lutaml-model 0.3.5 → 0.3.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/.rubocop_todo.yml +119 -12
- data/README.adoc +430 -21
- data/lib/lutaml/model/attribute.rb +27 -0
- data/lib/lutaml/model/config.rb +82 -1
- data/lib/lutaml/model/error/unknown_adapter_type_error.rb +16 -0
- data/lib/lutaml/model/error.rb +1 -0
- data/lib/lutaml/model/serialize.rb +75 -126
- data/lib/lutaml/model/type.rb +0 -24
- data/lib/lutaml/model/utils.rb +45 -0
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model/xml_adapter/builder/nokogiri.rb +73 -0
- data/lib/lutaml/model/xml_adapter/builder/ox.rb +89 -0
- data/lib/lutaml/model/xml_adapter/nokogiri_adapter.rb +16 -90
- data/lib/lutaml/model/xml_adapter/ox_adapter.rb +14 -93
- data/lib/lutaml/model/xml_adapter/xml_document.rb +89 -0
- data/lib/lutaml/model/yaml_adapter/standard_yaml_adapter.rb +0 -12
- data/lib/lutaml/model.rb +3 -2
- metadata +6 -3
- data/lib/lutaml/model/type/json.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8362f4af3671083805d20014ef7e2422358aac08f1c15036a283dbedb91225ca
|
4
|
+
data.tar.gz: 661838fcd61e972cd1827a1b4889b3d2073e7a8db16a4fce371dcbf09fb79b96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31757feb85022ff8472b8e178ff433a84e2dcbd7a00b6cc2055f3f4d860b4470201c2ee6c39d2a2b96cc86d96ec3654affd7078bb2cad595345afa50fec9826d
|
7
|
+
data.tar.gz: ff6f2048f11d46a9e4df1ec872bca13e5ebcbbc098aa35689840e3601d18337e2e7a85afd48f8a67b1b39482782258cdc1494f13eb1cd67eac8ac37cc2f5809d
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-08-
|
3
|
+
# on 2024-08-23 04:30:59 UTC using RuboCop version 1.65.1.
|
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
|
@@ -14,7 +14,76 @@ Gemspec/RequireMFA:
|
|
14
14
|
Exclude:
|
15
15
|
- 'lutaml-model.gemspec'
|
16
16
|
|
17
|
-
# Offense count:
|
17
|
+
# Offense count: 28
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
19
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
20
|
+
# SupportedStyles: with_first_argument, with_fixed_indentation
|
21
|
+
Layout/ArgumentAlignment:
|
22
|
+
Exclude:
|
23
|
+
- 'lib/lutaml/model/serialize.rb'
|
24
|
+
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
|
25
|
+
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
26
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
27
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
# This cop supports safe autocorrection (--autocorrect).
|
31
|
+
# Configuration parameters: IndentationWidth.
|
32
|
+
Layout/AssignmentIndentation:
|
33
|
+
Exclude:
|
34
|
+
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
|
35
|
+
|
36
|
+
# Offense count: 6
|
37
|
+
# This cop supports safe autocorrection (--autocorrect).
|
38
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
39
|
+
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
40
|
+
Layout/BlockAlignment:
|
41
|
+
Exclude:
|
42
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
43
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
44
|
+
|
45
|
+
# Offense count: 6
|
46
|
+
# This cop supports safe autocorrection (--autocorrect).
|
47
|
+
Layout/BlockEndNewline:
|
48
|
+
Exclude:
|
49
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
50
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
51
|
+
|
52
|
+
# Offense count: 1
|
53
|
+
# This cop supports safe autocorrection (--autocorrect).
|
54
|
+
Layout/EmptyLineAfterGuardClause:
|
55
|
+
Exclude:
|
56
|
+
- 'lib/lutaml/model/serialize.rb'
|
57
|
+
|
58
|
+
# Offense count: 16
|
59
|
+
# This cop supports safe autocorrection (--autocorrect).
|
60
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
61
|
+
# SupportedHashRocketStyles: key, separator, table
|
62
|
+
# SupportedColonStyles: key, separator, table
|
63
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
64
|
+
Layout/HashAlignment:
|
65
|
+
Exclude:
|
66
|
+
- 'lib/lutaml/model/serialize.rb'
|
67
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
68
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
69
|
+
|
70
|
+
# Offense count: 1
|
71
|
+
# This cop supports safe autocorrection (--autocorrect).
|
72
|
+
# Configuration parameters: EnforcedStyle.
|
73
|
+
# SupportedStyles: normal, indented_internal_methods
|
74
|
+
Layout/IndentationConsistency:
|
75
|
+
Exclude:
|
76
|
+
- 'lutaml-model.gemspec'
|
77
|
+
|
78
|
+
# Offense count: 12
|
79
|
+
# This cop supports safe autocorrection (--autocorrect).
|
80
|
+
# Configuration parameters: Width, AllowedPatterns.
|
81
|
+
Layout/IndentationWidth:
|
82
|
+
Exclude:
|
83
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
84
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
85
|
+
|
86
|
+
# Offense count: 83
|
18
87
|
# This cop supports safe autocorrection (--autocorrect).
|
19
88
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
20
89
|
# URISchemes: http, https
|
@@ -24,14 +93,27 @@ Layout/LineLength:
|
|
24
93
|
- 'lib/lutaml/model/comparable_model.rb'
|
25
94
|
- 'lib/lutaml/model/serialize.rb'
|
26
95
|
- 'lib/lutaml/model/type.rb'
|
96
|
+
- 'lib/lutaml/model/utils.rb'
|
27
97
|
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
|
28
98
|
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
29
99
|
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
30
100
|
- 'spec/lutaml/model/comparable_model_spec.rb'
|
101
|
+
- 'spec/lutaml/model/custom_serialization_spec.rb'
|
31
102
|
- 'spec/lutaml/model/delegation_spec.rb'
|
32
103
|
- 'spec/lutaml/model/schema/json_schema_spec.rb'
|
33
104
|
- 'spec/lutaml/model/serializable_spec.rb'
|
34
105
|
|
106
|
+
# Offense count: 24
|
107
|
+
# This cop supports safe autocorrection (--autocorrect).
|
108
|
+
# Configuration parameters: AllowInHeredoc.
|
109
|
+
Layout/TrailingWhitespace:
|
110
|
+
Exclude:
|
111
|
+
- 'lib/lutaml/model/serialize.rb'
|
112
|
+
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
|
113
|
+
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
114
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
115
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
116
|
+
|
35
117
|
# Offense count: 4
|
36
118
|
# Configuration parameters: AllowedMethods.
|
37
119
|
# AllowedMethods: enums
|
@@ -42,7 +124,7 @@ Lint/ConstantDefinitionInBlock:
|
|
42
124
|
- 'spec/lutaml/model/schema/xsd_schema_spec.rb'
|
43
125
|
- 'spec/lutaml/model/schema/yaml_schema_spec.rb'
|
44
126
|
|
45
|
-
# Offense count:
|
127
|
+
# Offense count: 28
|
46
128
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
47
129
|
Metrics/AbcSize:
|
48
130
|
Exclude:
|
@@ -55,13 +137,13 @@ Metrics/AbcSize:
|
|
55
137
|
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
56
138
|
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
57
139
|
|
58
|
-
# Offense count:
|
140
|
+
# Offense count: 5
|
59
141
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
60
142
|
# AllowedMethods: refine
|
61
143
|
Metrics/BlockLength:
|
62
|
-
Max:
|
144
|
+
Max: 29
|
63
145
|
|
64
|
-
# Offense count:
|
146
|
+
# Offense count: 20
|
65
147
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
66
148
|
Metrics/CyclomaticComplexity:
|
67
149
|
Exclude:
|
@@ -72,23 +154,22 @@ Metrics/CyclomaticComplexity:
|
|
72
154
|
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
73
155
|
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
74
156
|
|
75
|
-
# Offense count:
|
157
|
+
# Offense count: 37
|
76
158
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
77
159
|
Metrics/MethodLength:
|
78
|
-
Max:
|
160
|
+
Max: 45
|
79
161
|
|
80
162
|
# Offense count: 4
|
81
163
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
82
164
|
Metrics/ParameterLists:
|
83
165
|
Max: 9
|
84
166
|
|
85
|
-
# Offense count:
|
167
|
+
# Offense count: 16
|
86
168
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
87
169
|
Metrics/PerceivedComplexity:
|
88
170
|
Exclude:
|
89
171
|
- 'lib/lutaml/model/comparable_model.rb'
|
90
172
|
- 'lib/lutaml/model/serialize.rb'
|
91
|
-
- 'lib/lutaml/model/type.rb'
|
92
173
|
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
|
93
174
|
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'
|
94
175
|
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
@@ -102,7 +183,7 @@ RSpec/ContextWording:
|
|
102
183
|
- 'spec/lutaml/model/xml_adapter/oga_adapter_spec.rb'
|
103
184
|
- 'spec/lutaml/model/xml_adapter/ox_adapter_spec.rb'
|
104
185
|
|
105
|
-
# Offense count:
|
186
|
+
# Offense count: 76
|
106
187
|
# Configuration parameters: CountAsOne.
|
107
188
|
RSpec/ExampleLength:
|
108
189
|
Max: 57
|
@@ -131,7 +212,7 @@ RSpec/MultipleDescribes:
|
|
131
212
|
|
132
213
|
# Offense count: 70
|
133
214
|
RSpec/MultipleExpectations:
|
134
|
-
Max:
|
215
|
+
Max: 10
|
135
216
|
|
136
217
|
# Offense count: 11
|
137
218
|
# Configuration parameters: AllowSubject.
|
@@ -158,9 +239,35 @@ Security/CompoundHash:
|
|
158
239
|
Exclude:
|
159
240
|
- 'lib/lutaml/model/comparable_model.rb'
|
160
241
|
|
242
|
+
# Offense count: 10
|
243
|
+
# This cop supports safe autocorrection (--autocorrect).
|
244
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
245
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
246
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
247
|
+
# FunctionalMethods: let, let!, subject, watch
|
248
|
+
# AllowedMethods: lambda, proc, it
|
249
|
+
Style/BlockDelimiters:
|
250
|
+
Exclude:
|
251
|
+
- 'lib/lutaml/model/xml_adapter/xml_document.rb'
|
252
|
+
- 'spec/lutaml/model/serializable_spec.rb'
|
253
|
+
|
254
|
+
# Offense count: 2
|
255
|
+
# This cop supports safe autocorrection (--autocorrect).
|
256
|
+
Style/MultilineIfModifier:
|
257
|
+
Exclude:
|
258
|
+
- 'lib/lutaml/model/serialize.rb'
|
259
|
+
|
161
260
|
# Offense count: 1
|
162
261
|
# Configuration parameters: AllowedMethods.
|
163
262
|
# AllowedMethods: respond_to_missing?
|
164
263
|
Style/OptionalBooleanParameter:
|
165
264
|
Exclude:
|
166
265
|
- 'lib/lutaml/model/comparable_model.rb'
|
266
|
+
|
267
|
+
# Offense count: 2
|
268
|
+
# This cop supports safe autocorrection (--autocorrect).
|
269
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
270
|
+
# SupportedStyles: single_quotes, double_quotes
|
271
|
+
Style/StringLiterals:
|
272
|
+
Exclude:
|
273
|
+
- 'lutaml-model.gemspec'
|