From d83e4469c516b79ae4ed442270373efd8f65f7f4 Mon Sep 17 00:00:00 2001 From: Matt Brictson Date: Mon, 18 Jun 2018 08:21:27 -0700 Subject: [PATCH] Fix Travis failure for Ruby < 2.2.6 --- Gemfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index e01eac69..25377c54 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,24 @@ source "https://rubygems.org" gemspec group :cucumber do - gem "cucumber" + # Latest versions of cucumber don't support Ruby < 2.1 + # rubocop:disable Bundler/DuplicatedGem + if Gem::Requirement.new("< 2.1").satisfied_by?(Gem::Version.new(RUBY_VERSION)) + gem "cucumber", "< 3.0.1" + else + gem "cucumber" + end + # rubocop:enable Bundler/DuplicatedGem gem "rspec" gem "rspec-core", "~> 3.4.4" end + +# Latest versions of net-ssh don't support Ruby < 2.2.6 +if Gem::Requirement.new("< 2.2.6").satisfied_by?(Gem::Version.new(RUBY_VERSION)) + gem "net-ssh", "< 5.0.0" +end + +# Latest versions of public_suffix don't support Ruby < 2.1 +if Gem::Requirement.new("< 2.1").satisfied_by?(Gem::Version.new(RUBY_VERSION)) + gem "public_suffix", "< 3.0.0" +end