aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-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/dev-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/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