X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2b922e7ee506a1627d84e7c5de7a669ef13eccc6..d9fa88b9a3e164150d60ed750c13df4a342d6de9:/cookbooks/web/resources/rails_port.rb diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 200f39514..f01884805 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -20,6 +20,7 @@ require "yaml" resource_name :rails_port +provides :rails_port default_action :create @@ -79,6 +80,7 @@ action :create do imagemagick nodejs geoip-database + tzdata ] package %w[ @@ -108,7 +110,7 @@ action :create do gem_package "bundler#{new_resource.ruby}" do package_name "bundler" - version "1.16.2" + version "2.1.4" gem_binary "gem#{new_resource.ruby}" options "--format-executable" end @@ -121,13 +123,14 @@ action :create do declare_resource :directory, rails_directory do owner new_resource.user group new_resource.group - mode 0o2775 + mode "2775" end git rails_directory do action :sync repository new_resource.repository revision new_resource.revision + depth 1 user new_resource.user group new_resource.group notifies :run, "execute[#{rails_directory}/Gemfile]" @@ -152,7 +155,7 @@ action :create do source "database.yml.erb" owner new_resource.user group new_resource.group - mode 0o664 + mode "664" variables :host => new_resource.database_host, :port => new_resource.database_port, :name => new_resource.database_name, @@ -278,7 +281,7 @@ action :create do path "#{rails_directory}/config/application.yml" owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content application_yml notifies :run, "execute[#{rails_directory}/public/assets]" only_if { ::File.exist?("#{rails_directory}/config/example.application.yml") } @@ -343,7 +346,7 @@ action :create do file "#{rails_directory}/config/settings.local.yml" do owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content YAML.dump(settings) notifies :run, "execute[#{rails_directory}/public/assets]" only_if { ::File.exist?("#{rails_directory}/config/settings.yml") } @@ -359,7 +362,7 @@ action :create do file "#{rails_directory}/config/storage.yml" do owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content YAML.dump(storage_configuration) notifies :run, "execute[#{rails_directory}/public/assets]" end @@ -368,7 +371,7 @@ action :create do file "#{rails_directory}/config/piwik.yml" do owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content YAML.dump(new_resource.piwik_configuration) notifies :run, "execute[#{rails_directory}/public/assets]" end @@ -435,7 +438,7 @@ action :create do source "rails.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :directory => rails_directory end end