leptris 1.9.359.0-aarch64-linux → 1.9.361.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/declaration.rb +12 -0
- data/lib/leptris/xml/document.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd1070a64979828554575ca2b67b0bc527a6e1e77ede76344e99779667576cc7
|
|
4
|
+
data.tar.gz: a8ecf482dcc3ce8f244d03dd138b47c99dfdaf919114e3af1fa1083144a5af10
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d108c59767e19fc41482d1d18cee47bfb1ba6c644ab3170c576608db8c6818432fd5903fb393dcb0d2eb624f5c5be9f5cdcab74f1e9e2ad4445009a97bb23894
|
|
7
|
+
data.tar.gz: 7619b036caa7db6845ddcdc5afa6a62c51810867e96aeb20788cdd31436be5f9038c30f6d5c7fafed029371f792baa9393ded03ec382f656335830bfcede80d9
|
data/lib/leptris/version.rb
CHANGED
|
@@ -52,6 +52,18 @@ class Leptris::XML::Declaration
|
|
|
52
52
|
parts.join(" ") + "?>"
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
# The declaration rides Document#children (ruby#459), and generic
|
|
56
|
+
# child serializers call to_xml on whatever children exist
|
|
57
|
+
# (leptris#1732 — moxml's round trip). Same wire bytes as to_s.
|
|
58
|
+
# The serializer's kwargs ride along (moxml passes indent:/
|
|
59
|
+
# encoding:/no_decl:); under no_decl: the answer is EMPTY — the
|
|
60
|
+
# document-level preamble owns the emission and the child must
|
|
61
|
+
# not duplicate it (ruby#477).
|
|
62
|
+
def to_xml(no_decl: false, **_kwargs)
|
|
63
|
+
return "" if no_decl
|
|
64
|
+
to_s
|
|
65
|
+
end
|
|
66
|
+
|
|
55
67
|
def inspect
|
|
56
68
|
"#<#{self.class.name} version=#{version.inspect} " \
|
|
57
69
|
"encoding=#{encoding.inspect} standalone=#{standalone.inspect}>"
|
data/lib/leptris/xml/document.rb
CHANGED
|
@@ -354,7 +354,10 @@ class Leptris::XML::Document
|
|
|
354
354
|
def children
|
|
355
355
|
base = document_child_nodes
|
|
356
356
|
return base if declaration.nil?
|
|
357
|
-
|
|
357
|
+
# .dup: NodeSet#to_a hands back the LIVE memoized array — unshifting
|
|
358
|
+
# into it would inject the Declaration into the underlying child
|
|
359
|
+
# list and poison every later children call (leptris#1732 class).
|
|
360
|
+
list = base.to_a.dup
|
|
358
361
|
list.unshift(declaration)
|
|
359
362
|
Leptris::XML::NodeSet.new(self, list)
|
|
360
363
|
end
|