Move "path or URL" tap string to global constant.

This commit is contained in:
Mike McQuaid 2015-02-12 16:02:23 +00:00
parent 7004d3de0d
commit 0caa1912d9
2 changed files with 3 additions and 1 deletions

View File

@ -540,7 +540,7 @@ class Formula
elsif core_formula? elsif core_formula?
"Homebrew/homebrew" "Homebrew/homebrew"
else else
"path or URL" HOMEBREW_PATH_URL_TAP
end end
end end

View File

@ -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) HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{/(.*)}.source)
# match the default brew-cask tap e.g. Caskroom/cask # match the default brew-cask tap e.g. Caskroom/cask
HOMEBREW_CASK_TAP_FORMULA_REGEX = %r{^(Caskroom)/(cask)/([\w+-.]+)$} 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"