Add url_for_version and list_url to Ruby package (#8216)

This commit is contained in:
Adam J. Stewart 2018-07-06 07:22:38 -05:00 committed by GitHub
parent f946a83c8c
commit cf140b5f4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,8 @@ class Ruby(AutotoolsPackage):
homepage = "https://www.ruby-lang.org/"
url = "http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz"
list_url = "http://cache.ruby-lang.org/pub/ruby/"
list_depth = 1
version('2.2.0', 'cd03b28fd0b555970f5c4fd481700852')
@ -63,6 +65,10 @@ class Ruby(AutotoolsPackage):
expand=False
)
def url_for_version(self, version):
url = "http://cache.ruby-lang.org/pub/ruby/{0}/ruby-{1}.tar.gz"
return url.format(version.up_to(2), version)
def configure_args(self):
args = []
if '+openssl' in self.spec: