Commits

Silvio Tomatis  committed 035f363

Specify a version for each gem in buildout cfg.

  • Participants
  • Parent commits 4cd932a

Comments (0)

Files changed (3)

 Change History
 **************
 
+0.1.4 (UNRELEASED)
+==================
+
+- You can specify a version for each gem with a syntax similar to python eggs.
+
+
 0.1.3 (2011-12-28)
 ==================
 
             self._install_rubygems()
             gem_executable = self.get_gem_executable(bindir)
 
-        s = {
-            'GEM': gem_executable,
-            'OPTIONS': ' '.join([
-                    '--no-rdoc',
-                    '--no-ri',
-                    '--bindir=%s' % bindir,
-                ]),
-            'GEMS': ' '.join(self.gems)
-        }
-        self.run('%(GEM)s install %(OPTIONS)s %(GEMS)s' % s, self._get_env())
+        for gem in self.gems:
+            s = {
+                'GEM': gem_executable,
+                'OPTIONS': ' '.join([
+                        '--no-rdoc',
+                        '--no-ri',
+                        '--bindir=%s' % bindir,
+                    ]),
+                'GEMNAME': gem
+            }
+            if '=' in gem:
+                gemname, version = (gem.strip() for gem in gem.split('='))
+                s['GEMNAME'] = gemname
+                s['OPTIONS'] += ' --version %s' % version
+            print '%(GEM)s install %(OPTIONS)s %(GEMNAME)s' % s
+            self.run('%(GEM)s install %(OPTIONS)s %(GEMNAME)s' % s, self._get_env())
 
         for executable in os.listdir(bindir):
             installed_path = self._install_executable(
 
 from setuptools import setup
 
-version = '0.1.3'
+version = '0.1.4-dev'
 name = 'rubygemsrecipe'