mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-01-04 13:07:00 -06:00
439830b6d4
The switch to compare-xml exhibits non intuitive behaviour in that comparing without use of verbose mode does not detect documents that are identical. The if statement allowed the tests to pass but reads that if the documents compare as true then emit an error message and raise an exception. However this is because it returns false even with the docs are the same content. Unfortunately there was no pre-existing test case added when Since there were concerns about equivalent-xml not being active upstream raised by a distribution maintainer, switching back should be avoided. Attempted use of nokogiri-diff indicated that whitespace changes would be treated as differences with it being unclear how to easily exclude. Moving to xml-simple, which although will treat whitespace as significant and even with NormaliseSpace set to disregard any whitespace around content elements, it requires walking the returned structure to remove the empty content attribute that is left behind to allow a direct comparison between the data structures. To ensure the XML comparison is validated add a test where libvirt returns XML that is different to what was requested, and assert that the expected error is raised, an error message emitted and that the domain define would be reverted to the previous state if possible. Relates-To: #1565 Fixes: #1556
37 lines
1.5 KiB
Ruby
37 lines
1.5 KiB
Ruby
# -*- encoding: utf-8 -*-
|
|
# frozen_string_literal: true
|
|
require File.expand_path('../lib/vagrant-libvirt/version', __FILE__)
|
|
|
|
Gem::Specification.new do |s|
|
|
s.authors = ['Lukas Stanek','Dima Vasilets','Brian Pitts','Darragh Bailey']
|
|
s.email = ['ls@elostech.cz','pronix.service@gmail.com','brian@polibyte.com','daragh.bailey@gmail.com']
|
|
s.license = 'MIT'
|
|
s.description = %q{libvirt provider for Vagrant.}
|
|
s.summary = %q{libvirt provider for Vagrant.}
|
|
s.homepage = VagrantPlugins::ProviderLibvirt::HOMEPAGE
|
|
s.metadata = {
|
|
"source_code_uri" => VagrantPlugins::ProviderLibvirt::HOMEPAGE,
|
|
}
|
|
|
|
s.files = Dir.glob("{lib,locales}/**/*") + %w(LICENSE README.md)
|
|
s.executables = Dir.glob("bin/*.*").map{ |f| File.basename(f) }
|
|
s.test_files = Dir.glob("{test,spec,features}/**/*.*")
|
|
s.name = 'vagrant-libvirt'
|
|
s.require_paths = ['lib']
|
|
s.version = VagrantPlugins::ProviderLibvirt.get_version
|
|
|
|
s.add_runtime_dependency 'fog-libvirt', '>= 0.6.0'
|
|
s.add_runtime_dependency 'fog-core', '~> 2'
|
|
s.add_runtime_dependency 'rexml'
|
|
s.add_runtime_dependency 'xml-simple'
|
|
s.add_runtime_dependency 'diffy'
|
|
|
|
# Make sure to allow use of the same version as Vagrant by being less specific
|
|
s.add_runtime_dependency 'nokogiri', '~> 1.6'
|
|
|
|
s.add_development_dependency 'rake'
|
|
s.add_development_dependency "rspec-core", ">= 3.5"
|
|
s.add_development_dependency "rspec-expectations", ">= 3.5"
|
|
s.add_development_dependency "rspec-mocks", ">= 3.5"
|
|
end
|