diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-09-26 12:58:44 -0700 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-10-07 16:40:38 -0700 |
commit | cfd9d2efea9581126881598ec68a117121b61b8a (patch) | |
tree | 8cbff05bceb7e04f4cf581bf607250b6c3697549 | |
parent | e757c926990b1362f37fb1f1fa85b5f9545b469f (diff) | |
download | chef-cfd9d2efea9581126881598ec68a117121b61b8a.tar.gz |
Found some JSON pretty printing statements I missed
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 2 | ||||
-rw-r--r-- | lib/chef/chef_fs/command_line.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/integration/integration_helper.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 484ab07390..3813d0edb4 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -168,7 +168,7 @@ class Chef end end end - JSON.pretty_generate(result) + Chef::JSONCompat.to_json_pretty(result) else begin diff --git a/lib/chef/chef_fs/command_line.rb b/lib/chef/chef_fs/command_line.rb index 43e8b276e0..8a205eef78 100644 --- a/lib/chef/chef_fs/command_line.rb +++ b/lib/chef/chef_fs/command_line.rb @@ -253,7 +253,7 @@ class Chef def self.canonicalize_json(json_text) parsed_json = Chef::JSONCompat.parse(json_text) sorted_json = sort_keys(parsed_json) - JSON.pretty_generate(sorted_json) + Chef::JSONCompat.to_json_pretty(sorted_json) end def self.diff_text(old_path, new_path, old_value, new_value) diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb index b42f7f69d9..e6942c62af 100644 --- a/spec/support/shared/integration/integration_helper.rb +++ b/spec/support/shared/integration/integration_helper.rb @@ -72,7 +72,7 @@ module IntegrationSupport File.open(filename, 'w') do |file| raw = case contents when Hash, Array - JSON.pretty_generate(contents) + Chef::JSONCompat.to_json_pretty(contents) else contents end |