Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle REXML requires for Ubuntu focal #1584

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/unit-tests.yml
Expand Up @@ -41,6 +41,12 @@ jobs:
- ruby: 2.6.6
vagrant: v2.2.14
allow_fail: false
- ruby: 2.7.2
vagrant: v2.2.10
allow_fail: false
# above block is to ensure compatible with Ubuntu 20.04 vagrant package
# although it uses 2.2.10 it is the earliest version that will install on
# ruby 2.7 without patching
- ruby: 3.0.0
vagrant:
allow_fail: false
Expand Down
7 changes: 2 additions & 5 deletions lib/vagrant-libvirt/action/destroy_domain.rb
Expand Up @@ -2,11 +2,8 @@

require 'log4r'

begin
require 'rexml'
rescue LoadError
require 'rexml/rexml'
end
require 'rexml/document'
require 'rexml/xpath'

require 'vagrant-libvirt/util/domain_flags'

Expand Down
7 changes: 2 additions & 5 deletions lib/vagrant-libvirt/action/resolve_disk_settings.rb
Expand Up @@ -2,11 +2,8 @@

require 'log4r'

begin
require 'rexml'
rescue LoadError
require 'rexml/rexml'
end
require 'rexml/document'
require 'rexml/xpath'

require 'vagrant-libvirt/util/resolvers'

Expand Down
2 changes: 2 additions & 0 deletions lib/vagrant-libvirt/action/start_domain.rb
Expand Up @@ -3,6 +3,8 @@
require 'log4r'

require 'rexml/document'
require 'rexml/formatters/pretty'
require 'rexml/xpath'

require 'vagrant-libvirt/util/xml'

Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-libvirt/util/compat.rb
Expand Up @@ -11,7 +11,7 @@ module Util
module Compat
def self.action_hook_args(name, action)
# handle different number of arguments for action_hook depending on vagrant version
if Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('2.2.11')
if Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('2.2.10')
return name, action
end

Expand Down