aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-11-21 18:45:20 +0000
committerGitHub2016-11-21 18:45:20 +0000
commitc3f959d6af36f075600aac63f208d59c30cd602c (patch)
tree336233a927c2be8b69f74dd704b73b3293d6ac33 /Library/Homebrew/cmd
parentc7267b123d38d1c96c2ca786c942255d2417cd86 (diff)
parentd07b9ed7f2e8806b1840b4f60605ef45487655e1 (diff)
downloadbrew-c3f959d6af36f075600aac63f208d59c30cd602c.tar.bz2
Merge pull request #1542 from woodruffw/deprecate-utils-json
compat: deprecate Utils::JSON in favor of corelib JSON.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/info.rb4
-rw-r--r--Library/Homebrew/cmd/outdated.rb2
-rw-r--r--Library/Homebrew/cmd/style.rb4
-rw-r--r--Library/Homebrew/cmd/tap-info.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index a3062ec99..fc47e1731 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -22,7 +22,7 @@ require "options"
require "formula"
require "keg"
require "tab"
-require "utils/json"
+require "json"
module Homebrew
module_function
@@ -72,7 +72,7 @@ module Homebrew
ARGV.formulae
end
json = ff.map(&:to_hash)
- puts Utils::JSON.dump(json)
+ puts JSON.generate(json)
end
def github_remote_path(remote, path)
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index 3ff3ef107..9ed7a0f79 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -88,7 +88,7 @@ module Homebrew
installed_versions: outdated_versions.collect(&:to_s),
current_version: current_version }
end
- puts Utils::JSON.dump(json)
+ puts JSON.generate(json)
outdated
end
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb
index 8b6793e77..9befcf9ac 100644
--- a/Library/Homebrew/cmd/style.rb
+++ b/Library/Homebrew/cmd/style.rb
@@ -14,7 +14,7 @@
#: Exits with a non-zero status if any style violations are found.
require "utils"
-require "utils/json"
+require "json"
module Homebrew
module_function
@@ -74,7 +74,7 @@ module Homebrew
# exitstatus can also be nil if RuboCop process crashes, e.g. due to
# native extension problems
raise "Error while running RuboCop" if $?.exitstatus.nil? || $?.exitstatus > 1
- RubocopResults.new(Utils::JSON.load(json))
+ RubocopResults.new(JSON.parse(json))
else
raise "Invalid output_type for check_style_impl: #{output_type}"
end
diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb
index f31bf480c..0d9f8db3d 100644
--- a/Library/Homebrew/cmd/tap-info.rb
+++ b/Library/Homebrew/cmd/tap-info.rb
@@ -82,6 +82,6 @@ module Homebrew
end
def print_tap_json(taps)
- puts Utils::JSON.dump(taps.map(&:to_hash))
+ puts JSON.generate(taps.map(&:to_hash))
end
end