From f2e36239c2cb96930ec9f6df3919c8d07bb6d77f Mon Sep 17 00:00:00 2001 From: schneems Date: Fri, 1 Jul 2016 12:12:57 -0500 Subject: [PATCH] Force gem version based on Ruby version in Travis - Rack < 2.0 for Ruby < 2.2.2 - Json < 2.0 for Ruby < 2.0 --- .travis.yml | 1 + Gemfile | 8 ++++++++ gemfiles/Gemfile-1.9 | 2 ++ 3 files changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index aedaed80f..d99dcc4dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ rvm: - 2.0.0 - 2.1 - 2.2 + - 2.3.1 matrix: include: diff --git a/Gemfile b/Gemfile index 3be9c3cd8..bcaad77bc 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,10 @@ source "https://rubygems.org" gemspec + +if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2.2") + gem 'rack', '< 2.0' +end + +if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.0") + gem 'json', '< 2.0' +end diff --git a/gemfiles/Gemfile-1.9 b/gemfiles/Gemfile-1.9 index a51700c42..927a4d9eb 100644 --- a/gemfiles/Gemfile-1.9 +++ b/gemfiles/Gemfile-1.9 @@ -1,3 +1,5 @@ source "https://rubygems.org" gemspec path: '..' gem 'sass', '< 3.4' +gem 'rack', '< 2.0' +gem 'json', '< 2.0'