moxml 0.6.32 → 0.6.33
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/moxml/adapter/leptris.rb +11 -0
- data/lib/moxml/version.rb +1 -1
- data/spec/moxml/element_indent_spec.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a8d04b38ad16a68637f589f83adac75478bc558b7711b72705a2006a509bc8b3
|
|
4
|
+
data.tar.gz: 95eadd1c7317a5be48595dee13ce691e017ccd20b5626feabe0a6537e2a1690e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 321809829a5c331132c443fe88207be011b0a8a97854b39f3bfb70c3a4bef0db543d3f90b1148f2ae7271022efc7a56d8ca347dbfc389055c68d6266281e0e26
|
|
7
|
+
data.tar.gz: 30bcebd7f1fd8e6e69a39fd22fac477bdc2f0f7074c904e2e7a906815a3b17473545e9b81e2bf871c7b227876575954b885edde10568fc0fdef46fc798fce1d7
|
|
@@ -64,6 +64,17 @@ module Moxml
|
|
|
64
64
|
# suite's cta0001/open001 families.
|
|
65
65
|
MINIMUM_BINDING_VERSION = "1.9.458.0"
|
|
66
66
|
|
|
67
|
+
class << self
|
|
68
|
+
# The element unit serializer takes indent (the binding's
|
|
69
|
+
# to_xml kwargs face), so element-level to_xml(indent:) is
|
|
70
|
+
# honored - the facade's capability gate (D-09) passes and
|
|
71
|
+
# consumers serializing subtrees with pretty indentation
|
|
72
|
+
# (e.g. metanorma's key_cleanup embeds) run on leptris.
|
|
73
|
+
def element_indent_supported?
|
|
74
|
+
true
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
67
78
|
# Snapshot-backed attribute listing native (moxml#520): the
|
|
68
79
|
# listing face serves reads from the binding's flat packet face —
|
|
69
80
|
# no Attr mint, no FFI::Pointer, no per-attribute C crossing on
|
data/lib/moxml/version.rb
CHANGED
|
@@ -8,15 +8,18 @@ require "spec_helper"
|
|
|
8
8
|
# path stay common — consumers use them for canonical shapes.
|
|
9
9
|
RSpec.describe "element-level serialization indentation" do
|
|
10
10
|
it "honors a positive indent on engines that support it" do
|
|
11
|
-
%i[nokogiri rexml].each do |name|
|
|
11
|
+
%i[nokogiri rexml leptris].each do |name|
|
|
12
12
|
doc = Moxml.new(name).parse("<r><a/></r>")
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
# expand_empty: false is the indented-subtree shape consumers
|
|
14
|
+
# request (metanorma's key_cleanup embeds); the expand_empty
|
|
15
|
+
# face selects the compact expander and is indent-independent.
|
|
16
|
+
expect(doc.root.to_xml(indent: 2, expand_empty: false)).to include("\n"),
|
|
17
|
+
"#{name}: indent not honored"
|
|
15
18
|
end
|
|
16
19
|
end
|
|
17
20
|
|
|
18
21
|
it "raises the named AdapterError on engines that ignore the knob" do
|
|
19
|
-
%i[oga ox headed_ox libxml
|
|
22
|
+
%i[oga ox headed_ox libxml].each do |name|
|
|
20
23
|
doc = Moxml.new(name).parse("<r><a/></r>")
|
|
21
24
|
expect { doc.root.to_xml(indent: 2) }
|
|
22
25
|
.to raise_error(Moxml::AdapterError, /indentation/),
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moxml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.33
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-12-
|
|
11
|
+
date: 2026-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
Moxml is a unified XML manipulation library that provides a common API
|