aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-08-03 20:03:58 -0700
committerMike McQuaid2013-08-03 22:27:42 -0700
commit5bbe98f3a1ea076006dcf650d339c88972ae4708 (patch)
tree1abddfdf14b3d1a3a84567ae92956177b8c2dab1 /Library
parent36dcc6ba021e42de53a960eaa9286baddd72abb1 (diff)
downloadhomebrew-5bbe98f3a1ea076006dcf650d339c88972ae4708.tar.bz2
bottle_versions: add ssh_copy_id bottle detection.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/bottle_version.rb4
-rw-r--r--Library/Homebrew/test/test_bottle_versions.rb5
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