diff --git a/README.rst b/README.rst index 3072f0ba933fbd48bcf494cd5874c27ab5377439..5c6a5035399eaa91bb91a400492319731e816f48 100644 --- a/README.rst +++ b/README.rst @@ -24,3 +24,13 @@ Usage After running buildout you can use SASS from buildout environment:: ./bin/sass --version + +Options +======= + +gems + list of gem package names. + +version + rubygems version, if not specified, recipe will try to find most recent + version. diff --git a/rubygems.py b/rubygems.py index dc6f64db1b808ed4222cf7cd6c92a9aea8e496d1..bde0116b3f4c515fdde724a395613baa3fc217e8 100644 --- a/rubygems.py +++ b/rubygems.py @@ -28,6 +28,7 @@ class Recipe(object): raise zc.buildout.UserError('Configuration error') self.gems = options['gems'].split() + self.version = options.get('version') def run(self, cmd, environ=None): @@ -78,6 +79,10 @@ class Recipe(object): } def _get_latest_rubygems(self): + if self.version: + return ('http://production.cf.rubygems.org/rubygems/' + 'rubygems-%s.zip' % self.version, self.version) + f = urllib.urlopen('http://rubygems.org/pages/download') s = f.read() f.close()