Commit c817d701 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

Fix version cast to int

Ensure cast to int of 2 digits major version works
parent 54de2719
......@@ -275,7 +275,7 @@ class Recipe(object):
def get_dependency_list(self, gem_dict, gem_executable):
gem_search_pattern = '^' + gem_dict['gemname'].replace('.',r'\.') + '$'
if self.version[0] < '3':
if int(self.version.split(".")[0]) < 3:
gem_search_pattern = '/' + gem_search_pattern + '/'
cmd = [
......
......@@ -301,6 +301,11 @@ class RubyGemsDefaultTestCase(RubyGemsTestCase):
rubygems.Recipe, buildout, name, options
)
@fixture({'recipe': {'gems': 'sass', 'version': '10.0.0'}})
def test_2_digits_version(self, path, patches, buildout, name, options, version):
recipe = rubygems.Recipe(buildout, name, options)
recipe.update()
class deployment_fixture(fixture):
def check_output_mock(self, cmd, **kwargs):
......
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