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