summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/data_handler/client_data_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/chef_fs/data_handler/client_data_handler.rb')
-rw-r--r--lib/chef/chef_fs/data_handler/client_data_handler.rb24
1 files changed, 12 insertions, 12 deletions
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..6ed5d51379 100644
--- a/lib/chef/chef_fs/data_handler/client_data_handler.rb
+++ b/lib/chef/chef_fs/data_handler/client_data_handler.rb
@@ -1,5 +1,5 @@
-require 'chef/chef_fs/data_handler/data_handler_base'
-require 'chef/api_client'
+require "chef/chef_fs/data_handler/data_handler_base"
+require "chef/api_client"
class Chef
module ChefFS
@@ -7,25 +7,25 @@ class Chef
class ClientDataHandler < DataHandlerBase
def normalize(client, entry)
defaults = {
- 'name' => remove_dot_json(entry.name),
- 'clientname' => remove_dot_json(entry.name),
- 'admin' => false,
- 'validator' => false,
- 'chef_type' => 'client'
+ "name" => remove_dot_json(entry.name),
+ "clientname" => remove_dot_json(entry.name),
+ "admin" => false,
+ "validator" => false,
+ "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)
- client['validator'] = (client['validator'] == 'true') if client['validator'].is_a?(String)
+ client["admin"] = (client["admin"] == "true") if client["admin"].is_a?(String)
+ client["validator"] = (client["validator"] == "true") if client["validator"].is_a?(String)
if entry.respond_to?(:org) && entry.org
- defaults['orgname'] = entry.org
+ defaults["orgname"] = entry.org
end
result = normalize_hash(client, defaults)
- result.delete('json_class')
+ result.delete("json_class")
result
end
def preserve_key?(key)
- return key == 'name'
+ return key == "name"
end
def chef_class