Support testing against ruby 3.0 (#1243)

Retrieve vagrant and ruby-libvirt dependencies and modify as needed to
allow testing against ruby 3.0 until released versions support.

Use conditionals to skip steps when not needed.

Note that in order to use the locally built gem added to the cache
manually, need to disable checksums. However as all other ruby
versions will continue to use it, shouldn't be an issue as long as the
cache for ruby 3.0.0 is wiped clean before being used for anything such
as publishing.

Fixes: #1244
This commit is contained in:
Darragh Bailey
2021-04-07 19:41:28 +01:00
committed by GitHub
parent 8f65aec9eb
commit fbf026aeaa
2 changed files with 55 additions and 5 deletions

11
Gemfile
View File

@@ -8,11 +8,12 @@ group :development do
# gem dependency because we expect to be installed within the
# Vagrant environment itself using `vagrant plugin`.
vagrant_version = ENV['VAGRANT_VERSION']
if vagrant_version
if !vagrant_version.nil? && !vagrant_version.empty?
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git',
tag: vagrant_version
:ref => vagrant_version
else
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git'
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git',
:branch => 'main'
end
begin
@@ -30,6 +31,10 @@ group :development do
gem 'vagrant-spec', :github => 'hashicorp/vagrant-spec', :branch => "main"
end
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
gem 'rexml'
end
gem 'pry'
end