diff options
Diffstat (limited to 'chef/lib/chef/shef/ext.rb')
-rw-r--r-- | chef/lib/chef/shef/ext.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chef/lib/chef/shef/ext.rb b/chef/lib/chef/shef/ext.rb index a601e86786..6c5116f4a5 100644 --- a/chef/lib/chef/shef/ext.rb +++ b/chef/lib/chef/shef/ext.rb @@ -23,6 +23,7 @@ require 'chef/version' require 'chef/shef/shef_session' require 'chef/shef/model_wrapper' require 'chef/shef/shef_rest' +require 'chef/json' module Shef module Extensions @@ -327,13 +328,13 @@ E edited_data = Tempfile.open([filename, ".js"]) do |tempfile| tempfile.sync = true - tempfile.puts object.to_json + tempfile.puts Chef::JSON.to_json(object) system("#{Shef.editor.to_s} #{tempfile.path}") tempfile.rewind tempfile.read end - JSON.parse(edited_data) + Chef::JSON.from_json(edited_data) end desc "Find and edit API clients" |