Make tap_ref match similar code in update

This commit is contained in:
Jack Nagel 2014-07-06 12:42:08 -05:00
parent f8fb74ff76
commit 2d83c08592
2 changed files with 4 additions and 6 deletions

View File

@ -121,12 +121,10 @@ module Homebrew
def tap_ref(path)
case path.to_s
when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula}o
"Homebrew/homebrew/#{path.basename(".rb")}"
when HOMEBREW_TAP_PATH_REGEX
"#$1/#$2/#{File.basename($3, '.rb')}"
when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula/(.+)}o
"Homebrew/homebrew/#{File.basename($1, '.rb')}"
else
nil
"#{$1}/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"
end
end
end

View File

@ -269,7 +269,7 @@ class Report
when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula}o
path.basename(".rb").to_s
when HOMEBREW_TAP_PATH_REGEX
"#$1/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"
"#{$1}/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"
end
end.compact.sort
end