lutaml-model 0.8.200 → 0.8.202
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/.github/scripts/test_installed_gem.rb +1 -13
- data/.github/workflows/downstream-performance.yml +1 -22
- data/.github/workflows/performance.yml +1 -33
- data/.github/workflows/rake.yml +2 -6
- data/.rubocop.yml +0 -10
- data/.rubocop_todo.yml +0 -4
- data/Gemfile +0 -23
- data/README.adoc +25 -86
- data/Rakefile +2 -167
- data/docs/_guides/advanced-mapping.adoc +6 -6
- data/docs/_guides/character-encoding.adoc +0 -3
- data/docs/_guides/gem-integration.adoc +1 -1
- data/docs/_guides/index.adoc +0 -4
- data/docs/_guides/xml/type-namespaces.adoc +1 -1
- data/docs/_guides/xml-guide-0.8.0.adoc +2 -2
- data/docs/_guides/xml-namespaces.adoc +2 -3
- data/docs/_guides/xml_mappings/03_architecture.adoc +2 -2
- data/docs/_guides/xml_mappings/07_best_practices.adoc +2 -3
- data/docs/_guides/xml_mappings/08_troubleshooting.adoc +1 -9
- data/docs/_pages/comparison-with-shale.adoc +1 -1
- data/docs/_pages/configuration.adoc +6 -40
- data/docs/_pages/index.adoc +0 -1
- data/docs/_pages/serialization_adapters.adoc +4 -16
- data/docs/_references/architecture.adoc +1 -1
- data/docs/_references/lutaml-namespace-planning.md +1 -1
- data/docs/_references/three-phase-namespace-architecture.adoc +1 -2
- data/docs/_references/xsd-generation-with-namespace-support.adoc +3 -8
- data/docs/_tutorials/lutaml-xml-architecture.adoc +2 -8
- data/docs/architecture.md +7 -11
- data/docs/conversion_caching.adoc +1 -1
- data/docs/index.adoc +0 -1
- data/docs/key_value_data_model.adoc +1 -1
- data/docs/namespace-management.adoc +4 -10
- data/lib/lutaml/json/format.rb +0 -1
- data/lib/lutaml/json/generator_options.rb +0 -1
- data/lib/lutaml/key_value/transform.rb +9 -16
- data/lib/lutaml/lml/document_builder.rb +2 -2
- data/lib/lutaml/lml/entity_types.rb +2 -2
- data/lib/lutaml/model/adapter_resolver.rb +5 -15
- data/lib/lutaml/model/attribute.rb +14 -2
- data/lib/lutaml/model/cached_type_resolver.rb +1 -7
- data/lib/lutaml/model/error/unknown_adapter_type_error.rb +1 -1
- data/lib/lutaml/model/global_context.rb +3 -5
- data/lib/lutaml/model/instrumentation.rb +0 -3
- data/lib/lutaml/model/mapping/mapping_rule.rb +6 -10
- data/lib/lutaml/model/register.rb +20 -31
- data/lib/lutaml/model/runtime_compatibility.rb +0 -92
- data/lib/lutaml/model/schema/class_loader.rb +2 -4
- data/lib/lutaml/model/schema/xml_compiler/spec_builder/simple_types.rb +2 -3
- data/lib/lutaml/model/serialize/attribute_definition.rb +10 -184
- data/lib/lutaml/model/serialize/conversion_caching.rb +1 -5
- data/lib/lutaml/model/serialize/model_import.rb +0 -5
- data/lib/lutaml/model/serialize/value_mapping.rb +0 -3
- data/lib/lutaml/model/services/rule_value_extractor.rb +4 -7
- data/lib/lutaml/model/store.rb +10 -17
- data/lib/lutaml/model/toml.rb +0 -2
- data/lib/lutaml/model/transformation_registry.rb +3 -7
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model.rb +3 -19
- data/lib/lutaml/toml/format.rb +4 -8
- data/lib/lutaml/xml/adapter/moxml_adapter.rb +1 -7
- data/lib/lutaml/xml/adapter.rb +0 -4
- data/lib/lutaml/xml/adapter_loader.rb +1 -6
- data/lib/lutaml/xml/builder/base.rb +0 -3
- data/lib/lutaml/xml/builder.rb +0 -8
- data/lib/lutaml/xml/data_model.rb +1 -1
- data/lib/lutaml/xml/doctype_extractor.rb +3 -3
- data/lib/lutaml/xml/format.rb +22 -74
- data/lib/lutaml/xml/leptris/plan_compiler.rb +1 -2
- data/lib/lutaml/xml/model_transform.rb +14 -24
- data/lib/lutaml/xml/polymorphic_value_handler.rb +1 -1
- data/lib/lutaml/xml/schema/builder/moxml.rb +1 -1
- data/lib/lutaml/xml/schema/builder.rb +6 -9
- data/lib/lutaml/xml/schema/relaxng_schema.rb +1 -1
- data/lib/lutaml/xml/xml_element.rb +3 -2
- data/lib/lutaml/xml/xsd_validator.rb +4 -11
- data/lib/lutaml/yaml/adapter/yeptris_adapter.rb +2 -2
- data/lib/lutaml/yamls/adapter_loader.rb +1 -5
- data/lib/tasks/performance_comparator.rb +1 -1
- data/lutaml-model.gemspec +3 -8
- data/spec/benchmarks/xml_parsing_benchmark_spec.rb +1 -1
- data/spec/lutaml/json/adapter/standard_adapter_spec.rb +6 -9
- data/spec/lutaml/model/adapter_resolver_yeptris_switch_spec.rb +0 -2
- data/spec/lutaml/model/cached_type_resolver_spec.rb +2 -54
- data/spec/lutaml/model/cdata_spec.rb +2 -15
- data/spec/lutaml/model/encoding_spec.rb +0 -9
- data/spec/lutaml/model/except_spec.rb +0 -7
- data/spec/lutaml/model/json_spec.rb +0 -14
- data/spec/lutaml/model/mixed_content_spec.rb +6 -46
- data/spec/lutaml/model/ordered_content_spec.rb +0 -7
- data/spec/lutaml/model/polymorphic_scalar_member_spec.rb +57 -0
- data/spec/lutaml/model/processing_instruction_spec.rb +0 -6
- data/spec/lutaml/model/runtime_compatibility_spec.rb +0 -37
- data/spec/lutaml/model/serializable_spec.rb +0 -2
- data/spec/lutaml/model/toml_spec.rb +0 -23
- data/spec/lutaml/xml/adapter/base_adapter_regression_spec.rb +0 -4
- data/spec/lutaml/xml/adapter/order_spec.rb +1 -1
- data/spec/lutaml/xml/adapter/xml_namespace_spec.rb +0 -7
- data/spec/lutaml/xml/attribute_namespace_disjointness_spec.rb +6 -6
- data/spec/lutaml/xml/builder/builder_spec.rb +0 -24
- data/spec/lutaml/xml/default_namespace_spec.rb +1 -8
- data/spec/lutaml/xml/doctype_preservation_spec.rb +0 -4
- data/spec/lutaml/xml/entity_fragmentation_spec.rb +0 -6
- data/spec/lutaml/xml/fpi_namespace_spec.rb +0 -21
- data/spec/lutaml/xml/mapping_spec.rb +8 -15
- data/spec/lutaml/xml/namespace_scope_vcard_spec.rb +0 -7
- data/spec/lutaml/xml/namespace_spec.rb +0 -13
- data/spec/lutaml/xml/prefix_control_spec.rb +0 -6
- data/spec/lutaml/xml/schema/builder_moxml_spec.rb +1 -1
- data/spec/lutaml/xml/xml_adapter_spec.rb +0 -7
- data/spec/lutaml/xml/xml_spec.rb +2 -88
- data/spec/spec_helper.rb +5 -24
- data/spec/support/test_adapter_config.rb +6 -6
- metadata +1 -32
- data/.github/workflows/js-pr-check.yml +0 -106
- data/.github/workflows/js-sync.yml +0 -55
- data/.github/workflows/opal.yml +0 -65
- data/.gitmodules +0 -6
- data/.rspec-opal +0 -5
- data/docs/_guides/opal.adoc +0 -232
- data/lib/compat/opal/generate_boot.rb +0 -137
- data/lib/compat/opal/js_bundle_entry.rb +0 -42
- data/lib/compat/opal/lutaml_model_boot.rb +0 -638
- data/lib/compat/opal/monitor.rb +0 -31
- data/lib/compat/opal/moxml/adapter/customized_rexml/entity_reference.rb +0 -9
- data/lib/compat/opal/moxml/adapter/customized_rexml/formatter.rb +0 -225
- data/lib/compat/opal/moxml/adapter/customized_rexml.rb +0 -11
- data/lib/compat/opal/moxml_boot.rb +0 -68
- data/lib/compat/opal/objectspace_shim.rb +0 -23
- data/lib/compat/opal/rexml/namespace.rb +0 -59
- data/lib/compat/opal/rexml/parsers/baseparser.rb +0 -1016
- data/lib/compat/opal/rexml/source.rb +0 -214
- data/lib/compat/opal/rexml/text.rb +0 -426
- data/lib/compat/opal/rexml/xmltokens.rb +0 -45
- data/lib/compat/opal/rexml_compat.rb +0 -85
- data/lib/compat/opal/yaml_compat.rb +0 -32
- data/lib/lutaml/model/cached_type_resolver/mutex_hash_cache.rb +0 -53
- data/lib/lutaml/model/schema/schema_builder/oga.rb +0 -92
- data/lib/lutaml/xml/schema/builder/oga.rb +0 -92
- data/spec/lutaml/model/boot_manifest_spec.rb +0 -30
- data/spec/lutaml/model/opal_smoke_spec.rb +0 -199
- data/spec/lutaml/model/serialize/attribute_definition_block_form_spec.rb +0 -244
- data/spec/lutaml/xml/adapter/oga_adapter_spec.rb +0 -135
- data/spec/lutaml/xml/opal_xml_spec.rb +0 -204
- data/spec/support/opal.rb +0 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "concurrent"
|
|
3
|
+
require "concurrent"
|
|
4
4
|
|
|
5
5
|
module Lutaml
|
|
6
6
|
module Xml
|
|
@@ -9,7 +9,7 @@ module Lutaml
|
|
|
9
9
|
# Backs the `validate_xml_with` class macro (issue #264). Routing is
|
|
10
10
|
# engine-agnostic through moxml (#1184): schemas compile and validate
|
|
11
11
|
# on the CONFIGURED engine — `Moxml::XSD.supported?` answers without
|
|
12
|
-
# raising, and engines without a validator (ox,
|
|
12
|
+
# raising, and engines without a validator (ox, rexml) fall back
|
|
13
13
|
# to the historical Nokogiri path, keeping its requirement error when
|
|
14
14
|
# the gem is absent. The leptris engine carries a validator.
|
|
15
15
|
#
|
|
@@ -24,8 +24,8 @@ module Lutaml
|
|
|
24
24
|
# Not to be confused with Schema::Xsd::SchemaValidator, which checks
|
|
25
25
|
# that an XSD document itself is well-formed XSD.
|
|
26
26
|
module XsdValidator
|
|
27
|
-
@schemas = ::Concurrent::Map.new
|
|
28
|
-
@nokogiri_schemas = ::Concurrent::Map.new
|
|
27
|
+
@schemas = ::Concurrent::Map.new
|
|
28
|
+
@nokogiri_schemas = ::Concurrent::Map.new
|
|
29
29
|
|
|
30
30
|
# @param xml [String] an XML document
|
|
31
31
|
# @param schema_paths [Array<String>] paths to XSD schema files
|
|
@@ -34,13 +34,6 @@ module Lutaml
|
|
|
34
34
|
paths = Array(schema_paths)
|
|
35
35
|
return [] if paths.empty?
|
|
36
36
|
|
|
37
|
-
if RUBY_ENGINE == "opal"
|
|
38
|
-
raise NotImplementedError,
|
|
39
|
-
"XSD schema validation (validate_xml_with) requires an " \
|
|
40
|
-
"XML engine with schema validation, which is not " \
|
|
41
|
-
"available under Opal."
|
|
42
|
-
end
|
|
43
|
-
|
|
44
37
|
if engine_supports_xsd?
|
|
45
38
|
document = context.parse(xml, strict: true)
|
|
46
39
|
paths.flat_map do |path|
|
|
@@ -77,8 +77,8 @@ module Lutaml
|
|
|
77
77
|
# format_error_types conversion to InvalidFormatError) hold on
|
|
78
78
|
# every adapter. The C parser reports the position inside the
|
|
79
79
|
# error message ("... at line L, column C"); lift it into the
|
|
80
|
-
# structured fields. Without psych
|
|
81
|
-
#
|
|
80
|
+
# structured fields. Without psych the engine error propagates
|
|
81
|
+
# unchanged.
|
|
82
82
|
def self.syntax_error(error)
|
|
83
83
|
return error unless defined?(::Psych::SyntaxError)
|
|
84
84
|
|
|
@@ -13,11 +13,7 @@ module Lutaml
|
|
|
13
13
|
# @param _adapter [String] the adapter format name ("yamls")
|
|
14
14
|
# @param type [String] the normalized type name (e.g., "yeptris_adapter")
|
|
15
15
|
def self.load_adapter_file(_adapter, type)
|
|
16
|
-
adapter_path =
|
|
17
|
-
"lutaml/yamls/adapter/#{type}"
|
|
18
|
-
else
|
|
19
|
-
File.join(File.dirname(__FILE__), "adapter", type)
|
|
20
|
-
end
|
|
16
|
+
adapter_path = File.join(File.dirname(__FILE__), "adapter", type)
|
|
21
17
|
require adapter_path
|
|
22
18
|
rescue LoadError => e
|
|
23
19
|
raise Lutaml::Model::UnknownAdapterTypeError.new("yamls", type),
|
|
@@ -11,7 +11,7 @@ class PerformanceComparator
|
|
|
11
11
|
BENCH_SCRIPT = File.join(TMP_PERF_DIR, "benchmark_runner.rb")
|
|
12
12
|
|
|
13
13
|
BENCHMARK_MATRIX = {
|
|
14
|
-
xml: %i[nokogiri ox
|
|
14
|
+
xml: %i[nokogiri ox rexml],
|
|
15
15
|
json: %i[standard_json multi_json oj yeptris],
|
|
16
16
|
yaml: %i[standard_yaml yeptris],
|
|
17
17
|
toml: %i[toml_rb tomlib teptris],
|
data/lutaml-model.gemspec
CHANGED
|
@@ -23,8 +23,6 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
|
24
24
|
# The `git ls-files -z` loads the files in the
|
|
25
25
|
# RubyGem that have been added into git.
|
|
26
|
-
# vendor/ is excluded so the opal-oga / opal-ruby-ll submodule checkouts
|
|
27
|
-
# are not shipped in the published gem.
|
|
28
26
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
29
27
|
`git ls-files -z`.split("\x0").reject do |f|
|
|
30
28
|
f.match(%r{^(test|features|vendor/)/})
|
|
@@ -41,15 +39,12 @@ Gem::Specification.new do |spec|
|
|
|
41
39
|
# 0.5.84 always passes XML_PARSE_HUGE to libxml2: very large documents
|
|
42
40
|
# parse completely instead of being silently truncated at the 10 MB
|
|
43
41
|
# input-buffer cap (lutaml-model#871).
|
|
44
|
-
# moxml 0.6.0 removed
|
|
45
|
-
# cross-language program's phase 4); the CRuby facade faces this
|
|
42
|
+
# moxml 0.6.0 removed its JavaScript-runtime surface (lutaml/moxml#516,
|
|
43
|
+
# the cross-language program's phase 4); the CRuby facade faces this
|
|
46
44
|
# gem uses are unchanged, and the full suite is green on the 0.6
|
|
47
45
|
# line (6386/0 with 0.6.0 resolved). Owner call (2026-10-31):
|
|
48
46
|
# forward-pin the 0.6 series, matching canon (lutaml/canon#298);
|
|
49
|
-
# floored at 0.6.1 per the maintainer's directive.
|
|
50
|
-
# workspace-local 0.5.x pin is retired with this floor — it cannot
|
|
51
|
-
# resolve against it — and the boot's lib/compat/opal append is
|
|
52
|
-
# directory-guarded in the Rakefile for both lines.
|
|
47
|
+
# floored at 0.6.1 per the maintainer's directive.
|
|
53
48
|
# 0.6.23: preprocess_entities stopped rewriting the declared
|
|
54
49
|
# encoding of text payloads beginning with an XML declaration
|
|
55
50
|
# (lutaml/moxml#604) — the text-emission verbatim contract
|
|
@@ -42,7 +42,7 @@ RSpec.describe "XML adapter benchmark", :benchmark do
|
|
|
42
42
|
GC.stat(:total_allocated_objects) - before
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
%i[nokogiri ox
|
|
45
|
+
%i[nokogiri ox rexml leptris].each do |adapter|
|
|
46
46
|
it "#{adapter}: from_xml/to_xml i/s and allocations" do
|
|
47
47
|
model = nil
|
|
48
48
|
Lutaml::Model::Config.with_adapter(xml: adapter) do
|
|
@@ -106,11 +106,8 @@ RSpec.describe Lutaml::Json::Adapter::StandardAdapter do
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
describe Lutaml::Json::GeneratorOptions do
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
# there, so it has to stand on its own.
|
|
112
|
-
# BASE_PERMITTED is the whole allowlist on Opal, whose JSON shim has no
|
|
113
|
-
# State class for DERIVED_PERMITTED to read. So it has to stand alone
|
|
109
|
+
# BASE_PERMITTED is what the filter falls back to when JSON::State is
|
|
110
|
+
# not defined for DERIVED_PERMITTED to read. So it has to stand alone
|
|
114
111
|
# against the real generator, not merely be a subset of something larger.
|
|
115
112
|
it "permits only options the running generator actually accepts" do
|
|
116
113
|
rejected = described_class::BASE_PERMITTED.reject do |key|
|
|
@@ -128,10 +125,10 @@ RSpec.describe Lutaml::Json::Adapter::StandardAdapter do
|
|
|
128
125
|
expect(rejected).to eq([])
|
|
129
126
|
end
|
|
130
127
|
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
#
|
|
134
|
-
#
|
|
128
|
+
# Without a JSON::State class DERIVED_PERMITTED is empty and the whole
|
|
129
|
+
# module must still load. Asserting that BASE_PERMITTED contains some
|
|
130
|
+
# symbols does not exercise the guard; only loading the file with
|
|
131
|
+
# JSON::State absent does.
|
|
135
132
|
it "loads and still permits the base set when JSON::State is absent" do
|
|
136
133
|
hide_const("JSON::State")
|
|
137
134
|
|
|
@@ -66,31 +66,17 @@ RSpec.describe Lutaml::Model::CachedTypeResolver do
|
|
|
66
66
|
it_behaves_like "a resolver cache backend"
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
-
describe described_class::MutexHashCache do
|
|
70
|
-
subject(:cache_backend) { described_class.new }
|
|
71
|
-
|
|
72
|
-
it_behaves_like "a resolver cache backend"
|
|
73
|
-
end
|
|
74
|
-
|
|
75
69
|
describe "#initialize" do
|
|
76
70
|
it "stores the delegate resolver" do
|
|
77
71
|
expect(resolver.delegate).to eq(Lutaml::Model::TypeResolver)
|
|
78
72
|
end
|
|
79
73
|
|
|
80
|
-
it "uses ConcurrentMapCache by default
|
|
74
|
+
it "uses ConcurrentMapCache by default" do
|
|
81
75
|
expect(resolver.cache_backend).to be_a(described_class::ConcurrentMapCache)
|
|
82
76
|
end
|
|
83
77
|
|
|
84
|
-
it "uses MutexHashCache by default on Opal" do
|
|
85
|
-
allow(Lutaml::Model::RuntimeCompatibility).to receive(:opal?).and_return(true)
|
|
86
|
-
|
|
87
|
-
opal_resolver = described_class.new(delegate: Lutaml::Model::TypeResolver)
|
|
88
|
-
|
|
89
|
-
expect(opal_resolver.cache_backend).to be_a(described_class::MutexHashCache)
|
|
90
|
-
end
|
|
91
|
-
|
|
92
78
|
it "accepts an injected cache backend" do
|
|
93
|
-
cache_backend = described_class::
|
|
79
|
+
cache_backend = described_class::ConcurrentMapCache.new
|
|
94
80
|
|
|
95
81
|
injected_resolver = described_class.new(
|
|
96
82
|
delegate: Lutaml::Model::TypeResolver,
|
|
@@ -321,42 +307,4 @@ RSpec.describe Lutaml::Model::CachedTypeResolver do
|
|
|
321
307
|
expect(stats[:keys]).to contain_exactly(%i[ctx2 custom])
|
|
322
308
|
end
|
|
323
309
|
end
|
|
324
|
-
|
|
325
|
-
describe "Opal compatibility" do
|
|
326
|
-
let(:resolver) { described_class.new(delegate: Lutaml::Model::TypeResolver) }
|
|
327
|
-
|
|
328
|
-
before do
|
|
329
|
-
allow(Lutaml::Model::RuntimeCompatibility).to receive(:opal?).and_return(true)
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
it "uses the MutexHashCache by default on Opal" do
|
|
333
|
-
expect(resolver.cache_backend).to be_a(described_class::MutexHashCache)
|
|
334
|
-
end
|
|
335
|
-
|
|
336
|
-
it "does not autoload the native ConcurrentMapCache on Opal" do
|
|
337
|
-
hide_const("Lutaml::Model::CachedTypeResolver::ConcurrentMapCache")
|
|
338
|
-
|
|
339
|
-
load File.expand_path(
|
|
340
|
-
"../../../lib/lutaml/model/cached_type_resolver.rb", __dir__
|
|
341
|
-
)
|
|
342
|
-
|
|
343
|
-
expect(described_class.autoload?(:ConcurrentMapCache)).to be_nil
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
it "caches resolved types without Concurrent::Map" do
|
|
347
|
-
resolver.resolve(:custom, context)
|
|
348
|
-
registry.clear
|
|
349
|
-
|
|
350
|
-
expect(resolver.resolve(:custom, context)).to eq(custom_class)
|
|
351
|
-
expect(resolver.cache_stats[:keys]).to eq([%i[test custom]])
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
it "clears the Opal cache" do
|
|
355
|
-
resolver.resolve(:custom, context)
|
|
356
|
-
|
|
357
|
-
resolver.clear_all_caches
|
|
358
|
-
|
|
359
|
-
expect(resolver.cache_stats[:size]).to eq(0)
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
310
|
end
|
|
@@ -335,17 +335,6 @@ RSpec.describe CdataSpec do
|
|
|
335
335
|
XML
|
|
336
336
|
end
|
|
337
337
|
|
|
338
|
-
let(:expected_oga_xml) do
|
|
339
|
-
"<CustomModelParent>" \
|
|
340
|
-
"<first_name><![CDATA[John]]></first_name>" \
|
|
341
|
-
"<last_name>Doe</last_name>" \
|
|
342
|
-
"<CustomModelChild>" \
|
|
343
|
-
"<street><![CDATA[Oxford Street]]></street>" \
|
|
344
|
-
"<city><![CDATA[London]]></city>" \
|
|
345
|
-
"</CustomModelChild>" \
|
|
346
|
-
"</CustomModelParent>"
|
|
347
|
-
end
|
|
348
|
-
|
|
349
338
|
describe ".from_xml" do
|
|
350
339
|
it "maps XML content to custom model using custom methods" do
|
|
351
340
|
instance = parent_mapper.from_xml(input_xml)
|
|
@@ -366,9 +355,7 @@ RSpec.describe CdataSpec do
|
|
|
366
355
|
instance = parent_mapper.from_xml(input_xml)
|
|
367
356
|
result_xml = parent_mapper.to_xml(instance)
|
|
368
357
|
|
|
369
|
-
expected_output = if adapter_class == Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:
|
|
370
|
-
expected_oga_xml
|
|
371
|
-
elsif adapter_class == Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:ox)
|
|
358
|
+
expected_output = if adapter_class == Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:ox)
|
|
372
359
|
expected_ox_xml
|
|
373
360
|
else
|
|
374
361
|
expected_nokogiri_xml
|
|
@@ -570,7 +557,7 @@ RSpec.describe CdataSpec do
|
|
|
570
557
|
end
|
|
571
558
|
end
|
|
572
559
|
|
|
573
|
-
%i[nokogiri ox
|
|
560
|
+
%i[nokogiri ox rexml].each do |engine|
|
|
574
561
|
next unless TestAdapterConfig.adapter_enabled?(engine)
|
|
575
562
|
|
|
576
563
|
describe "the :#{engine} lane" do
|
|
@@ -269,13 +269,4 @@ RSpec.describe "XML Encoding Handling" do
|
|
|
269
269
|
end
|
|
270
270
|
end
|
|
271
271
|
end
|
|
272
|
-
|
|
273
|
-
if defined?(Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga))
|
|
274
|
-
describe "with Oga adapter" do
|
|
275
|
-
if TestAdapterConfig.adapter_enabled?(:oga)
|
|
276
|
-
it_behaves_like "encoding behavior",
|
|
277
|
-
Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga)
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
272
|
end
|
|
@@ -215,13 +215,6 @@ RSpec.describe "Except" do
|
|
|
215
215
|
it_behaves_like "xml", described_class
|
|
216
216
|
end
|
|
217
217
|
|
|
218
|
-
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga) do
|
|
219
|
-
if TestAdapterConfig.adapter_enabled?(:oga)
|
|
220
|
-
it_behaves_like "xml",
|
|
221
|
-
described_class
|
|
222
|
-
end
|
|
223
|
-
end
|
|
224
|
-
|
|
225
218
|
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:ox) do
|
|
226
219
|
if TestAdapterConfig.adapter_enabled?(:ox)
|
|
227
220
|
it_behaves_like "xml",
|
|
@@ -15,18 +15,4 @@ RSpec.describe Lutaml::Model::Json do
|
|
|
15
15
|
expect(result).to include("ok")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
|
-
|
|
19
|
-
describe "adapter autoloading" do
|
|
20
|
-
it "does not autoload native JSON adapters on Opal" do
|
|
21
|
-
%i[OjAdapter MultiJsonAdapter].each do |constant_name|
|
|
22
|
-
hide_const("Lutaml::Json::Adapter::#{constant_name}")
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
allow(Lutaml::Model::RuntimeCompatibility).to receive(:opal?).and_return(true)
|
|
26
|
-
load File.expand_path("../../../lib/lutaml/json/adapter.rb", __dir__)
|
|
27
|
-
|
|
28
|
-
expect(Lutaml::Json::Adapter.autoload?(:OjAdapter)).to be_nil
|
|
29
|
-
expect(Lutaml::Json::Adapter.autoload?(:MultiJsonAdapter)).to be_nil
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
18
|
end
|
|
@@ -803,7 +803,7 @@ RSpec.describe "MixedContent" do
|
|
|
803
803
|
describe ".from_xml" do
|
|
804
804
|
let(:expected_nokogiri_content) do
|
|
805
805
|
# Moxml resolves numeric character references (—, ©) to
|
|
806
|
-
# their Unicode characters, matching
|
|
806
|
+
# their Unicode characters, matching the Rexml behavior. Raw Nokogiri
|
|
807
807
|
# preserved numeric refs via native serialization, but the resolved
|
|
808
808
|
# form is semantically identical.
|
|
809
809
|
"B <p>R&C</p>\n C <p>J\u{2014}C</p>\n O <p>A & B </p>\n F <p>Z \u{A9}S</p>"
|
|
@@ -811,9 +811,6 @@ RSpec.describe "MixedContent" do
|
|
|
811
811
|
let(:expected_ox_content) do
|
|
812
812
|
"B <p>R&C</p> C <p>J—C</p> O <p>A & B </p> F <p>Z ©S</p>"
|
|
813
813
|
end
|
|
814
|
-
let(:expected_oga_content) do
|
|
815
|
-
"B <p>R&C</p>\n C <p>J—C</p>\n O <p>A & B </p>\n F <p>Z ©S</p>"
|
|
816
|
-
end
|
|
817
814
|
let(:expected_rexml_content) do
|
|
818
815
|
"B <p>R&C</p>\n C <p>J—C</p>\n O <p>A & B </p>\n F <p>Z ©S</p>"
|
|
819
816
|
end
|
|
@@ -851,18 +848,6 @@ RSpec.describe "MixedContent" do
|
|
|
851
848
|
XML
|
|
852
849
|
end
|
|
853
850
|
|
|
854
|
-
let(:expected_oga_xml) do
|
|
855
|
-
<<~XML
|
|
856
|
-
<SpecialCharContentWithRawOptionAndMixedOption>
|
|
857
|
-
<special> B <p>R&C</p>
|
|
858
|
-
C <p>J—C</p>
|
|
859
|
-
O <p>A & B </p>
|
|
860
|
-
F <p>Z ©S</p>
|
|
861
|
-
</special>
|
|
862
|
-
</SpecialCharContentWithRawOptionAndMixedOption>
|
|
863
|
-
XML
|
|
864
|
-
end
|
|
865
|
-
|
|
866
851
|
let(:expected_rexml_xml) do
|
|
867
852
|
<<~XML
|
|
868
853
|
<SpecialCharContentWithRawOptionAndMixedOption>
|
|
@@ -881,9 +866,9 @@ RSpec.describe "MixedContent" do
|
|
|
881
866
|
|
|
882
867
|
expected_xml = send(:"expected_#{adapter_class.type}_xml")
|
|
883
868
|
|
|
884
|
-
# Ox
|
|
869
|
+
# Ox normalizes whitespace in mixed content per XML spec (semantically equivalent)
|
|
885
870
|
# Canon can't compare whitespace-normalized XML, so we normalize both sides
|
|
886
|
-
if
|
|
871
|
+
if adapter_class == Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:ox)
|
|
887
872
|
normalize = ->(str) {
|
|
888
873
|
str.gsub(/\s+/, " ").gsub(/\s*</, "<").gsub(/>\s*/, ">").strip
|
|
889
874
|
}
|
|
@@ -921,7 +906,6 @@ RSpec.describe "MixedContent" do
|
|
|
921
906
|
describe ".to_xml" do
|
|
922
907
|
let(:expected_nokogiri_xml) { "B <p>R&C</p>" }
|
|
923
908
|
let(:expected_ox_xml) { "B <p>R&C</p>" }
|
|
924
|
-
let(:expected_oga_xml) { "B <p>R&C</p>" }
|
|
925
909
|
let(:expected_rexml_xml) { "B <p>R&C</p>" }
|
|
926
910
|
|
|
927
911
|
it "serializes special char mixed content correctly" do
|
|
@@ -958,9 +942,6 @@ RSpec.describe "MixedContent" do
|
|
|
958
942
|
let(:expected_xml) do
|
|
959
943
|
"<TextualSupport>\n <value><computer security> type of operation specified by an access right</value>\n</TextualSupport>"
|
|
960
944
|
end
|
|
961
|
-
let(:expected_oga_xml) do
|
|
962
|
-
"<TextualSupport><value><computer security> type of operation specified by an access right</value></TextualSupport>"
|
|
963
|
-
end
|
|
964
945
|
|
|
965
946
|
it "serializes special char mixed content correctly" do
|
|
966
947
|
parsed = MixedContentSpec::TextualSupport.from_xml(xml)
|
|
@@ -1007,16 +988,12 @@ RSpec.describe "MixedContent" do
|
|
|
1007
988
|
|
|
1008
989
|
context "when encoding: nil xml" do
|
|
1009
990
|
let(:expected_encoding_nil_nokogiri_xml) do
|
|
1010
|
-
# Moxml resolves numeric character references to Unicode
|
|
1011
|
-
# matching Oga/Rexml behavior (see expected_encoding_nil_oga_xml).
|
|
991
|
+
# Moxml resolves numeric character references to Unicode.
|
|
1012
992
|
"\u{2211}computer security\u{220F} type of \u{200B} operation specified \u{B5} by an access right"
|
|
1013
993
|
end
|
|
1014
994
|
let(:expected_encoding_nil_ox_xml) do
|
|
1015
995
|
"<HexCode> \xE2\x88\x91computer security\xE2\x88\x8F type of \xE2\x80\x8B operation specified \xC2\xB5 by an access right </HexCode>\n".force_encoding("ASCII-8BIT")
|
|
1016
996
|
end
|
|
1017
|
-
let(:expected_encoding_nil_oga_xml) do
|
|
1018
|
-
"<HexCode>\n ∑computer security∏ type of operation specified µ by an access right\n</HexCode>"
|
|
1019
|
-
end
|
|
1020
997
|
|
|
1021
998
|
it "serializes special char mixed content correctly with encoding: nil to get hexcode" do
|
|
1022
999
|
parsed = MixedContentSpec::HexCode.from_xml(xml, encoding: nil)
|
|
@@ -1026,8 +1003,6 @@ RSpec.describe "MixedContent" do
|
|
|
1026
1003
|
expected_encoding_nil_nokogiri_xml
|
|
1027
1004
|
elsif adapter_class == Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:ox)
|
|
1028
1005
|
expected_encoding_nil_ox_xml
|
|
1029
|
-
else
|
|
1030
|
-
expected_encoding_nil_oga_xml
|
|
1031
1006
|
end
|
|
1032
1007
|
|
|
1033
1008
|
expect(parsed.encoding).to be_nil
|
|
@@ -1078,11 +1053,7 @@ RSpec.describe "MixedContent" do
|
|
|
1078
1053
|
parsed = MixedContentSpec::Shift.from_xml(fixture,
|
|
1079
1054
|
encoding: "Shift_JIS")
|
|
1080
1055
|
serialized = parsed.to_xml
|
|
1081
|
-
expected =
|
|
1082
|
-
fixture.gsub(/\s+/, "")
|
|
1083
|
-
else
|
|
1084
|
-
fixture.strip
|
|
1085
|
-
end
|
|
1056
|
+
expected = fixture.strip
|
|
1086
1057
|
expect(serialized.strip).to eq(expected)
|
|
1087
1058
|
end
|
|
1088
1059
|
|
|
@@ -1155,11 +1126,7 @@ RSpec.describe "MixedContent" do
|
|
|
1155
1126
|
parsed = MixedContentSpec::Latin.from_xml(fixture,
|
|
1156
1127
|
encoding: "ISO-8859-1")
|
|
1157
1128
|
serialized = parsed.to_xml
|
|
1158
|
-
expected_xml =
|
|
1159
|
-
"<note><to>José</to><from>Müller</from><heading>Reminder</heading></note>"
|
|
1160
|
-
else
|
|
1161
|
-
"<note>\n <to>José</to>\n <from>Müller</from>\n <heading>Reminder</heading>\n</note>"
|
|
1162
|
-
end
|
|
1129
|
+
expected_xml = "<note>\n <to>José</to>\n <from>Müller</from>\n <heading>Reminder</heading>\n</note>"
|
|
1163
1130
|
expect(serialized.encode("UTF-8").strip).to be_xml_equivalent_to(expected_xml.encode("UTF-8"))
|
|
1164
1131
|
end
|
|
1165
1132
|
end
|
|
@@ -1491,13 +1458,6 @@ RSpec.describe "MixedContent" do
|
|
|
1491
1458
|
end
|
|
1492
1459
|
end
|
|
1493
1460
|
|
|
1494
|
-
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga) do
|
|
1495
|
-
if TestAdapterConfig.adapter_enabled?(:oga)
|
|
1496
|
-
it_behaves_like "mixed content behavior",
|
|
1497
|
-
described_class
|
|
1498
|
-
end
|
|
1499
|
-
end
|
|
1500
|
-
|
|
1501
1461
|
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:rexml) do
|
|
1502
1462
|
if TestAdapterConfig.adapter_enabled?(:rexml)
|
|
1503
1463
|
it_behaves_like "mixed content behavior",
|
|
@@ -196,13 +196,6 @@ RSpec.describe "OrderedContent" do
|
|
|
196
196
|
end
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
-
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga) do
|
|
200
|
-
if TestAdapterConfig.adapter_enabled?(:oga)
|
|
201
|
-
it_behaves_like "ordered content behavior",
|
|
202
|
-
described_class
|
|
203
|
-
end
|
|
204
|
-
end
|
|
205
|
-
|
|
206
199
|
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:rexml) do
|
|
207
200
|
if TestAdapterConfig.adapter_enabled?(:rexml)
|
|
208
201
|
it_behaves_like "ordered content behavior",
|
|
@@ -110,4 +110,61 @@ RSpec.describe "polymorphic scalar members under a Serializable base" do
|
|
|
110
110
|
end.to raise_error(ArgumentError, /polymorphic entry :frobnicate is not a type/)
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
|
+
|
|
114
|
+
# lutaml-model#1306: a String entry is the lazy type-name form, as for
|
|
115
|
+
# a String attribute type (fontist 3.0.45 lists its import sources by
|
|
116
|
+
# name). The list never resolves names, so they restrict nothing
|
|
117
|
+
# beyond the declared base — the behavior before 0.8.199, which must
|
|
118
|
+
# stay: a working declaration may not start failing at require time.
|
|
119
|
+
describe "String entries" do
|
|
120
|
+
let(:name_base_class) do
|
|
121
|
+
Class.new(Lutaml::Model::Serializable) do
|
|
122
|
+
attribute :x, :string
|
|
123
|
+
|
|
124
|
+
json { map :x, to: :x }
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
let(:named_list_class) do
|
|
129
|
+
base = name_base_class
|
|
130
|
+
Class.new(Lutaml::Model::Serializable) do
|
|
131
|
+
attribute :source, base, polymorphic: [
|
|
132
|
+
"MacosImportSource",
|
|
133
|
+
"GoogleImportSource",
|
|
134
|
+
"SilImportSource",
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
json { map :source, to: :source }
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
before do
|
|
142
|
+
stub_const("PolyNameBase", name_base_class)
|
|
143
|
+
stub_const("PolyNamedList", named_list_class)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
it "accepts a name at class definition" do
|
|
147
|
+
expect { PolyNamedList }.not_to raise_error
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
it "keeps a list of names inert: the declared base governs" do
|
|
151
|
+
model = PolyNamedList.new(source: PolyNameBase.new(x: "v"))
|
|
152
|
+
expect(model.validate).to eq([])
|
|
153
|
+
expect(model.to_json).to eq('{"source":{"x":"v"}}')
|
|
154
|
+
expect(PolyNamedList.from_json(model.to_json).source).to be_a(PolyNameBase)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
it "keeps the class entries authoritative beside a name" do
|
|
158
|
+
member = model_member_class
|
|
159
|
+
other = Class.new(Lutaml::Model::Serializable) { attribute :y, :integer }
|
|
160
|
+
stub_const("PolyOtherMember", other)
|
|
161
|
+
mixed = Class.new(Lutaml::Model::Serializable) do
|
|
162
|
+
attribute :content, Lutaml::Model::Serializable, polymorphic: [member, "OtherMember"]
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
expect(mixed.new(content: member.new(x: "v")).validate).to eq([])
|
|
166
|
+
expect(mixed.new(content: other.new(y: 1)).validate.first)
|
|
167
|
+
.to be_a(Lutaml::Model::PolymorphicError)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
113
170
|
end
|
|
@@ -357,12 +357,6 @@ RSpec.describe "Processing Instructions" do
|
|
|
357
357
|
end
|
|
358
358
|
end
|
|
359
359
|
|
|
360
|
-
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga) do
|
|
361
|
-
if TestAdapterConfig.adapter_enabled?(:oga)
|
|
362
|
-
it_behaves_like "PI round-trip behavior", described_class
|
|
363
|
-
end
|
|
364
|
-
end
|
|
365
|
-
|
|
366
360
|
describe Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:rexml) do
|
|
367
361
|
if TestAdapterConfig.adapter_enabled?(:rexml)
|
|
368
362
|
it_behaves_like "PI round-trip behavior", described_class
|
|
@@ -3,18 +3,6 @@
|
|
|
3
3
|
require "spec_helper"
|
|
4
4
|
|
|
5
5
|
RSpec.describe Lutaml::Model::RuntimeCompatibility do
|
|
6
|
-
describe ".opal?" do
|
|
7
|
-
it "memoizes false results on native Ruby" do
|
|
8
|
-
skip "native-only memoization example" if RUBY_ENGINE == "opal"
|
|
9
|
-
|
|
10
|
-
described_class.remove_instance_variable(:@opal) if described_class.instance_variable_defined?(:@opal)
|
|
11
|
-
|
|
12
|
-
expect(described_class.opal?).to be(false)
|
|
13
|
-
expect(described_class.instance_variable_defined?(:@opal)).to be(true)
|
|
14
|
-
expect(described_class.instance_variable_get(:@opal)).to be(false)
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
6
|
describe ".safe_constantize" do
|
|
19
7
|
it "returns nil when the top-level constant is missing" do
|
|
20
8
|
expect(described_class.safe_constantize("MissingTopLevel::Error")).to be_nil
|
|
@@ -33,29 +21,4 @@ RSpec.describe Lutaml::Model::RuntimeCompatibility do
|
|
|
33
21
|
.to eq(error_class)
|
|
34
22
|
end
|
|
35
23
|
end
|
|
36
|
-
|
|
37
|
-
# lib/lutaml/model.rb and lib/lutaml/xml.rb re-evaluate their top-level
|
|
38
|
-
# prepend calls when Opal's eager loader processes them more than once.
|
|
39
|
-
# Opal's Module#prepend raises "Prepending a module multiple times is
|
|
40
|
-
# not supported" in that case; runtime_compatibility.rb aligns Opal
|
|
41
|
-
# with MRI's idempotent behavior. MRI has been idempotent since 2.0,
|
|
42
|
-
# so the spec applies to both runtimes.
|
|
43
|
-
describe "Module#prepend idempotency" do
|
|
44
|
-
it "is a no-op when the module is already in the ancestor chain" do
|
|
45
|
-
mod = Module.new
|
|
46
|
-
klass = Class.new
|
|
47
|
-
klass.prepend(mod)
|
|
48
|
-
|
|
49
|
-
expect { klass.prepend(mod) }.not_to raise_error
|
|
50
|
-
expect(klass.ancestors.count(mod)).to eq(1)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
it "still prepends when the module is not yet present" do
|
|
54
|
-
mod = Module.new
|
|
55
|
-
klass = Class.new
|
|
56
|
-
|
|
57
|
-
expect { klass.prepend(mod) }.not_to raise_error
|
|
58
|
-
expect(klass.ancestors).to include(mod)
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
24
|
end
|
|
@@ -565,7 +565,6 @@ RSpec.describe Lutaml::Model::Serializable do
|
|
|
565
565
|
xml: {
|
|
566
566
|
nokogiri: "<<<<name>John Doe</name>",
|
|
567
567
|
ox: "<<<<name>John Doe</name>",
|
|
568
|
-
oga: '<person xmlns="http://example.com" xmlns="http://another.com"><name>John Doe</name></person>',
|
|
569
568
|
rexml: "<root><tag></root>",
|
|
570
569
|
},
|
|
571
570
|
json: {
|
|
@@ -608,7 +607,6 @@ RSpec.describe Lutaml::Model::Serializable do
|
|
|
608
607
|
describe "invalid format handling for XML" do
|
|
609
608
|
it_behaves_like "invalid format error", :xml, :nokogiri, :from_xml, :xml
|
|
610
609
|
it_behaves_like "invalid format error", :xml, :ox, :from_xml, :xml
|
|
611
|
-
it_behaves_like "invalid format error", :xml, :oga, :from_xml, :xml
|
|
612
610
|
it_behaves_like "invalid format error", :xml, :rexml, :from_xml, :xml
|
|
613
611
|
end
|
|
614
612
|
|
|
@@ -8,19 +8,6 @@ RSpec.describe Lutaml::Model::Toml do
|
|
|
8
8
|
it "does not eagerly register a native TOML adapter class" do
|
|
9
9
|
expect(Lutaml::Model::FormatRegistry.info(:toml)[:adapter_class]).to be_nil
|
|
10
10
|
end
|
|
11
|
-
|
|
12
|
-
it "does not autoload native TOML adapters on Opal" do
|
|
13
|
-
%i[TomlRbAdapter TomlibAdapter TeptrisAdapter].each do |constant_name|
|
|
14
|
-
hide_const("Lutaml::Toml::Adapter::#{constant_name}")
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
allow(Lutaml::Model::RuntimeCompatibility).to receive(:opal?).and_return(true)
|
|
18
|
-
load File.expand_path("../../../lib/lutaml/toml/adapter.rb", __dir__)
|
|
19
|
-
|
|
20
|
-
expect(Lutaml::Toml::Adapter.autoload?(:TomlRbAdapter)).to be_nil
|
|
21
|
-
expect(Lutaml::Toml::Adapter.autoload?(:TomlibAdapter)).to be_nil
|
|
22
|
-
expect(Lutaml::Toml::Adapter.autoload?(:TeptrisAdapter)).to be_nil
|
|
23
|
-
end
|
|
24
11
|
end
|
|
25
12
|
|
|
26
13
|
describe ".detect_toml_adapter" do
|
|
@@ -100,16 +87,6 @@ RSpec.describe Lutaml::Model::Toml do
|
|
|
100
87
|
end
|
|
101
88
|
end
|
|
102
89
|
|
|
103
|
-
context "when running on Opal" do
|
|
104
|
-
before do
|
|
105
|
-
allow(Lutaml::Model::RuntimeCompatibility).to receive(:opal?).and_return(true)
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
it "returns nil" do
|
|
109
|
-
expect(described_class.detect_toml_adapter).to be_nil
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
|
|
113
90
|
context "when both adapters are available" do
|
|
114
91
|
before do
|
|
115
92
|
stub_const("Tomlib", Module.new)
|
|
@@ -138,10 +138,6 @@ RSpec.describe Lutaml::Xml::Adapter::BaseAdapter do
|
|
|
138
138
|
it_behaves_like "base adapter regressions", Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:ox)
|
|
139
139
|
end
|
|
140
140
|
|
|
141
|
-
context "with OgaAdapter" do
|
|
142
|
-
it_behaves_like "base adapter regressions", Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:oga)
|
|
143
|
-
end
|
|
144
|
-
|
|
145
141
|
context "with RexmlAdapter" do
|
|
146
142
|
it_behaves_like "base adapter regressions", Lutaml::Xml::Adapter::MoxmlAdapter.for_engine(:rexml)
|
|
147
143
|
end
|