diff options
author | Thom May <thom@may.lt> | 2016-01-14 13:58:57 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-01-14 13:58:57 +0000 |
commit | 05064423057d4cf46f4713b81b08829cf6d20af6 (patch) | |
tree | acbf46b849ad87e9248bfe8616a1d846bd5264e0 /lib/chef/provider | |
parent | c05928361f871468634857fc4220ae08bf26dfab (diff) | |
parent | af4afcc712d24dbc85a9c020a124acadeed295d2 (diff) | |
download | chef-05064423057d4cf46f4713b81b08829cf6d20af6.tar.gz |
Merge pull request #4398 from chef/lcg/trailing_comma
autocorrecting Style/TrailingComma
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/dsc_resource.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/dsc_script.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/file.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/http_request.rb | 10 | ||||
-rw-r--r-- | lib/chef/provider/ifconfig.rb | 8 | ||||
-rw-r--r-- | lib/chef/provider/osx_profile.rb | 8 | ||||
-rw-r--r-- | lib/chef/provider/package/chocolatey.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/windows/exe.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/package/windows/registry_uninstall_entry.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/powershell_script.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/reboot.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/windows.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/user/dscl.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/user/pw.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/user/windows.rb | 2 |
15 files changed, 32 insertions, 32 deletions
diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb index 432fe3987f..3095ff63e0 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 @@ -152,7 +152,7 @@ class Chef cmdlet = Chef::Util::Powershell::Cmdlet.new( node, "Invoke-DscResource #{switches}", - output_format + output_format, ) cmdlet.run!({}, {:timeout => new_resource.timeout}) end @@ -170,7 +170,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/dsc_script.rb b/lib/chef/provider/dsc_script.rb index 8205910d5a..ea47ff22b3 100644 --- a/lib/chef/provider/dsc_script.rb +++ b/lib/chef/provider/dsc_script.rb @@ -92,7 +92,7 @@ class Chef shellout_flags = { :cwd => @dsc_resource.cwd, :environment => @dsc_resource.environment, - :timeout => @dsc_resource.timeout + :timeout => @dsc_resource.timeout, } begin @@ -119,7 +119,7 @@ class Chef shellout_flags = { :cwd => @dsc_resource.cwd, :environment => @dsc_resource.environment, - :timeout => @dsc_resource.timeout + :timeout => @dsc_resource.timeout, } generator = Chef::Util::DSC::ConfigurationGenerator.new(@run_context.node, config_directory) diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index 4d9f07d2b2..85bc2d98be 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -246,7 +246,7 @@ class Chef else [ Chef::Exceptions::FileTypeMismatch, "File #{path} exists, but is a #{file_type_string(@new_resource.path)}, set force_unlink to true to remove", - "Assuming #{file_type_string(@new_resource.path)} at #{@new_resource.path} would have been removed by a previous resource" + "Assuming #{file_type_string(@new_resource.path)} at #{@new_resource.path} would have been removed by a previous resource", ] end end @@ -267,7 +267,7 @@ class Chef [ Chef::Exceptions::FileTypeMismatch, "File #{path} exists, but is a symlink to #{real_path} which is a #{file_type_string(real_path)}. " + "Disable manage_symlink_source and set force_unlink to remove it.", - "Assuming symlink #{path} or source file #{real_path} would have been fixed by a previous resource" + "Assuming symlink #{path} or source file #{real_path} would have been fixed by a previous resource", ] end rescue Errno::ELOOP diff --git a/lib/chef/provider/http_request.rb b/lib/chef/provider/http_request.rb index 61aff434ed..dac62bc2f6 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 7869917307..9ec2533ac0 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/osx_profile.rb b/lib/chef/provider/osx_profile.rb index 085397efea..4b3e512480 100644 --- a/lib/chef/provider/osx_profile.rb +++ b/lib/chef/provider/osx_profile.rb @@ -148,15 +148,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) @@ -177,7 +177,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 7a9173e077..45e2a2fc84 100644 --- a/lib/chef/provider/package/chocolatey.rb +++ b/lib/chef/provider/package/chocolatey.rb @@ -142,7 +142,7 @@ class Chef "[System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')" ).stdout.chomp, 'bin', - 'choco.exe' + 'choco.exe', ) end diff --git a/lib/chef/provider/package/windows/exe.rb b/lib/chef/provider/package/windows/exe.rb index 8f6cd1efa5..f21106f2ff 100644 --- a/lib/chef/provider/package/windows/exe.rb +++ b/lib/chef/provider/package/windows/exe.rb @@ -61,7 +61,7 @@ class Chef "\"#{new_resource.source}\"", unattended_flags, expand_options(new_resource.options), - "& exit %%%%ERRORLEVEL%%%%" + "& exit %%%%ERRORLEVEL%%%%", ].join(" "), timeout: new_resource.timeout, returns: new_resource.returns ) end @@ -86,7 +86,7 @@ class Chef ::File.basename(uninstall_string), expand_options(new_resource.options), " ", - unattended_flags + unattended_flags, ].join %Q{start "" /wait #{uninstall_string} & exit %%%%ERRORLEVEL%%%%} end diff --git a/lib/chef/provider/package/windows/registry_uninstall_entry.rb b/lib/chef/provider/package/windows/registry_uninstall_entry.rb index a63e09c6bd..2c3f6ba093 100644 --- a/lib/chef/provider/package/windows/registry_uninstall_entry.rb +++ b/lib/chef/provider/package/windows/registry_uninstall_entry.rb @@ -31,7 +31,7 @@ class Chef [ [::Win32::Registry::HKEY_LOCAL_MACHINE, (::Win32::Registry::Constants::KEY_READ | 0x0100)], [::Win32::Registry::HKEY_LOCAL_MACHINE, (::Win32::Registry::Constants::KEY_READ | 0x0200)], - [::Win32::Registry::HKEY_CURRENT_USER] + [::Win32::Registry::HKEY_CURRENT_USER], ].each do |hkey| desired = hkey.length > 1 ? hkey[1] : ::Win32::Registry::Constants::KEY_READ begin diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index e04efb6b42..a5b0a5dc24 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -131,7 +131,7 @@ EOH "-ExecutionPolicy #{execution_policy}", # Powershell will hang if STDIN is redirected # http://connect.microsoft.com/PowerShell/feedback/details/572313/powershell-exe-can-hang-if-stdin-is-redirected - "-InputFormat None" + "-InputFormat None", ] end diff --git a/lib/chef/provider/reboot.rb b/lib/chef/provider/reboot.rb index 22e77dcc13..ab3177ba65 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/windows.rb b/lib/chef/provider/service/windows.rb index f5c370246c..fcebeeb6c6 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -305,7 +305,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 5b506daf81..78769ae758 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -416,7 +416,7 @@ user password using shadow hash.") salt, iterations, 128, - OpenSSL::Digest::SHA512.new + OpenSSL::Digest::SHA512.new, ) end @@ -570,7 +570,7 @@ user password using shadow hash.") :comment => "realname", :password => "passwd", :auth_authority => "authentication_authority", - :shadow_hash => "ShadowHashData" + :shadow_hash => "ShadowHashData", }.freeze # Directory where the user plist files are stored for versions 10.7 and above @@ -701,7 +701,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 diff --git a/lib/chef/provider/user/pw.rb b/lib/chef/provider/user/pw.rb index 810ffb9a8d..e53d647f37 100644 --- a/lib/chef/provider/user/pw.rb +++ b/lib/chef/provider/user/pw.rb @@ -75,7 +75,7 @@ class Chef 'home' => "-d", 'gid' => "-g", 'uid' => "-u", - 'shell' => "-s" + 'shell' => "-s", } field_list.sort{ |a,b| a[0] <=> b[0] }.each do |field, option| field_symbol = field.to_sym diff --git a/lib/chef/provider/user/windows.rb b/lib/chef/provider/user/windows.rb index 76519bb498..b0b2d7e956 100644 --- a/lib/chef/provider/user/windows.rb +++ b/lib/chef/provider/user/windows.rb @@ -105,7 +105,7 @@ class Chef 'home' => 'home_dir', 'uid' => 'user_id', 'shell' => 'script_path', - 'password' => 'password' + 'password' => 'password', } field_list.sort{ |a,b| a[0] <=> b[0] }.each do |field, option| |