mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
jpeg: support version format.
This commit is contained in:
parent
0a3530ecd9
commit
eec8cc6a12
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user