diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:21:00 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:21:00 -0800 |
commit | 3d8fa81ee7cc6fce3449b74c69023e206dd53991 (patch) | |
tree | efd9bdc2d4ec875c8d9ed12113e2ab00d2cfe68a /lib | |
parent | cb4ee84e418164e8d2e85147efad711a42ff2799 (diff) | |
download | chef-3d8fa81ee7cc6fce3449b74c69023e206dd53991.tar.gz |
autofixing some missed cops
second round of autofixing for some reason...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/application/client.rb | 8 | ||||
-rw-r--r-- | lib/chef/application/solo.rb | 4 | ||||
-rw-r--r-- | lib/chef/chef_fs/data_handler/data_handler_base.rb | 2 | ||||
-rw-r--r-- | lib/chef/monkey_patches/webrick-utils.rb | 2 | ||||
-rw-r--r-- | lib/chef/node/attribute.rb | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index a3cac2782a..1f232c651d 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -188,9 +188,9 @@ class Chef::Application::Client < Chef::Application :short => "-o RunlistItem,RunlistItem...", :long => "--override-runlist RunlistItem,RunlistItem...", :description => "Replace current run list with specified items for a single run", - :proc => lambda{|items| + :proc => lambda {|items| items = items.split(",") - items.compact.map{|item| + items.compact.map {|item| Chef::RunList::RunListItem.new(item) } } @@ -199,9 +199,9 @@ class Chef::Application::Client < Chef::Application :short => "-r RunlistItem,RunlistItem...", :long => "--runlist RunlistItem,RunlistItem...", :description => "Permanently replace current run list with specified items", - :proc => lambda{|items| + :proc => lambda {|items| items = items.split(",") - items.compact.map{|item| + items.compact.map {|item| Chef::RunList::RunListItem.new(item) } } diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index dbf843125e..26bd6ba52e 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -152,9 +152,9 @@ class Chef::Application::Solo < Chef::Application :short => "-o RunlistItem,RunlistItem...", :long => "--override-runlist RunlistItem,RunlistItem...", :description => "Replace current run list with specified items", - :proc => lambda{|items| + :proc => lambda {|items| items = items.split(",") - items.compact.map{|item| + items.compact.map {|item| Chef::RunList::RunListItem.new(item) } } diff --git a/lib/chef/chef_fs/data_handler/data_handler_base.rb b/lib/chef/chef_fs/data_handler/data_handler_base.rb index b8d0b7cd4f..83f56ed16d 100644 --- a/lib/chef/chef_fs/data_handler/data_handler_base.rb +++ b/lib/chef/chef_fs/data_handler/data_handler_base.rb @@ -94,7 +94,7 @@ class Chef # name to recipe[name]. Then calls uniq on the result. # def normalize_run_list(run_list) - run_list.map{|item| + run_list.map {|item| case item.to_s when /^recipe\[.*\]$/ item # explicit recipe diff --git a/lib/chef/monkey_patches/webrick-utils.rb b/lib/chef/monkey_patches/webrick-utils.rb index ff275a434d..71bed2bb74 100644 --- a/lib/chef/monkey_patches/webrick-utils.rb +++ b/lib/chef/monkey_patches/webrick-utils.rb @@ -31,7 +31,7 @@ module WEBrick Socket::AI_PASSIVE) # flag last_error = nil sockets = [] - res.each{|ai| + res.each {|ai| begin logger.debug("TCPServer.new(#{ai[3]}, #{port})") if logger sock = TCPServer.new(ai[3], port) diff --git a/lib/chef/node/attribute.rb b/lib/chef/node/attribute.rb index 13ce75455f..ab97cf99bf 100644 --- a/lib/chef/node/attribute.rb +++ b/lib/chef/node/attribute.rb @@ -480,7 +480,7 @@ class Chef end def inspect - "#<#{self.class} " << (COMPONENTS + [:@merged_attributes, :@properties]).map{|iv| + "#<#{self.class} " << (COMPONENTS + [:@merged_attributes, :@properties]).map {|iv| "#{iv}=#{instance_variable_get(iv).inspect}" }.join(", ") << ">" end |