Fix some foodcritic style warnings
authorTom Hughes <tom@compton.nu>
Sat, 23 Nov 2013 12:59:16 +0000 (12:59 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 23 Nov 2013 12:59:16 +0000 (12:59 +0000)
cookbooks/accounts/recipes/default.rb
cookbooks/apt/definitions/apt_source.rb
cookbooks/dev/recipes/default.rb
cookbooks/owl/recipes/default.rb
cookbooks/tile/recipes/default.rb

index fbf8991..50e3d37 100644 (file)
@@ -59,7 +59,8 @@ search(:accounts, "*:*").each do |account|
       supports :manage_home => manage_home
     end
 
-    remote_directory user_home do
+    remote_directory "/home/#{name}" do
+      path user_home
       source name.to_s
       owner name.to_s
       group name.to_s
index 382f9cc..cc847a0 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 define :apt_source do
-  if node.apt.sources.include?(params[:name])
+  if node[:apt][:sources].include?(params[:name])
     source_action = :create
 
     if params[:key]
index 29ce0c0..f8098fa 100644 (file)
@@ -129,7 +129,7 @@ search(:accounts, "*:*").each do |account|
   end
 end
 
-if node[:postgresql][:clusters]["9.1/main"]
+if node[:postgresql][:clusters][:"9.1/main"]
   postgresql_user "apis" do
     cluster "9.1/main"
   end
@@ -158,7 +158,7 @@ if node[:postgresql][:clusters]["9.1/main"]
       group "apis"
       repository details[:repository]
       revision details[:revision]
-      database_port node[:postgresql][:clusters]["9.1/main"][:port]
+      database_port node[:postgresql][:clusters][:"9.1/main"][:port]
       database_name database_name
       database_username "apis"
       run_migrations true
index a1868ed..455a1ca 100644 (file)
@@ -125,7 +125,7 @@ template "/srv/owl.openstreetmap.org/openstreetmap-watch-list/rails/config/datab
   group "owl"
   mode 0664
   notifies :run, "execute[/srv/owl.openstreetmap.org/openstreetmap-watch-list/rails/Gemfile]"
-  only_if { node[:postgresql][:clusters]["9.1/main"] }
+  only_if { node[:postgresql][:clusters][:"9.1/main"] }
 end
 
 apache_site "owl.openstreetmap.org" do
index d2f3607..8d3b2e8 100644 (file)
@@ -374,8 +374,8 @@ postgresql_munin "gis" do
   database "gis"
 end
 
-tile_uid = node[:etc][:passwd]["tile"][:uid]
-www_data_gid = node[:etc][:group]["www-data"][:gid]
+tile_uid = node[:etc][:passwd][:"tile"][:uid]
+www_data_gid = node[:etc][:group][:"www-data"][:gid]
 
 ruby_block node[:tile][:node_file] do
   block do