From 9a3fee3b9f30028f6c0ee703dbf9ce86b4bab17b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 23 Nov 2013 12:59:16 +0000 Subject: [PATCH] Fix some foodcritic style warnings --- cookbooks/accounts/recipes/default.rb | 3 ++- cookbooks/apt/definitions/apt_source.rb | 2 +- cookbooks/dev/recipes/default.rb | 4 ++-- cookbooks/owl/recipes/default.rb | 2 +- cookbooks/tile/recipes/default.rb | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cookbooks/accounts/recipes/default.rb b/cookbooks/accounts/recipes/default.rb index fbf8991f4..50e3d375a 100644 --- a/cookbooks/accounts/recipes/default.rb +++ b/cookbooks/accounts/recipes/default.rb @@ -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 diff --git a/cookbooks/apt/definitions/apt_source.rb b/cookbooks/apt/definitions/apt_source.rb index 382f9cce4..cc847a01e 100644 --- a/cookbooks/apt/definitions/apt_source.rb +++ b/cookbooks/apt/definitions/apt_source.rb @@ -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] diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 29ce0c063..f8098faec 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -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 diff --git a/cookbooks/owl/recipes/default.rb b/cookbooks/owl/recipes/default.rb index a1868edcf..455a1cac3 100644 --- a/cookbooks/owl/recipes/default.rb +++ b/cookbooks/owl/recipes/default.rb @@ -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 diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index d2f36076f..8d3b2e8dc 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -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 -- 2.43.2