aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/info.rb
diff options
context:
space:
mode:
authorJack Nagel2013-06-22 16:51:08 -0500
committerJack Nagel2013-06-22 21:34:02 -0500
commit083b3c84d08571dda76e4d9ec553492ca60b8db3 (patch)
tree3f6b9dd8f3d128116a503a42e220ab664d39911c /Library/Homebrew/cmd/info.rb
parentc4272a25cc1e8cd85acadb52db551cad2a5824cb (diff)
downloadbrew-083b3c84d08571dda76e4d9ec553492ca60b8db3.tar.bz2
Add Utils::JSON to wrap the JSON implementation
Diffstat (limited to 'Library/Homebrew/cmd/info.rb')
-rw-r--r--Library/Homebrew/cmd/info.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index de98d692c..b5f133dfd 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -3,6 +3,7 @@ require 'tab'
require 'keg'
require 'caveats'
require 'blacklist'
+require 'utils/json'
module Homebrew extend self
def info
@@ -46,14 +47,12 @@ module Homebrew extend self
end
def print_json
- require 'vendor/multi_json'
-
formulae = ARGV.include?("--all") ? Formula : ARGV.formulae
json = formulae.map {|f| f.to_hash}
if json.size == 1
- puts MultiJson.encode json.pop
+ puts Utils::JSON.dump(json.pop)
else
- puts MultiJson.encode json
+ puts Utils::JSON.dump(json)
end
end