summaryrefslogtreecommitdiff
path: root/lib/chef/key.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-19 14:47:55 +0000
committerThom May <thom@chef.io>2016-01-19 14:47:55 +0000
commit3458740dc59959e0eaa88543883756d041435d56 (patch)
tree86c5f759dbe18608a9133547f823c2f35b175fce /lib/chef/key.rb
parentc48d37e27953ebb8435ec298caf59de1909f63e6 (diff)
downloadchef-3458740dc59959e0eaa88543883756d041435d56.tar.gz
deprecate a few more callstm/rest_deprecation
Diffstat (limited to 'lib/chef/key.rb')
-rw-r--r--lib/chef/key.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/key.rb b/lib/chef/key.rb
index ba5613e35e..141a444d57 100644
--- a/lib/chef/key.rb
+++ b/lib/chef/key.rb
@@ -222,8 +222,9 @@ class Chef
Chef::Key.from_hash(Chef::JSONCompat.from_json(json))
end
- class << self
- alias_method :json_create, :from_json
+ def self.json_create(json)
+ Chef.log_deprecation("Auto inflation of JSON data is deprecated. Please use Chef::Key#from_json or one of the load_by methods.")
+ Chef::Key.from_json(json)
end
def self.list_by_user(actor, inflate=false)