aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2015-02-12 16:02:23 +0000
committerMike McQuaid2015-02-13 10:58:43 +0000
commita7d1a31200fbcb180aceaa77aaa749037fbc8779 (patch)
treea974970b64fd14389ae78d8a7216db87d20248fa
parent1eb09ec45132830ef8f171ec78dfce4694f3298e (diff)
downloadhomebrew-a7d1a31200fbcb180aceaa77aaa749037fbc8779.tar.bz2
Move "path or URL" tap string to global constant.
-rw-r--r--Library/Homebrew/formula.rb2
-rw-r--r--Library/Homebrew/tap_constants.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index d9004c72a..6e76a34d8 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -540,7 +540,7 @@ class Formula
elsif core_formula?
"Homebrew/homebrew"
else
- "path or URL"
+ HOMEBREW_PATH_URL_TAP
end
end
diff --git a/Library/Homebrew/tap_constants.rb b/Library/Homebrew/tap_constants.rb
index 4392f5f92..ba387c85b 100644
--- a/Library/Homebrew/tap_constants.rb
+++ b/Library/Homebrew/tap_constants.rb
@@ -8,3 +8,5 @@ HOMEBREW_TAP_DIR_REGEX = %r{#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Taps/([\w-]+
HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{/(.*)}.source)
# match the default brew-cask tap e.g. Caskroom/cask
HOMEBREW_CASK_TAP_FORMULA_REGEX = %r{^(Caskroom)/(cask)/([\w+-.]+)$}
+# the tap name used for formulae installed from paths or URLs
+HOMEBREW_PATH_URL_TAP = "path or URL"