diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-13 09:52:10 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-13 09:52:10 -0800 |
commit | 404a9bc88be538769c6c80b3b31f39a6582991d2 (patch) | |
tree | 2f8795e5f64153440c22a522d669c235a627f289 /lib/chef/key.rb | |
parent | b949a48acc21d4b64869bd7b834708d5232b1f2a (diff) | |
download | chef-404a9bc88be538769c6c80b3b31f39a6582991d2.tar.gz |
fix specs: RedundantReturn, RedundantSelf, RedundantBegin
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/key.rb')
-rw-r--r-- | lib/chef/key.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/key.rb b/lib/chef/key.rb index d19ff433a3..c68fe1039c 100644 --- a/lib/chef/key.rb +++ b/lib/chef/key.rb @@ -155,7 +155,7 @@ class Chef result = chef_rest.post("#{api_base}/#{@actor}/keys", payload) # append the private key to the current key if the server returned one, # since the POST endpoint just returns uri and private_key if needed. - new_key = self.to_hash + new_key = to_hash new_key["private_key"] = result["private_key"] if result["private_key"] Chef::Key.from_hash(new_key) end @@ -178,9 +178,9 @@ class Chef new_key = chef_rest.put("#{api_base}/#{@actor}/keys/#{put_name}", to_hash) # if the server returned a public_key, remove the create_key field, as we now have a key if new_key["public_key"] - self.delete_create_key + delete_create_key end - Chef::Key.from_hash(self.to_hash.merge(new_key)) + Chef::Key.from_hash(to_hash.merge(new_key)) end def save @@ -229,12 +229,12 @@ class Chef def list_by_user(actor, inflate = false) keys = Chef::ServerAPI.new(Chef::Config[:chef_server_root]).get("users/#{actor}/keys") - self.list(keys, actor, :load_by_user, inflate) + list(keys, actor, :load_by_user, inflate) end def list_by_client(actor, inflate = false) keys = Chef::ServerAPI.new(Chef::Config[:chef_server_url]).get("clients/#{actor}/keys") - self.list(keys, actor, :load_by_client, inflate) + list(keys, actor, :load_by_client, inflate) end def load_by_user(actor, key_name) |