bottle_version: handle libpano.

This commit is contained in:
Mike McQuaid 2014-10-20 08:57:19 +01:00
parent bb167ef902
commit 7a06bc067e
2 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,10 @@ class BottleVersion < Version
m = /(00-\d+\.\d+(\.\d+)+)/.match(stem)
return m.captures.first unless m.nil?
# e.g. 13-2.9.19 from libpano-13-2.9.19_1.yosemite.bottle.tar.gz
m = /\D+-(\d+-[\d\.]+)/.match(stem)
return m.captures.first unless m.nil?
# e.g. 1.6.39 from pazpar2-1.6.39.mavericks.bottle.tar.gz
m = /-(\d+\.\d+(\.\d+)+)/.match(stem)
return m.captures.first unless m.nil?

View File

@ -55,4 +55,9 @@ class BottleVersionParsingTests < Homebrew::TestCase
assert_version_detected 'R16B03-1',
'erlang-R16B03-1.mavericks.bottle.2.tar.gz'
end
def test_libpano_style
assert_version_detected '13-2.9.19',
'libpano-13-2.9.19_1.yosemite.bottle.tar.gz'
end
end