From 2f4f8cae373ab369c0af05afba3aba0a22cdcd98 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Fri, 29 Jul 2016 19:05:04 +0200 Subject: [PATCH] Cap rake and json_pure versions on Ruby < 2.0 --- .travis.yml | 11 +++++++---- Gemfile | 18 ++++++++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0f0042..acc6bdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,10 @@ language: ruby rvm: - 1.8.7 - 1.9.3 - - 2.0 - - 2.1 - - 2.2 + - 2.0.0 + - 2.1.10 + - 2.2.5 + - 2.3.1 env: - PUPPET_GEM_VERSION="~> 3.7" - PUPPET_GEM_VERSION="~> 4.0" @@ -14,6 +15,8 @@ matrix: exclude: - rvm: 1.8.7 env: PUPPET_GEM_VERSION="~> 4.0" - - rvm: 2.2 + - rvm: 2.2.5 + env: PUPPET_GEM_VERSION="~> 3.7" + - rvm: 2.3.1 env: PUPPET_GEM_VERSION="~> 3.7" fast_finish: true diff --git a/Gemfile b/Gemfile index fde04aa..bdcff37 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,17 @@ else end gem 'puppetlabs_spec_helper', :require => false -# https://github.com/rspec/rspec-core/issues/1864 -gem 'rspec', '< 3.2.0', {"platforms"=>["ruby_18"]} -gem 'rspec-puppet', '~> 2.1.0', :require => false -gem 'metadata-json-lint', :require => false +gem 'metadata-json-lint', :require => false + +## compatibility + +platforms :ruby_18 do + # https://github.com/rspec/rspec-core/issues/1864 + gem 'rspec', '< 3.2.0', :require => false + gem 'rake', '< 11.0.0', :require => false +end + +platforms :ruby_18, :ruby_19 do + gem 'json', '< 2.0.0', :require => false + gem 'json_pure', '< 2.0.0', :require => false +end