Install the rails asset cleanup script on dev
authorTom Hughes <tom@compton.nu>
Sat, 9 Jan 2016 10:52:35 +0000 (10:52 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 9 Jan 2016 10:52:35 +0000 (10:52 +0000)
cookbooks/dev/recipes/default.rb

index c31aca83b075830135b9139f64ced44c6ef2e0bc..a574324119d49ff0f461f9c61d21581d56ba7ce4 100644 (file)
@@ -135,11 +135,19 @@ search(:accounts, "*:*").each do |account|
   end
 end
 
   end
 end
 
-if node[:postgresql][:clusters][:"9.1/main"]
+if node[:postgresql][:clusters][:"9.3/main"]
   postgresql_user "apis" do
     cluster "9.3/main"
   end
 
   postgresql_user "apis" do
     cluster "9.3/main"
   end
 
+  template "/usr/local/bin/cleanup-rails-assets" do
+    cookbook "web"
+    source "cleanup-assets.erb"
+    owner "root"
+    group "root"
+    mode 0755
+  end
+
   node[:dev][:rails].each do |name, details|
     database_name = details[:database] || "apis_#{name}"
     site_name = "#{name}.apis.dev.openstreetmap.org"
   node[:dev][:rails].each do |name, details|
     database_name = details[:database] || "apis_#{name}"
     site_name = "#{name}.apis.dev.openstreetmap.org"