lutaml-model 0.8.11 → 0.8.13
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/opal.yml +31 -0
- data/.rspec-opal +5 -0
- data/.rubocop_todo.yml +45 -34
- data/README.adoc +126 -104
- data/RELEASE_NOTES.adoc +3 -3
- data/benchmark/quick_benchmark.rb +2 -2
- data/benchmark/serialization_benchmark.rb +4 -4
- data/docs/_guides/advanced-mapping.adoc +1 -1
- data/docs/_guides/character-encoding.adoc +3 -3
- data/docs/_guides/index.adoc +4 -0
- data/docs/_guides/missing-values-handling.adoc +6 -6
- data/docs/_guides/ooxml-examples.adoc +7 -7
- data/docs/_guides/opal.adoc +221 -0
- data/docs/_guides/value-transformations.adoc +7 -7
- data/docs/_guides/xml/namespace-presentation.adoc +1 -1
- data/docs/_guides/xml/namespace-semantics.adoc +15 -15
- data/docs/_guides/xml/type-namespaces.adoc +9 -9
- data/docs/_guides/xml-mapping.adoc +32 -26
- data/docs/_guides/xml-namespace-qualification.adoc +4 -4
- data/docs/_guides/xml-namespaces.adoc +2 -2
- data/docs/_guides/xml_mappings/04_xml_namespace_class.adoc +18 -18
- data/docs/_guides/xml_mappings/05_common_patterns.adoc +16 -16
- data/docs/_guides/xml_mappings/06_migration_guide.adoc +5 -5
- data/docs/_guides/xml_mappings/07_best_practices.adoc +13 -12
- data/docs/_migrations/0-8-0-namespace-restructuring.adoc +2 -2
- data/docs/_pages/attributes.adoc +2 -2
- data/docs/_pages/collections.adoc +26 -20
- data/docs/_pages/configuration.adoc +9 -4
- data/docs/_pages/consolidation-mapping.adoc +4 -4
- data/docs/_pages/importable_models.adoc +14 -13
- data/docs/_pages/index.adoc +1 -0
- data/docs/_pages/quick-start.adoc +1 -1
- data/docs/_pages/serialization_adapters.adoc +3 -2
- data/docs/_pages/value_types.adoc +10 -10
- data/docs/_references/custom_registers.adoc +7 -7
- data/docs/_references/format-independent-features.adoc +4 -4
- data/docs/_references/instance-serialization.adoc +1 -1
- data/docs/_references/parent-root-context.adoc +3 -3
- data/docs/_tutorials/basic-model-definition.adoc +1 -1
- data/docs/_tutorials/first-xml-serialization.adoc +4 -4
- data/docs/_tutorials/lutaml-xml-architecture.adoc +4 -4
- data/docs/_tutorials/validation-basics.adoc +1 -1
- data/docs/_tutorials/working-with-collections.adoc +2 -2
- data/docs/_tutorials/xml-namespaces-basics.adoc +1 -1
- data/docs/_tutorials/xml-schema-primer-style-guide.adoc +29 -29
- data/docs/cli_compare.adoc +1 -1
- data/docs/index.adoc +2 -1
- data/docs/namespace-management.adoc +14 -14
- data/lib/lutaml/hash_format/adapter/mapping.rb +2 -4
- data/lib/lutaml/json/adapter/mapping.rb +2 -4
- data/lib/lutaml/jsonl/adapter/mapping.rb +2 -4
- data/lib/lutaml/key_value/adapter/hash/mapping.rb +2 -4
- data/lib/lutaml/key_value/adapter/json/mapping.rb +2 -4
- data/lib/lutaml/key_value/adapter/jsonl/mapping.rb +2 -4
- data/lib/lutaml/key_value/adapter/toml/mapping.rb +2 -4
- data/lib/lutaml/key_value/adapter/yaml/mapping.rb +2 -4
- data/lib/lutaml/key_value/adapter/yamls/mapping.rb +2 -4
- data/lib/lutaml/key_value/mapping.rb +35 -10
- data/lib/lutaml/model/adapter_resolver.rb +5 -8
- data/lib/lutaml/model/collection.rb +11 -11
- data/lib/lutaml/model/error/no_root_mapping_error.rb +6 -5
- data/lib/lutaml/model/error/no_root_namespace_error.rb +6 -5
- data/lib/lutaml/model/error/type_only_mapping_error.rb +13 -0
- data/lib/lutaml/model/error/type_only_namespace_error.rb +12 -0
- data/lib/lutaml/model/mapping/mapping.rb +12 -0
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model.rb +3 -0
- data/lib/lutaml/toml/adapter/mapping.rb +2 -4
- data/lib/lutaml/xml/adapter/base_adapter.rb +0 -9
- data/lib/lutaml/xml/adapter/nokogiri_adapter.rb +0 -1
- data/lib/lutaml/xml/adapter/oga_adapter.rb +0 -1
- data/lib/lutaml/xml/adapter/ox_adapter.rb +0 -1
- data/lib/lutaml/xml/adapter/rexml_adapter.rb +0 -1
- data/lib/lutaml/xml/adapter/xml_serializer.rb +42 -22
- data/lib/lutaml/xml/adapter.rb +4 -0
- data/lib/lutaml/xml/builder/base.rb +64 -25
- data/lib/lutaml/xml/builder/nokogiri.rb +0 -2
- data/lib/lutaml/xml/builder/oga.rb +0 -2
- data/lib/lutaml/xml/builder/ox.rb +0 -2
- data/lib/lutaml/xml/builder/rexml.rb +0 -2
- data/lib/lutaml/xml/builder.rb +1 -0
- data/lib/lutaml/xml/configurable.rb +2 -2
- data/lib/lutaml/xml/declaration_handler.rb +3 -105
- data/lib/lutaml/xml/mapping.rb +3 -3
- data/lib/lutaml/xml/schema/xsd/documentation.rb +1 -1
- data/lib/lutaml/xml/schema/xsd.rb +5 -4
- data/lib/lutaml/xml/schema.rb +8 -5
- data/lib/lutaml/xml/serialization/collection_ext.rb +7 -7
- data/lib/lutaml/xml/serialization/format_conversion.rb +1 -1
- data/lib/lutaml/xml/serialization/instance_methods.rb +1 -1
- data/lib/lutaml/xml/xml_orderable.rb +17 -0
- data/lib/lutaml/xml.rb +9 -13
- data/lib/lutaml/yaml/adapter/mapping.rb +2 -4
- data/lib/lutaml/yamls/adapter/mapping.rb +7 -3
- data/lib/tasks/memory_profile.rb +2 -2
- data/lib/tasks/performance_benchmark.rb +5 -5
- data/lutaml-model.gemspec +1 -1
- data/spec/lutaml/key_value/transformation/rule_compiler_spec.rb +1 -1
- data/spec/lutaml/key_value/transformation/value_serializer_spec.rb +1 -1
- data/spec/lutaml/model/attribute_collection_spec.rb +1 -1
- data/spec/lutaml/model/cli_spec.rb +1 -1
- data/spec/lutaml/model/collection_spec.rb +1 -1
- data/spec/lutaml/model/collection_validation_spec.rb +6 -6
- data/spec/lutaml/model/consolidation_spec.rb +8 -8
- data/spec/lutaml/model/custom_collection_spec.rb +3 -3
- data/spec/lutaml/model/default_register_spec.rb +23 -23
- data/spec/lutaml/model/delegation_spec.rb +3 -10
- data/spec/lutaml/model/derived_attribute_serialization_spec.rb +1 -1
- data/spec/lutaml/model/dynamic_attribute_spec.rb +2 -2
- data/spec/lutaml/model/enum_spec.rb +1 -1
- data/spec/lutaml/model/group_spec.rb +12 -12
- data/spec/lutaml/model/lazy_collection_spec.rb +4 -4
- data/spec/lutaml/model/mixed_content_spec.rb +2 -2
- data/spec/lutaml/model/namespace_versioning_spec.rb +4 -4
- data/spec/lutaml/model/opal_smoke_spec.rb +117 -0
- data/spec/lutaml/model/processing_instruction_spec.rb +11 -11
- data/spec/lutaml/model/register_methods_spec.rb +2 -2
- data/spec/lutaml/model/render_empty_spec.rb +1 -1
- data/spec/lutaml/model/serialize_perf_guard_spec.rb +1 -1
- data/spec/lutaml/model/transform_dynamic_attributes_spec.rb +1 -1
- data/spec/lutaml/model/transformation_builder_spec.rb +2 -2
- data/spec/lutaml/model/xml_decoupling_spec.rb +3 -3
- data/spec/lutaml/model/xsd_patterns_spec.rb +2 -3
- data/spec/lutaml/xml/adapter/order_spec.rb +1 -1
- data/spec/lutaml/xml/clear_parse_state_spec.rb +1 -1
- data/spec/lutaml/xml/content_model_validation_spec.rb +4 -2
- data/spec/lutaml/xml/doubly_defined_namespace_spec.rb +5 -5
- data/spec/lutaml/xml/enhanced_mapping_spec.rb +2 -1
- data/spec/lutaml/xml/entity_fragmentation_spec.rb +5 -5
- data/spec/lutaml/xml/indent_spec.rb +109 -0
- data/spec/lutaml/xml/line_ending_spec.rb +66 -0
- data/spec/lutaml/xml/mapping_finalization_guard_spec.rb +2 -2
- data/spec/lutaml/xml/model_transform_guard_spec.rb +4 -4
- data/spec/lutaml/xml/namespace_alias_spec.rb +4 -4
- data/spec/lutaml/xml/namespace_aware_parsing_spec.rb +3 -3
- data/spec/lutaml/xml/namespace_bound_element_roundtrip_spec.rb +2 -2
- data/spec/lutaml/xml/namespace_format_preservation_spec.rb +1 -1
- data/spec/lutaml/xml/namespace_inheritance_spec.rb +3 -3
- data/spec/lutaml/xml/namespace_preservation_spec.rb +5 -5
- data/spec/lutaml/xml/opal_xml_spec.rb +145 -0
- data/spec/lutaml/xml/pipeline_integration_spec.rb +145 -0
- data/spec/lutaml/xml/schema_primer_spec.rb +5 -5
- data/spec/lutaml/xml/transformation_spec.rb +20 -20
- data/spec/lutaml/xml/type_namespace/collector_spec.rb +1 -1
- data/spec/lutaml/xml/type_namespace/planner_spec.rb +3 -3
- data/spec/lutaml/xml/xml_spec.rb +64 -13
- data/spec/support/opal.rb +6 -0
- metadata +16 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da27c86db192d8d77af76f856e7cf54db5bdd8740f293ce0068940a0c44699c6
|
|
4
|
+
data.tar.gz: 06dfdfb95294ee9e066c34316ca1287a042000627ebe4ce77f08602cc0b477bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15e4876e720f00a340f6fbb7450a0911b183710cd14834b77c6c6bb50c26175f592db7316b8f15bd1d07fa50572d9780756024b185208303f24900d5f853adee
|
|
7
|
+
data.tar.gz: 6cad953d8d79c4a291c020ad9b00de176f2366f2223df4406b2fd70a395d3925b69b1e0a5af4e1a19bb2dd75447aec84a0d8153ad252faa7ff3a611b9e3c0dc3
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: opal
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
submodules: "recursive"
|
|
15
|
+
|
|
16
|
+
- name: Set up Ruby
|
|
17
|
+
uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: "3.3"
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
|
|
22
|
+
- name: Set up Node.js
|
|
23
|
+
uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: "18"
|
|
26
|
+
|
|
27
|
+
- name: Run Opal tests
|
|
28
|
+
# TODO: Remove continue-on-error once REXML adapter is verified
|
|
29
|
+
# under actual Opal runtime (REXML compiles to JS via Opal's stdlib)
|
|
30
|
+
run: bundle exec rake spec:opal
|
|
31
|
+
continue-on-error: true
|
data/.rspec-opal
ADDED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-05-
|
|
3
|
+
# on 2026-05-27 05:02:01 UTC using RuboCop version 1.86.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
@@ -17,45 +17,53 @@ Gemspec/RequiredRubyVersion:
|
|
|
17
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
18
|
Layout/ArgumentAlignment:
|
|
19
19
|
Exclude:
|
|
20
|
-
- '
|
|
21
|
-
- 'spec/lutaml/model/store_spec.rb'
|
|
20
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|
|
22
21
|
|
|
23
|
-
# Offense count:
|
|
22
|
+
# Offense count: 1
|
|
24
23
|
# This cop supports safe autocorrection (--autocorrect).
|
|
25
|
-
|
|
26
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
27
|
-
Layout/BlockAlignment:
|
|
24
|
+
Layout/ClosingParenthesisIndentation:
|
|
28
25
|
Exclude:
|
|
29
|
-
- 'spec/lutaml/model/
|
|
26
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|
|
30
27
|
|
|
31
|
-
# Offense count:
|
|
28
|
+
# Offense count: 1
|
|
32
29
|
# This cop supports safe autocorrection (--autocorrect).
|
|
33
|
-
|
|
30
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
31
|
+
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
|
32
|
+
Layout/FirstArgumentIndentation:
|
|
34
33
|
Exclude:
|
|
35
|
-
- 'spec/lutaml/model/
|
|
34
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|
|
36
35
|
|
|
37
|
-
# Offense count:
|
|
36
|
+
# Offense count: 2
|
|
38
37
|
# This cop supports safe autocorrection (--autocorrect).
|
|
39
|
-
# Configuration parameters:
|
|
40
|
-
#
|
|
41
|
-
|
|
38
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
39
|
+
# SupportedHashRocketStyles: key, separator, table
|
|
40
|
+
# SupportedColonStyles: key, separator, table
|
|
41
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
42
|
+
Layout/HashAlignment:
|
|
42
43
|
Exclude:
|
|
43
|
-
- 'spec/lutaml/model/
|
|
44
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|
|
44
45
|
|
|
45
|
-
# Offense count:
|
|
46
|
+
# Offense count: 3022
|
|
46
47
|
# This cop supports safe autocorrection (--autocorrect).
|
|
47
48
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
48
49
|
# URISchemes: http, https
|
|
49
50
|
Layout/LineLength:
|
|
50
51
|
Enabled: false
|
|
51
52
|
|
|
52
|
-
# Offense count:
|
|
53
|
+
# Offense count: 1
|
|
54
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
55
|
+
# Configuration parameters: EnforcedStyle.
|
|
56
|
+
# SupportedStyles: symmetrical, new_line, same_line
|
|
57
|
+
Layout/MultilineMethodCallBraceLayout:
|
|
58
|
+
Exclude:
|
|
59
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|
|
60
|
+
|
|
61
|
+
# Offense count: 1
|
|
53
62
|
# This cop supports safe autocorrection (--autocorrect).
|
|
54
63
|
# Configuration parameters: AllowInHeredoc.
|
|
55
64
|
Layout/TrailingWhitespace:
|
|
56
65
|
Exclude:
|
|
57
|
-
- '
|
|
58
|
-
- 'spec/lutaml/model/store_spec.rb'
|
|
66
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|
|
59
67
|
|
|
60
68
|
# Offense count: 21
|
|
61
69
|
# Configuration parameters: AllowedMethods.
|
|
@@ -148,6 +156,12 @@ Lint/UnusedMethodArgument:
|
|
|
148
156
|
- 'lib/lutaml/xml/unqualified_inheritance_strategy.rb'
|
|
149
157
|
- 'spec/support/xml/xsd/code_example_validator.rb'
|
|
150
158
|
|
|
159
|
+
# Offense count: 1
|
|
160
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
161
|
+
Lint/UselessAssignment:
|
|
162
|
+
Exclude:
|
|
163
|
+
- 'spec/lutaml/xml/opal_xml_spec.rb'
|
|
164
|
+
|
|
151
165
|
# Offense count: 1
|
|
152
166
|
Lint/UselessConstantScoping:
|
|
153
167
|
Exclude:
|
|
@@ -277,7 +291,7 @@ RSpec/BeforeAfterAll:
|
|
|
277
291
|
RSpec/ContextWording:
|
|
278
292
|
Enabled: false
|
|
279
293
|
|
|
280
|
-
# Offense count:
|
|
294
|
+
# Offense count: 98
|
|
281
295
|
# Configuration parameters: IgnoredMetadata.
|
|
282
296
|
RSpec/DescribeClass:
|
|
283
297
|
Enabled: false
|
|
@@ -288,7 +302,7 @@ RSpec/DescribeMethod:
|
|
|
288
302
|
- 'spec/lutaml/xml/schema/xsd/schema_helper_methods_spec.rb'
|
|
289
303
|
- 'spec/lutaml/xml/serializable_namespace_spec.rb'
|
|
290
304
|
|
|
291
|
-
# Offense count:
|
|
305
|
+
# Offense count: 1301
|
|
292
306
|
# Configuration parameters: CountAsOne.
|
|
293
307
|
RSpec/ExampleLength:
|
|
294
308
|
Max: 68
|
|
@@ -363,7 +377,7 @@ RSpec/MultipleDescribes:
|
|
|
363
377
|
- 'spec/lutaml/xml/namespace_resolution_strategy_spec.rb'
|
|
364
378
|
- 'spec/lutaml/xml/xml_space_type_spec.rb'
|
|
365
379
|
|
|
366
|
-
# Offense count:
|
|
380
|
+
# Offense count: 1515
|
|
367
381
|
RSpec/MultipleExpectations:
|
|
368
382
|
Max: 21
|
|
369
383
|
|
|
@@ -437,17 +451,6 @@ Security/MarshalLoad:
|
|
|
437
451
|
Exclude:
|
|
438
452
|
- 'scripts-xmi-profile/profile_xmi.rb'
|
|
439
453
|
|
|
440
|
-
# Offense count: 5
|
|
441
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
442
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
443
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
444
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
445
|
-
# FunctionalMethods: let, let!, subject, watch
|
|
446
|
-
# AllowedMethods: lambda, proc, it
|
|
447
|
-
Style/BlockDelimiters:
|
|
448
|
-
Exclude:
|
|
449
|
-
- 'spec/lutaml/model/store_spec.rb'
|
|
450
|
-
|
|
451
454
|
# Offense count: 2
|
|
452
455
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
453
456
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
@@ -540,3 +543,11 @@ Style/StringConcatenation:
|
|
|
540
543
|
- 'lib/lutaml/model/schema/xml_compiler/complex_type.rb'
|
|
541
544
|
- 'lib/lutaml/model/schema/xml_compiler/simple_type.rb'
|
|
542
545
|
- 'lib/lutaml/model/schema/xml_compiler/xml_namespace_class.rb'
|
|
546
|
+
|
|
547
|
+
# Offense count: 1
|
|
548
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
549
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
550
|
+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
551
|
+
Style/TrailingCommaInArguments:
|
|
552
|
+
Exclude:
|
|
553
|
+
- 'spec/lutaml/model/opal_smoke_spec.rb'
|