moxml 0.5.52 → 0.5.53
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/README.adoc +51 -4
- data/lib/moxml/adapter/oga.rb +4 -3
- data/lib/moxml/version.rb +1 -1
- data/spec/moxml/adapter/libxml_internals_spec.rb +7 -2
- 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: 355fc83dcbe876d6b93a17a347f4f1b406258780780019f8777103fd6ec22460
|
|
4
|
+
data.tar.gz: 2bad0b067b54079754580eb8c7eedbc78924db32957a2e1c30ac29212a9d2107
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5487cedda582d606a358c2d23b1020931deb50b7f200b1cfa3be8b4be12e078129dc0c3a9ec9744afe92c71d7cb89660bdc2a937c9cb1c6d6d0e33127cf17976
|
|
7
|
+
data.tar.gz: 8f06fd756c4abcf39105f35009cfbba4e0e5f307fbe934c06996818e64585f773562b6c7ebed1be338fee5f84d65459fcabc005c7fea22df5e092ebae06568f9
|
data/README.adoc
CHANGED
|
@@ -51,8 +51,55 @@ Leptris:: https://github.com/leptris/leptris[Leptris], a pure-C99 XML 1.0
|
|
|
51
51
|
parser with a W3C-conformant XPath 1.0 engine, consumed through the
|
|
52
52
|
https://github.com/leptris/leptris-ruby[leptris-ruby] FFI binding
|
|
53
53
|
(precompiled platform gems — no compilation at install). Fastest on
|
|
54
|
-
every measured operation; requires leptris >= 1.
|
|
55
|
-
|
|
54
|
+
every measured operation; requires leptris >= 1.9.32 (see version table below).
|
|
55
|
+
|
|
56
|
+
=== Underlying library versions
|
|
57
|
+
|
|
58
|
+
Moxml declares no runtime gem dependencies: you bundle the adapter
|
|
59
|
+
gem(s) you want. Each adapter carries the version floor it is built
|
|
60
|
+
and tested against — older versions are untested and the leptris
|
|
61
|
+
adapter refuses to load below its floor.
|
|
62
|
+
|
|
63
|
+
[cols="2,3,5"]
|
|
64
|
+
|===
|
|
65
|
+
|Adapter |Acceptable versions |Notes
|
|
66
|
+
|
|
67
|
+
|REXML
|
|
68
|
+
|Ruby-bundled (Ruby >= 3.0)
|
|
69
|
+
|Always available; no gem to manage.
|
|
70
|
+
|
|
71
|
+
|Nokogiri
|
|
72
|
+
|>= 1.18
|
|
73
|
+
|Tested against the 1.18 line.
|
|
74
|
+
|
|
75
|
+
|Ox
|
|
76
|
+
|>= 2.14
|
|
77
|
+
|Tested against the 2.14 line.
|
|
78
|
+
|
|
79
|
+
|Oga
|
|
80
|
+
|3.4 / 3.5
|
|
81
|
+
|The moxml repository vendors an Opal-compatible fork of oga 3.4
|
|
82
|
+
for development and CI. Oga 4.x is not yet validated against
|
|
83
|
+
moxml's customized generator and decoder overrides.
|
|
84
|
+
|
|
85
|
+
|LibXML (libxml-ruby)
|
|
86
|
+
|>= 5.0
|
|
87
|
+
|6.x works and is the installed default on Ruby >= 3.2 (libxml-ruby
|
|
88
|
+
6.0 itself requires Ruby >= 3.2); Ruby 3.1 resolves 5.x.
|
|
89
|
+
|
|
90
|
+
|Leptris (leptris-ruby)
|
|
91
|
+
|>= 1.9.32
|
|
92
|
+
|Hard floor — `MINIMUM_BINDING_VERSION`; older bindings do not load.
|
|
93
|
+
Newer bindings unlock more native surface automatically:
|
|
94
|
+
1.9.163.7+ single-result XPath seams, 1.9.174.4+ C-minted identity
|
|
95
|
+
wrappers, 1.9.174.6+ one-dispatch subtree walks, 1.9.177+ first-class
|
|
96
|
+
entity references (`entity_mode: :keep`). The release notes carry the
|
|
97
|
+
current recommendation.
|
|
98
|
+
|===
|
|
99
|
+
|
|
100
|
+
NOTE: moxml's dev Gemfile pins `leptris ~> 1.9.174`, `nokogiri ~> 1.18`,
|
|
101
|
+
`ox ~> 2.14`, `libxml-ruby >= 5.0`, and the vendored oga fork — the CI
|
|
102
|
+
matrix tests exactly those floors.
|
|
56
103
|
|
|
57
104
|
==== Default adapter selection
|
|
58
105
|
|
|
@@ -61,7 +108,7 @@ the runtime environment:
|
|
|
61
108
|
|
|
62
109
|
. If running on Opal (`RUBY_ENGINE == "opal"`), Oga is used (pure Ruby, no C extensions)
|
|
63
110
|
. Otherwise, if the installed leptris gem supports programmatic document
|
|
64
|
-
construction (`Leptris::XML::Document.create`, leptris >= 1.
|
|
111
|
+
construction (`Leptris::XML::Document.create`, leptris >= 1.9.32), Leptris is used
|
|
65
112
|
. Otherwise, Moxml detects already-loaded XML libraries in this order:
|
|
66
113
|
.. Nokogiri
|
|
67
114
|
.. Ox
|
|
@@ -72,7 +119,7 @@ the runtime environment:
|
|
|
72
119
|
----
|
|
73
120
|
# Automatic detection — picks the best available adapter
|
|
74
121
|
ctx = Moxml.new
|
|
75
|
-
ctx.config.adapter_name # => :leptris (leptris >= 1.
|
|
122
|
+
ctx.config.adapter_name # => :leptris (leptris >= 1.9.32), :nokogiri otherwise, :oga on Opal
|
|
76
123
|
|
|
77
124
|
# Explicit override — always takes precedence
|
|
78
125
|
ctx = Moxml.new(:ox)
|
data/lib/moxml/adapter/oga.rb
CHANGED
|
@@ -561,9 +561,10 @@ module Moxml
|
|
|
561
561
|
)
|
|
562
562
|
end
|
|
563
563
|
|
|
564
|
-
# Whether this oga
|
|
565
|
-
#
|
|
566
|
-
# spec pending-or-live
|
|
564
|
+
# Whether this adapter's oga serialization honors the
|
|
565
|
+
# indent option (the customized generator currently does
|
|
566
|
+
# not; the probe keeps the indentation spec pending-or-live
|
|
567
|
+
# per environment).
|
|
567
568
|
def indents_output?
|
|
568
569
|
return @indents_output unless @indents_output.nil?
|
|
569
570
|
|
data/lib/moxml/version.rb
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
begin
|
|
4
|
-
require "libxml-ruby"
|
|
4
|
+
require "libxml-ruby"
|
|
5
5
|
rescue LoadError
|
|
6
|
-
|
|
6
|
+
begin
|
|
7
|
+
require "libxml"
|
|
8
|
+
rescue LoadError
|
|
9
|
+
# LibXML gem not available - skip all specs in this file
|
|
10
|
+
return
|
|
11
|
+
end
|
|
7
12
|
end
|
|
8
13
|
|
|
9
14
|
require "moxml/adapter/libxml"
|