diff options
| author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-10-20 16:10:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-20 16:10:27 -0700 |
| commit | 25f10d325947b5bbbb4c4dd358d2bb1c7f34f437 (patch) | |
| tree | 5495cf129c2d992d1e425a03ecbdf48fb1de2f7d /lib | |
| parent | 19824570589fecad10fcad01c2c9c6be834cc286 (diff) | |
| parent | d0dbda11796e819d4a640f9ee58d5a308a109a19 (diff) | |
| download | chef-25f10d325947b5bbbb4c4dd358d2bb1c7f34f437.tar.gz | |
Merge pull request #5479 from chef/lcg/rubocop-0.44.1
fixes for rubocop 0.44.1 engine
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/chef/application/client.rb | 4 | ||||
| -rw-r--r-- | lib/chef/application/solo.rb | 2 | ||||
| -rw-r--r-- | lib/chef/provider/package/windows/exe.rb | 7 | ||||
| -rw-r--r-- | lib/chef/provider/package/windows/msi.rb | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index cbaa494b71..000aff905b 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -202,7 +202,7 @@ 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 do |item| Chef::RunList::RunListItem.new(item) @@ -213,7 +213,7 @@ 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 do |item| Chef::RunList::RunListItem.new(item) diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index 446a0f007d..1481338a9c 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -166,7 +166,7 @@ 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 do |item| Chef::RunList::RunListItem.new(item) diff --git a/lib/chef/provider/package/windows/exe.rb b/lib/chef/provider/package/windows/exe.rb index 44a2f19d1e..60065d9019 100644 --- a/lib/chef/provider/package/windows/exe.rb +++ b/lib/chef/provider/package/windows/exe.rb @@ -89,9 +89,10 @@ class Chef end def current_installed_version - @current_installed_version ||= uninstall_entries.count == 0 ? nil : begin - uninstall_entries.map { |entry| entry.display_version }.uniq - end + @current_installed_version ||= + if uninstall_entries.count != 0 + uninstall_entries.map { |entry| entry.display_version }.uniq + end end # http://unattended.sourceforge.net/installers.php diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb index ac771688e7..96c6728ef4 100644 --- a/lib/chef/provider/package/windows/msi.rb +++ b/lib/chef/provider/package/windows/msi.rb @@ -50,7 +50,7 @@ class Chef Chef::Log.debug("#{new_resource} checking package status and version for #{product_code}") get_installed_version(product_code) else - uninstall_entries.count == 0 ? nil : begin + if uninstall_entries.count != 0 uninstall_entries.map { |entry| entry.display_version }.uniq end end |
