diff --git a/.ci/Gemfile.jinja2 b/.ci/Gemfile.jinja2 index 495530d4bb..f03fbc70c8 100644 --- a/.ci/Gemfile.jinja2 +++ b/.ci/Gemfile.jinja2 @@ -1,5 +1,14 @@ source 'https://rubygems.org' ruby '2.2.2' - -{% for gem in gems %}gem "{{gem.name + '"' if gem.required == '' else gem.name + '", require: false'}} -{% endfor %} +{% for gem in gems %} +{%- if gem.version != '' and gem.required != '' %} +gem "{{ gem.name + '", "' + gem.version + '", require: false' }} +{%- elif gem.version == '' and gem.required == '' %} +gem "{{ gem.name + '"' }} +{%- elif gem.version != '' and gem.required == '' %} +gem "{{ gem.name + '", "' + gem.version + '"' }} +{%- else %} +gem "{{ gem.name + '", require: false' }} +{%- endif %} +{%- endfor %} +{{ '' }} diff --git a/.ci/generate_bear_requirements.py b/.ci/generate_bear_requirements.py index 6f6ef166e8..f92131c45d 100755 --- a/.ci/generate_bear_requirements.py +++ b/.ci/generate_bear_requirements.py @@ -125,8 +125,9 @@ def write_gem_requirements(requirements): for requirement in requirements: gem_dependencies.append( - {'name' : requirement.package, - 'required' : requirement.require}) + {'name': requirement.package, + 'version': requirement.version, + 'required': requirement.require}) gemfile_string = template.render( gems=gem_dependencies diff --git a/Gemfile b/Gemfile index 555de5762e..33bf6bf358 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' ruby '2.2.2' gem "csvlint" -gem "puppet-lint" +gem "puppet-lint", "2.1.1" gem "reek" gem "rubocop" gem "scss_lint", require: false diff --git a/bears/configfiles/PuppetLintBear.py b/bears/configfiles/PuppetLintBear.py index cf3bca3a4b..f7b8130a0b 100644 --- a/bears/configfiles/PuppetLintBear.py +++ b/bears/configfiles/PuppetLintBear.py @@ -14,7 +14,7 @@ class PuppetLintBear: ''' LANGUAGES = {'Puppet'} - REQUIREMENTS = {GemRequirement('puppet-lint', '2')} + REQUIREMENTS = {GemRequirement('puppet-lint', '2.1.1')} AUTHORS = {'The coala developers'} AUTHORS_EMAILS = {'coala-devel@googlegroups.com'} LICENSE = 'AGPL-3.0'