moxml 0.6.0 → 0.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66a0ad64613ea6615d2876c58138a4e492bf986f6c26f73482a0848e522aef1c
4
- data.tar.gz: 89333eb6b5d1cb8f74ca6fc5858bf60c596fb364157f11e20d812305f14d7571
3
+ metadata.gz: 585ba1c91fa3417c0fbbb93cc0e98caf6231f72c3b56fe9c85503ecab4fc7a66
4
+ data.tar.gz: ee2f953d571e5ca408c50e3b245f4f712a8c57e8088560282226166e2226d616
5
5
  SHA512:
6
- metadata.gz: eb40893e92da115a23d16699e9fd520dfcf5f0d3df708da67bedc907e794b2c75074f6b1fe4f44491df7e402cbbcd0fc81ff62504e7850f98796327dd9dfcb64
7
- data.tar.gz: be8ef56d26910c2d50b8e8a29b52c2bcb3b558b5eddffc4a07382c1407b97617a2706b17d888ac48e1433034724806cd2eea69d6aedf70e20dd29b3be9749d16
6
+ metadata.gz: 02cbedb6b2220932e6c809ff982ccaf4b3d97b0c7f4b5132702084d61d2fa6209c71b47e59d8f580861d7b2a102103595517a548b7751cbbd054fc5bfedf010b
7
+ data.tar.gz: 989a635887455ac0cdaa941f784885041d172e7f1fc64fd4d68b710d879e54f8450bb3364ac4b225a1ed51f6f5cb10554fa4fab600549db6f2c298eb034ab20d
@@ -2,8 +2,9 @@
2
2
 
3
3
  # Parse-path alias: rexml expands the built-in entities at parse time,
4
4
  # so parsed references are the facade's Moxml::Entity::Reference values.
5
- # Lifecycle: the :rexml adapter is Opal-only and dies with the Opal
6
- # surface (#489 phase 4); third-party engine, no upstream ask.
5
+ # Lifecycle: the :rexml adapter's fate governs this file; the
6
+ # adapter's historical Opal role ended with #489 phase 4. Third-party
7
+ # engine, no upstream ask.
7
8
 
8
9
  module Moxml
9
10
  module Adapter
@@ -3,8 +3,8 @@
3
3
  # Custom REXML formatter that fixes indentation and wrapping issues.
4
4
  # Engine gap (upstream rexml): REXML's Formatters::Pretty cannot be
5
5
  # configured to the facade's whitespace contract. Third-party engine,
6
- # no upstream ask; the :rexml adapter is Opal-only and dies with the
7
- # Opal surface (#489 phase 4).
6
+ # no upstream ask; the :rexml adapter's fate governs this file (its
7
+ # historical Opal role ended with #489 phase 4).
8
8
 
9
9
  require "rexml/formatters/pretty"
10
10
 
data/lib/moxml/adapter.rb CHANGED
@@ -24,11 +24,6 @@ module Moxml
24
24
 
25
25
  AVAILABLE_ADAPTERS = %i[nokogiri oga rexml ox headed_ox libxml leptris].freeze
26
26
 
27
- # Adapters that work under the Opal (JavaScript) runtime.
28
- # Oga is pure Ruby and designed with Opal compatibility in mind — it is the
29
- # canonical XML parser for the JavaScript runtime. REXML is also pure Ruby
30
- # but requires extensive runtime compat shims (regex features like /n,
31
- # \u{...}, (?-mix:...) don't transpile cleanly), so it is opt-in only.
32
27
  # Registry mapping adapter names to their class name suffixes.
33
28
  # Special cases (like :headed_ox → "HeadedOx") live here instead of
34
29
  # a case statement, keeping the dispatch open for extension.
data/lib/moxml/config.rb CHANGED
@@ -11,9 +11,7 @@ module Moxml
11
11
  # when the installed leptris supports programmatic document
12
12
  # construction (Leptris::XML::Document.create); otherwise moxml
13
13
  # falls back to FALLBACK_ADAPTER so released-gem environments keep
