Skip to content
Snippets Groups Projects
Commit eec8cc6a authored by Mike McQuaid's avatar Mike McQuaid
Browse files

jpeg: support version format.

parent 0a3530ec
No related branches found
No related tags found
No related merge requests found
......@@ -243,6 +243,10 @@ class VersionParsingTests < Test::Unit::TestCase
assert_version_detected '1.2.0-rc2', 'http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin.tar.gz'
end
def test_jpeg_style
assert_version_detected '8d', 'http://www.ijg.org/files/jpegsrc.v8d.tar.gz'
end
# def test_version_ghc_style
# assert_version_detected '7.0.4', 'http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-x86_64-apple-darwin.tar.bz2'
# assert_version_detected '7.0.4', 'http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-i386-apple-darwin.tar.bz2'
......
......@@ -183,6 +183,10 @@ class Version
# e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war
m = /\/(\d\.\d+)\//.match(spec.to_s)
return m.captures.first unless m.nil?
# e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz
m = /\.v(\d+[a-z]?)/.match(stem)
return m.captures.first unless m.nil?
end
# DSL for defining comparators
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment