summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-19 09:28:33 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-19 09:28:33 -0800
commit92bec4bb96d857f027068fc56af46c76c484fd50 (patch)
tree2cffea3fc9466d0c5e2baa7cc7630abb0ed7aecb /lib/chef/provider
parent6077b99f6ad1bc9a082f575f3818e69f05d8c8dc (diff)
downloadchef-92bec4bb96d857f027068fc56af46c76c484fd50.tar.gz
flip multiline function arguments aroundlcg/rubocop-0.37.2
no enforced trailing comma on arguments...
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/dsc_resource.rb6
-rw-r--r--lib/chef/provider/execute.rb2
-rw-r--r--lib/chef/provider/http_request.rb10
-rw-r--r--lib/chef/provider/ifconfig.rb8
-rw-r--r--lib/chef/provider/link.rb2
-rw-r--r--lib/chef/provider/osx_profile.rb14
-rw-r--r--lib/chef/provider/package/chocolatey.rb4
-rw-r--r--lib/chef/provider/reboot.rb2
-rw-r--r--lib/chef/provider/service/gentoo.rb2
-rw-r--r--lib/chef/provider/service/macosx.rb4
-rw-r--r--lib/chef/provider/service/windows.rb2
-rw-r--r--lib/chef/provider/user/dscl.rb4
12 files changed, 30 insertions, 30 deletions
diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb
index eac8a829bd..be752f269f 100644
--- a/lib/chef/provider/dsc_resource.rb
+++ b/lib/chef/provider/dsc_resource.rb
@@ -72,7 +72,7 @@ class Chef
def local_configuration_manager
@local_configuration_manager ||= Chef::Util::DSC::LocalConfigurationManager.new(
node,
- nil,
+ nil
)
end
@@ -158,7 +158,7 @@ class Chef
cmdlet = Chef::Util::Powershell::Cmdlet.new(
node,
"Invoke-DscResource #{switches}",
- output_format,
+ output_format
)
cmdlet.run!({}, { :timeout => new_resource.timeout })
end
@@ -176,7 +176,7 @@ class Chef
def create_reboot_resource
@reboot_resource = Chef::Resource::Reboot.new(
"Reboot for #{@new_resource.name}",
- run_context,
+ run_context
).tap do |r|
r.reason("Reboot for #{@new_resource.resource}.")
end
diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb
index 4e7d8e1454..45f0ad5488 100644
--- a/lib/chef/provider/execute.rb
+++ b/lib/chef/provider/execute.rb
@@ -117,7 +117,7 @@ class Chef
def sentinel_file
Pathname.new(Chef::Util::PathHelper.cleanpath(
- ( cwd && creates_relative? ) ? ::File.join(cwd, creates) : creates,
+ ( cwd && creates_relative? ) ? ::File.join(cwd, creates) : creates
))
end
end
diff --git a/lib/chef/provider/http_request.rb b/lib/chef/provider/http_request.rb
index b52368f472..e1ee01d9b4 100644
--- a/lib/chef/provider/http_request.rb
+++ b/lib/chef/provider/http_request.rb
@@ -42,7 +42,7 @@ class Chef
# and false for a "304 Not Modified" response
modified = @http.head(
"#{@new_resource.url}",
- @new_resource.headers,
+ @new_resource.headers
)
Chef::Log.info("#{@new_resource} HEAD to #{@new_resource.url} successful")
Chef::Log.debug("#{@new_resource} HEAD request response: #{modified}")
@@ -59,7 +59,7 @@ class Chef
message = check_message(@new_resource.message)
body = @http.get(
"#{@new_resource.url}",
- @new_resource.headers,
+ @new_resource.headers
)
Chef::Log.info("#{@new_resource} GET to #{@new_resource.url} successful")
Chef::Log.debug("#{@new_resource} GET request response: #{body}")
@@ -73,7 +73,7 @@ class Chef
body = @http.put(
"#{@new_resource.url}",
message,
- @new_resource.headers,
+ @new_resource.headers
)
Chef::Log.info("#{@new_resource} PUT to #{@new_resource.url} successful")
Chef::Log.debug("#{@new_resource} PUT request response: #{body}")
@@ -87,7 +87,7 @@ class Chef
body = @http.post(
"#{@new_resource.url}",
message,
- @new_resource.headers,
+ @new_resource.headers
)
Chef::Log.info("#{@new_resource} POST to #{@new_resource.url} message: #{message.inspect} successful")
Chef::Log.debug("#{@new_resource} POST request response: #{body}")
@@ -99,7 +99,7 @@ class Chef
converge_by("#{@new_resource} DELETE to #{@new_resource.url}") do
body = @http.delete(
"#{@new_resource.url}",
- @new_resource.headers,
+ @new_resource.headers
)
@new_resource.updated_by_last_action(true)
Chef::Log.info("#{@new_resource} DELETE to #{@new_resource.url} successful")
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb
index d00d5cd155..e73869d829 100644
--- a/lib/chef/provider/ifconfig.rb
+++ b/lib/chef/provider/ifconfig.rb
@@ -109,7 +109,7 @@ class Chef
command = add_command
converge_by ("run #{command} to add #{@new_resource}") do
run_command(
- :command => command,
+ :command => command
)
Chef::Log.info("#{@new_resource} added")
end
@@ -127,7 +127,7 @@ class Chef
command = enable_command
converge_by ("run #{command} to enable #{@new_resource}") do
run_command(
- :command => command,
+ :command => command
)
Chef::Log.info("#{@new_resource} enabled")
end
@@ -141,7 +141,7 @@ class Chef
command = delete_command
converge_by ("run #{command} to delete #{@new_resource}") do
run_command(
- :command => command,
+ :command => command
)
Chef::Log.info("#{@new_resource} deleted")
end
@@ -158,7 +158,7 @@ class Chef
command = disable_command
converge_by ("run #{command} to disable #{@new_resource}") do
run_command(
- :command => command,
+ :command => command
)
Chef::Log.info("#{@new_resource} disabled")
end
diff --git a/lib/chef/provider/link.rb b/lib/chef/provider/link.rb
index 85c46ada98..d184094bbb 100644
--- a/lib/chef/provider/link.rb
+++ b/lib/chef/provider/link.rb
@@ -52,7 +52,7 @@ class Chef
if file_class.symlink?(@current_resource.target_file)
@current_resource.link_type(:symbolic)
@current_resource.to(
- canonicalize(file_class.readlink(@current_resource.target_file)),
+ canonicalize(file_class.readlink(@current_resource.target_file))
)
else
@current_resource.link_type(:hard)
diff --git a/lib/chef/provider/osx_profile.rb b/lib/chef/provider/osx_profile.rb
index f232dede83..3e37cbc9a5 100644
--- a/lib/chef/provider/osx_profile.rb
+++ b/lib/chef/provider/osx_profile.rb
@@ -40,7 +40,7 @@ class Chef
all_profiles = get_installed_profiles
@new_resource.profile(
@new_resource.profile ||
- @new_resource.profile_name,
+ @new_resource.profile_name
)
@new_profile_hash = get_profile_hash(@new_resource.profile)
@@ -141,7 +141,7 @@ class Chef
def get_cache_dir
cache_dir = Chef::FileCache.create_cache_path(
- "profiles/#{@new_resource.cookbook_name}",
+ "profiles/#{@new_resource.cookbook_name}"
)
end
@@ -150,15 +150,15 @@ class Chef
::File.join(
"profiles",
@new_resource.cookbook_name,
- ::File.dirname(cookbook_file),
- ),
+ ::File.dirname(cookbook_file)
+ )
)
remote_file = Chef::Resource::CookbookFile.new(
::File.join(
get_cache_dir,
- "#{cookbook_file}.remote",
+ "#{cookbook_file}.remote"
),
- run_context,
+ run_context
)
remote_file.cookbook_name = @new_resource.cookbook_name
remote_file.source(cookbook_file)
@@ -179,7 +179,7 @@ class Chef
# Make a UUID of the profile contents and return as string
UUIDTools::UUID.sha1_create(
UUIDTools::UUID_DNS_NAMESPACE,
- profile.to_s,
+ profile.to_s
).to_s
end
diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb
index ad4db0c4e6..6804e99a13 100644
--- a/lib/chef/provider/package/chocolatey.rb
+++ b/lib/chef/provider/package/chocolatey.rb
@@ -155,14 +155,14 @@ EOS
@choco_exe ||= ::File.join(
choco_install_path,
"bin",
- "choco.exe",
+ "choco.exe"
)
end
# lets us mock out an incorrect value for testing.
def choco_install_path
@choco_install_path ||= powershell_out!(
- PATHFINDING_POWERSHELL_COMMAND,
+ PATHFINDING_POWERSHELL_COMMAND
).stdout.chomp
end
diff --git a/lib/chef/provider/reboot.rb b/lib/chef/provider/reboot.rb
index 11039f8701..34eee9236d 100644
--- a/lib/chef/provider/reboot.rb
+++ b/lib/chef/provider/reboot.rb
@@ -40,7 +40,7 @@ class Chef
:delay_mins => @new_resource.delay_mins,
:reason => @new_resource.reason,
:timestamp => Time.now,
- :requested_by => @new_resource.name,
+ :requested_by => @new_resource.name
)
end
diff --git a/lib/chef/provider/service/gentoo.rb b/lib/chef/provider/service/gentoo.rb
index 1bfd46ef14..66f2f10f23 100644
--- a/lib/chef/provider/service/gentoo.rb
+++ b/lib/chef/provider/service/gentoo.rb
@@ -39,7 +39,7 @@ class Chef::Provider::Service::Gentoo < Chef::Provider::Service::Init
readable = ::File.readable? file
Chef::Log.debug "#{@new_resource} exists: #{exists}, readable: #{readable}"
exists and readable
- end,
+ end
)
Chef::Log.debug "#{@new_resource} enabled: #{@current_resource.enabled}"
diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb
index cdd5d934ff..63485903c3 100644
--- a/lib/chef/provider/service/macosx.rb
+++ b/lib/chef/provider/service/macosx.rb
@@ -224,7 +224,7 @@ class Chef
# plist files can come in XML or Binary formats. this command
# will make sure we get XML every time.
plist_xml = shell_out_with_systems_locale!(
- "plutil -convert xml1 -o - #{@plist}",
+ "plutil -convert xml1 -o - #{@plist}"
).stdout
plist_doc = REXML::Document.new(plist_xml)
@@ -236,7 +236,7 @@ class Chef
plists = PLIST_DIRS.inject([]) do |results, dir|
edir = ::File.expand_path(dir)
entries = Dir.glob(
- "#{edir}/*#{Chef::Util::PathHelper.escape_glob(@current_resource.service_name)}*.plist",
+ "#{edir}/*#{Chef::Util::PathHelper.escape_glob(@current_resource.service_name)}*.plist"
)
entries.any? ? results << entries : results
end
diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb
index 2705aa5c02..9bfd9238cd 100644
--- a/lib/chef/provider/service/windows.rb
+++ b/lib/chef/provider/service/windows.rb
@@ -306,7 +306,7 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service
Chef::Log.debug "#{@new_resource.name} setting start_type to #{type}"
Win32::Service.configure(
:service_name => @new_resource.service_name,
- :start_type => allowed_types[type],
+ :start_type => allowed_types[type]
)
@new_resource.updated_by_last_action(true)
end
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb
index 1659e324c0..fecfb73e2d 100644
--- a/lib/chef/provider/user/dscl.rb
+++ b/lib/chef/provider/user/dscl.rb
@@ -415,7 +415,7 @@ user password using shadow hash.")
salt,
iterations,
128,
- OpenSSL::Digest::SHA512.new,
+ OpenSSL::Digest::SHA512.new
)
end
@@ -700,7 +700,7 @@ user password using shadow hash.")
salt,
current_resource.iterations,
128,
- OpenSSL::Digest::SHA512.new,
+ OpenSSL::Digest::SHA512.new
).unpack("H*").first == current_resource.password
end