summaryrefslogtreecommitdiff
path: root/lib/chef/api_client_v1.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /lib/chef/api_client_v1.rb
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'lib/chef/api_client_v1.rb')
-rw-r--r--lib/chef/api_client_v1.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/chef/api_client_v1.rb b/lib/chef/api_client_v1.rb
index 7329343f43..6b3db812c0 100644
--- a/lib/chef/api_client_v1.rb
+++ b/lib/chef/api_client_v1.rb
@@ -17,16 +17,16 @@
# limitations under the License.
#
-require 'chef/config'
-require 'chef/mixin/params_validate'
-require 'chef/mixin/from_file'
-require 'chef/mash'
-require 'chef/json_compat'
-require 'chef/search/query'
-require 'chef/exceptions'
-require 'chef/mixin/api_version_request_handling'
-require 'chef/server_api'
-require 'chef/api_client'
+require "chef/config"
+require "chef/mixin/params_validate"
+require "chef/mixin/from_file"
+require "chef/mash"
+require "chef/json_compat"
+require "chef/search/query"
+require "chef/exceptions"
+require "chef/mixin/api_version_request_handling"
+require "chef/server_api"
+require "chef/api_client"
# COMPATIBILITY NOTE
#
@@ -48,7 +48,7 @@ class Chef
# Create a new Chef::ApiClientV1 object.
def initialize
- @name = ''
+ @name = ""
@public_key = nil
@private_key = nil
@admin = false
@@ -294,12 +294,12 @@ class Chef
new_client = chef_rest_v1.post("clients", payload)
# get the private_key out of the chef_key hash if it exists
- if new_client['chef_key']
- if new_client['chef_key']['private_key']
- new_client['private_key'] = new_client['chef_key']['private_key']
+ if new_client["chef_key"]
+ if new_client["chef_key"]["private_key"]
+ new_client["private_key"] = new_client["chef_key"]["private_key"]
end
- new_client['public_key'] = new_client['chef_key']['public_key']
- new_client.delete('chef_key')
+ new_client["public_key"] = new_client["chef_key"]["public_key"]
+ new_client.delete("chef_key")
end
rescue Net::HTTPServerException => e