2015-06-07 11:49:41 -07:00
|
|
|
# match taps' formulae, e.g. someuser/sometap/someformula
|
2016-09-04 11:15:32 +01:00
|
|
|
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}
|
2016-10-19 11:54:30 -04:00
|
|
|
# match taps' casks, e.g. someuser/sometap/somecask
|
|
|
|
HOMEBREW_TAP_CASK_REGEX = %r{^([\w-]+)/([\w-]+)/([a-z0-9\-]+)$}
|
2015-06-07 11:49:41 -07:00
|
|
|
# match taps' directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap
|
2017-07-29 16:27:54 +02:00
|
|
|
HOMEBREW_TAP_DIR_REGEX = %r{#{Regexp.escape(HOMEBREW_LIBRARY)}/Taps/(?<user>[\w-]+)/(?<repo>[\w-]+)}
|
2015-06-07 11:49:41 -07:00
|
|
|
# match taps' formula paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap/someformula
|
2014-05-14 16:43:52 +09:00
|
|
|
HOMEBREW_TAP_PATH_REGEX = Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{/(.*)}.source)
|
2016-01-11 20:34:55 +11:00
|
|
|
# match the default and the versions brew-cask tap e.g. Caskroom/cask or Caskroom/versions
|
2016-10-19 11:56:40 -04:00
|
|
|
HOMEBREW_CASK_TAP_CASK_REGEX = %r{^([Cc]askroom)/(cask|versions)/([\w+-.]+)$}
|