Skip to content

Commit

Permalink
Bump default Vagrant version to 1.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharpie committed May 20, 2017
1 parent e1becf9 commit 54d94d9
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
source 'https://rubygems.org'
require 'rubygems/version'

ENV['TEST_VAGRANT_VERSION'] ||= 'v1.8.5'
vagrant_branch = ENV['TEST_VAGRANT_VERSION'] || 'v1.9.5'
vagrant_version = nil

# Wrapping gemspec in the :plugins group causes Vagrant 1.5 and newer to
# automagically load this plugin during acceptance tests.
Expand All @@ -14,17 +16,28 @@ group :development do
end

group :test do
if ENV['TEST_VAGRANT_VERSION'] == 'HEAD'
gem 'vagrant', :github => 'mitchellh/vagrant', :branch => 'master'
case vagrant_branch
when /head/i
gem 'vagrant', :git => 'https://github.com/mitchellh/vagrant.git',
:branch => 'master'
else
gem 'vagrant', :github => 'mitchellh/vagrant', :tag => ENV['TEST_VAGRANT_VERSION']
vagrant_version = Gem::Version.new(vagrant_branch.sub(/^v/, ''))
gem 'vagrant', :git => 'https://github.com/mitchellh/vagrant.git',
:tag => vagrant_branch
# FIXME: Hack to allow Vagrant v1.6.5 to install for tests. Remove when
# support for 1.6.5 is dropped.
gem 'rack', '< 2'
end

# Pinned on 2/21/2016. Compatible with Vagrant 1.6.x, 1.7.x and 1.8.x.
gem 'vagrant-spec', :github => 'mitchellh/vagrant-spec', :ref => '9bba7e1'
if vagrant_branch.match(/head/i) || (vagrant_version > Gem::Version.new('1.9.3'))
# Pinned on 4/11/2017. Compatible with Vagrant > 1.9.3.
gem 'vagrant-spec', :git => 'https://github.com/mitchellh/vagrant-spec.git',
:ref => '1d09951'
elsif vagrant_version
# Pinned on 12/10/2014. Compatible with Vagrant 1.6.x -- 1.9.3.
gem 'vagrant-spec', :git => 'https://github.com/mitchellh/vagrant-spec.git',
:ref => '1df5a3a'
end
end

eval_gemfile "#{__FILE__}.local" if File.exists? "#{__FILE__}.local"

0 comments on commit 54d94d9

Please sign in to comment.