lutaml-model 0.7.1 → 0.7.7
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/.envrc +1 -0
- data/.github/workflows/dependent-tests.yml +4 -0
- data/.github/workflows/rake.yml +12 -0
- data/.github/workflows/release.yml +3 -0
- data/.gitignore +6 -1
- data/.irbrc +1 -0
- data/.pryrc +1 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +58 -84
- data/Gemfile +4 -1
- data/README.adoc +3115 -365
- data/RELEASE_NOTES.adoc +346 -0
- data/docs/custom_adapters.adoc +144 -0
- data/docs/custom_registers.adoc +228 -0
- data/docs/schema_generation.adoc +898 -0
- data/docs/schema_import.adoc +364 -0
- data/flake.lock +114 -0
- data/flake.nix +103 -0
- data/lib/lutaml/model/attribute.rb +242 -100
- data/lib/lutaml/model/choice.rb +30 -0
- data/lib/lutaml/model/collection.rb +212 -0
- data/lib/lutaml/model/comparable_model.rb +3 -3
- data/lib/lutaml/model/config.rb +71 -42
- data/lib/lutaml/model/constants.rb +2 -0
- data/lib/lutaml/model/error/element_count_out_of_range_error.rb +29 -0
- data/lib/lutaml/model/error/invalid_attribute_name_error.rb +15 -0
- data/lib/lutaml/model/error/invalid_attribute_options_error.rb +16 -0
- data/lib/lutaml/model/error/invalid_choice_range_error.rb +3 -5
- data/lib/lutaml/model/error/polymorphic_error.rb +7 -2
- data/lib/lutaml/model/error/register/not_registrable_class_error.rb +11 -0
- data/lib/lutaml/model/error/type/invalid_value_error.rb +5 -3
- data/lib/lutaml/model/error/type/max_bound_error.rb +20 -0
- data/lib/lutaml/model/error/type/max_length_error.rb +20 -0
- data/lib/lutaml/model/error/type/min_bound_error.rb +20 -0
- data/lib/lutaml/model/error/type/min_length_error.rb +20 -0
- data/lib/lutaml/model/error/type/pattern_not_matched_error.rb +18 -0
- data/lib/lutaml/model/error/validation_failed_error.rb +9 -0
- data/lib/lutaml/model/error.rb +10 -0
- data/lib/lutaml/model/errors.rb +36 -0
- data/lib/lutaml/model/format_registry.rb +44 -0
- data/lib/lutaml/model/global_register.rb +41 -0
- data/lib/lutaml/model/hash_adapter/document.rb +11 -0
- data/lib/lutaml/model/hash_adapter/mapping.rb +19 -0
- data/lib/lutaml/model/hash_adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/model/hash_adapter/standard_adapter.rb +17 -0
- data/lib/lutaml/model/hash_adapter/transform.rb +8 -0
- data/lib/lutaml/model/hash_adapter.rb +21 -0
- data/lib/lutaml/model/json/document.rb +11 -0
- data/lib/lutaml/model/json/mapping.rb +19 -0
- data/lib/lutaml/model/json/mapping_rule.rb +9 -0
- data/lib/lutaml/model/{json_adapter → json}/multi_json_adapter.rb +4 -5
- data/lib/lutaml/model/{json_adapter/standard_json_adapter.rb → json/standard_adapter.rb} +5 -3
- data/lib/lutaml/model/json/transform.rb +8 -0
- data/lib/lutaml/model/json.rb +21 -0
- data/lib/lutaml/model/jsonl/document.rb +14 -0
- data/lib/lutaml/model/jsonl/mapping.rb +19 -0
- data/lib/lutaml/model/jsonl/mapping_rule.rb +9 -0
- data/lib/lutaml/model/jsonl/standard_adapter.rb +33 -0
- data/lib/lutaml/model/jsonl/transform.rb +19 -0
- data/lib/lutaml/model/jsonl.rb +21 -0
- data/lib/lutaml/model/key_value_document.rb +28 -0
- data/lib/lutaml/model/mapping/key_value_mapping.rb +85 -13
- data/lib/lutaml/model/mapping/key_value_mapping_rule.rb +5 -0
- data/lib/lutaml/model/mapping/mapping.rb +13 -0
- data/lib/lutaml/model/mapping/mapping_rule.rb +15 -9
- data/lib/lutaml/model/register.rb +105 -0
- data/lib/lutaml/model/{toml_adapter.rb → registrable.rb} +1 -1
- data/lib/lutaml/model/schema/base_schema.rb +64 -0
- data/lib/lutaml/model/schema/decorators/attribute.rb +114 -0
- data/lib/lutaml/model/schema/decorators/choices.rb +31 -0
- data/lib/lutaml/model/schema/decorators/class_definition.rb +85 -0
- data/lib/lutaml/model/schema/decorators/definition_collection.rb +97 -0
- data/lib/lutaml/model/schema/generator/definition.rb +53 -0
- data/lib/lutaml/model/schema/generator/definitions_collection.rb +81 -0
- data/lib/lutaml/model/schema/generator/properties_collection.rb +63 -0
- data/lib/lutaml/model/schema/generator/property.rb +110 -0
- data/lib/lutaml/model/schema/generator/ref.rb +24 -0
- data/lib/lutaml/model/schema/helpers/template_helper.rb +49 -0
- data/lib/lutaml/model/schema/json_schema.rb +42 -49
- data/lib/lutaml/model/schema/relaxng_schema.rb +14 -10
- data/lib/lutaml/model/schema/renderer.rb +36 -0
- data/lib/lutaml/model/schema/shared_methods.rb +24 -0
- data/lib/lutaml/model/schema/templates/model.erb +9 -0
- data/lib/lutaml/model/schema/xml_compiler/attribute.rb +85 -0
- data/lib/lutaml/model/schema/xml_compiler/attribute_group.rb +45 -0
- data/lib/lutaml/model/schema/xml_compiler/choice.rb +65 -0
- data/lib/lutaml/model/schema/xml_compiler/complex_content.rb +27 -0
- data/lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb +34 -0
- data/lib/lutaml/model/schema/xml_compiler/complex_type.rb +136 -0
- data/lib/lutaml/model/schema/xml_compiler/element.rb +104 -0
- data/lib/lutaml/model/schema/xml_compiler/group.rb +97 -0
- data/lib/lutaml/model/schema/xml_compiler/restriction.rb +101 -0
- data/lib/lutaml/model/schema/xml_compiler/sequence.rb +50 -0
- data/lib/lutaml/model/schema/xml_compiler/simple_content.rb +36 -0
- data/lib/lutaml/model/schema/xml_compiler/simple_type.rb +189 -0
- data/lib/lutaml/model/schema/xml_compiler.rb +231 -587
- data/lib/lutaml/model/schema/xsd_schema.rb +12 -8
- data/lib/lutaml/model/schema/yaml_schema.rb +41 -35
- data/lib/lutaml/model/schema.rb +1 -0
- data/lib/lutaml/model/sequence.rb +60 -30
- data/lib/lutaml/model/serialization_adapter.rb +22 -0
- data/lib/lutaml/model/serialize.rb +296 -548
- data/lib/lutaml/model/services/base.rb +11 -0
- data/lib/lutaml/model/services/logger.rb +54 -0
- data/lib/lutaml/model/services/rule_value_extractor.rb +92 -0
- data/lib/lutaml/model/services/transformer.rb +48 -0
- data/lib/lutaml/model/services/type/validator/number.rb +25 -0
- data/lib/lutaml/model/services/type/validator/string.rb +52 -0
- data/lib/lutaml/model/services/type/validator.rb +43 -0
- data/lib/lutaml/model/services/validator.rb +145 -0
- data/lib/lutaml/model/services.rb +5 -0
- data/lib/lutaml/model/toml/document.rb +11 -0
- data/lib/lutaml/model/toml/mapping.rb +27 -0
- data/lib/lutaml/model/toml/mapping_rule.rb +9 -0
- data/lib/lutaml/model/{toml_adapter → toml}/toml_rb_adapter.rb +3 -3
- data/lib/lutaml/model/toml/tomlib_adapter.rb +19 -0
- data/lib/lutaml/model/toml/transform.rb +8 -0
- data/lib/lutaml/model/toml.rb +30 -0
- data/lib/lutaml/model/transform/key_value_transform.rb +297 -0
- data/lib/lutaml/model/transform/xml_transform.rb +228 -0
- data/lib/lutaml/model/transform.rb +93 -0
- data/lib/lutaml/model/type/boolean.rb +1 -1
- data/lib/lutaml/model/type/date.rb +1 -1
- data/lib/lutaml/model/type/date_time.rb +1 -1
- data/lib/lutaml/model/type/decimal.rb +11 -9
- data/lib/lutaml/model/type/float.rb +2 -1
- data/lib/lutaml/model/type/integer.rb +24 -21
- data/lib/lutaml/model/type/string.rb +4 -2
- data/lib/lutaml/model/type/time.rb +1 -1
- data/lib/lutaml/model/type/time_without_date.rb +1 -1
- data/lib/lutaml/model/type/value.rb +11 -10
- data/lib/lutaml/model/type.rb +5 -2
- data/lib/lutaml/model/uninitialized_class.rb +1 -1
- data/lib/lutaml/model/utils.rb +56 -4
- data/lib/lutaml/model/validation.rb +6 -4
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model/{xml_adapter → xml}/builder/nokogiri.rb +2 -2
- data/lib/lutaml/model/{xml_adapter → xml}/builder/oga.rb +10 -10
- data/lib/lutaml/model/{xml_adapter → xml}/builder/ox.rb +1 -1
- data/lib/lutaml/model/{xml_adapter/xml_document.rb → xml/document.rb} +42 -25
- data/lib/lutaml/model/xml/element.rb +32 -0
- data/lib/lutaml/model/xml/mapping.rb +471 -0
- data/lib/lutaml/model/xml/mapping_rule.rb +149 -0
- data/lib/lutaml/model/xml/nokogiri_adapter.rb +234 -0
- data/lib/lutaml/model/{xml_adapter → xml}/oga/document.rb +1 -1
- data/lib/lutaml/model/{xml_adapter → xml}/oga/element.rb +7 -2
- data/lib/lutaml/model/xml/oga_adapter.rb +172 -0
- data/lib/lutaml/model/xml/ox_adapter.rb +229 -0
- data/lib/lutaml/model/xml/transform.rb +8 -0
- data/lib/lutaml/model/{xml_adapter → xml}/xml_attribute.rb +1 -1
- data/lib/lutaml/model/{xml_adapter → xml}/xml_element.rb +9 -31
- data/lib/lutaml/model/{xml_adapter → xml}/xml_namespace.rb +1 -1
- data/lib/lutaml/model/xml.rb +31 -0
- data/lib/lutaml/model/xml_adapter/element.rb +11 -25
- data/lib/lutaml/model/xml_adapter/nokogiri_adapter.rb +6 -223
- data/lib/lutaml/model/xml_adapter/oga_adapter.rb +13 -163
- data/lib/lutaml/model/xml_adapter/ox_adapter.rb +10 -207
- data/lib/lutaml/model/yaml/document.rb +10 -0
- data/lib/lutaml/model/yaml/mapping.rb +19 -0
- data/lib/lutaml/model/yaml/mapping_rule.rb +9 -0
- data/lib/lutaml/model/{yaml_adapter/standard_yaml_adapter.rb → yaml/standard_adapter.rb} +4 -3
- data/lib/lutaml/model/yaml/transform.rb +8 -0
- data/lib/lutaml/model/yaml.rb +21 -0
- data/lib/lutaml/model/yamls/document.rb +14 -0
- data/lib/lutaml/model/yamls/mapping.rb +19 -0
- data/lib/lutaml/model/yamls/mapping_rule.rb +9 -0
- data/lib/lutaml/model/yamls/standard_adapter.rb +34 -0
- data/lib/lutaml/model/yamls/transform.rb +19 -0
- data/lib/lutaml/model/yamls.rb +21 -0
- data/lib/lutaml/model.rb +15 -4
- data/lutaml-model.gemspec +0 -4
- data/spec/benchmarks/xml_parsing_benchmark_spec.rb +5 -6
- data/spec/fixtures/xml/advanced_test_schema.xsd +134 -0
- data/spec/fixtures/xml/examples/nested_categories.xml +55 -0
- data/spec/fixtures/xml/examples/valid_catalog.xml +43 -0
- data/spec/fixtures/xml/product_catalog.xsd +151 -0
- data/spec/fixtures/xml/specifications_schema.xsd +38 -0
- data/spec/lutaml/model/attribute_collection_spec.rb +101 -0
- data/spec/lutaml/model/attribute_spec.rb +41 -44
- data/spec/lutaml/model/cdata_spec.rb +7 -7
- data/spec/lutaml/model/choice_spec.rb +44 -0
- data/spec/lutaml/model/custom_bibtex_adapter_spec.rb +598 -0
- data/spec/lutaml/model/custom_collection_spec.rb +830 -0
- data/spec/lutaml/model/custom_vobject_adapter_spec.rb +1226 -0
- data/spec/lutaml/model/global_register_spec.rb +108 -0
- data/spec/lutaml/model/group_spec.rb +27 -10
- data/spec/lutaml/model/hash/adapter_spec.rb +255 -0
- data/spec/lutaml/model/json_adapter_spec.rb +6 -6
- data/spec/lutaml/model/jsonl/standard_adapter_spec.rb +91 -0
- data/spec/lutaml/model/jsonl_spec.rb +229 -0
- data/spec/lutaml/model/key_value_mapping_spec.rb +25 -1
- data/spec/lutaml/model/mixed_content_spec.rb +24 -24
- data/spec/lutaml/model/multiple_mapping_spec.rb +6 -6
- data/spec/lutaml/model/ordered_content_spec.rb +6 -6
- data/spec/lutaml/model/polymorphic_spec.rb +178 -0
- data/spec/lutaml/model/register/key_value_spec.rb +275 -0
- data/spec/lutaml/model/register/xml_spec.rb +185 -0
- data/spec/lutaml/model/register_spec.rb +147 -0
- data/spec/lutaml/model/root_mappings_spec.rb +3 -3
- data/spec/lutaml/model/rule_value_extractor_spec.rb +162 -0
- data/spec/lutaml/model/schema/generator/definitions_collection_spec.rb +120 -0
- data/spec/lutaml/model/schema/json_schema_spec.rb +412 -51
- data/spec/lutaml/model/schema/json_schema_to_models_spec.rb +383 -0
- data/spec/lutaml/model/schema/xml_compiler/attribute_group_spec.rb +65 -0
- data/spec/lutaml/model/schema/xml_compiler/attribute_spec.rb +63 -0
- data/spec/lutaml/model/schema/xml_compiler/choice_spec.rb +71 -0
- data/spec/lutaml/model/schema/xml_compiler/complex_content_restriction_spec.rb +55 -0
- data/spec/lutaml/model/schema/xml_compiler/complex_content_spec.rb +37 -0
- data/spec/lutaml/model/schema/xml_compiler/complex_type_spec.rb +173 -0
- data/spec/lutaml/model/schema/xml_compiler/element_spec.rb +63 -0
- data/spec/lutaml/model/schema/xml_compiler/group_spec.rb +86 -0
- data/spec/lutaml/model/schema/xml_compiler/restriction_spec.rb +76 -0
- data/spec/lutaml/model/schema/xml_compiler/sequence_spec.rb +59 -0
- data/spec/lutaml/model/schema/xml_compiler/simple_content_spec.rb +55 -0
- data/spec/lutaml/model/schema/xml_compiler/simple_type_spec.rb +181 -0
- data/spec/lutaml/model/schema/xml_compiler_spec.rb +503 -1804
- data/spec/lutaml/model/schema/yaml_schema_spec.rb +249 -26
- data/spec/lutaml/model/sequence_spec.rb +36 -0
- data/spec/lutaml/model/serializable_spec.rb +201 -94
- data/spec/lutaml/model/toml_adapter_spec.rb +6 -6
- data/spec/lutaml/model/toml_spec.rb +51 -0
- data/spec/lutaml/model/transformation_spec.rb +72 -15
- data/spec/lutaml/model/type_spec.rb +8 -4
- data/spec/lutaml/model/uninitialized_class_spec.rb +96 -0
- data/spec/lutaml/model/utils_spec.rb +3 -3
- data/spec/lutaml/model/xml/derived_attributes_spec.rb +1 -1
- data/spec/lutaml/model/xml/namespace_spec.rb +57 -0
- data/spec/lutaml/model/xml/root_mappings/nested_child_mappings_spec.rb +217 -0
- data/spec/lutaml/model/xml/xml_element_spec.rb +7 -1
- data/spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb +2 -2
- data/spec/lutaml/model/xml_adapter/oga_adapter_spec.rb +2 -2
- data/spec/lutaml/model/xml_adapter/ox_adapter_spec.rb +2 -2
- data/spec/lutaml/model/xml_adapter/xml_namespace_spec.rb +12 -12
- data/spec/lutaml/model/xml_adapter_spec.rb +30 -6
- data/spec/lutaml/model/xml_mapping_rule_spec.rb +14 -7
- data/spec/lutaml/model/xml_mapping_spec.rb +27 -15
- data/spec/lutaml/model/xml_spec.rb +63 -0
- data/spec/lutaml/model/yaml_adapter_spec.rb +3 -5
- data/spec/lutaml/model/yamls/standard_adapter_spec.rb +183 -0
- data/spec/lutaml/model/yamls_spec.rb +294 -0
- data/spec/spec_helper.rb +4 -3
- metadata +162 -60
- data/lib/lutaml/model/json_adapter/json_document.rb +0 -20
- data/lib/lutaml/model/json_adapter/json_object.rb +0 -28
- data/lib/lutaml/model/loggable.rb +0 -15
- data/lib/lutaml/model/mapping/json_mapping.rb +0 -17
- data/lib/lutaml/model/mapping/toml_mapping.rb +0 -25
- data/lib/lutaml/model/mapping/xml_mapping.rb +0 -389
- data/lib/lutaml/model/mapping/xml_mapping_rule.rb +0 -139
- data/lib/lutaml/model/mapping/yaml_mapping.rb +0 -17
- data/lib/lutaml/model/mapping.rb +0 -14
- data/lib/lutaml/model/schema/templates/simple_type.rb +0 -247
- data/lib/lutaml/model/toml_adapter/toml_document.rb +0 -20
- data/lib/lutaml/model/toml_adapter/toml_object.rb +0 -28
- data/lib/lutaml/model/toml_adapter/tomlib_adapter.rb +0 -20
- data/lib/lutaml/model/yaml_adapter/yaml_document.rb +0 -20
- data/lib/lutaml/model/yaml_adapter/yaml_object.rb +0 -28
- data/lib/lutaml/model/yaml_adapter.rb +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 518cf7f42227fbdd75f25ed97d2107f0d0c575290ae2a21d5be323b70546cae4
|
|
4
|
+
data.tar.gz: 19f355abc4da8bff1ce95b06eba36aca987888325175aba9ab153998bcc8d68f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9fb8b93ce570cc804f4f9d2f1562ac58dab5b76aa55b5d3b79d82a95eef6edc4c65752beeb7d6176878d4f765dbf40a3f63331b8b2b726363b7a5a506046d243
|
|
7
|
+
data.tar.gz: 10a50c4c30cf2034d3e394fd8526d00c220df5dcf216d8dd5fc19395858766254d8e8f835232404be2661d5821ebb05e82afad130b238d27aa224d5fc38855cd
|
data/.envrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
use flake
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -6,10 +6,22 @@ on:
|
|
|
6
6
|
push:
|
|
7
7
|
branches: [ master, main ]
|
|
8
8
|
tags: [ v* ]
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- '**.adoc'
|
|
9
11
|
pull_request:
|
|
12
|
+
paths-ignore:
|
|
13
|
+
- '**.adoc'
|
|
10
14
|
|
|
11
15
|
jobs:
|
|
12
16
|
rake:
|
|
13
17
|
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
|
|
18
|
+
with:
|
|
19
|
+
before-setup-ruby: |
|
|
20
|
+
mkdir -p .bundle
|
|
21
|
+
touch .bundle/config
|
|
22
|
+
cat .bundle/config
|
|
23
|
+
echo "---" >> .bundle/config
|
|
24
|
+
echo 'BUNDLE_BUILD__RUBY___LL: "--with-cflags=-std=gnu17"' >> .bundle/config
|
|
25
|
+
cat .bundle/config
|
|
14
26
|
secrets:
|
|
15
27
|
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
|
@@ -18,6 +18,9 @@ jobs:
|
|
|
18
18
|
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
|
19
19
|
with:
|
|
20
20
|
next_version: ${{ github.event.inputs.next_version }}
|
|
21
|
+
post_install: |
|
|
22
|
+
git status
|
|
23
|
+
cat .bundle/config
|
|
21
24
|
secrets:
|
|
22
25
|
rubygems-api-key: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
|
|
23
26
|
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
data/.gitignore
CHANGED
data/.irbrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "lutaml/model"
|
data/.pryrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "lutaml/model"
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2025-
|
|
3
|
+
# on 2025-07-07 12:34:09 UTC using RuboCop version 1.77.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
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
Layout/ElseAlignment:
|
|
12
|
-
Exclude:
|
|
13
|
-
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
|
14
|
-
|
|
15
|
-
# Offense count: 2
|
|
9
|
+
# Offense count: 627
|
|
16
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
17
|
-
# Configuration parameters:
|
|
18
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
19
|
-
Layout/EndAlignment:
|
|
20
|
-
Exclude:
|
|
21
|
-
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
|
22
|
-
|
|
23
|
-
# Offense count: 2
|
|
24
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
25
|
-
# Configuration parameters: Width, AllowedPatterns.
|
|
26
|
-
Layout/IndentationWidth:
|
|
27
|
-
Exclude:
|
|
28
|
-
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
|
29
|
-
|
|
30
|
-
# Offense count: 484
|
|
31
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
32
|
-
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
11
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
33
12
|
# URISchemes: http, https
|
|
34
13
|
Layout/LineLength:
|
|
35
14
|
Enabled: false
|
|
@@ -42,33 +21,18 @@ Lint/ConstantDefinitionInBlock:
|
|
|
42
21
|
- 'spec/benchmarks/xml_parsing_benchmark_spec.rb'
|
|
43
22
|
- 'spec/lutaml/model/xml_adapter/xml_namespace_spec.rb'
|
|
44
23
|
|
|
45
|
-
# Offense count:
|
|
24
|
+
# Offense count: 65
|
|
46
25
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
47
26
|
Metrics/AbcSize:
|
|
48
|
-
|
|
49
|
-
- 'lib/lutaml/model/attribute.rb'
|
|
50
|
-
- 'lib/lutaml/model/comparable_model.rb'
|
|
51
|
-
- 'lib/lutaml/model/mapping/key_value_mapping_rule.rb'
|
|
52
|
-
- 'lib/lutaml/model/mapping/mapping_rule.rb'
|
|
53
|
-
- 'lib/lutaml/model/mapping/xml_mapping.rb'
|
|
54
|
-
- 'lib/lutaml/model/mapping/xml_mapping_rule.rb'
|
|
55
|
-
- 'lib/lutaml/model/schema/relaxng_schema.rb'
|
|
56
|
-
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
|
57
|
-
- 'lib/lutaml/model/schema/xsd_schema.rb'
|
|
58
|
-
- 'lib/lutaml/model/serialize.rb'
|
|
59
|
-
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
|
|
60
|
-
- 'lib/lutaml/model/xml_adapter/oga/element.rb'
|
|
61
|
-
- 'lib/lutaml/model/xml_adapter/oga_adapter.rb'
|
|
62
|
-
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
|
63
|
-
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
|
27
|
+
Enabled: false
|
|
64
28
|
|
|
65
|
-
# Offense count:
|
|
29
|
+
# Offense count: 8
|
|
66
30
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
67
31
|
# AllowedMethods: refine
|
|
68
32
|
Metrics/BlockLength:
|
|
69
|
-
Max:
|
|
33
|
+
Max: 36
|
|
70
34
|
|
|
71
|
-
# Offense count:
|
|
35
|
+
# Offense count: 36
|
|
72
36
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
73
37
|
Metrics/CyclomaticComplexity:
|
|
74
38
|
Exclude:
|
|
@@ -76,24 +40,25 @@ Metrics/CyclomaticComplexity:
|
|
|
76
40
|
- 'lib/lutaml/model/comparable_model.rb'
|
|
77
41
|
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
|
78
42
|
- 'lib/lutaml/model/serialize.rb'
|
|
43
|
+
- 'lib/lutaml/model/transform/xml_transform.rb'
|
|
79
44
|
- 'lib/lutaml/model/type/integer.rb'
|
|
80
|
-
- 'lib/lutaml/model/
|
|
81
|
-
- 'lib/lutaml/model/
|
|
82
|
-
- 'lib/lutaml/model/
|
|
83
|
-
- 'lib/lutaml/model/
|
|
84
|
-
- 'lib/lutaml/model/
|
|
45
|
+
- 'lib/lutaml/model/xml/builder/oga.rb'
|
|
46
|
+
- 'lib/lutaml/model/xml/document.rb'
|
|
47
|
+
- 'lib/lutaml/model/xml/nokogiri_adapter.rb'
|
|
48
|
+
- 'lib/lutaml/model/xml/oga_adapter.rb'
|
|
49
|
+
- 'lib/lutaml/model/xml/ox_adapter.rb'
|
|
85
50
|
|
|
86
|
-
# Offense count:
|
|
51
|
+
# Offense count: 95
|
|
87
52
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
88
53
|
Metrics/MethodLength:
|
|
89
|
-
Max:
|
|
54
|
+
Max: 45
|
|
90
55
|
|
|
91
|
-
# Offense count:
|
|
56
|
+
# Offense count: 13
|
|
92
57
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
93
58
|
Metrics/ParameterLists:
|
|
94
59
|
Max: 22
|
|
95
60
|
|
|
96
|
-
# Offense count:
|
|
61
|
+
# Offense count: 26
|
|
97
62
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
98
63
|
Metrics/PerceivedComplexity:
|
|
99
64
|
Exclude:
|
|
@@ -101,20 +66,37 @@ Metrics/PerceivedComplexity:
|
|
|
101
66
|
- 'lib/lutaml/model/comparable_model.rb'
|
|
102
67
|
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
|
103
68
|
- 'lib/lutaml/model/serialize.rb'
|
|
69
|
+
- 'lib/lutaml/model/transform/xml_transform.rb'
|
|
104
70
|
- 'lib/lutaml/model/type/integer.rb'
|
|
105
|
-
- 'lib/lutaml/model/
|
|
106
|
-
- 'lib/lutaml/model/
|
|
107
|
-
- 'lib/lutaml/model/
|
|
108
|
-
- 'lib/lutaml/model/
|
|
109
|
-
- 'lib/lutaml/model/
|
|
71
|
+
- 'lib/lutaml/model/xml/builder/oga.rb'
|
|
72
|
+
- 'lib/lutaml/model/xml/document.rb'
|
|
73
|
+
- 'lib/lutaml/model/xml/nokogiri_adapter.rb'
|
|
74
|
+
- 'lib/lutaml/model/xml/oga_adapter.rb'
|
|
75
|
+
- 'lib/lutaml/model/xml/ox_adapter.rb'
|
|
76
|
+
|
|
77
|
+
# Offense count: 5
|
|
78
|
+
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods.
|
|
79
|
+
# AllowedMethods: call
|
|
80
|
+
Naming/PredicateMethod:
|
|
81
|
+
Exclude:
|
|
82
|
+
- 'lib/lutaml/model/attribute.rb'
|
|
83
|
+
- 'lib/lutaml/model/mapping/mapping_rule.rb'
|
|
84
|
+
- 'spec/lutaml/model/custom_vobject_adapter_spec.rb'
|
|
110
85
|
|
|
111
86
|
# Offense count: 1
|
|
112
|
-
#
|
|
113
|
-
Performance/
|
|
87
|
+
# Configuration parameters: MinSize.
|
|
88
|
+
Performance/CollectionLiteralInLoop:
|
|
114
89
|
Exclude:
|
|
115
|
-
- '
|
|
90
|
+
- 'spec/lutaml/model/custom_bibtex_adapter_spec.rb'
|
|
116
91
|
|
|
117
92
|
# Offense count: 2
|
|
93
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
94
|
+
# Prefixes: when, with, without
|
|
95
|
+
RSpec/ContextWording:
|
|
96
|
+
Exclude:
|
|
97
|
+
- 'spec/lutaml/model/group_spec.rb'
|
|
98
|
+
|
|
99
|
+
# Offense count: 3
|
|
118
100
|
# Configuration parameters: IgnoredMetadata.
|
|
119
101
|
RSpec/DescribeClass:
|
|
120
102
|
Exclude:
|
|
@@ -124,6 +106,7 @@ RSpec/DescribeClass:
|
|
|
124
106
|
- '**/spec/system/**/*'
|
|
125
107
|
- '**/spec/views/**/*'
|
|
126
108
|
- 'spec/benchmarks/xml_parsing_benchmark_spec.rb'
|
|
109
|
+
- 'spec/lutaml/model/custom_bibtex_adapter_spec.rb'
|
|
127
110
|
- 'spec/lutaml/model/transformation_spec.rb'
|
|
128
111
|
|
|
129
112
|
# Offense count: 2
|
|
@@ -134,10 +117,10 @@ RSpec/DescribedClass:
|
|
|
134
117
|
Exclude:
|
|
135
118
|
- 'spec/lutaml/model/xml_mapping_spec.rb'
|
|
136
119
|
|
|
137
|
-
# Offense count:
|
|
120
|
+
# Offense count: 211
|
|
138
121
|
# Configuration parameters: CountAsOne.
|
|
139
122
|
RSpec/ExampleLength:
|
|
140
|
-
Max:
|
|
123
|
+
Max: 36
|
|
141
124
|
|
|
142
125
|
# Offense count: 13
|
|
143
126
|
RSpec/LeakyConstantDeclaration:
|
|
@@ -145,16 +128,16 @@ RSpec/LeakyConstantDeclaration:
|
|
|
145
128
|
- 'spec/benchmarks/xml_parsing_benchmark_spec.rb'
|
|
146
129
|
- 'spec/lutaml/model/xml_adapter/xml_namespace_spec.rb'
|
|
147
130
|
|
|
148
|
-
# Offense count:
|
|
131
|
+
# Offense count: 329
|
|
149
132
|
RSpec/MultipleExpectations:
|
|
150
|
-
Max:
|
|
133
|
+
Max: 21
|
|
151
134
|
|
|
152
|
-
# Offense count:
|
|
135
|
+
# Offense count: 49
|
|
153
136
|
# Configuration parameters: AllowSubject.
|
|
154
137
|
RSpec/MultipleMemoizedHelpers:
|
|
155
138
|
Max: 9
|
|
156
139
|
|
|
157
|
-
# Offense count:
|
|
140
|
+
# Offense count: 47
|
|
158
141
|
# Configuration parameters: AllowedGroups.
|
|
159
142
|
RSpec/NestedGroups:
|
|
160
143
|
Max: 4
|
|
@@ -166,7 +149,7 @@ RSpec/PendingWithoutReason:
|
|
|
166
149
|
- 'spec/lutaml/model/type/time_spec.rb'
|
|
167
150
|
- 'spec/lutaml/model/type/time_without_date_spec.rb'
|
|
168
151
|
|
|
169
|
-
# Offense count:
|
|
152
|
+
# Offense count: 8
|
|
170
153
|
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
|
|
171
154
|
# Include: **/*_spec.rb
|
|
172
155
|
RSpec/SpecFilePathFormat:
|
|
@@ -175,19 +158,17 @@ RSpec/SpecFilePathFormat:
|
|
|
175
158
|
- 'spec/lutaml/model/collection_spec.rb'
|
|
176
159
|
- 'spec/lutaml/model/defaults_spec.rb'
|
|
177
160
|
- 'spec/lutaml/model/type/decimal_spec.rb'
|
|
161
|
+
- 'spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb'
|
|
162
|
+
- 'spec/lutaml/model/xml_adapter/oga_adapter_spec.rb'
|
|
163
|
+
- 'spec/lutaml/model/xml_adapter/ox_adapter_spec.rb'
|
|
164
|
+
- 'spec/lutaml/model/xml_mapping_rule_spec.rb'
|
|
165
|
+
- 'spec/lutaml/model/xml_mapping_spec.rb'
|
|
178
166
|
|
|
179
167
|
# Offense count: 1
|
|
180
168
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
181
|
-
|
|
182
|
-
# AllowedReceivers: Thread.current
|
|
183
|
-
Style/HashEachMethods:
|
|
169
|
+
Style/CommentedKeyword:
|
|
184
170
|
Exclude:
|
|
185
|
-
- '
|
|
186
|
-
|
|
187
|
-
# Offense count: 1
|
|
188
|
-
Style/MissingRespondToMissing:
|
|
189
|
-
Exclude:
|
|
190
|
-
- 'lib/lutaml/model/serialize.rb'
|
|
171
|
+
- 'spec/lutaml/model/custom_bibtex_adapter_spec.rb'
|
|
191
172
|
|
|
192
173
|
# Offense count: 1
|
|
193
174
|
# Configuration parameters: AllowedMethods.
|
|
@@ -195,10 +176,3 @@ Style/MissingRespondToMissing:
|
|
|
195
176
|
Style/OptionalBooleanParameter:
|
|
196
177
|
Exclude:
|
|
197
178
|
- 'lib/lutaml/model/comparable_model.rb'
|
|
198
|
-
|
|
199
|
-
# Offense count: 4
|
|
200
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
201
|
-
Style/RedundantStringEscape:
|
|
202
|
-
Exclude:
|
|
203
|
-
- 'lib/lutaml/model/schema/templates/simple_type.rb'
|
|
204
|
-
- 'lib/lutaml/model/schema/xml_compiler.rb'
|
data/Gemfile
CHANGED
|
@@ -8,7 +8,10 @@ gemspec
|
|
|
8
8
|
gem "benchmark-ips"
|
|
9
9
|
gem "bigdecimal"
|
|
10
10
|
gem "equivalent-xml"
|
|
11
|
-
|
|
11
|
+
# TODO: remove once https://github.com/Shopify/liquid/issues/1772 is fixed
|
|
12
|
+
# needed for liquid with ruby 3.4
|
|
13
|
+
gem "base64"
|
|
14
|
+
gem "liquid", "~> 5"
|
|
12
15
|
gem "lutaml-xsd"
|
|
13
16
|
gem "multi_json"
|
|
14
17
|
gem "nokogiri"
|