aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorWilliam Woodruff2016-11-20 13:00:01 -0500
committerWilliam Woodruff2016-11-20 20:06:25 -0500
commitd07b9ed7f2e8806b1840b4f60605ef45487655e1 (patch)
tree90387191e0debec6f578dc58646d7fb588f08333 /Library/Homebrew/cmd
parent54d18cee17a7af49b5858dd752bf2eda59014472 (diff)
downloadbrew-d07b9ed7f2e8806b1840b4f60605ef45487655e1.tar.bz2
Replace Utils::JSON with corelib JSON calls.
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