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/cookbook_version.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/cookbook_version.rb')
-rw-r--r-- | lib/chef/cookbook_version.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 778a6043bf..4482f778c1 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -405,7 +405,6 @@ class Chef records_by_pref[best_pref] end - # Given a node, segment and path (filename or directory name), # return the priority-ordered list of preference locations to # look. @@ -458,9 +457,9 @@ class Chef end def to_json(*a) - result = self.to_hash + result = to_hash result['json_class'] = self.class.name - result.to_json(*a) + Chef::JSONCompat.to_json(result, *a) end def self.json_create(o) |