diff options
| author | Mike McQuaid | 2013-08-03 20:03:58 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2013-08-03 22:27:42 -0700 |
| commit | 98c3d39e655881c79f485c599902722180068df9 (patch) | |
| tree | d055f196816bbb8d1e0c8f7eb76e6d00a6adfa71 /Library | |
| parent | b507536f80169ec0789d1a01fcbc47baede431f8 (diff) | |
| download | brew-98c3d39e655881c79f485c599902722180068df9.tar.bz2 | |
bottle_versions: add ssh_copy_id bottle detection.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/bottle_version.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_bottle_versions.rb | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/bottle_version.rb b/Library/Homebrew/bottle_version.rb index 9da0bf3e3..477863297 100644 --- a/Library/Homebrew/bottle_version.rb +++ b/Library/Homebrew/bottle_version.rb @@ -7,6 +7,10 @@ class BottleVersion < Version m = /-([\d\.]+-x86(_64)?)/.match(stem) return m.captures.first unless m.nil? + # e.g. ssh-copy-id-6.2p2.bottle.tar.gz + m = /(\d\.(\d)+(p(\d)+)?)/.match(stem) + return m.captures.first unless m.nil? + super end end diff --git a/Library/Homebrew/test/test_bottle_versions.rb b/Library/Homebrew/test/test_bottle_versions.rb index d1cd002ca..b0b061d67 100644 --- a/Library/Homebrew/test/test_bottle_versions.rb +++ b/Library/Homebrew/test/test_bottle_versions.rb @@ -10,4 +10,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase assert_version_detected '2013.1.610569-x86_64', '/usr/local/perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz' end + + def test_ssh_copy_id_style + assert_version_detected '6.2p2', + '/usr/local/ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz' + end end |
