Commit 4fcfb6ec authored by Laurence Rowe's avatar Laurence Rowe

Add option to sepcify rubygems url now that download location has changed.

parent c58a8063
......@@ -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.
......
......@@ -29,6 +29,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')
......@@ -80,6 +81,12 @@ class Recipe(object):
}
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