]> git.openstreetmap.org Git - chef.git/commitdiff
Qualify property names
authorTom Hughes <tom@compton.nu>
Mon, 27 Nov 2017 15:20:13 +0000 (15:20 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 27 Nov 2017 15:20:13 +0000 (15:20 +0000)
cookbooks/python/resources/package.rb
cookbooks/web/resources/rails_port.rb

index e2cab899ae5630f909ce6d1798e800a6c3ca123e..7dddd17afdb2caefef201557788acfc4c4089939 100644 (file)
@@ -24,7 +24,7 @@ property :version, :kind_of => String
 property :python_version, :kind_of => String
 
 action :install do
-  if version.nil?
+  if new_resource.version.nil?
     execute "pip-install-#{new_resource.package_name}" do
       command "#{pip_command} install #{new_resource.package_name}"
       not_if "#{pip_command} show #{new_resource.package_name}"
index 56fd163c3ea195cd84bc7c9438a5e7991309ab03..d7f2e012da8d528510b932175a8777227bbf58b9 100644 (file)
@@ -147,7 +147,7 @@ action :create do
 
   application_yml = edit_file "#{rails_directory}/config/example.application.yml" do |line|
     line.gsub!(/^( *)server_protocol:.*$/, "\\1server_protocol: \"https\"")
-    line.gsub!(/^( *)server_url:.*$/, "\\1server_url: \"#{name}\"")
+    line.gsub!(/^( *)server_url:.*$/, "\\1server_url: \"#{new_resource.site}\"")
 
     line.gsub!(/^( *)#publisher_url:.*$/, "\\1publisher_url: \"https://plus.google.com/111953119785824514010\"")
 
@@ -159,7 +159,7 @@ action :create do
 
     line.gsub!(/^( *)email_return_path:.*$/, "\\1email_return_path: \"bounces@openstreetmap.org\"")
 
-    line.gsub!(/^( *)status:.*$/, "\\1status: :#{status}")
+    line.gsub!(/^( *)status:.*$/, "\\1status: :#{new_resource.status}")
 
     if new_resource.messages_domain
       line.gsub!(/^( *)#messages_domain:.*$/, "\\1messages_domain: \"#{new_resource.messages_domain}\"")
@@ -352,7 +352,7 @@ action :create do
     only_if { ::File.exist?("/usr/bin/passenger-config") }
   end
 
-  template "/etc/cron.daily/rails-#{name.tr('.', '-')}" do
+  template "/etc/cron.daily/rails-#{new_resource.site.tr('.', '-')}" do
     cookbook "web"
     source "rails.cron.erb"
     owner "root"