diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-13 11:44:32 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-13 11:44:32 -0800 |
commit | af4afcc712d24dbc85a9c020a124acadeed295d2 (patch) | |
tree | 08a71e81175177fee945d09bb831d5ae37a24606 /spec/support | |
parent | 1edd3dba71b4531bb1a570dd7e387620e8ee61de (diff) | |
download | chef-af4afcc712d24dbc85a9c020a124acadeed295d2.tar.gz |
autocorrecting Style/TrailingCommalcg/trailing_comma
chefstyle -a fixed 1044 occurrances
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared/context/client.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/functional/directory_resource.rb | 4 | ||||
-rw-r--r-- | spec/support/shared/functional/http.rb | 8 | ||||
-rw-r--r-- | spec/support/shared/functional/securable_resource.rb | 12 | ||||
-rw-r--r-- | spec/support/shared/functional/win32_service.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/integration/app_server_support.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/integration/knife_support.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/unit/api_error_inspector.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/unit/api_versioning.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/unit/mock_shellout.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/unit/platform_introspector.rb | 4 | ||||
-rw-r--r-- | spec/support/shared/unit/provider/useradd_based_user_provider.rb | 8 | ||||
-rw-r--r-- | spec/support/shared/unit/user_and_client_shared.rb | 2 |
13 files changed, 26 insertions, 26 deletions
diff --git a/spec/support/shared/context/client.rb b/spec/support/shared/context/client.rb index cb387a9478..eec66dcb26 100644 --- a/spec/support/shared/context/client.rb +++ b/spec/support/shared/context/client.rb @@ -15,7 +15,7 @@ shared_context "client" do :hostname => hostname, :machinename => machinename, :platform => platform, - :platform_version => platform_version + :platform_version => platform_version, } end diff --git a/spec/support/shared/functional/directory_resource.rb b/spec/support/shared/functional/directory_resource.rb index 39bdc313e5..51c7550a78 100644 --- a/spec/support/shared/functional/directory_resource.rb +++ b/spec/support/shared/functional/directory_resource.rb @@ -68,14 +68,14 @@ shared_examples_for "a directory resource" do def allowed_acl(sid, expected_perms) [ ACE.access_allowed(sid, expected_perms[:specific]), - ACE.access_allowed(sid, expected_perms[:generic], (Chef::ReservedNames::Win32::API::Security::INHERIT_ONLY_ACE | Chef::ReservedNames::Win32::API::Security::CONTAINER_INHERIT_ACE | Chef::ReservedNames::Win32::API::Security::OBJECT_INHERIT_ACE)) + ACE.access_allowed(sid, expected_perms[:generic], (Chef::ReservedNames::Win32::API::Security::INHERIT_ONLY_ACE | Chef::ReservedNames::Win32::API::Security::CONTAINER_INHERIT_ACE | Chef::ReservedNames::Win32::API::Security::OBJECT_INHERIT_ACE)), ] end def denied_acl(sid, expected_perms) [ ACE.access_denied(sid, expected_perms[:specific]), - ACE.access_denied(sid, expected_perms[:generic], (Chef::ReservedNames::Win32::API::Security::INHERIT_ONLY_ACE | Chef::ReservedNames::Win32::API::Security::CONTAINER_INHERIT_ACE | Chef::ReservedNames::Win32::API::Security::OBJECT_INHERIT_ACE)) + ACE.access_denied(sid, expected_perms[:generic], (Chef::ReservedNames::Win32::API::Security::INHERIT_ONLY_ACE | Chef::ReservedNames::Win32::API::Security::CONTAINER_INHERIT_ACE | Chef::ReservedNames::Win32::API::Security::OBJECT_INHERIT_ACE)), ] end diff --git a/spec/support/shared/functional/http.rb b/spec/support/shared/functional/http.rb index 963fbf1c5b..cfbb8e3689 100644 --- a/spec/support/shared/functional/http.rb +++ b/spec/support/shared/functional/http.rb @@ -81,7 +81,7 @@ module ChefHTTPShared # (expected_content should be uncompressed) @api.get("/nyan_cat_content_length.png", 200, nil, { - 'Content-Length' => nyan_uncompressed_size.to_s, + 'Content-Length' => nyan_uncompressed_size.to_s } ) { File.open(nyan_uncompressed_filename, "rb") do |f| @@ -94,7 +94,7 @@ module ChefHTTPShared { 'Content-Length' => nyan_compressed_size.to_s, 'Content-Type' => 'application/gzip', - 'Content-Encoding' => 'gzip' + 'Content-Encoding' => 'gzip', } ) { File.open(nyan_compressed_filename, "rb") do |f| @@ -109,7 +109,7 @@ module ChefHTTPShared # (expected_content should be uncompressed) @api.get("/nyan_cat_truncated.png", 200, nil, { - 'Content-Length' => (nyan_uncompressed_size + 1).to_s, + 'Content-Length' => (nyan_uncompressed_size + 1).to_s } ) { File.open(nyan_uncompressed_filename, "rb") do |f| @@ -122,7 +122,7 @@ module ChefHTTPShared { 'Content-Length' => (nyan_compressed_size + 1).to_s, 'Content-Type' => 'application/gzip', - 'Content-Encoding' => 'gzip' + 'Content-Encoding' => 'gzip', } ) { File.open(nyan_compressed_filename, "rb") do |f| diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb index b3c32356aa..1e8edec9ae 100644 --- a/spec/support/shared/functional/securable_resource.rb +++ b/spec/support/shared/functional/securable_resource.rb @@ -111,28 +111,28 @@ shared_context "use Windows permissions", :windows_only do let(:expected_read_execute_perms) do { :generic => Chef::ReservedNames::Win32::API::Security::GENERIC_READ | Chef::ReservedNames::Win32::API::Security::GENERIC_EXECUTE, - :specific => Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_READ | Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_EXECUTE + :specific => Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_READ | Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_EXECUTE, } end let(:expected_write_perms) do { :generic => Chef::ReservedNames::Win32::API::Security::GENERIC_WRITE, - :specific => Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE + :specific => Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE, } end let(:expected_modify_perms) do { :generic => Chef::ReservedNames::Win32::API::Security::GENERIC_READ | Chef::ReservedNames::Win32::API::Security::GENERIC_WRITE | Chef::ReservedNames::Win32::API::Security::GENERIC_EXECUTE | Chef::ReservedNames::Win32::API::Security::DELETE, - :specific => Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_READ | Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE | Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_EXECUTE | Chef::ReservedNames::Win32::API::Security::DELETE + :specific => Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_READ | Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE | Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_EXECUTE | Chef::ReservedNames::Win32::API::Security::DELETE, } end let(:expected_full_control_perms) do { :generic => Chef::ReservedNames::Win32::API::Security::GENERIC_ALL, - :specific => Chef::ReservedNames::Win32::API::Security::FILE_ALL_ACCESS + :specific => Chef::ReservedNames::Win32::API::Security::FILE_ALL_ACCESS, } end @@ -470,7 +470,7 @@ shared_examples_for "a securable resource without existing target" do expect(explicit_aces).to eq([ ACE.access_allowed(SID.Guest, Security::FILE_GENERIC_READ | Security::FILE_GENERIC_WRITE | Security::FILE_GENERIC_EXECUTE | Security::DELETE), ACE.access_allowed(SID.Administrators, Security::FILE_GENERIC_READ | Security::FILE_GENERIC_EXECUTE), - ACE.access_allowed(SID.Everyone, Security::FILE_GENERIC_READ) + ACE.access_allowed(SID.Everyone, Security::FILE_GENERIC_READ), ]) end @@ -483,7 +483,7 @@ shared_examples_for "a securable resource without existing target" do expect(explicit_aces).to eq([ ACE.access_allowed(SID.Guest, Security::FILE_GENERIC_READ), ACE.access_allowed(SID.Administrators, Security::FILE_GENERIC_WRITE | Security::DELETE), - ACE.access_allowed(SID.Everyone, Security::FILE_GENERIC_EXECUTE) + ACE.access_allowed(SID.Everyone, Security::FILE_GENERIC_EXECUTE), ]) end diff --git a/spec/support/shared/functional/win32_service.rb b/spec/support/shared/functional/win32_service.rb index 2ee1a8ad88..8eca7a47fa 100644 --- a/spec/support/shared/functional/win32_service.rb +++ b/spec/support/shared/functional/win32_service.rb @@ -47,7 +47,7 @@ shared_context "using Win32::Service" do :service_display_name => "Spec Test Service", :service_description => "Service for testing Chef::Application::WindowsServiceManager.", :service_file_path => File.expand_path(File.join(File.dirname(__FILE__), '../../platforms/win32/spec_service.rb')), - :delayed_start => true + :delayed_start => true, } } diff --git a/spec/support/shared/integration/app_server_support.rb b/spec/support/shared/integration/app_server_support.rb index 0ca6c54ede..a133833d3e 100644 --- a/spec/support/shared/integration/app_server_support.rb +++ b/spec/support/shared/integration/app_server_support.rb @@ -27,7 +27,7 @@ module AppServerSupport Rack::Handler::WEBrick.run(app, :Port => 9018, :AccessLog => [], - :Logger => WEBrick::Log::new(StringIO.new, 7) + :Logger => WEBrick::Log::new(StringIO.new, 7), ) do |found_server| server = found_server end diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb index 30293be6cf..fb624bca8b 100644 --- a/spec/support/shared/integration/knife_support.rb +++ b/spec/support/shared/integration/knife_support.rb @@ -40,7 +40,7 @@ module KnifeSupport checksums_cache_dir = Dir.mktmpdir('checksums') do |checksums_cache_dir| Chef::Config[:cache_options] = { :path => checksums_cache_dir, - :skip_expires => true + :skip_expires => true, } # This is Chef::Knife.run without load_commands--we'll load stuff diff --git a/spec/support/shared/unit/api_error_inspector.rb b/spec/support/shared/unit/api_error_inspector.rb index 29faa07f29..82581fae5c 100644 --- a/spec/support/shared/unit/api_error_inspector.rb +++ b/spec/support/shared/unit/api_error_inspector.rb @@ -34,7 +34,7 @@ shared_examples_for "an api error inspector" do :validation_key => "/etc/chef/testorg-validator.pem", :chef_server_url => "https://chef-api.example.com", :node_name => "testnode-name", - :client_key => "/etc/chef/client.pem" + :client_key => "/etc/chef/client.pem", } @description = Chef::Formatters::ErrorDescription.new("Error registering the node:") @outputter = Chef::Formatters::IndentableOutputStream.new(StringIO.new, STDERR) diff --git a/spec/support/shared/unit/api_versioning.rb b/spec/support/shared/unit/api_versioning.rb index 05a4117f8e..ccbe95d029 100644 --- a/spec/support/shared/unit/api_versioning.rb +++ b/spec/support/shared/unit/api_versioning.rb @@ -47,7 +47,7 @@ shared_examples_for "user and client reregister" do { "min_version" => min_version, "max_version" => max_version, - "request_version" => "30" + "request_version" => "30", } } diff --git a/spec/support/shared/unit/mock_shellout.rb b/spec/support/shared/unit/mock_shellout.rb index 7c3e49ec82..82cd618143 100644 --- a/spec/support/shared/unit/mock_shellout.rb +++ b/spec/support/shared/unit/mock_shellout.rb @@ -31,7 +31,7 @@ class MockShellout @properties = { stdout: "", stderr: "", - exitstatus: 0 + exitstatus: 0, }.merge(properties) end def method_missing(name, *args) diff --git a/spec/support/shared/unit/platform_introspector.rb b/spec/support/shared/unit/platform_introspector.rb index df24370fde..52a780eb10 100644 --- a/spec/support/shared/unit/platform_introspector.rb +++ b/spec/support/shared/unit/platform_introspector.rb @@ -24,7 +24,7 @@ shared_examples_for "a platform introspector" do %w{openbsd freebsd}.each do |x| @platform_hash[x] = { "default" => x, - "1.2.3" => "#{x}-1.2.3" + "1.2.3" => "#{x}-1.2.3", } end @platform_hash["debian"] = {["5", "6"] => "debian-5/6", "default" => "debian"} @@ -39,7 +39,7 @@ shared_examples_for "a platform introspector" do "debian" => "debian value", [:rhel, :fedora] => "redhatty value", "suse" => "suse value", - :default => "default value" + :default => "default value", } end diff --git a/spec/support/shared/unit/provider/useradd_based_user_provider.rb b/spec/support/shared/unit/provider/useradd_based_user_provider.rb index fc7c79ef7d..60b048975a 100644 --- a/spec/support/shared/unit/provider/useradd_based_user_provider.rb +++ b/spec/support/shared/unit/provider/useradd_based_user_provider.rb @@ -384,25 +384,25 @@ shared_examples_for "a useradd-based user provider" do |supported_useradd_option "action" => "should return false if home matches", "current_resource_home" => [ "/home/laurent" ], "new_resource_home" => [ "/home/laurent" ], - "expected_result" => false + "expected_result" => false, }, { "action" => "should return true if home doesn't match", "current_resource_home" => [ "/home/laurent" ], "new_resource_home" => [ "/something/else" ], - "expected_result" => true + "expected_result" => true, }, { "action" => "should return false if home only differs by trailing slash", "current_resource_home" => [ "/home/laurent" ], "new_resource_home" => [ "/home/laurent/", "/home/laurent" ], - "expected_result" => false + "expected_result" => false, }, { "action" => "should return false if home is an equivalent path", "current_resource_home" => [ "/home/laurent" ], "new_resource_home" => [ "/home/./laurent", "/home/laurent" ], - "expected_result" => false + "expected_result" => false, }, ].each do |home_check| it home_check["action"] do diff --git a/spec/support/shared/unit/user_and_client_shared.rb b/spec/support/shared/unit/user_and_client_shared.rb index bc5ffa07c2..98f2982f12 100644 --- a/spec/support/shared/unit/user_and_client_shared.rb +++ b/spec/support/shared/unit/user_and_client_shared.rb @@ -74,7 +74,7 @@ shared_examples_for "user or client create" do { "chef_key" => { "public_key" => "some_public_key", - "private_key" => "some_private_key" + "private_key" => "some_private_key", } } } |