mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-30 12:39:48 -05:00
bottle_versions: add perforce bottle detection.
This commit is contained in:
1 parent
ee972d943b
commit
36dcc6ba02
2 files changed
+9
No files matched your search
@@ -3,6 +3,10 @@ class BottleVersion < Version
|
||||
spec = Pathname.new(spec) unless spec.is_a? Pathname
|
||||
stem = spec.stem
|
||||
|
||||
# e.g. perforce-2013.1.610569-x86_64
|
||||
m = /-([\d\.]+-x86(_64)?)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
@@ -5,4 +5,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
|
||||
def assert_version_detected expected, path
|
||||
assert_equal expected, BottleVersion.parse(path).to_s
|
||||
end
|
||||
|
||||
def test_perforce_style
|
||||
assert_version_detected '2013.1.610569-x86_64',
|
||||
'/usr/local/perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz'
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user