From 586864393e405a67b1457b563a4d5adc99e50e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 26 Mar 2020 20:48:15 +0100 Subject: [PATCH] Auto-install the right bundler version (#168) --- .travis.yml | 2 +- lib/appraisal/command.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a43a987..04fca451 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ --- -before_install: gem install bundler:1.17.3 +before_install: gem install bundler:2.1.4 rvm: - 2.3 diff --git a/lib/appraisal/command.rb b/lib/appraisal/command.rb index 5ba7f794..26619e50 100644 --- a/lib/appraisal/command.rb +++ b/lib/appraisal/command.rb @@ -41,9 +41,9 @@ def with_clean_env end def ensure_bundler_is_available - unless system %(gem list -q "^bundler$" | grep -q bundler) + version = Utils.bundler_version + unless system %(gem list -i bundler -v #{version}) puts ">> Reinstall Bundler into #{ENV["GEM_HOME"]}" - version = Utils.bundler_version unless system "gem install bundler --version #{version}" puts