diff options
| author | Joshua Peek | 2010-03-27 15:02:21 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2010-03-27 14:01:19 -0700 |
| commit | 04855ddd484389bc8292a4d82106185466a3eb89 (patch) | |
| tree | 6fde7564639a9844d7b00936aaed637e9eb2a0fe /Library/Homebrew | |
| parent | 9fbc26a39ff86f3a9b1ea0f79b502f5736a5119b (diff) | |
| download | brew-04855ddd484389bc8292a4d82106185466a3eb89.tar.bz2 | |
fix github version parser with multidigit number
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_versions.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index e2489a51b..d4fa6d92e 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -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 diff --git a/Library/Homebrew/test/test_versions.rb b/Library/Homebrew/test/test_versions.rb index 446b2c8ef..3e55676f5 100644 --- a/Library/Homebrew/test/test_versions.rb +++ b/Library/Homebrew/test/test_versions.rb @@ -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 |
