Skip to content

Commit cfa1264

Browse files
authored
Merge pull request #99 from fac/dependabot/bundler/libxml-ruby-6.0.0
Update libxml-ruby requirement from ~> 5.0.3 to >= 5.0.3, < 6.1.0
2 parents 44010b1 + 49ea97b commit cfa1264

7 files changed

Lines changed: 18 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [3.5.0] - 2026-05-25
11+
- Updated libxml-ruby to v6.0.0
12+
1013
## [3.4.0] - 2026-04-17
1114
### Changed
1215
- Bumped Gem required ruby version to >= 3.4

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PATH
22
remote: .
33
specs:
4-
hermod (3.4.0)
4+
hermod (3.5.0)
55
activesupport (> 3.2)
6-
libxml-ruby (~> 5.0.3)
6+
libxml-ruby (>= 5.0.3, < 6.1.0)
77

88
GEM
99
remote: https://rubygems.org/
@@ -56,7 +56,7 @@ GEM
5656
concurrent-ruby (~> 1.0)
5757
io-console (0.8.2)
5858
json (2.19.3)
59-
libxml-ruby (5.0.6)
59+
libxml-ruby (6.0.0)
6060
listen (3.10.0)
6161
logger
6262
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -155,11 +155,11 @@ CHECKSUMS
155155
guard (2.20.1) sha256=ab9cd7873854e6b76080c0589f781ff3e390e441bdda20165804df54f977015a
156156
guard-compat (1.2.1) sha256=3ad21ab0070107f92edfd82610b5cdc2fb8e368851e72362ada9703443d646fe
157157
guard-minitest (3.0.0) sha256=0c418e62a4081a429e4e66ad094a3b66f113423542b43ad7b2df0c87f19d5728
158-
hermod (3.4.0)
158+
hermod (3.5.0)
159159
i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
160160
io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
161161
json (2.19.3) sha256=289b0bb53052a1fa8c34ab33cc750b659ba14a5c45f3fcf4b18762dc67c78646
162-
libxml-ruby (5.0.6) sha256=ef82ff4b4c6aaaa9629f0a2d5deccd9502507e368bf2c5a98d675f634013ca46
162+
libxml-ruby (6.0.0) sha256=a9d9458d018dee591d0995fdc1110cd67ec32b7be67d36fdb9e0b01a4ca9dac4
163163
listen (3.10.0) sha256=c6e182db62143aeccc2e1960033bebe7445309c7272061979bb098d03760c9d2
164164
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
165165
lumberjack (1.4.2) sha256=40de5ae46321380c835031bcc1370f13bba304d29f2b5f5bb152061a5a191b95

hermod.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
2222

2323
spec.required_ruby_version = ">= 3.4"
2424

25-
spec.add_runtime_dependency "libxml-ruby", "~> 5.0.3"
25+
spec.add_runtime_dependency "libxml-ruby", ">= 5.0.3", "< 6.1.0"
2626
spec.add_runtime_dependency "activesupport", "> 3.2"
2727

2828
spec.add_development_dependency "bundler", "~> 2.6", ">= 2.6.2"

lib/hermod/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Hermod
2-
VERSION = "3.4.0"
2+
VERSION = "3.5.0"
33
end

lib/hermod/xml_node.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ def initialize(name, value, attributes={})
2121
@attributes = attributes
2222
end
2323

24-
# Internal: turns the XmlNode into an XML::Node including any attributes
24+
# Internal: turns the XmlNode into a LibXML::XML::Node including any attributes
2525
# without any sanitisation (currently - this may change in a future
2626
# version).
2727
#
28-
# Returns an XML::Node built from the XmlNode object.
28+
# Returns a LibXML::XML::Node built from the XmlNode object.
2929
def to_xml
3030
if value.respond_to? :to_xml
3131
value.to_xml
3232
else
33-
XML::Node.new(@name, @value).tap do |node|
33+
LibXML::XML::Node.new(@name, @value).tap do |node|
3434
@attributes.each do |attribute_name, attribute_value|
3535
node[attribute_name] = attribute_value if attribute_value.present?
3636
end

lib/hermod/xml_section.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'xml'
1+
require 'libxml-ruby'
22
require 'hermod/xml_section_builder'
33
require 'hermod/sanitisation'
44

@@ -22,15 +22,15 @@ def self.build(options = {}, &block)
2222

2323
attr_reader :attributes
2424

25-
# Public: turns the XmlSection into an XML::Node instance (from
25+
# Public: turns the XmlSection into a LibXML::XML::Node instance (from
2626
# libxml-ruby). This creates this as a node, adds any attributes (after
2727
# sanitising them according to HMRC's rules) and then adds child nodes in
2828
# the order they were defined in the DSL. Nodes that have been called multiple
2929
# times are added in the order they were called.
3030
#
31-
# Returns an XML::Node
31+
# Returns a LibXML::XML::Node
3232
def to_xml
33-
XML::Node.new(self.class.xml_name).tap do |root_node|
33+
LibXML::XML::Node.new(self.class.xml_name).tap do |root_node|
3434
# Add attributes
3535
attributes.each do |attribute_name, attribute_value|
3636
sane_value = sanitise_attribute(attribute_value)

spec/minitest_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def nodes(node_name)
6363
#
6464
# index - the zero-based index of the node you wish to retrieve
6565
#
66-
# Returns an XML::Node (from LibXML)
66+
# Returns a LibXML::XML::Node
6767
def node_by_index(index)
6868
subject.to_xml.to_a[index]
6969
end

0 commit comments

Comments
 (0)