14
- # working. Under Opal the default is oga only when the vendored
15
- # pure-Ruby fork was compiled into the bundle — stock oga requires
16
- # its C extension and cannot load there; otherwise rexml.
14
+ # working.
17
15
  PREFERRED_ADAPTER = :leptris
18
16
  FALLBACK_ADAPTER = :nokogiri
19
17
 
@@ -75,12 +73,7 @@ module Moxml
75
73
 
76
74
  @leptris_preferred_available =
77
75
  begin
78
- # Route the require through a non-literal send: Opal::Builder
79
- # resolves literal requires statically and dies on native-only
80
- # gems (leptris is FFI; lutaml/moxml#475) before this rescue
81
- # can degrade the adapter. The runtime require still raises
82
- # LoadError under Opal, which the rescue below handles.
83
- __send__(:require, "leptris")
76
+ require "leptris"
84
77
  Moxml::Adapter.load(:leptris)
85
78
  Gem::Version.new(::Leptris::VERSION) >=
86
79
  Gem::Version.new(Moxml::Adapter::Leptris::MINIMUM_BINDING_VERSION)
@@ -4,8 +4,7 @@ module Moxml
4
4
  module Reference
5
5
  # A small, total XML reader for the model's input taxonomy. No
6
6
  # recovery: malformed input raises a named ParseError. The only
7
- # dependencies are Ruby's String and Regexp, so the reference
8
- # transpiles to the Opal lane.
7
+ # dependencies are Ruby's String and Regexp alone.
9
8
  class Parser
10
9
  NAME = /[A-Za-z_:][-A-Za-z0-9_:.]*/
11
10
  XML_WHITESPACE = /[ \t\n\r]/
@@ -9,8 +9,8 @@ module Moxml
9
9
  # declaration).
10
10
  #
11
11
  # Output is assembled as an array of parts and joined: the
12
- # reference must run under Opal, where mutable String#<< is
13
- # unsupported.
12
+ # reference stays off mutable String#<< by design (cheap total
13
+ # behavior, no per-call buffer semantics).
14
14
  class Writer
15
15
  VOID_ELEMENTS = %w[
16
16
  area base br col embed hr img input link meta param source
@@ -5,7 +5,7 @@ module Moxml
5
5
  # reader, writer, and normalizer that answer the processing model
6
6
  # without any native engine. Adapters are differentially tested
7
7
  # against these answers; the reference is also the lane for
8
- # engine-free environments (the Opal line generalized).
8
+ # engine-free environments.
9
9
  #
10
10
  # The reference is deliberately small and total over the model's
11
11
  # declared input taxonomy — every well-formed document the model
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
  end
@@ -87,7 +87,7 @@ module Moxml
87
87
  if defined?(URI::RFC3986_PARSER)
88
88
  URI::RFC3986_PARSER.split(uri)
89
89
  elsif uri.match?(/\A[a-zA-Z][a-zA-Z0-9+\-.]*:[^\x00-\x20]*\z/)
90
- # Minimal URI validation for Opal (no RFC3986_PARSER available)
90
+ # Minimal validation where URI::RFC3986_PARSER is unavailable
91
91
  else
92
92
  # Accept relative references and bare paths
93
93
  return unless uri.match?(/[\x00-\x08\x0B\x0C\x0E-\x1F]/)
data/lib/moxml.rb CHANGED
@@ -89,8 +89,6 @@ module Moxml
89
89
  autoload :Builder, "moxml/builder"
90
90
  autoload :Entity, "moxml/entity"
91
91
  autoload :EntityRegistry, "moxml/entity_registry"
92
- # Opal has no autoload; the compat boot file requires this eagerly
93
- # alongside the registry.
94
92
  autoload :NativeAttachment, "moxml/native_attachment"
95
93
  autoload :XmlUtils, "moxml/xml_utils"
96
94
  autoload :XmlEmitter, "moxml/xml_emitter"
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.0
4
+ version: 0.6.1
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-10-31 00:00:00.000000000 Z
11
+ date: 2026-11-01 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