Gemfile in vagrant-config_builder-1.2.0 vs Gemfile in vagrant-config_builder-1.3.0

- old
+ new

@@ -1,30 +1,40 @@ source 'https://rubygems.org' +require 'rubygems/version' -ENV['TEST_VAGRANT_VERSION'] ||= 'v1.8.4' +vagrant_branch = ENV['TEST_VAGRANT_VERSION'] || 'v2.1.2' +vagrant_version = nil # Wrapping gemspec in the :plugins group causes Vagrant 1.5 and newer to # automagically load this plugin during acceptance tests. group :plugins do gemspec end group :development do - gem 'yard', '~> 0.8.7' + gem 'yard', '~> 0.9.11' gem 'redcarpet' 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/hashicorp/vagrant.git', + :branch => 'master' else - gem 'vagrant', :github => 'mitchellh/vagrant', :tag => ENV['TEST_VAGRANT_VERSION'] - # FIXME: Hack to allow Vagrant v1.6.5 to install for tests. Remove when - # support for 1.6.5 is dropped. - gem 'rack', '< 2' + vagrant_version = Gem::Version.new(vagrant_branch.sub(/^v/, '')) + gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git', + :tag => vagrant_branch 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')) + # Pinned on 2018-06-27. Compatible with Vagrant > 1.9. Brings in Rspec 3. + gem 'vagrant-spec', :git => 'https://github.com/hashicorp/vagrant-spec.git', + :ref => '9413ab2' + elsif vagrant_version + # Pinned on 2014-12-10. Compatible with Vagrant 1.6.x -- 1.8.7. + gem 'vagrant-spec', :git => 'https://github.com/hashicorp/vagrant-spec.git', + :ref => '1df5a3a' + end end eval_gemfile "#{__FILE__}.local" if File.exists? "#{__FILE__}.local"