From 35989d7db39fc47d68ef8d9ec3d4777553faa9b7 Mon Sep 17 00:00:00 2001 From: Gosuke Miyashita Date: Sun, 13 Dec 2015 18:27:45 +0900 Subject: [PATCH] Restrict net-ssh version for CI builds with Ruby < 2.0.0 --- Gemfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index c48e3eb6..7b5fd1a3 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ source 'https://rubygems.org' # Specify your gem's dependencies in serverspec.gemspec gemspec -# Put Gemfile.local to use arbitrary gems for your use case. -path = Pathname.new("Gemfile.local") -eval(path.read) if path.exist? +if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') + # net-ssh 3.x dropped Ruby 1.8 and 1.9 support. + gem 'net-ssh', '~> 2.7' +end