aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2016-03-07 18:04:25 +0800
committerXu Cheng2016-03-07 19:43:46 +0800
commit28f3dae8cd5bf975121090cb58262b8344a3917c (patch)
tree3b2b793a3c715b401d5ef9288d5c108f334e4aa2 /Library/Homebrew/cmd
parent2b32cfe7b0b0171da97a96d6e1f9ed3ec92e7f6c (diff)
downloadbrew-28f3dae8cd5bf975121090cb58262b8344a3917c.tar.bz2
rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future. It makes sense to rename it to CoreTap.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb2
-rw-r--r--Library/Homebrew/cmd/install.rb1
-rw-r--r--Library/Homebrew/cmd/pull.rb7
-rw-r--r--Library/Homebrew/cmd/readall.rb3
-rw-r--r--Library/Homebrew/cmd/tap-info.rb2
-rw-r--r--Library/Homebrew/cmd/tap-pin.rb2
-rw-r--r--Library/Homebrew/cmd/tap-unpin.rb2
-rw-r--r--Library/Homebrew/cmd/tap.rb1
-rw-r--r--Library/Homebrew/cmd/test-bot.rb11
-rw-r--r--Library/Homebrew/cmd/untap.rb2
-rw-r--r--Library/Homebrew/cmd/update-report.rb4
11 files changed, 16 insertions, 21 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index a3643e7a6..9eec5590f 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -247,7 +247,7 @@ class FormulaAuditor
return
end
- if oldname = CoreFormulaRepository.instance.formula_renames[name]
+ if oldname = CoreTap.instance.formula_renames[name]
problem "'#{name}' is reserved as the old name of #{oldname}"
return
end
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index c2ef9a334..6745e92b0 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -3,7 +3,6 @@ require "diagnostic"
require "cmd/search"
require "formula_installer"
require "tap"
-require "core_formula_repository"
require "hardware"
module Homebrew
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index 45c3bf76b..ae762ca51 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -23,7 +23,6 @@ require "utils"
require "utils/json"
require "formula"
require "tap"
-require "core_formula_repository"
module Homebrew
def pull
@@ -41,11 +40,11 @@ module Homebrew
if arg.to_i > 0
issue = arg
url = "https://github.com/Homebrew/homebrew/pull/#{arg}"
- tap = CoreFormulaRepository.instance
+ tap = CoreTap.instance
elsif (testing_match = arg.match %r{brew.sh/job/Homebrew.*Testing/(\d+)/})
_, testing_job = *testing_match
url = "https://github.com/Homebrew/homebrew/compare/master...BrewTestBot:testing-#{testing_job}"
- tap = CoreFormulaRepository.instance
+ tap = CoreTap.instance
odie "Testing URLs require `--bottle`!" unless ARGV.include?("--bottle")
elsif (api_match = arg.match HOMEBREW_PULL_API_REGEX)
_, user, repo, issue = *api_match
@@ -167,7 +166,7 @@ module Homebrew
url
else
bottle_branch = "pull-bottle-#{issue}"
- if tap.core_formula_repository?
+ if tap.core_tap?
"https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}"
else
"https://github.com/BrewTestBot/homebrew-#{tap.repo}/compare/homebrew:master...pr-#{issue}"
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb
index 7775c2923..f006838ea 100644
--- a/Library/Homebrew/cmd/readall.rb
+++ b/Library/Homebrew/cmd/readall.rb
@@ -5,7 +5,6 @@
require "formula"
require "tap"
-require "core_formula_repository"
require "thread"
module Homebrew
@@ -39,7 +38,7 @@ module Homebrew
if ARGV.named.empty?
formulae = Formula.files
alias_dirs = Tap.map(&:alias_dir)
- alias_dirs.unshift CoreFormulaRepository.instance.alias_dir
+ alias_dirs.unshift CoreTap.instance.alias_dir
else
tap = Tap.fetch(ARGV.named.first)
raise TapUnavailableError, tap.name unless tap.installed?
diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb
index 8139b4943..3d1a0c83d 100644
--- a/Library/Homebrew/cmd/tap-info.rb
+++ b/Library/Homebrew/cmd/tap-info.rb
@@ -10,7 +10,7 @@ module Homebrew
end
end
- raise "Homebrew/homebrew is not allowed" if taps.any?(&:core_formula_repository?)
+ raise "Homebrew/homebrew is not allowed" if taps.any?(&:core_tap?)
if ARGV.json == "v1"
print_tap_json(taps)
diff --git a/Library/Homebrew/cmd/tap-pin.rb b/Library/Homebrew/cmd/tap-pin.rb
index e906c700d..7625f2642 100644
--- a/Library/Homebrew/cmd/tap-pin.rb
+++ b/Library/Homebrew/cmd/tap-pin.rb
@@ -4,7 +4,7 @@ module Homebrew
def tap_pin
ARGV.named.each do |name|
tap = Tap.fetch(name)
- raise "Homebrew/homebrew is not allowed" if tap.core_formula_repository?
+ raise "Homebrew/homebrew is not allowed" if tap.core_tap?
tap.pin
ohai "Pinned #{tap.name}"
end
diff --git a/Library/Homebrew/cmd/tap-unpin.rb b/Library/Homebrew/cmd/tap-unpin.rb
index e36a68ed0..5bf3bb178 100644
--- a/Library/Homebrew/cmd/tap-unpin.rb
+++ b/Library/Homebrew/cmd/tap-unpin.rb
@@ -4,7 +4,7 @@ module Homebrew
def tap_unpin
ARGV.named.each do |name|
tap = Tap.fetch(name)
- raise "Homebrew/homebrew is not allowed" if tap.core_formula_repository?
+ raise "Homebrew/homebrew is not allowed" if tap.core_tap?
tap.unpin
ohai "Unpinned #{tap.name}"
end
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb
index a755e5559..99efc7aab 100644
--- a/Library/Homebrew/cmd/tap.rb
+++ b/Library/Homebrew/cmd/tap.rb
@@ -1,5 +1,4 @@
require "tap"
-require "core_formula_repository"
module Homebrew
def tap
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb
index 80c98dfa6..b6fc301bd 100644
--- a/Library/Homebrew/cmd/test-bot.rb
+++ b/Library/Homebrew/cmd/test-bot.rb
@@ -31,7 +31,6 @@ require "rexml/document"
require "rexml/xmldecl"
require "rexml/cdata"
require "tap"
-require "core_formula_repository"
module Homebrew
BYTES_IN_1_MEGABYTE = 1024*1024
@@ -62,7 +61,7 @@ module Homebrew
end
end
- CoreFormulaRepository.instance
+ CoreTap.instance
end
class Step
@@ -209,7 +208,7 @@ module Homebrew
@added_formulae = []
@modified_formula = []
@steps = []
- @tap = options.fetch(:tap, CoreFormulaRepository.instance)
+ @tap = options.fetch(:tap, CoreTap.instance)
@repository = @tap.path
@skip_homebrew = options.fetch(:skip_homebrew, false)
@@ -609,7 +608,7 @@ module Homebrew
@category = __method__
return if @skip_homebrew
test "brew", "tests"
- if @tap.core_formula_repository?
+ if @tap.core_tap?
tests_args = ["--no-compat"]
readall_args = ["--aliases"]
if RUBY_VERSION.split(".").first.to_i >= 2
@@ -767,7 +766,7 @@ module Homebrew
safe_system "brew", "update"
if pr
- pull_pr = if tap.core_formula_repository?
+ pull_pr = if tap.core_tap?
pr
else
"https://github.com/#{tap.user}/homebrew-#{tap.repo}/pull/#{pr}"
@@ -779,7 +778,7 @@ module Homebrew
bottle_args << "--keep-old" if ARGV.include? "--keep-old"
system "brew", "bottle", *bottle_args
- remote_repo = tap.core_formula_repository? ? "homebrew" : "homebrew-#{tap.repo}"
+ remote_repo = tap.core_tap? ? "homebrew" : "homebrew-#{tap.repo}"
remote = "git@github.com:BrewTestBot/#{remote_repo}.git"
tag = pr ? "pr-#{pr}" : "testing-#{number}"
safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}"
diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb
index 8f14258f3..52e1e9a18 100644
--- a/Library/Homebrew/cmd/untap.rb
+++ b/Library/Homebrew/cmd/untap.rb
@@ -6,7 +6,7 @@ module Homebrew
ARGV.named.each do |tapname|
tap = Tap.fetch(tapname)
- raise "Homebrew/homebrew is not allowed" if tap.core_formula_repository?
+ raise "Homebrew/homebrew is not allowed" if tap.core_tap?
tap.uninstall
end
end
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index 79eac4382..d85b35cec 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -12,7 +12,7 @@ module Homebrew
hub = ReporterHub.new
begin
- master_reporter = Reporter.new(CoreFormulaRepository.instance)
+ master_reporter = Reporter.new(CoreTap.instance)
rescue Reporter::ReporterRevisionUnsetError => e
raise e if ARGV.homebrew_developer?
odie "update-report should not be called directly!"
@@ -125,7 +125,7 @@ class Reporter
new_name = tap.formula_renames[old_name]
next unless new_name
- if tap.core_formula_repository?
+ if tap.core_tap?
new_full_name = new_name
else
new_full_name = "#{tap}/#{new_name}"