diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-08-11 17:36:52 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-08-11 17:36:52 -0700 |
commit | 3f415b11dfb1c494a45a0a83d69196cd75924cf1 (patch) | |
tree | ee6bbff8836a1a8514fe3be7ce9ead67ad8cb02a /lib/chef/environment.rb | |
parent | b4dfc6a1f478f29105a3b4746029e3ad46291b82 (diff) | |
download | chef-3f415b11dfb1c494a45a0a83d69196cd75924cf1.tar.gz |
remove JSON gem usage
should fully convert to using ffi-yajl
there are still issues with JSON gem monkeypatching interacting with
chef-zero and the spec tests so we keep the requires here for the
json gem and the ffi_yajl/json_gem here. when ohai and chef-zero are
fixed, we an just require ffi_yajl.
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r-- | lib/chef/environment.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb index 5c719ca285..33dfb52403 100644 --- a/lib/chef/environment.rb +++ b/lib/chef/environment.rb @@ -129,7 +129,7 @@ class Chef end def to_json(*a) - to_hash.to_json(*a) + Chef::JSONCompat.to_json(to_hash, *a) end def update_from!(o) @@ -140,7 +140,6 @@ class Chef self end - def update_attributes_from_params(params) unless params[:default_attributes].nil? || params[:default_attributes].size == 0 default_attributes(Chef::JSONCompat.from_json(params[:default_attributes])) @@ -213,7 +212,6 @@ class Chef end end - def self.json_create(o) environment = new environment.name(o["name"]) |