mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Latest vagrant depends on a vagrant-spec release containing a more recent dependency on childprocess than is supported for earlier releases of vagrant. Adjust dependencies to pin to the specific release of vagrant-spec if the request version of vagrant is 2.2.7 or older. Does not attempt to handle the situation where a version is specified that cannot be parsed. While it would be useful to test against newer versions of 2.2.x, it appears this encounters a bug in upstream vagrant when installing in dev mode see https://github.com/hashicorp/vagrant#11293 Therefore limit latest 2.2.x released version tested against to 2.2.4.
41 lines
1.2 KiB
Ruby
41 lines
1.2 KiB
Ruby
source 'https://rubygems.org'
|
|
|
|
# Specify your gem's dependencies in vagrant-libvirt.gemspec
|
|
gemspec
|
|
|
|
group :development do
|
|
# We depend on Vagrant for development, but we don't add it as a
|
|
# gem dependency because we expect to be installed within the
|
|
# Vagrant environment itself using `vagrant plugin`.
|
|
vagrant_version = ENV['VAGRANT_VERSION']
|
|
if vagrant_version
|
|
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git',
|
|
tag: vagrant_version
|
|
else
|
|
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git'
|
|
end
|
|
|
|
begin
|
|
raise if vagrant_version.empty?
|
|
vagrant_version = vagrant_version[1..-1] if vagrant_version && vagrant_version.start_with?('v')
|
|
vagrant_gem_version = Gem::Version.new(vagrant_version)
|
|
rescue
|
|
# default to newer if unable to parse
|
|
vagrant_gem_version = Gem::Version.new('2.2.8')
|
|
end
|
|
|
|
if vagrant_gem_version <= Gem::Version.new('2.2.7')
|
|
gem 'vagrant-spec', :github => 'hashicorp/vagrant-spec', :ref => '161128f2216cee8edb7bcd30da18bd4dea86f98a'
|
|
else
|
|
gem 'vagrant-spec', :github => 'hashicorp/vagrant-spec'
|
|
end
|
|
|
|
gem 'pry'
|
|
end
|
|
|
|
group :plugins do
|
|
gemspec
|
|
end
|
|
|
|
gem 'coveralls', require: false
|