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 /lib/chef/chef_fs | |
parent | 1edd3dba71b4531bb1a570dd7e387620e8ee61de (diff) | |
download | chef-af4afcc712d24dbc85a9c020a124acadeed295d2.tar.gz |
autocorrecting Style/TrailingCommalcg/trailing_comma
chefstyle -a fixed 1044 occurrances
Diffstat (limited to 'lib/chef/chef_fs')
16 files changed, 27 insertions, 27 deletions
diff --git a/lib/chef/chef_fs/config.rb b/lib/chef/chef_fs/config.rb index 260882ae70..29c9d3b879 100644 --- a/lib/chef/chef_fs/config.rb +++ b/lib/chef/chef_fs/config.rb @@ -41,7 +41,7 @@ class Chef "roles" => "role", "users" => "user", "policies" => "policy", - "policy_groups" => "policy_group" + "policy_groups" => "policy_group", } INFLECTIONS.each { |k,v| k.freeze; v.freeze } INFLECTIONS.freeze diff --git a/lib/chef/chef_fs/data_handler/acl_data_handler.rb b/lib/chef/chef_fs/data_handler/acl_data_handler.rb index 8def8a543d..6096b6e43c 100644 --- a/lib/chef/chef_fs/data_handler/acl_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/acl_data_handler.rb @@ -11,8 +11,8 @@ class Chef 'read' => {}, 'update' => {}, 'delete' => {}, - 'grant' => {} - }) + 'grant' => {}, + },) result.keys.each do |key| result[key] = normalize_hash(result[key], { 'actors' => [], 'groups' => [] }) result[key]['actors'] = result[key]['actors'].sort diff --git a/lib/chef/chef_fs/data_handler/client_data_handler.rb b/lib/chef/chef_fs/data_handler/client_data_handler.rb index 5bcbd4e373..421a463c2f 100644 --- a/lib/chef/chef_fs/data_handler/client_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/client_data_handler.rb @@ -11,7 +11,7 @@ class Chef 'clientname' => remove_dot_json(entry.name), 'admin' => false, 'validator' => false, - 'chef_type' => 'client' + 'chef_type' => 'client', } # Handle the fact that admin/validator have changed type from string -> boolean client['admin'] = (client['admin'] == 'true') if client['admin'].is_a?(String) diff --git a/lib/chef/chef_fs/data_handler/container_data_handler.rb b/lib/chef/chef_fs/data_handler/container_data_handler.rb index 980453cbab..f03005f947 100644 --- a/lib/chef/chef_fs/data_handler/container_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/container_data_handler.rb @@ -7,8 +7,8 @@ class Chef def normalize(container, entry) normalize_hash(container, { 'containername' => remove_dot_json(entry.name), - 'containerpath' => remove_dot_json(entry.name) - }) + 'containerpath' => remove_dot_json(entry.name), + },) end def preserve_key?(key) diff --git a/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb b/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb index 56b7e0b765..0f2cad7983 100644 --- a/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb @@ -15,12 +15,12 @@ class Chef 'json_class' => 'Chef::CookbookVersion', 'chef_type' => 'cookbook_version', 'frozen?' => false, - 'metadata' => {} - }) + 'metadata' => {}, + },) result['metadata'] = normalize_hash(result['metadata'], { 'version' => version, - 'name' => name - }) + 'name' => name, + },) end def preserve_key?(key) diff --git a/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb b/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb index 1306922081..e2d0f43de2 100644 --- a/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb @@ -14,7 +14,7 @@ class Chef # use those in knife-essentials. normalize_hash(data_bag_item, { 'id' => remove_dot_json(entry.name) - }) + },) end def normalize_for_post(data_bag_item, entry) @@ -26,7 +26,7 @@ class Chef "json_class" => "Chef::DataBagItem", "chef_type" => "data_bag_item", "data_bag" => entry.parent.name, - "raw_data" => normalize(data_bag_item, entry) + "raw_data" => normalize(data_bag_item, entry), } end diff --git a/lib/chef/chef_fs/data_handler/environment_data_handler.rb b/lib/chef/chef_fs/data_handler/environment_data_handler.rb index 5105f2ac49..5152a01e39 100644 --- a/lib/chef/chef_fs/data_handler/environment_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/environment_data_handler.rb @@ -13,8 +13,8 @@ class Chef 'default_attributes' => {}, 'override_attributes' => {}, 'json_class' => 'Chef::Environment', - 'chef_type' => 'environment' - }) + 'chef_type' => 'environment', + },) end def preserve_key?(key) diff --git a/lib/chef/chef_fs/data_handler/group_data_handler.rb b/lib/chef/chef_fs/data_handler/group_data_handler.rb index 1a36c66eb8..40cb57b78a 100644 --- a/lib/chef/chef_fs/data_handler/group_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/group_data_handler.rb @@ -28,7 +28,7 @@ class Chef result['actors'] = { 'users' => result['users'], 'clients' => result['clients'], - 'groups' => result['groups'] + 'groups' => result['groups'], } result.delete('users') result.delete('clients') diff --git a/lib/chef/chef_fs/data_handler/node_data_handler.rb b/lib/chef/chef_fs/data_handler/node_data_handler.rb index 04faa527f0..c4910b55b9 100644 --- a/lib/chef/chef_fs/data_handler/node_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/node_data_handler.rb @@ -15,8 +15,8 @@ class Chef 'normal' => {}, 'default' => {}, 'automatic' => {}, - 'run_list' => [] - }) + 'run_list' => [], + },) result['run_list'] = normalize_run_list(result['run_list']) result end diff --git a/lib/chef/chef_fs/data_handler/organization_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_data_handler.rb index da911c08f0..7b1bcc4c6c 100644 --- a/lib/chef/chef_fs/data_handler/organization_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/organization_data_handler.rb @@ -11,7 +11,7 @@ class Chef 'org_type' => 'Business', 'clientname' => "#{entry.org}-validator", 'billing_plan' => 'platform-free', - }) + },) result end diff --git a/lib/chef/chef_fs/data_handler/policy_data_handler.rb b/lib/chef/chef_fs/data_handler/policy_data_handler.rb index 9f4d7479fc..32a7a791f7 100644 --- a/lib/chef/chef_fs/data_handler/policy_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/policy_data_handler.rb @@ -21,7 +21,7 @@ class Chef 'name' => name, 'revision_id' => revision_id, 'run_list' => [], - 'cookbook_locks' => {} + 'cookbook_locks' => {}, } normalize_hash(policy, defaults) end diff --git a/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb b/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb index 6ada606e49..10de6abb42 100644 --- a/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb @@ -8,7 +8,7 @@ class Chef def normalize(policy_group, entry) defaults = { "name" => remove_dot_json(entry.name), - "policies" => {} + "policies" => {}, } result = normalize_hash(policy_group, defaults) result.delete("uri") # not useful data diff --git a/lib/chef/chef_fs/data_handler/role_data_handler.rb b/lib/chef/chef_fs/data_handler/role_data_handler.rb index 21c3013e9f..d7530f0b9b 100644 --- a/lib/chef/chef_fs/data_handler/role_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/role_data_handler.rb @@ -14,8 +14,8 @@ class Chef 'default_attributes' => {}, 'override_attributes' => {}, 'run_list' => [], - 'env_run_lists' => {} - }) + 'env_run_lists' => {}, + },) result['run_list'] = normalize_run_list(result['run_list']) result['env_run_lists'].each_pair do |env, run_list| result['env_run_lists'][env] = normalize_run_list(run_list) diff --git a/lib/chef/chef_fs/data_handler/user_data_handler.rb b/lib/chef/chef_fs/data_handler/user_data_handler.rb index f6859faccd..01c673b460 100644 --- a/lib/chef/chef_fs/data_handler/user_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/user_data_handler.rb @@ -14,8 +14,8 @@ class Chef 'chef_type' => 'webui_user', 'salt' => nil, 'password' => nil, - 'openid' => nil - }) + 'openid' => nil, + },) end def preserve_key?(key) 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 1ac03166c2..d2e0e64afe 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 @@ -147,7 +147,7 @@ class Chef # /environments EnvironmentsDir.new("environments", self, nil, Chef::ChefFS::DataHandler::EnvironmentDataHandler.new), # /roles - RestListDir.new("roles", self, nil, Chef::ChefFS::DataHandler::RoleDataHandler.new) + RestListDir.new("roles", self, nil, Chef::ChefFS::DataHandler::RoleDataHandler.new), ] if repo_mode == 'hosted_everything' result += [ @@ -179,7 +179,7 @@ class Chef # /nodes NodesDir.new("nodes", self, nil, Chef::ChefFS::DataHandler::NodeDataHandler.new), # /users - RestListDir.new("users", self, nil, Chef::ChefFS::DataHandler::UserDataHandler.new) + RestListDir.new("users", self, nil, Chef::ChefFS::DataHandler::UserDataHandler.new), ] end result.sort_by { |child| child.name } diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb index 51de0bfd86..b888b6de22 100644 --- a/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb @@ -58,7 +58,7 @@ class Chef :files => { :recursive => true }, :resources => { :ruby_only => true, :recursive => true }, :providers => { :ruby_only => true, :recursive => true }, - :root_files => { } + :root_files => { }, } # See Erchef code |