diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
commit | 35603c7ce1bd3ccf35334ed65152140f0ecaf080 (patch) | |
tree | 452c84ce196ce00d672c71a8fa65f86c5a074fac /lib/chef/chef_fs | |
parent | eda2808dce8146bfdb308dd658b1dd565df3562b (diff) | |
download | chef-35603c7ce1bd3ccf35334ed65152140f0ecaf080.tar.gz |
fix Style/HashSyntax
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/chef_fs')
9 files changed, 15 insertions, 15 deletions
diff --git a/lib/chef/chef_fs/config.rb b/lib/chef/chef_fs/config.rb index 0725426275..2a41fb5870 100644 --- a/lib/chef/chef_fs/config.rb +++ b/lib/chef/chef_fs/config.rb @@ -173,7 +173,7 @@ class Chef def create_chef_fs require "chef/chef_fs/file_system/chef_server/chef_server_root_dir" - Chef::ChefFS::FileSystem::ChefServer::ChefServerRootDir.new("remote", @chef_config, :cookbook_version => @cookbook_version) + Chef::ChefFS::FileSystem::ChefServer::ChefServerRootDir.new("remote", @chef_config, cookbook_version: @cookbook_version) end def local_fs diff --git a/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb b/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb index 63ce71ef40..3447e3500a 100644 --- a/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb @@ -99,7 +99,7 @@ class Chef end def rest - Chef::ServerAPI.new(chef_server_url, :client_name => chef_username, :signing_key_filename => chef_private_key, :raw_output => true, :api_version => "0") + Chef::ServerAPI.new(chef_server_url, client_name: chef_username, signing_key_filename: chef_private_key, raw_output: true, api_version: "0") end def get_json(path) @@ -107,7 +107,7 @@ class Chef end def chef_rest - Chef::ServerAPI.new(chef_server_url, :client_name => chef_username, :signing_key_filename => chef_private_key, :api_version => "0") + Chef::ServerAPI.new(chef_server_url, client_name: chef_username, signing_key_filename: chef_private_key, api_version: "0") end def api_path diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb index 4e8e68e364..e0eca5f6de 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb @@ -74,7 +74,7 @@ class Chef def upload_cookbook(other, options) cookbook_to_upload = other.chef_object cookbook_to_upload.freeze_version if options[:freeze] - uploader = Chef::CookbookUploader.new(cookbook_to_upload, :force => options[:force], :rest => chef_rest) + uploader = Chef::CookbookUploader.new(cookbook_to_upload, force: options[:force], rest: chef_rest) with_actual_cookbooks_dir(other.parent.file_path) do uploader.upload_cookbooks diff --git a/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb b/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb index adaffb99a7..344a3deecc 100644 --- a/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb @@ -40,7 +40,7 @@ class Chef end def write(contents) - desired_invites = minimize_value(Chef::JSONCompat.parse(contents, :create_additions => false)) + desired_invites = minimize_value(Chef::JSONCompat.parse(contents, create_additions: false)) actual_invites = _read_json.inject({}) { |h, val| h[val["username"]] = val["id"]; h } invites = actual_invites.keys (desired_invites - invites).each do |invite| diff --git a/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb b/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb index 7e9c7141c4..a780ddd97b 100644 --- a/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb @@ -40,7 +40,7 @@ class Chef end def write(contents) - desired_members = minimize_value(Chef::JSONCompat.parse(contents, :create_additions => false)) + desired_members = minimize_value(Chef::JSONCompat.parse(contents, create_additions: false)) members = minimize_value(_read_json) (desired_members - members).each do |member| begin diff --git a/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb b/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb index 8da3718136..94c1a5b695 100644 --- a/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb @@ -78,7 +78,7 @@ class Chef cookbook_to_upload.freeze_version if options[:freeze] # Instantiate a new uploader based on the proxy loader - uploader = Chef::CookbookUploader.new(cookbook_to_upload, :force => options[:force], :rest => chef_rest) + uploader = Chef::CookbookUploader.new(cookbook_to_upload, force: options[:force], rest: chef_rest) with_actual_cookbooks_dir(temp_cookbooks_path) do uploader.upload_cookbooks diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb index b296901dd1..8e64e3ca06 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb @@ -64,7 +64,7 @@ class Chef def write(cookbook_path, cookbook_version_json, from_fs) # Use the copy/diff algorithm to copy it down so we don't destroy # chefignored data. This is terribly un-thread-safe. - Chef::ChefFS::FileSystem.copy_to(Chef::ChefFS::FilePattern.new("/#{cookbook_path}"), from_fs, self, nil, { :purge => true }) + Chef::ChefFS::FileSystem.copy_to(Chef::ChefFS::FilePattern.new("/#{cookbook_path}"), from_fs, self, nil, { purge: true }) # Write out .uploaded-cookbook-version.json # cookbook_file_path = File.join(file_path, cookbook_name) <- this should be the same as self.file_path diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb index 1731e19ce1..36445e5680 100644 --- a/lib/chef/chef_fs/knife.rb +++ b/lib/chef/chef_fs/knife.rb @@ -45,16 +45,16 @@ class Chef end option :repo_mode, - :long => "--repo-mode MODE", - :description => "Specifies the local repository layout. Values: static, everything, hosted_everything. Default: everything/hosted_everything" + long: "--repo-mode MODE", + description: "Specifies the local repository layout. Values: static, everything, hosted_everything. Default: everything/hosted_everything" option :chef_repo_path, - :long => "--chef-repo-path PATH", - :description => "Overrides the location of chef repo. Default is specified by chef_repo_path in the config" + long: "--chef-repo-path PATH", + description: "Overrides the location of chef repo. Default is specified by chef_repo_path in the config" option :concurrency, - :long => "--concurrency THREADS", - :description => "Maximum number of simultaneous requests to send (default: 10)" + long: "--concurrency THREADS", + description: "Maximum number of simultaneous requests to send (default: 10)" def configure_chef super diff --git a/lib/chef/chef_fs/parallelizer.rb b/lib/chef/chef_fs/parallelizer.rb index 32de61e048..eee555fc93 100644 --- a/lib/chef/chef_fs/parallelizer.rb +++ b/lib/chef/chef_fs/parallelizer.rb @@ -45,7 +45,7 @@ class Chef end def parallel_do(enumerable, options = {}, &block) - ParallelEnumerable.new(@tasks, enumerable, options.merge(:ordered => false), &block).wait + ParallelEnumerable.new(@tasks, enumerable, options.merge(ordered: false), &block).wait end def stop(wait = true, timeout = nil) |