diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-10-08 10:48:18 -0700 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-10-08 10:48:18 -0700 |
commit | 9f44841df63fac60e773917bb3240d8d64e6ed2e (patch) | |
tree | de5ff40308d6dc590a500eb3e7ec8d83e1a896df /spec/spec_helper.rb | |
parent | b92978dd22f734f33044ec62c605b6eedb43bb6e (diff) | |
download | chef-9f44841df63fac60e773917bb3240d8d64e6ed2e.tar.gz |
Adding back `require 'json'` to prevent breaking consumers who currently use Hash.to_json in their cookbookstball/yajl-replace-json
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9d629da226..8abd5f59af 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -186,12 +186,5 @@ module WEBrick end end -# We are no longer using the 'json' gem - deny all access to it! -orig_require = Kernel.send(:instance_method, :require) -Kernel.send(:remove_method, :require) -Kernel.send(:define_method, :require) { |path| - raise LoadError, 'JSON gem is no longer allowed - use Chef::JSONCompat.to_json' if path == 'json' - orig_require.bind(Kernel).call(path) -} # Enough stuff needs json serialization that I'm just adding it here for equality asserts require 'chef/json_compat' |