fix github version parser with multidigit number

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Joshua Peek 2010-03-27 15:02:21 -05:00 committed by Adam Vandenberg
parent 9fbc26a39f
commit 04855ddd48
2 changed files with 6 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class Pathname
# github tarballs are special
# we only support numbered tagged downloads
%r[github.com/.*/tarball/v?((\d\.)+\d)$].match to_s
%r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
return $1 if $1
# eg. boost_1_39_0

View File

@ -74,6 +74,11 @@ class VersionTests < Test::Unit::TestCase
assert_equal '1.0.5', r.version
end
def test_version_github_with_high_patch_number
r=MockFormula.new "http://github.com/lloyd/yajl/tarball/v1.2.34"
assert_equal '1.2.34', r.version
end
def test_yet_another_version
r=MockFormula.new "http://example.com/mad-0.15.1b.tar.gz"
assert_equal '0.15.1b', r.version