aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-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/dev-cmd
parent54d18cee17a7af49b5858dd752bf2eda59014472 (diff)
downloadbrew-d07b9ed7f2e8806b1840b4f60605ef45487655e1.tar.bz2
Replace Utils::JSON with corelib JSON calls.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/boneyard-formula-pr.rb4
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb4
-rw-r--r--Library/Homebrew/dev-cmd/pull.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
index 3d95f14b9..4c2fbb6f3 100644
--- a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
@@ -9,7 +9,7 @@
#: If `--reason=<reason>` is passed, append this to the commit/PR message.
require "formula"
-require "utils/json"
+require "json"
require "fileutils"
begin
@@ -60,7 +60,7 @@ module Homebrew
EOS
safe_system "git", "add", tap_migrations_path
end
- tap_migrations = Utils::JSON.load(File.read(tap_migrations_path))
+ tap_migrations = JSON.parse(File.read(tap_migrations_path))
tap_migrations[formula.name] = boneyard_tap.name
tap_migrations = tap_migrations.sort.inject({}) { |acc, elem| acc.merge!(elem[0] => elem[1]) }
tap_migrations_path.atomic_write(JSON.pretty_generate(tap_migrations) + "\n")
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index 7e98f2ebb..9618cf412 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -344,7 +344,7 @@ module Homebrew
},
}
File.open("#{filename.prefix}.bottle.json", "w") do |file|
- file.write Utils::JSON.dump json
+ file.write JSON.generate json
end
end
@@ -352,7 +352,7 @@ module Homebrew
write = ARGV.include? "--write"
bottles_hash = ARGV.named.reduce({}) do |hash, json_file|
- deep_merge_hashes hash, Utils::JSON.load(IO.read(json_file))
+ deep_merge_hashes hash, JSON.parse(IO.read(json_file))
end
bottles_hash.each do |formula_name, bottle_hash|
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index 7e6e86a85..f7006baaa 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -32,7 +32,7 @@
require "net/http"
require "net/https"
require "utils"
-require "utils/json"
+require "json"
require "formula"
require "formulary"
require "tap"
@@ -433,7 +433,7 @@ module Homebrew
return nil unless $?.success?
Homebrew.force_utf8!(json)
- FormulaInfoFromJson.new(Utils::JSON.load(json)[0])
+ FormulaInfoFromJson.new(JSON.parse(json)[0])
end
def bottle_tags