Commit b2fa8224 authored by sirex's avatar sirex

Merged in lrowe/rubygemsrecipe (pull request #5)

Add option to sepcify rubygems url now that download location has changed.
parents a5b62f3d 4fcfb6ec
......@@ -33,6 +33,10 @@ gems
list of gem package names, also you can specify gem version, example:
``sass==3.1.1``.
url
rubygems zip download url, if not specified, recipe will try to find most
recent version.
version
rubygems version, if not specified, recipe will try to find most recent
version.
......
......@@ -31,6 +31,7 @@ class Recipe(object):
self.gems = options['gems'].split()
self.version = options.get('version')
self.url = options.get('url')
# Allow to define specific ruby executable. If not, take just 'ruby'
self.ruby_executable = options.get('ruby-executable', 'ruby')
......@@ -95,6 +96,12 @@ class Recipe(object):
return env
def _get_latest_rubygems(self):
if self.url:
version = self.version
if not version:
version = re.search(r'rubygems-([0-9.]+).zip$', self.url).group(1)
return (self.url, version)
if self.version:
return ('http://production.cf.rubygems.org/rubygems/'
'rubygems-%s.zip' % self.version, self.version)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment