From a47f584b577cfdd21c7b3a74ddfd04ef3d2c29c9 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 30 May 2016 10:10:41 +0100 Subject: [PATCH] Fix rubocop and foodcritic complaints --- cookbooks/imagery/recipes/gb_os_sv.rb | 2 +- cookbooks/nginx/recipes/default.rb | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/cookbooks/imagery/recipes/gb_os_sv.rb b/cookbooks/imagery/recipes/gb_os_sv.rb index 7711fd2ac..fd9185329 100644 --- a/cookbooks/imagery/recipes/gb_os_sv.rb +++ b/cookbooks/imagery/recipes/gb_os_sv.rb @@ -166,5 +166,5 @@ imagery_layer "gb_os_sv_2016_04" do copyright "Contains Ordnance Survey data © Crown copyright and database right 2015" background_colour "230 246 255" # OSSV Water Blue extension "os_sv_png" - url_aliases [ "/sv-2016-04", "/sv" ] # Add "/sv" to current edition for backward compatibility + url_aliases ["/sv-2016-04", "/sv"] # Add "/sv" to current edition for backward compatibility end diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index 54a9b7524..bd104f676 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -28,20 +28,18 @@ template "/etc/nginx/nginx.conf" do mode 0644 end -if node['nginx']['cache']['fastcgi']['enable'] - directory "/var/cache/nginx/fastcgi-cache" do - owner "www-data" - group "root" - mode 0755 - end +directory "/var/cache/nginx/fastcgi-cache" do + owner "www-data" + group "root" + mode 0755 + only_if { node[:nginx][:cache][:fastcgi][:enable] } end -if node['nginx']['cache']['proxy']['enable'] - directory "/var/cache/nginx/proxy-cache" do - owner "www-data" - group "root" - mode 0755 - end +directory "/var/cache/nginx/proxy-cache" do + owner "www-data" + group "root" + mode 0755 + only_if { node[:nginx][:cache][:proxy][:enable] } end service "nginx" do -- 2.39.5