Add debian style names to version checker.
This commit is contained in:
parent
4ae8029557
commit
375f8094d3
@ -146,6 +146,10 @@ class Pathname
|
|||||||
/-((\d+\.)+\d+[abc]?)[-.](bin|stable|src|sources?)$/.match stem
|
/-((\d+\.)+\d+[abc]?)[-.](bin|stable|src|sources?)$/.match stem
|
||||||
return $1 if $1
|
return $1 if $1
|
||||||
|
|
||||||
|
# Debian style eg dash_0.5.5.1.orig.tar.gz
|
||||||
|
/_((\d+\.)+\d+[abc]?)[.]orig$/.match stem
|
||||||
|
return $1 if $1
|
||||||
|
|
||||||
# eg. otp_src_R13B (this is erlang's style)
|
# eg. otp_src_R13B (this is erlang's style)
|
||||||
# eg. astyle_1.23_macosx.tar.gz
|
# eg. astyle_1.23_macosx.tar.gz
|
||||||
stem.scan /_([^_]+)/ do |match|
|
stem.scan /_([^_]+)/ do |match|
|
||||||
|
|||||||
@ -140,4 +140,14 @@ class VersionTests < Test::Unit::TestCase
|
|||||||
check 'http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz',
|
check 'http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz',
|
||||||
'1.4.14b'
|
'1.4.14b'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_debian_style_1
|
||||||
|
check 'http://ftp.de.debian.org/debian/pool/main/s/sl/sl_3.03.orig.tar.gz',
|
||||||
|
'3.03'
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_debian_style_2
|
||||||
|
check 'http://ftp.de.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz',
|
||||||
|
'1.01b'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user