]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/resources/rails_port.rb
Enable unified mode for custom resources
[chef.git] / cookbooks / web / resources / rails_port.rb
index ba3f06aaade7928d232a54b74a0a6e9e038c207a..e0c9cad9177b028b4dddf27fea4d2f508b460ff9 100644 (file)
@@ -22,6 +22,8 @@ require "yaml"
 resource_name :rails_port
 provides :rails_port
 
+unified_mode true
+
 default_action :create
 
 property :site, String, :name_property => true
@@ -322,7 +324,7 @@ action :create do
     "storage_service",
     "storage_url",
     "tile_cdn_url"
-  ).reject { |_k, v| v.nil? }.merge(
+  ).compact.merge(
     "server_protocol" => "https",
     "server_url" => new_resource.site,
     "support_email" => "support@openstreetmap.org",
@@ -448,6 +450,7 @@ action :create do
   file "#{rails_directory}/public/export/embed.html" do
     action :nothing
     subscribes :delete, "git[#{rails_directory}]"
+    subscribes :delete, "file[#{rails_directory}/config/settings.local.yml]"
   end
 
   passenger_application rails_directory do