From: Tom Hughes Date: Tue, 11 Sep 2018 21:11:05 +0000 (+0100) Subject: Fix new rubocop warnings X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/47359d65933cc5a855cf232d7bdcd09e9945190f?ds=sidebyside Fix new rubocop warnings --- diff --git a/cookbooks/chef/libraries/subversion.rb b/cookbooks/chef/libraries/subversion.rb index dec188cec..cbcce026a 100644 --- a/cookbooks/chef/libraries/subversion.rb +++ b/cookbooks/chef/libraries/subversion.rb @@ -29,6 +29,7 @@ class Chef @repo_attrs ||= svn_info.lines.each_with_object({}) do |line, attrs| next unless line =~ SVN_INFO_PATTERN + property = Regexp.last_match[1] value = Regexp.last_match[2] attrs[property] = value diff --git a/cookbooks/foundation/recipes/board.rb b/cookbooks/foundation/recipes/board.rb index cf41dcb48..fb9414416 100644 --- a/cookbooks/foundation/recipes/board.rb +++ b/cookbooks/foundation/recipes/board.rb @@ -33,7 +33,7 @@ mediawiki_site "board.osmfoundation.org" do email_contact "webmaster@openstreetmap.org" email_sender "webmaster@openstreetmap.org" email_sender_name "OSMF Board Wiki" - private true + private_site true recaptcha_public_key "6LflIQATAAAAAMXyDWpba-FgipVzE-aGF4HIR59N" recaptcha_private_key passwords["board"]["recaptcha"] end diff --git a/cookbooks/foundation/recipes/dwg.rb b/cookbooks/foundation/recipes/dwg.rb index cb2cca105..5df9442ee 100644 --- a/cookbooks/foundation/recipes/dwg.rb +++ b/cookbooks/foundation/recipes/dwg.rb @@ -33,7 +33,7 @@ mediawiki_site "dwg.osmfoundation.org" do email_contact "webmaster@openstreetmap.org" email_sender "webmaster@openstreetmap.org" email_sender_name "OSMF Board Wiki" - private true + private_site true recaptcha_public_key "6LflIQATAAAAAMXyDWpba-FgipVzE-aGF4HIR59N" recaptcha_private_key passwords["dwg"]["recaptcha"] end diff --git a/cookbooks/mediawiki/resources/site.rb b/cookbooks/mediawiki/resources/site.rb index 418108384..1174aed31 100644 --- a/cookbooks/mediawiki/resources/site.rb +++ b/cookbooks/mediawiki/resources/site.rb @@ -39,7 +39,7 @@ property :site_readonly, :kind_of => [String, TrueClass, FalseClass], :default = property :admin_user, :kind_of => String, :default => "Admin" property :admin_password, :kind_of => String, :required => true property :private_accounts, :kind_of => [TrueClass, FalseClass], :default => false -property :private, :kind_of => [TrueClass, FalseClass], :default => false +property :private_site, :kind_of => [TrueClass, FalseClass], :default => false property :recaptcha_public_key, :kind_of => String property :recaptcha_private_key, :kind_of => String property :extra_file_extensions, :kind_of => [String, Array], :default => [] @@ -217,7 +217,7 @@ action :create do update_site false end - if new_resource.private_accounts || new_resource.private + if new_resource.private_accounts || new_resource.private_site mediawiki_extension "ConfirmEdit" do site new_resource.site update_site false @@ -472,7 +472,7 @@ action :create do template "apache.erb" directory site_directory variables :aliases => Array(new_resource.aliases), - :private => new_resource.private + :private => new_resource.private_site reload_apache false end @@ -563,7 +563,7 @@ action_class do :site_readonly => new_resource.site_readonly, :extra_file_extensions => new_resource.extra_file_extensions, :private_accounts => new_resource.private_accounts, - :private => new_resource.private + :private_site => new_resource.private_site } end end diff --git a/cookbooks/tilecache/attributes/default.rb b/cookbooks/tilecache/attributes/default.rb index 6ef75527e..a552ee6fc 100644 --- a/cookbooks/tilecache/attributes/default.rb +++ b/cookbooks/tilecache/attributes/default.rb @@ -1,4 +1,3 @@ - default[:tilecache][:tile_parent] = "render.openstreetmap.org" default[:tilecache][:tile_siblings] = [] diff --git a/cookbooks/tilelog/attributes/default.rb b/cookbooks/tilelog/attributes/default.rb index d07a287bf..3846951a5 100644 --- a/cookbooks/tilelog/attributes/default.rb +++ b/cookbooks/tilelog/attributes/default.rb @@ -1,4 +1,3 @@ - default[:tilelog][:source_directory] = "/opt/tilelog" default[:tilelog][:input_directory] = "/store/logs/tile.openstreetmap.org" default[:tilelog][:output_directory] = "/store/planet/tile_logs" diff --git a/cookbooks/wiki/attributes/default.rb b/cookbooks/wiki/attributes/default.rb index 1d73d9ff0..0cde6a313 100644 --- a/cookbooks/wiki/attributes/default.rb +++ b/cookbooks/wiki/attributes/default.rb @@ -1,3 +1,2 @@ - # Force apache to listen only on localhost # default[:apache][:listen_address] = "127.0.0.1"