tap_constants: rename HOMEBREW_CASK_TAP_FORMULA_REGEX

New name is HOMEBREW_CASK_TAP_CASK_REGEX
This commit is contained in:
Josh Hagins 2016-10-19 11:56:40 -04:00
parent 44f1354d63
commit c7e6613f7b
3 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ module Homebrew
unless ARGV.force?
ARGV.named.each do |name|
next if File.exist?(name)
if name !~ HOMEBREW_TAP_FORMULA_REGEX && name !~ HOMEBREW_CASK_TAP_FORMULA_REGEX
if name !~ HOMEBREW_TAP_FORMULA_REGEX && name !~ HOMEBREW_CASK_TAP_CASK_REGEX
next
end
tap = Tap.fetch($1, $2)

View File

@ -58,7 +58,7 @@ module HomebrewArgvExtension
end
def casks
@casks ||= downcased_unique_named.grep HOMEBREW_CASK_TAP_FORMULA_REGEX
@casks ||= downcased_unique_named.grep HOMEBREW_CASK_TAP_CASK_REGEX
end
def kegs

View File

@ -7,4 +7,4 @@ HOMEBREW_TAP_DIR_REGEX = %r{#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Taps/([\w-]+
# match taps' formula paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap/someformula
HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{/(.*)}.source)
# match the default and the versions brew-cask tap e.g. Caskroom/cask or Caskroom/versions
HOMEBREW_CASK_TAP_FORMULA_REGEX = %r{^([Cc]askroom)/(cask|versions)/([\w+-.]+)$}
HOMEBREW_CASK_TAP_CASK_REGEX = %r{^([Cc]askroom)/(cask|versions)/([\w+-.]+)$}