Commit c2f38e2c authored by sirex's avatar sirex

Updated documentation for gem versions feature and made some improvements to

this feature.
parent f36bfcc7
...@@ -20,6 +20,7 @@ Usage ...@@ -20,6 +20,7 @@ Usage
recipe = rubygemsrecipe recipe = rubygemsrecipe
gems = gems =
sass sass
compass==0.10
After running buildout you can use SASS from buildout environment:: After running buildout you can use SASS from buildout environment::
...@@ -29,7 +30,8 @@ Options ...@@ -29,7 +30,8 @@ Options
======= =======
gems gems
list of gem package names. list of gem package names, also you can specify gem version, example:
``sass==3.1.1``.
version version
rubygems version, if not specified, recipe will try to find most recent rubygems version, if not specified, recipe will try to find most recent
......
...@@ -162,21 +162,23 @@ class Recipe(object): ...@@ -162,21 +162,23 @@ class Recipe(object):
self._install_rubygems() self._install_rubygems()
gem_executable = self.get_gem_executable(bindir) gem_executable = self.get_gem_executable(bindir)
for gem in self.gems: s = {
s = { 'GEM': gem_executable,
'GEM': gem_executable, 'OPTIONS': ' '.join([
'OPTIONS': ' '.join([ '--no-rdoc',
'--no-rdoc', '--no-ri',
'--no-ri', '--bindir=%s' % bindir,
'--bindir=%s' % bindir, ]),
]), }
'GEMNAME': gem for gemname in self.gems:
} if '==' in gemname:
if '=' in gem: gemname, version = gemname.split('==', 1)
gemname, version = (gem.strip() for gem in gem.split('=')) s['GEMNAME'] = gemname.strip()
s['OPTIONS'] += ' --version %s' % version.strip()
else:
s['GEMNAME'] = gemname s['GEMNAME'] = gemname
s['OPTIONS'] += ' --version %s' % version self.run('%(GEM)s install %(OPTIONS)s %(GEMNAME)s' % s,
self.run('%(GEM)s install %(OPTIONS)s %(GEMNAME)s' % s, self._get_env()) self._get_env())
for executable in os.listdir(bindir): for executable in os.listdir(bindir):
installed_path = self._install_executable( installed_path = self._install_executable(
......
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