From 921fd40486f9289e1b317c44a6ebac37627ea6fa Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Wed, 4 Jan 2017 11:59:41 +0100 Subject: [PATCH] Gemfile: Remove json, json_pure dependency for Ruby >= 2 We only need to pin json it down to < 2 on Ruby 1.9 --- Gemfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 717927439..fec15c1ee 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,16 @@ source 'https://rubygems.org' -puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION'].to_s}" : ">= 3.8" -jsonversion = ENV['TRAVIS_RUBY_VERSION'].to_i <= 2 ? "1.8.3" : "~> 2.0" -gem 'puppet', puppetversion + +gem 'puppet', ENV.key?('PUPPET_VERSION') ? ENV['PUPPET_VERSION'].to_s : '>= 3.8' + gem 'puppetlabs_spec_helper', '>= 0.1.0' gem 'puppet-lint', '>= 0.3.2' gem 'facter', '>= 1.7.0' gem 'facterdb', :git => 'https://github.com/jfryman/facterdb', :ref => 'sles-12-support' gem 'rspec-puppet-facts', '>= 1.6.0' -gem 'json', jsonversion -gem 'json_pure', jsonversion gem 'metadata-json-lint' + +# json > 2.0.1 is not compatible with Ruby 1.9 +if RUBY_VERSION < '2.0.0' + gem 'json', '< 2' + gem 'json_pure', '< 2' +end