summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:45:01 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:45:01 -0700
commit36075b93536da78cd50ffe4eebe1ae4613a04ec9 (patch)
treee1bcee57a98e1e7cd7f43edc401f6bd1b1c07e14 /lib/chef
parentd7478e406d0bdcc15c8122fb7b4e39ad3208c9ac (diff)
downloadchef-36075b93536da78cd50ffe4eebe1ae4613a04ec9.tar.gz
Layout/MultilineMethodCallIndentation
Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb4
-rw-r--r--lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb4
-rw-r--r--lib/chef/provider/package/windows/exe.rb4
-rw-r--r--lib/chef/provider/package/windows/msi.rb2
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb
index 6b0cb4630a..b74f76cab3 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -544,8 +544,8 @@ class Chef
result = with_entry([ path[0] ]) do |entry|
# list /cookbooks/name = filter /cookbooks/name-version down to name
entry.children.map { |child| split_name_version(child.name) }
- .select { |name, version| name == path[1] }
- .map { |name, version| version }
+ .select { |name, version| name == path[1] }
+ .map { |name, version| version }
end
if result.empty?
raise ChefZero::DataStore::DataNotFoundError.new(path)
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb
index 7a0dc80f79..a68277d567 100644
--- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb
+++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb
@@ -53,8 +53,8 @@ class Chef
def children
entries = Dir.entries(file_path).sort
- .map { |child_name| make_child_entry(child_name) }
- .select { |child| child && can_have_child?(child.name, child.dir?) }
+ .map { |child_name| make_child_entry(child_name) }
+ .select { |child| child && can_have_child?(child.name, child.dir?) }
entries.select { |entry| !(entry.dir? && entry.children.size == 0 ) }
rescue Errno::ENOENT
raise Chef::ChefFS::FileSystem::NotFoundError.new(self, $!)
diff --git a/lib/chef/provider/package/windows/exe.rb b/lib/chef/provider/package/windows/exe.rb
index 7663bf0ad4..c7460f938e 100644
--- a/lib/chef/provider/package/windows/exe.rb
+++ b/lib/chef/provider/package/windows/exe.rb
@@ -1,7 +1,7 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Author:: Matt Wrock <matt@mattwrock.com>
-# Copyright:: Copyright 2011-2016, Chef Software, Inc.
+# Copyright:: Copyright 2011-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -71,7 +71,7 @@ class Chef
def remove_package
uninstall_version = new_resource.version || current_installed_version
uninstall_entries.select { |entry| [uninstall_version].flatten.include?(entry.display_version) }
- .map(&:uninstall_string).uniq.each do |uninstall_string|
+ .map(&:uninstall_string).uniq.each do |uninstall_string|
logger.trace("Registry provided uninstall string for #{new_resource} is '#{uninstall_string}'")
shell_out!(uninstall_command(uninstall_string), timeout: new_resource.timeout, returns: new_resource.returns)
end
diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb
index c034d9d31b..0298ad17c5 100644
--- a/lib/chef/provider/package/windows/msi.rb
+++ b/lib/chef/provider/package/windows/msi.rb
@@ -81,7 +81,7 @@ class Chef
else
uninstall_version = new_resource.version || installed_version
uninstall_entries.select { |entry| [uninstall_version].flatten.include?(entry.display_version) }
- .map(&:uninstall_string).uniq.each do |uninstall_string|
+ .map(&:uninstall_string).uniq.each do |uninstall_string|
uninstall_string = "msiexec /x #{uninstall_string.match(/{.*}/)}"
uninstall_string += expand_options(new_resource.options)
uninstall_string += " /q" unless uninstall_string.downcase =~ / \/q/