lutaml-model 0.8.19 → 0.8.22
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/workflows/dependent-tests.yml +1 -1
- data/.github/workflows/rake.yml +1 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +133 -72
- data/bench/bench_common.rb +8 -5
- data/bench/bench_niso.rb +1 -2
- data/bench/gate_config.rb +4 -1
- data/benchmark/serialization_benchmark.rb +4 -4
- data/docs/_guides/value-transformations.adoc +27 -0
- data/lib/compat/opal/generate_boot.rb +3 -1
- data/lib/compat/opal/lutaml_model_boot.rb +10 -7
- data/lib/compat/opal/moxml_boot.rb +6 -1
- data/lib/lutaml/hash_format/format.rb +29 -0
- data/lib/lutaml/hash_format.rb +5 -27
- data/lib/lutaml/json/format.rb +61 -0
- data/lib/lutaml/json.rb +4 -59
- data/lib/lutaml/jsonl/format.rb +22 -0
- data/lib/lutaml/jsonl.rb +5 -19
- data/lib/lutaml/key_value/format.rb +26 -0
- data/lib/lutaml/key_value/transform.rb +4 -1
- data/lib/lutaml/key_value/transformation/value_serializer.rb +0 -2
- data/lib/lutaml/key_value.rb +4 -21
- data/lib/lutaml/model/attribute.rb +38 -4
- data/lib/lutaml/model/collection.rb +2 -2
- data/lib/lutaml/model/compiled_rule.rb +1 -1
- data/lib/lutaml/model/config.rb +2 -2
- data/lib/lutaml/model/consolidation_map.rb +2 -2
- data/lib/lutaml/model/consolidation_rule/dispatch_block.rb +2 -2
- data/lib/lutaml/model/errors.rb +2 -2
- data/lib/lutaml/model/global_context.rb +4 -2
- data/lib/lutaml/model/mapping/mapping_rule.rb +4 -1
- data/lib/lutaml/model/mapping/model_mapping.rb +2 -2
- data/lib/lutaml/model/runtime_compatibility.rb +2 -2
- data/lib/lutaml/model/schema/class_loader.rb +2 -1
- data/lib/lutaml/model/schema/decorators/definition_collection.rb +4 -4
- data/lib/lutaml/model/schema/definitions/namespace.rb +2 -1
- data/lib/lutaml/model/schema/file_writer.rb +5 -2
- data/lib/lutaml/model/schema/renderers/base.rb +4 -3
- data/lib/lutaml/model/schema/renderers/mappings.rb +9 -3
- data/lib/lutaml/model/schema/renderers/member_decls.rb +9 -3
- data/lib/lutaml/model/schema/renderers/model.rb +18 -6
- data/lib/lutaml/model/schema/renderers/required_files_calculator.rb +2 -1
- data/lib/lutaml/model/schema/renderers.rb +2 -1
- data/lib/lutaml/model/schema/rnc_compiler/source_resolver.rb +6 -2
- data/lib/lutaml/model/schema/rnc_compiler.rb +3 -1
- data/lib/lutaml/model/schema/rng_compiler/element_visitor.rb +35 -15
- data/lib/lutaml/model/schema/rng_compiler/value_type_resolver.rb +4 -2
- data/lib/lutaml/model/schema/rng_compiler.rb +10 -5
- data/lib/lutaml/model/schema/xml_compiler/element_order.rb +2 -1
- data/lib/lutaml/model/schema/xml_compiler/spec_builder/complex_types.rb +4 -2
- data/lib/lutaml/model/schema/xml_compiler/spec_builder/members.rb +39 -13
- data/lib/lutaml/model/schema/xml_compiler/spec_builder.rb +29 -10
- data/lib/lutaml/model/schema/xml_compiler/supported_data_types.rb +2 -2
- data/lib/lutaml/model/schema/xml_compiler.rb +10 -5
- data/lib/lutaml/model/sequence.rb +4 -4
- data/lib/lutaml/model/serialize/attribute_definition.rb +1 -0
- data/lib/lutaml/model/serialize/format_conversion.rb +2 -2
- data/lib/lutaml/model/serialize/initialization.rb +9 -1
- data/lib/lutaml/model/serialize/model_import.rb +1 -0
- data/lib/lutaml/model/serialize.rb +4 -3
- data/lib/lutaml/model/type/uninitialized_class_guard.rb +1 -1
- data/lib/lutaml/model/type.rb +9 -0
- data/lib/lutaml/model/type_registry.rb +2 -2
- data/lib/lutaml/model/uninitialized_class.rb +1 -1
- data/lib/lutaml/model/union.rb +5 -2
- data/lib/lutaml/model/utils.rb +2 -2
- data/lib/lutaml/model/value_policy.rb +27 -0
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model.rb +17 -16
- data/lib/lutaml/rdf/mapping.rb +2 -2
- data/lib/lutaml/rdf/namespace_set.rb +2 -2
- data/lib/lutaml/rdf/transform.rb +2 -2
- data/lib/lutaml/toml/format.rb +48 -0
- data/lib/lutaml/toml.rb +5 -46
- data/lib/lutaml/xml/adapter/base_adapter.rb +2 -2
- data/lib/lutaml/xml/builder/base.rb +2 -2
- data/lib/lutaml/xml/format.rb +331 -0
- data/lib/lutaml/xml/mapping.rb +2 -2
- data/lib/lutaml/xml/mapping_rule.rb +62 -3
- data/lib/lutaml/xml/model_transform.rb +132 -55
- data/lib/lutaml/xml/namespace_collector.rb +3 -3
- data/lib/lutaml/xml/parse_session.rb +59 -0
- data/lib/lutaml/xml/parsed_namespace_set.rb +2 -2
- data/lib/lutaml/xml/schema/builder.rb +5 -5
- data/lib/lutaml/xml/schema/xsd/schema_location_mapping.rb +2 -2
- data/lib/lutaml/xml/schema/xsd.rb +0 -2
- data/lib/lutaml/xml/schema/xsd_schema.rb +2 -1
- data/lib/lutaml/xml/serialization/format_conversion.rb +3 -3
- data/lib/lutaml/xml/transformation/element_builder.rb +2 -1
- data/lib/lutaml/xml/transformation/ordered_applier.rb +2 -1
- data/lib/lutaml/xml/xml_element.rb +2 -0
- data/lib/lutaml/xml.rb +4 -328
- data/lib/lutaml/yaml/format.rb +30 -0
- data/lib/lutaml/yaml.rb +5 -28
- data/lib/lutaml/yamls/adapter/mapping.rb +2 -2
- data/lib/lutaml/yamls/format.rb +22 -0
- data/lib/lutaml/yamls.rb +5 -19
- data/lib/tasks/benchmark_runner.rb +2 -2
- data/lutaml-model.gemspec +1 -1
- data/spec/lutaml/model/attribute_apply_value_map_spec.rb +26 -13
- data/spec/lutaml/model/attribute_spec.rb +8 -3
- data/spec/lutaml/model/custom_bibtex_adapter_spec.rb +2 -2
- data/spec/lutaml/model/custom_from_empty_values_spec.rb +74 -0
- data/spec/lutaml/model/custom_vobject_adapter_spec.rb +8 -8
- data/spec/lutaml/model/defaults_spec.rb +45 -0
- data/spec/lutaml/model/json_spec.rb +1 -2
- data/spec/lutaml/model/serialize/builder_spec.rb +6 -3
- data/spec/lutaml/model/store_spec.rb +3 -1
- data/spec/lutaml/model/transform_apply_value_map_spec.rb +6 -3
- data/spec/lutaml/model/union_attribute_spec.rb +4 -2
- data/spec/lutaml/model/value_policy_spec.rb +82 -0
- data/spec/lutaml/require_load_order_spec.rb +25 -0
- data/spec/lutaml/xml/attribute_element_namespace_disjoint_spec.rb +88 -0
- data/spec/lutaml/xml/attribute_namespace_disjointness_spec.rb +125 -0
- data/spec/lutaml/xml/out_of_namespace_parsing_spec.rb +123 -0
- data/spec/lutaml/xml/schema/rnc_compiler_spec.rb +17 -6
- data/spec/lutaml/xml/schema/rng_compiler_spec.rb +15 -6
- data/spec/lutaml/xml/w3c_types_spec.rb +3 -6
- metadata +20 -4
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
4
|
+
|
|
5
|
+
# lutaml-model#754: parsing a document whose elements live in a namespace
|
|
6
|
+
# different from the model's bound namespace must not silently drop
|
|
7
|
+
# element content. The document's own namespace is adopted as an implicit
|
|
8
|
+
# alias of the model's namespace for the duration of the parse, so
|
|
9
|
+
# lenient (out-of-namespace) parsing is lossless for element content the
|
|
10
|
+
# way in-namespace parsing is.
|
|
11
|
+
module OutOfNamespaceParsingSpec
|
|
12
|
+
class Gml32 < Lutaml::Xml::Namespace
|
|
13
|
+
uri "http://www.opengis.net/gml/3.2"
|
|
14
|
+
prefix_default "gml"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class Code < Lutaml::Model::Serializable
|
|
18
|
+
attribute :value, :string
|
|
19
|
+
|
|
20
|
+
xml do
|
|
21
|
+
root "name"
|
|
22
|
+
namespace Gml32
|
|
23
|
+
map_content to: :value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class EntryDefinition < Lutaml::Model::Serializable
|
|
28
|
+
attribute :description, :string
|
|
29
|
+
attribute :name, Code, collection: true
|
|
30
|
+
|
|
31
|
+
xml do
|
|
32
|
+
element "Definition"
|
|
33
|
+
namespace Gml32
|
|
34
|
+
map_element "description", to: :description
|
|
35
|
+
map_element "name", to: :name
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class DictionaryEntry < Lutaml::Model::Serializable
|
|
40
|
+
attribute :definition, EntryDefinition
|
|
41
|
+
|
|
42
|
+
xml do
|
|
43
|
+
element "dictionaryEntry"
|
|
44
|
+
namespace Gml32
|
|
45
|
+
map_element "Definition", to: :definition
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class Dictionary < Lutaml::Model::Serializable
|
|
50
|
+
attribute :name, Code, collection: true
|
|
51
|
+
attribute :dictionary_entry, DictionaryEntry, collection: true
|
|
52
|
+
|
|
53
|
+
xml do
|
|
54
|
+
element "Dictionary"
|
|
55
|
+
namespace Gml32
|
|
56
|
+
map_element "name", to: :name
|
|
57
|
+
map_element "dictionaryEntry", to: :dictionary_entry
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def self.gml_doc(uri)
|
|
62
|
+
<<~XML
|
|
63
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
64
|
+
<gml:Dictionary xmlns:gml="#{uri}">
|
|
65
|
+
<gml:name>codes</gml:name>
|
|
66
|
+
<gml:dictionaryEntry>
|
|
67
|
+
<gml:Definition>
|
|
68
|
+
<gml:description>first</gml:description>
|
|
69
|
+
<gml:name>ONE</gml:name>
|
|
70
|
+
</gml:Definition>
|
|
71
|
+
</gml:dictionaryEntry>
|
|
72
|
+
</gml:Dictionary>
|
|
73
|
+
XML
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
RSpec.describe "out-of-namespace document parsing" do
|
|
78
|
+
let(:in_namespace_xml) { OutOfNamespaceParsingSpec.gml_doc("http://www.opengis.net/gml/3.2") }
|
|
79
|
+
let(:out_of_namespace_xml) { OutOfNamespaceParsingSpec.gml_doc("http://www.opengis.net/gml") }
|
|
80
|
+
|
|
81
|
+
it "parses simple-type element content from a document in the bound namespace" do
|
|
82
|
+
definition = OutOfNamespaceParsingSpec::Dictionary
|
|
83
|
+
.from_xml(in_namespace_xml).dictionary_entry.first.definition
|
|
84
|
+
expect(definition.description).to eq("first")
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
it "keeps simple-type element content when the document namespace differs (#754)" do
|
|
88
|
+
definition = OutOfNamespaceParsingSpec::Dictionary
|
|
89
|
+
.from_xml(out_of_namespace_xml).dictionary_entry.first.definition
|
|
90
|
+
expect(definition.description).to eq("first")
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
it "keeps serializable-typed element content when the document namespace differs" do
|
|
94
|
+
definition = OutOfNamespaceParsingSpec::Dictionary
|
|
95
|
+
.from_xml(out_of_namespace_xml).dictionary_entry.first.definition
|
|
96
|
+
expect(definition.name.map(&:value)).to eq(["ONE"])
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
it "keeps simple-type content at the document root level" do
|
|
100
|
+
dictionary = OutOfNamespaceParsingSpec::Dictionary.from_xml(out_of_namespace_xml)
|
|
101
|
+
expect(dictionary.name.map(&:value)).to eq(["codes"])
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
it "does not adopt an unrelated child namespace" do
|
|
105
|
+
xml = <<~XML
|
|
106
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
107
|
+
<gml:Dictionary xmlns:gml="http://www.opengis.net/gml"
|
|
108
|
+
xmlns:city="http://www.opengis.net/citygml/2.0">
|
|
109
|
+
<city:name>not mine</city:name>
|
|
110
|
+
</gml:Dictionary>
|
|
111
|
+
XML
|
|
112
|
+
dictionary = OutOfNamespaceParsingSpec::Dictionary.from_xml(xml)
|
|
113
|
+
expect(dictionary.name).to be_empty
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
it "round-trips out-of-namespace content without losing the description" do
|
|
117
|
+
dictionary = OutOfNamespaceParsingSpec::Dictionary.from_xml(out_of_namespace_xml)
|
|
118
|
+
output = dictionary.to_xml(prefix: true)
|
|
119
|
+
expect(output).to include("first")
|
|
120
|
+
reparsed = OutOfNamespaceParsingSpec::Dictionary.from_xml(output)
|
|
121
|
+
expect(reparsed.dictionary_entry.first.definition.description).to eq("first")
|
|
122
|
+
end
|
|
123
|
+
end
|
|
@@ -14,7 +14,9 @@ RSpec.describe Lutaml::Model::Schema::RncCompiler do
|
|
|
14
14
|
|
|
15
15
|
describe ".to_models" do
|
|
16
16
|
context "with an RNC schema using named patterns and start |=" do
|
|
17
|
-
let(:schema)
|
|
17
|
+
let(:schema) do
|
|
18
|
+
File.read("spec/fixtures/xml/schema/rnc/address_book.rnc")
|
|
19
|
+
end
|
|
18
20
|
let(:sources) { described_class.to_models(schema) }
|
|
19
21
|
|
|
20
22
|
it "compiles RNC through the RNG compiler" do
|
|
@@ -65,7 +67,9 @@ RSpec.describe Lutaml::Model::Schema::RncCompiler do
|
|
|
65
67
|
|
|
66
68
|
context "with create_files output" do
|
|
67
69
|
let(:dir) { Dir.mktmpdir }
|
|
68
|
-
let(:schema)
|
|
70
|
+
let(:schema) do
|
|
71
|
+
File.read("spec/fixtures/xml/schema/rnc/address_book.rnc")
|
|
72
|
+
end
|
|
69
73
|
|
|
70
74
|
before do
|
|
71
75
|
stub_const("RncAddressBookSpec", Module.new)
|
|
@@ -206,7 +210,8 @@ RSpec.describe Lutaml::Model::Schema::RncCompiler do
|
|
|
206
210
|
"spec/fixtures/xml/schema/rnc/includes/circular_a.rnc"
|
|
207
211
|
|
|
208
212
|
expect do
|
|
209
|
-
described_class.to_models(File.read(circular_path),
|
|
213
|
+
described_class.to_models(File.read(circular_path),
|
|
214
|
+
location: circular_path)
|
|
210
215
|
end.to raise_error(/circular_a\.rnc/)
|
|
211
216
|
end
|
|
212
217
|
end
|
|
@@ -308,7 +313,9 @@ RSpec.describe Lutaml::Model::Schema::RncCompiler do
|
|
|
308
313
|
# The inline restricted type is subclassed (not mutated) so a fresh
|
|
309
314
|
# namespaced type inherits its constraints and carries the namespace.
|
|
310
315
|
expect(sources["CodeType"]).not_to match(/namespace \w+Namespace/)
|
|
311
|
-
subclass = sources.keys.find
|
|
316
|
+
subclass = sources.keys.find do |k|
|
|
317
|
+
sources[k].match?(/class \w+ < CodeType/)
|
|
318
|
+
end
|
|
312
319
|
expect(subclass).not_to be_nil
|
|
313
320
|
expect(sources[subclass]).to match(/namespace \w+Namespace/)
|
|
314
321
|
end
|
|
@@ -323,7 +330,9 @@ RSpec.describe Lutaml::Model::Schema::RncCompiler do
|
|
|
323
330
|
namespaces = sources.select { |_, v| v.include?("Lutaml::Xml::W3c::XmlNamespace") }
|
|
324
331
|
expect(namespaces.size).to eq(2)
|
|
325
332
|
uris = namespaces.values.map { |v| v[/uri "([^"]+)"/, 1] }
|
|
326
|
-
prefixes = namespaces.values.map
|
|
333
|
+
prefixes = namespaces.values.map do |v|
|
|
334
|
+
v[/prefix_default "([^"]+)"/, 1]
|
|
335
|
+
end
|
|
327
336
|
expect(uris).to contain_exactly("urn:a", "urn:b")
|
|
328
337
|
expect(prefixes.uniq.size).to eq(2)
|
|
329
338
|
end
|
|
@@ -341,7 +350,9 @@ RSpec.describe Lutaml::Model::Schema::RncCompiler do
|
|
|
341
350
|
}
|
|
342
351
|
RNC
|
|
343
352
|
|
|
344
|
-
wrapper = sources.keys.find
|
|
353
|
+
wrapper = sources.keys.find do |k|
|
|
354
|
+
sources[k].match?(/namespace \w+Namespace/) && !k.include?("Namespace")
|
|
355
|
+
end
|
|
345
356
|
expect(sources[wrapper]).to include("< Lutaml::Model::Type::DateTime")
|
|
346
357
|
end
|
|
347
358
|
end
|
|
@@ -33,7 +33,9 @@ RSpec.describe Lutaml::Model::Schema::RngCompiler do
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
let(:dir) { Dir.mktmpdir }
|
|
36
|
-
let(:schema)
|
|
36
|
+
let(:schema) do
|
|
37
|
+
File.read("spec/fixtures/xml/schema/rng/address_book.rng")
|
|
38
|
+
end
|
|
37
39
|
|
|
38
40
|
let(:valid_xml) do
|
|
39
41
|
<<~XML
|
|
@@ -220,10 +222,13 @@ RSpec.describe Lutaml::Model::Schema::RngCompiler do
|
|
|
220
222
|
end
|
|
221
223
|
|
|
222
224
|
let(:dir) { Dir.mktmpdir }
|
|
223
|
-
let(:schema)
|
|
225
|
+
let(:schema) do
|
|
226
|
+
File.read("spec/fixtures/xml/schema/rng/integer_range.rng")
|
|
227
|
+
end
|
|
224
228
|
|
|
225
229
|
it "generates a SimpleType subclass for <data> with restrictions" do
|
|
226
|
-
src = File.read(File.join(dir, "rngrestrictionspec",
|
|
230
|
+
src = File.read(File.join(dir, "rngrestrictionspec",
|
|
231
|
+
"st_integer_range.rb"))
|
|
227
232
|
expect(src).to include("class StIntegerRange < Lutaml::Model::Type::Integer")
|
|
228
233
|
expect(src).to include("options[:min] = 1")
|
|
229
234
|
expect(src).to include("options[:max] = 255")
|
|
@@ -507,7 +512,9 @@ RSpec.describe Lutaml::Model::Schema::RngCompiler do
|
|
|
507
512
|
expect(classes_hash.keys).to contain_exactly(
|
|
508
513
|
"AddressBook", "Card", "CardContent"
|
|
509
514
|
)
|
|
510
|
-
classes_hash.each_value
|
|
515
|
+
classes_hash.each_value do |src|
|
|
516
|
+
expect(src).to start_with("# frozen_string_literal: true")
|
|
517
|
+
end
|
|
511
518
|
end
|
|
512
519
|
end
|
|
513
520
|
|
|
@@ -821,7 +828,8 @@ RSpec.describe Lutaml::Model::Schema::RngCompiler do
|
|
|
821
828
|
|
|
822
829
|
it "returns generated source per class" do
|
|
823
830
|
expect(result).to be_a(Hash)
|
|
824
|
-
expect(result.keys).to contain_exactly("AddressBook", "Card",
|
|
831
|
+
expect(result.keys).to contain_exactly("AddressBook", "Card",
|
|
832
|
+
"CardContent")
|
|
825
833
|
end
|
|
826
834
|
|
|
827
835
|
it "loads the namespaced module and registers classes" do
|
|
@@ -886,7 +894,8 @@ RSpec.describe Lutaml::Model::Schema::RngCompiler do
|
|
|
886
894
|
File.read("spec/fixtures/xml/schema/rng/address_book.rng"),
|
|
887
895
|
)
|
|
888
896
|
expect(result).to be_a(Hash)
|
|
889
|
-
expect(result.keys).to contain_exactly("AddressBook", "Card",
|
|
897
|
+
expect(result.keys).to contain_exactly("AddressBook", "Card",
|
|
898
|
+
"CardContent")
|
|
890
899
|
end
|
|
891
900
|
end
|
|
892
901
|
end
|
|
@@ -307,9 +307,8 @@ RSpec.describe Lutaml::Xml::W3c do
|
|
|
307
307
|
RUBY
|
|
308
308
|
temp_script.close
|
|
309
309
|
|
|
310
|
-
# rubocop:disable Style/CommandLiteral
|
|
310
|
+
# rubocop:disable-next Style/CommandLiteral
|
|
311
311
|
result = `#{RbConfig.ruby} -I#{lib_path} #{temp_script.path} 2>&1`
|
|
312
|
-
# rubocop:enable Style/CommandLiteral
|
|
313
312
|
|
|
314
313
|
expect($?.success?).to be(true),
|
|
315
314
|
"W3C types not registered after require 'lutaml/xml'. " \
|
|
@@ -335,9 +334,8 @@ RSpec.describe Lutaml::Xml::W3c do
|
|
|
335
334
|
RUBY
|
|
336
335
|
temp_script.close
|
|
337
336
|
|
|
338
|
-
# rubocop:disable Style/CommandLiteral
|
|
337
|
+
# rubocop:disable-next Style/CommandLiteral
|
|
339
338
|
result = `#{RbConfig.ruby} -I#{lib_path} #{temp_script.path} 2>&1`
|
|
340
|
-
# rubocop:enable Style/CommandLiteral
|
|
341
339
|
|
|
342
340
|
expect($?.success?).to be(true),
|
|
343
341
|
"Type.lookup failed for W3C symbols after require 'lutaml/xml'. " \
|
|
@@ -361,9 +359,8 @@ RSpec.describe Lutaml::Xml::W3c do
|
|
|
361
359
|
RUBY
|
|
362
360
|
temp_script.close
|
|
363
361
|
|
|
364
|
-
# rubocop:disable Style/CommandLiteral
|
|
362
|
+
# rubocop:disable-next Style/CommandLiteral
|
|
365
363
|
result = `#{RbConfig.ruby} -I#{lib_path} #{temp_script.path} 2>&1`
|
|
366
|
-
# rubocop:enable Style/CommandLiteral
|
|
367
364
|
|
|
368
365
|
expect($?.success?).to be(true),
|
|
369
366
|
"Symbol-based attribute definition failed after require 'lutaml/xml'. " \
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lutaml-model
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.22
|
|
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-
|
|
11
|
+
date: 2026-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -92,14 +92,14 @@ dependencies:
|
|
|
92
92
|
requirements:
|
|
93
93
|
- - "~>"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 0.
|
|
95
|
+
version: 0.5.0
|
|
96
96
|
type: :runtime
|
|
97
97
|
prerelease: false
|
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 0.
|
|
102
|
+
version: 0.5.0
|
|
103
103
|
- !ruby/object:Gem::Dependency
|
|
104
104
|
name: ostruct
|
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -309,6 +309,7 @@ files:
|
|
|
309
309
|
- lib/lutaml/hash_format/adapter/mapping_rule.rb
|
|
310
310
|
- lib/lutaml/hash_format/adapter/standard_adapter.rb
|
|
311
311
|
- lib/lutaml/hash_format/adapter/transform.rb
|
|
312
|
+
- lib/lutaml/hash_format/format.rb
|
|
312
313
|
- lib/lutaml/hash_format/type/serializers.rb
|
|
313
314
|
- lib/lutaml/json.rb
|
|
314
315
|
- lib/lutaml/json/adapter.rb
|
|
@@ -319,6 +320,7 @@ files:
|
|
|
319
320
|
- lib/lutaml/json/adapter/oj_adapter.rb
|
|
320
321
|
- lib/lutaml/json/adapter/standard_adapter.rb
|
|
321
322
|
- lib/lutaml/json/adapter/transform.rb
|
|
323
|
+
- lib/lutaml/json/format.rb
|
|
322
324
|
- lib/lutaml/json/schema.rb
|
|
323
325
|
- lib/lutaml/json/schema/json_schema.rb
|
|
324
326
|
- lib/lutaml/json/type/serializers.rb
|
|
@@ -329,6 +331,7 @@ files:
|
|
|
329
331
|
- lib/lutaml/jsonl/adapter/mapping_rule.rb
|
|
330
332
|
- lib/lutaml/jsonl/adapter/standard_adapter.rb
|
|
331
333
|
- lib/lutaml/jsonl/adapter/transform.rb
|
|
334
|
+
- lib/lutaml/jsonl/format.rb
|
|
332
335
|
- lib/lutaml/jsonld.rb
|
|
333
336
|
- lib/lutaml/jsonld/adapter.rb
|
|
334
337
|
- lib/lutaml/key_value.rb
|
|
@@ -375,6 +378,7 @@ files:
|
|
|
375
378
|
- lib/lutaml/key_value/data_model.rb
|
|
376
379
|
- lib/lutaml/key_value/data_model/element.rb
|
|
377
380
|
- lib/lutaml/key_value/document.rb
|
|
381
|
+
- lib/lutaml/key_value/format.rb
|
|
378
382
|
- lib/lutaml/key_value/mapping.rb
|
|
379
383
|
- lib/lutaml/key_value/mapping_rule.rb
|
|
380
384
|
- lib/lutaml/key_value/transform.rb
|
|
@@ -642,6 +646,7 @@ files:
|
|
|
642
646
|
- lib/lutaml/model/validation/report.rb
|
|
643
647
|
- lib/lutaml/model/validation/rule.rb
|
|
644
648
|
- lib/lutaml/model/validation_framework.rb
|
|
649
|
+
- lib/lutaml/model/value_policy.rb
|
|
645
650
|
- lib/lutaml/model/value_transformer.rb
|
|
646
651
|
- lib/lutaml/model/version.rb
|
|
647
652
|
- lib/lutaml/model/yaml.rb
|
|
@@ -675,6 +680,7 @@ files:
|
|
|
675
680
|
- lib/lutaml/toml/adapter/toml_rb_adapter.rb
|
|
676
681
|
- lib/lutaml/toml/adapter/tomlib_adapter.rb
|
|
677
682
|
- lib/lutaml/toml/adapter/transform.rb
|
|
683
|
+
- lib/lutaml/toml/format.rb
|
|
678
684
|
- lib/lutaml/toml/type/serializers.rb
|
|
679
685
|
- lib/lutaml/turtle.rb
|
|
680
686
|
- lib/lutaml/turtle/adapter.rb
|
|
@@ -743,6 +749,7 @@ files:
|
|
|
743
749
|
- lib/lutaml/xml/error/schema_validation_error.rb
|
|
744
750
|
- lib/lutaml/xml/error/xml_configuration_error.rb
|
|
745
751
|
- lib/lutaml/xml/error/xml_error.rb
|
|
752
|
+
- lib/lutaml/xml/format.rb
|
|
746
753
|
- lib/lutaml/xml/format_chooser.rb
|
|
747
754
|
- lib/lutaml/xml/hoisting_algorithm.rb
|
|
748
755
|
- lib/lutaml/xml/listener.rb
|
|
@@ -769,6 +776,7 @@ files:
|
|
|
769
776
|
- lib/lutaml/xml/oga/element.rb
|
|
770
777
|
- lib/lutaml/xml/ox.rb
|
|
771
778
|
- lib/lutaml/xml/ox/element.rb
|
|
779
|
+
- lib/lutaml/xml/parse_session.rb
|
|
772
780
|
- lib/lutaml/xml/parsed_namespace_declaration.rb
|
|
773
781
|
- lib/lutaml/xml/parsed_namespace_set.rb
|
|
774
782
|
- lib/lutaml/xml/polymorphic_value_handler.rb
|
|
@@ -895,6 +903,7 @@ files:
|
|
|
895
903
|
- lib/lutaml/yaml/adapter/mapping_rule.rb
|
|
896
904
|
- lib/lutaml/yaml/adapter/standard_adapter.rb
|
|
897
905
|
- lib/lutaml/yaml/adapter/transform.rb
|
|
906
|
+
- lib/lutaml/yaml/format.rb
|
|
898
907
|
- lib/lutaml/yaml/schema.rb
|
|
899
908
|
- lib/lutaml/yaml/schema/yaml_schema.rb
|
|
900
909
|
- lib/lutaml/yaml/type/serializers.rb
|
|
@@ -909,6 +918,7 @@ files:
|
|
|
909
918
|
- lib/lutaml/yamls/adapter/transform.rb
|
|
910
919
|
- lib/lutaml/yamls/adapter/yamls_sequence.rb
|
|
911
920
|
- lib/lutaml/yamls/adapter/yamls_sequence_rule.rb
|
|
921
|
+
- lib/lutaml/yamls/format.rb
|
|
912
922
|
- lib/tasks/benchmark_runner.rb
|
|
913
923
|
- lib/tasks/memory_profile.rb
|
|
914
924
|
- lib/tasks/performance.rake
|
|
@@ -1654,6 +1664,7 @@ files:
|
|
|
1654
1664
|
- spec/lutaml/model/context_registry_spec.rb
|
|
1655
1665
|
- spec/lutaml/model/custom_bibtex_adapter_spec.rb
|
|
1656
1666
|
- spec/lutaml/model/custom_collection_spec.rb
|
|
1667
|
+
- spec/lutaml/model/custom_from_empty_values_spec.rb
|
|
1657
1668
|
- spec/lutaml/model/custom_model_spec.rb
|
|
1658
1669
|
- spec/lutaml/model/custom_serialization_spec.rb
|
|
1659
1670
|
- spec/lutaml/model/custom_vobject_adapter_spec.rb
|
|
@@ -1777,6 +1788,7 @@ files:
|
|
|
1777
1788
|
- spec/lutaml/model/validation/validation_framework_spec.rb
|
|
1778
1789
|
- spec/lutaml/model/validation_spec.rb
|
|
1779
1790
|
- spec/lutaml/model/value_map_spec.rb
|
|
1791
|
+
- spec/lutaml/model/value_policy_spec.rb
|
|
1780
1792
|
- spec/lutaml/model/value_transformation_comprehensive_spec.rb
|
|
1781
1793
|
- spec/lutaml/model/with_child_mapping_spec.rb
|
|
1782
1794
|
- spec/lutaml/model/xml_decoupling_spec.rb
|
|
@@ -1802,6 +1814,7 @@ files:
|
|
|
1802
1814
|
- spec/lutaml/rdf/namespace_spec.rb
|
|
1803
1815
|
- spec/lutaml/rdf/rdf_transform_spec.rb
|
|
1804
1816
|
- spec/lutaml/rdf/term_definition_spec.rb
|
|
1817
|
+
- spec/lutaml/require_load_order_spec.rb
|
|
1805
1818
|
- spec/lutaml/turtle/adapter_spec.rb
|
|
1806
1819
|
- spec/lutaml/turtle/mapping_spec.rb
|
|
1807
1820
|
- spec/lutaml/turtle/transform_spec.rb
|
|
@@ -1812,6 +1825,8 @@ files:
|
|
|
1812
1825
|
- spec/lutaml/xml/adapter/ox_adapter_spec.rb
|
|
1813
1826
|
- spec/lutaml/xml/adapter/rexml_adapter_spec.rb
|
|
1814
1827
|
- spec/lutaml/xml/adapter/xml_namespace_spec.rb
|
|
1828
|
+
- spec/lutaml/xml/attribute_element_namespace_disjoint_spec.rb
|
|
1829
|
+
- spec/lutaml/xml/attribute_namespace_disjointness_spec.rb
|
|
1815
1830
|
- spec/lutaml/xml/builder/builder_spec.rb
|
|
1816
1831
|
- spec/lutaml/xml/clear_parse_state_spec.rb
|
|
1817
1832
|
- spec/lutaml/xml/compiled_rule_namespace_spec.rb
|
|
@@ -1871,6 +1886,7 @@ files:
|
|
|
1871
1886
|
- spec/lutaml/xml/ooxml_namespace_spec.rb
|
|
1872
1887
|
- spec/lutaml/xml/opal_xml_spec.rb
|
|
1873
1888
|
- spec/lutaml/xml/ordered_method_spec.rb
|
|
1889
|
+
- spec/lutaml/xml/out_of_namespace_parsing_spec.rb
|
|
1874
1890
|
- spec/lutaml/xml/pipeline_integration_spec.rb
|
|
1875
1891
|
- spec/lutaml/xml/prefix_control_spec.rb
|
|
1876
1892
|
- spec/lutaml/xml/register_spec.rb
|