lutaml-store 0.1.1 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea027eecd3b29d9e1369455e835feb794173b4326a81034f67bb06b89e6adb3b
4
- data.tar.gz: 74a1b77d3e644bfb92a397a0a1e51b0eb0d7a3af545543c6419c3d6a1677bd65
3
+ metadata.gz: 9a51b678ada3133e9dec69b021b81f2f306f96839da6f6d3c6095542b4f1c518
4
+ data.tar.gz: 8157f4106efe708cc4b868ffa174004729e3e22a8a94ec519add41407d0c11a6
5
5
  SHA512:
6
- metadata.gz: 3fef83d3704ef385c9f536ff73ec2681b962d56a46b1211aa7e3042119c5b0a6a2bc70a52c97edd5e791060d526981ff75beaff7d0f2cd1c40e40ea54b3dc713
7
- data.tar.gz: bfe7057e1323a7396bcc71e829f26f2c44725fadee07156553a6721b29e9a31ab478b9c47d92f79deb6cd38f96f90477d2a505baa0f85b7b56f837e4be10055e
6
+ metadata.gz: 639dcd3e75e7ec3c40128cf28c036aff3e003ab9db3460266260587c386aea5495bbe244376caef15b5555f541ff3715ce738b2ec93e501d622fafa290016881
7
+ data.tar.gz: 6942bb83e1ab2edb1c0a10afcdd7014baceb3c02319fc82714d54234e0a012105a3046adb76c09f12d9e861b9ea53b108bcfdb874836db81e8a08461d0237083
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-06-01 15:50:24 UTC using RuboCop version 1.86.2.
3
+ # on 2026-06-03 01:47:04 UTC using RuboCop version 1.86.2.
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
@@ -11,68 +11,40 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'lutaml-store.gemspec'
13
13
 
14
- # Offense count: 14
14
+ # Offense count: 15
15
15
  # This cop supports safe autocorrection (--autocorrect).
16
16
  # Configuration parameters: EnforcedStyle, IndentationWidth.
17
17
  # SupportedStyles: with_first_argument, with_fixed_indentation
18
18
  Layout/ArgumentAlignment:
19
19
  Exclude:
20
- - 'lib/lutaml/store/compression.rb'
21
- - 'spec/lutaml/store/anti_pattern_spec.rb'
22
- - 'spec/lutaml/store/lutaml_model_integration_spec.rb'
23
- - 'spec/lutaml/store/model_serializer_spec.rb'
24
-
25
- # Offense count: 4
26
- # This cop supports safe autocorrection (--autocorrect).
27
- Layout/EmptyLineAfterGuardClause:
28
- Exclude:
29
- - 'lib/lutaml/store/adapter/filesystem.rb'
30
20
  - 'lib/lutaml/store/attribute_updater.rb'
21
+ - 'lib/lutaml/store/http_cache.rb'
22
+ - 'lib/lutaml/store/model_registry.rb'
23
+ - 'spec/lutaml/store/package_store_spec.rb'
24
+ - 'spec/lutaml/store/package_transport/directory_transport_spec.rb'
25
+ - 'spec/lutaml/store/package_transport/zip_transport_spec.rb'
31
26
 
32
- # Offense count: 7
27
+ # Offense count: 8
33
28
  # This cop supports safe autocorrection (--autocorrect).
34
- Layout/EmptyLineAfterMagicComment:
29
+ Layout/EmptyLineAfterGuardClause:
35
30
  Exclude:
36
- - 'demo/pottery_class_demo.rb'
37
- - 'lib/lutaml/store/http_cache_config.rb'
38
- - 'lib/lutaml/store/http_cache_entry.rb'
39
- - 'lib/lutaml/store/http_header_processor.rb'
40
- - 'spec/lutaml/store/http_cache_entry_spec.rb'
41
- - 'spec/lutaml/store/http_cache_spec.rb'
42
- - 'spec/lutaml/store/http_header_processor_spec.rb'
31
+ - 'lib/lutaml/store/package_transport.rb'
43
32
 
44
33
  # Offense count: 1
45
34
  # This cop supports safe autocorrection (--autocorrect).
46
- # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
47
- Layout/EmptyLineBetweenDefs:
48
- Exclude:
49
- - 'lib/lutaml/store/compression.rb'
50
-
51
- # Offense count: 4
52
- # This cop supports safe autocorrection (--autocorrect).
53
35
  Layout/EmptyLines:
54
36
  Exclude:
55
- - 'lib/lutaml/store/adapter/memory.rb'
56
- - 'lib/lutaml/store/cache.rb'
57
- - 'lib/lutaml/store/compression.rb'
58
- - 'lib/lutaml/store/monitor.rb'
59
-
60
- # Offense count: 2
61
- # This cop supports safe autocorrection (--autocorrect).
62
- # Configuration parameters: EnforcedStyle.
63
- # SupportedStyles: empty_lines, no_empty_lines
64
- Layout/EmptyLinesAroundBlockBody:
65
- Exclude:
66
- - 'lib/lutaml/store/adapter/filesystem.rb'
37
+ - 'lib/lutaml/store/package_store.rb'
67
38
 
68
- # Offense count: 13
39
+ # Offense count: 3
69
40
  # This cop supports safe autocorrection (--autocorrect).
70
- Layout/EmptyLinesAroundMethodBody:
41
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
42
+ Layout/ExtraSpacing:
71
43
  Exclude:
72
- - 'lib/lutaml/store/attribute_updater.rb'
73
- - 'lib/lutaml/store/compression.rb'
44
+ - 'lib/lutaml/store/package_store.rb'
45
+ - 'lib/lutaml/store/package_transport.rb'
74
46
 
75
- # Offense count: 9
47
+ # Offense count: 3
76
48
  # This cop supports safe autocorrection (--autocorrect).
77
49
  # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
78
50
  # SupportedHashRocketStyles: key, separator, table
@@ -80,125 +52,73 @@ Layout/EmptyLinesAroundMethodBody:
80
52
  # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
81
53
  Layout/HashAlignment:
82
54
  Exclude:
83
- - 'spec/lutaml/store/lutaml_model_integration_spec.rb'
84
- - 'spec/lutaml/store/model_serializer_spec.rb'
85
-
86
- # Offense count: 3
87
- # This cop supports safe autocorrection (--autocorrect).
88
- # Configuration parameters: EnforcedStyle.
89
- # SupportedStyles: normal, indented_internal_methods
90
- Layout/IndentationConsistency:
91
- Exclude:
92
- - 'lib/lutaml/store/attribute_updater.rb'
93
- - 'lib/lutaml/store/integrity.rb'
55
+ - 'spec/lutaml/store/package_transport/directory_transport_spec.rb'
56
+ - 'spec/lutaml/store/package_transport/zip_transport_spec.rb'
94
57
 
95
- # Offense count: 9
58
+ # Offense count: 13
96
59
  # This cop supports safe autocorrection (--autocorrect).
97
- # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
98
- # SupportedStylesAlignWith: start_of_line, relative_to_receiver
99
- Layout/IndentationWidth:
60
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
61
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
62
+ Layout/MultilineMethodCallIndentation:
100
63
  Exclude:
101
- - 'lib/lutaml/store/adapter/filesystem.rb'
102
- - 'lib/lutaml/store/compression.rb'
103
- - 'lib/lutaml/store/integrity.rb'
64
+ - 'lib/lutaml/store/package_store.rb'
65
+ - 'lib/lutaml/store/package_transport.rb'
104
66
 
105
- # Offense count: 7
67
+ # Offense count: 3
106
68
  # This cop supports safe autocorrection (--autocorrect).
107
- Layout/RescueEnsureAlignment:
69
+ # Configuration parameters: EnforcedStyleInsidePipes.
70
+ # SupportedStylesInsidePipes: space, no_space
71
+ Layout/SpaceAroundBlockParameters:
108
72
  Exclude:
109
- - 'lib/lutaml/store/adapter/filesystem.rb'
110
- - 'lib/lutaml/store/compression.rb'
73
+ - 'lib/lutaml/store/package_store.rb'
74
+ - 'lib/lutaml/store/package_transport.rb'
111
75
 
112
- # Offense count: 22
76
+ # Offense count: 5
113
77
  # This cop supports safe autocorrection (--autocorrect).
114
78
  # Configuration parameters: AllowInHeredoc.
115
79
  Layout/TrailingWhitespace:
116
80
  Exclude:
117
- - 'lib/lutaml/store/adapter/filesystem.rb'
118
81
  - 'lib/lutaml/store/attribute_updater.rb'
119
- - 'lib/lutaml/store/compression.rb'
120
- - 'spec/lutaml/store/lutaml_model_integration_spec.rb'
121
- - 'spec/lutaml/store/model_serializer_spec.rb'
122
-
123
- # Offense count: 2
124
- # This cop supports unsafe autocorrection (--autocorrect-all).
125
- # Configuration parameters: AllowSafeAssignment.
126
- Lint/AssignmentInCondition:
127
- Exclude:
128
- - 'lib/lutaml/store/http_header_processor.rb'
129
-
130
- # Offense count: 3
131
- # This cop supports safe autocorrection (--autocorrect).
132
- Lint/RedundantRequireStatement:
133
- Exclude:
134
- - 'lib/lutaml/store/adapter/memory.rb'
135
- - 'lib/lutaml/store/cache.rb'
136
- - 'lib/lutaml/store/monitor.rb'
137
-
138
- # Offense count: 1
139
- # This cop supports safe autocorrection (--autocorrect).
140
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
141
- Lint/UnusedBlockArgument:
142
- Exclude:
143
- - 'lib/lutaml/store/adapter/sqlite.rb'
144
-
145
- # Offense count: 2
146
- # This cop supports safe autocorrection (--autocorrect).
147
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
148
- # NotImplementedExceptions: NotImplementedError
149
- Lint/UnusedMethodArgument:
150
- Exclude:
151
82
  - 'lib/lutaml/store/http_cache.rb'
152
- - 'lib/lutaml/store/monitor.rb'
83
+ - 'lib/lutaml/store/model_registry.rb'
153
84
 
154
85
  # Offense count: 1
155
- # This cop supports safe autocorrection (--autocorrect).
156
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
157
- Lint/UselessAccessModifier:
86
+ Lint/IneffectiveAccessModifier:
158
87
  Exclude:
159
- - 'lib/lutaml/store/compression.rb'
88
+ - 'lib/lutaml/store/package_store.rb'
160
89
 
161
- # Offense count: 7
162
- # This cop supports safe autocorrection (--autocorrect).
163
- Lint/UselessAssignment:
164
- Exclude:
165
- - 'lib/lutaml/store/http_cache.rb'
166
- - 'spec/lutaml/store/cache_store_spec.rb'
167
- - 'spec/lutaml/store/http_cache_hal_integration_spec.rb'
168
- - 'spec/lutaml/store/http_cache_spec.rb'
169
-
170
- # Offense count: 23
90
+ # Offense count: 30
171
91
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
172
92
  Metrics/AbcSize:
173
93
  Max: 112
174
94
 
175
- # Offense count: 51
95
+ # Offense count: 56
176
96
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
177
97
  # AllowedMethods: refine
178
98
  Metrics/BlockLength:
179
- Max: 320
99
+ Max: 315
180
100
 
181
- # Offense count: 14
101
+ # Offense count: 17
182
102
  # Configuration parameters: CountComments, CountAsOne.
183
103
  Metrics/ClassLength:
184
104
  Max: 379
185
105
 
186
- # Offense count: 7
106
+ # Offense count: 10
187
107
  # Configuration parameters: AllowedMethods, AllowedPatterns.
188
108
  Metrics/CyclomaticComplexity:
189
- Max: 10
109
+ Max: 11
190
110
 
191
- # Offense count: 72
111
+ # Offense count: 82
192
112
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
193
113
  Metrics/MethodLength:
194
114
  Max: 84
195
115
 
196
- # Offense count: 3
116
+ # Offense count: 4
197
117
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
198
118
  Metrics/ParameterLists:
199
119
  Max: 8
200
120
 
201
- # Offense count: 4
121
+ # Offense count: 6
202
122
  # Configuration parameters: AllowedMethods, AllowedPatterns.
203
123
  Metrics/PerceivedComplexity:
204
124
  Max: 11
@@ -208,13 +128,14 @@ Naming/AccessorMethodName:
208
128
  Exclude:
209
129
  - 'lib/lutaml/store/adapter/sqlite.rb'
210
130
 
211
- # Offense count: 3
131
+ # Offense count: 12
212
132
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
213
133
  # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
214
134
  Naming/MethodParameterName:
215
135
  Exclude:
216
136
  - 'demo/vcard_models.rb'
217
137
  - 'demo/vcard_store_demo.rb'
138
+ - 'lib/lutaml/store/package_transport.rb'
218
139
 
219
140
  # Offense count: 1
220
141
  # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
@@ -240,7 +161,15 @@ Security/MarshalLoad:
240
161
  Exclude:
241
162
  - 'lib/lutaml/store/format/marshal_format.rb'
242
163
 
243
- # Offense count: 14
164
+ # Offense count: 2
165
+ # This cop supports safe autocorrection (--autocorrect).
166
+ # Configuration parameters: EnforcedStyle.
167
+ # SupportedStyles: separated, grouped
168
+ Style/AccessorGrouping:
169
+ Exclude:
170
+ - 'lib/lutaml/store/package_store.rb'
171
+
172
+ # Offense count: 2
244
173
  # This cop supports safe autocorrection (--autocorrect).
245
174
  # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
246
175
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
@@ -249,95 +178,36 @@ Security/MarshalLoad:
249
178
  # AllowedMethods: lambda, proc, it
250
179
  Style/BlockDelimiters:
251
180
  Exclude:
252
- - 'spec/lutaml/store/compression_spec.rb'
253
- - 'spec/lutaml/store/file_io_spec.rb'
254
- - 'spec/lutaml/store/integrity_spec.rb'
255
- - 'spec/lutaml/store/model_serializer_spec.rb'
181
+ - 'spec/lutaml/store/package_definition_spec.rb'
182
+ - 'spec/lutaml/store/package_transport/directory_transport_spec.rb'
256
183
 
257
- # Offense count: 3
258
- # This cop supports safe autocorrection (--autocorrect).
259
- # Configuration parameters: Keywords, RequireColon.
260
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
261
- Style/CommentAnnotation:
262
- Exclude:
263
- - 'spec/lutaml/store/compression_spec.rb'
264
- - 'spec/lutaml/store/config_enhanced_spec.rb'
265
- - 'spec/lutaml/store/store_spec.rb'
266
-
267
- # Offense count: 29
184
+ # Offense count: 34
268
185
  # Configuration parameters: AllowedConstants.
269
186
  Style/Documentation:
270
187
  Enabled: false
271
188
 
272
- # Offense count: 1
273
- # This cop supports safe autocorrection (--autocorrect).
274
- # Configuration parameters: EnforcedStyle.
275
- # SupportedStyles: compact, expanded
276
- Style/EmptyMethod:
277
- Exclude:
278
- - 'lib/lutaml/store/adapter/filesystem.rb'
279
-
280
- # Offense count: 7
281
- # This cop supports unsafe autocorrection (--autocorrect-all).
282
- # Configuration parameters: EnforcedStyle.
283
- # SupportedStyles: always, always_true, never
284
- Style/FrozenStringLiteralComment:
285
- Exclude:
286
- - '**/*.arb'
287
- - 'demo/pottery_class_demo.rb'
288
- - 'lib/lutaml/store/http_cache_config.rb'
289
- - 'lib/lutaml/store/http_cache_entry.rb'
290
- - 'lib/lutaml/store/http_header_processor.rb'
291
- - 'spec/lutaml/store/http_cache_entry_spec.rb'
292
- - 'spec/lutaml/store/http_cache_spec.rb'
293
- - 'spec/lutaml/store/http_header_processor_spec.rb'
294
-
295
- # Offense count: 1
296
- # This cop supports safe autocorrection (--autocorrect).
297
- # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
298
- Style/GuardClause:
299
- Exclude:
300
- - 'lib/lutaml/store/attribute_updater.rb'
301
-
302
- # Offense count: 6
189
+ # Offense count: 2
303
190
  # This cop supports unsafe autocorrection (--autocorrect-all).
304
191
  # Configuration parameters: AllowedReceivers.
305
192
  # AllowedReceivers: Thread.current
306
193
  Style/HashEachMethods:
307
194
  Exclude:
308
- - 'demo/vcard_store_demo.rb'
309
195
  - 'lib/lutaml/store/cache_store.rb'
310
196
  - 'lib/lutaml/store/database_store.rb'
311
- - 'lib/lutaml/store/http_cache.rb'
312
197
 
313
- # Offense count: 9
198
+ # Offense count: 1
314
199
  # This cop supports safe autocorrection (--autocorrect).
315
- Style/IfUnlessModifier:
316
- Exclude:
317
- - 'lib/lutaml/store/attribute_updater.rb'
318
- - 'lib/lutaml/store/cache.rb'
319
- - 'lib/lutaml/store/http_cache.rb'
320
- - 'lib/lutaml/store/integrity.rb'
321
- - 'lib/lutaml/store/model_registry.rb'
322
- - 'lib/lutaml/store/monitor.rb'
323
-
324
- # Offense count: 3
325
- # This cop supports unsafe autocorrection (--autocorrect-all).
326
- # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
327
- # SupportedStyles: predicate, comparison
328
- Style/NumericPredicate:
200
+ Style/KeywordParametersOrder:
329
201
  Exclude:
330
- - 'spec/**/*'
331
- - 'demo/vcard_store_demo.rb'
332
- - 'lib/lutaml/store/adapter/memory.rb'
333
- - 'lib/lutaml/store/http_cache.rb'
202
+ - 'lib/lutaml/store/package_definition.rb'
334
203
 
335
- # Offense count: 7
204
+ # Offense count: 5
336
205
  # This cop supports safe autocorrection (--autocorrect).
337
- Style/RedundantBegin:
206
+ Style/MultilineIfModifier:
338
207
  Exclude:
339
- - 'lib/lutaml/store/adapter/filesystem.rb'
340
- - 'lib/lutaml/store/compression.rb'
208
+ - 'lib/lutaml/store/attribute_updater.rb'
209
+ - 'lib/lutaml/store/http_cache.rb'
210
+ - 'lib/lutaml/store/model_registry.rb'
341
211
 
342
212
  # Offense count: 2
343
213
  # This cop supports unsafe autocorrection (--autocorrect-all).
@@ -348,103 +218,37 @@ Style/RedundantFetchBlock:
348
218
 
349
219
  # Offense count: 1
350
220
  # This cop supports safe autocorrection (--autocorrect).
351
- # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
352
- # SupportedStyles: slashes, percent_r, mixed
353
- Style/RegexpLiteral:
354
- Exclude:
355
- - 'lib/lutaml/store/adapter/filesystem.rb'
356
-
357
- # Offense count: 1
358
- # This cop supports safe autocorrection (--autocorrect).
359
- Style/RescueModifier:
360
- Exclude:
361
- - 'demo/vcard_models.rb'
362
-
363
- # Offense count: 4
364
- # This cop supports safe autocorrection (--autocorrect).
365
- # Configuration parameters: EnforcedStyle.
366
- # SupportedStyles: implicit, explicit
367
- Style/RescueStandardError:
221
+ Style/RedundantRegexpEscape:
368
222
  Exclude:
369
- - 'demo/vcard_models.rb'
370
- - 'lib/lutaml/store/adapter/filesystem.rb'
371
- - 'lib/lutaml/store/integrity.rb'
372
-
373
- # Offense count: 1
374
- # This cop supports unsafe autocorrection (--autocorrect-all).
375
- # Configuration parameters: RequireEnglish, EnforcedStyle.
376
- # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
377
- Style/SpecialGlobalVars:
378
- Exclude:
379
- - 'demo/vcard_store_demo.rb'
380
-
381
- # Offense count: 4
382
- # This cop supports unsafe autocorrection (--autocorrect-all).
383
- # Configuration parameters: Mode.
384
- Style/StringConcatenation:
385
- Exclude:
386
- - 'demo/vcard_store_demo.rb'
387
- - 'lib/lutaml/store/format/jsonl.rb'
223
+ - 'lib/lutaml/store/package_transport.rb'
388
224
 
389
225
  # Offense count: 1
390
226
  # This cop supports safe autocorrection (--autocorrect).
391
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
392
- # SupportedStyles: single_quotes, double_quotes
393
- Style/StringLiterals:
394
- Exclude:
395
- - 'lib/lutaml/store/compression.rb'
396
-
397
- # Offense count: 2
398
- # This cop supports safe autocorrection (--autocorrect).
399
- # Configuration parameters: EnforcedStyle.
400
- # SupportedStyles: single_quotes, double_quotes
401
- Style/StringLiteralsInInterpolation:
402
- Exclude:
403
- - 'lib/lutaml/store/compression.rb'
404
-
405
- # Offense count: 9
406
- # This cop supports safe autocorrection (--autocorrect).
407
227
  # Configuration parameters: EnforcedStyleForMultiline.
408
228
  # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
409
- Style/TrailingCommaInArguments:
229
+ Style/TrailingCommaInArrayLiteral:
410
230
  Exclude:
411
- - 'spec/lutaml/store/file_io_spec.rb'
412
- - 'spec/lutaml/store/import_spec.rb'
413
- - 'spec/lutaml/store/key_collision_serializer_spec.rb'
414
- - 'spec/lutaml/store/load_save_spec.rb'
231
+ - 'spec/lutaml/store/format/yamls_spec.rb'
415
232
 
416
- # Offense count: 8
233
+ # Offense count: 1
417
234
  # This cop supports safe autocorrection (--autocorrect).
418
235
  # Configuration parameters: EnforcedStyleForMultiline.
419
236
  # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
420
- Style/TrailingCommaInArrayLiteral:
237
+ Style/TrailingCommaInHashLiteral:
421
238
  Exclude:
422
- - 'spec/lutaml/store/file_io_spec.rb'
423
- - 'spec/lutaml/store/format_round_trip_spec.rb'
424
- - 'spec/lutaml/store/import_spec.rb'
425
- - 'spec/lutaml/store/load_save_spec.rb'
426
- - 'spec/lutaml/store/lutaml_model_integration_spec.rb'
239
+ - 'lib/lutaml/store/package_store.rb'
427
240
 
428
241
  # Offense count: 3
429
242
  # This cop supports safe autocorrection (--autocorrect).
430
- # Configuration parameters: EnforcedStyleForMultiline.
431
- # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
432
- Style/TrailingCommaInHashLiteral:
243
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
244
+ # AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
245
+ Style/TrivialAccessors:
433
246
  Exclude:
434
- - 'lib/lutaml/store/format.rb'
435
- - 'spec/lutaml/store/key_collision_serializer_spec.rb'
247
+ - 'lib/lutaml/store/package_store.rb'
436
248
 
437
249
  # Offense count: 5
438
250
  # This cop supports safe autocorrection (--autocorrect).
439
- # Configuration parameters: WordRegex.
440
- # SupportedStyles: percent, brackets
441
- Style/WordArray:
442
- EnforcedStyle: percent
443
- MinSize: 4
444
-
445
- # Offense count: 7
446
- # This cop supports safe autocorrection (--autocorrect).
447
251
  # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
448
252
  # URISchemes: http, https
449
253
  Layout/LineLength:
450
- Max: 161
254
+ Max: 148
data/Gemfile.lock CHANGED
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lutaml-store (0.1.1)
4
+ lutaml-store (0.2.0)
5
5
  lutaml-model (~> 0.8.15)
6
+ rubyzip (~> 2.3)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
@@ -27,6 +28,7 @@ GEM
27
28
  erb (6.0.4)
28
29
  ffi (1.17.4)
29
30
  ffi (1.17.4-arm64-darwin)
31
+ ffi (1.17.4-x86_64-linux-gnu)
30
32
  io-console (0.8.2)
31
33
  irb (1.18.0)
32
34
  pp (>= 0.6.0)
@@ -57,6 +59,8 @@ GEM
57
59
  racc (~> 1.4)
58
60
  nokogiri (1.19.3-arm64-darwin)
59
61
  racc (~> 1.4)
62
+ nokogiri (1.19.3-x86_64-linux-gnu)
63
+ racc (~> 1.4)
60
64
  ostruct (0.6.3)
61
65
  paint (2.3.0)
62
66
  parallel (2.1.0)
@@ -140,6 +144,7 @@ GEM
140
144
 
141
145
  PLATFORMS
142
146
  arm64-darwin-23
147
+ x86_64-linux
143
148
 
144
149
  DEPENDENCIES
145
150
  irb
@@ -166,19 +171,21 @@ CHECKSUMS
166
171
  erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
167
172
  ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
168
173
  ffi (1.17.4-arm64-darwin) sha256=19071aaf1419251b0a46852abf960e77330a3b334d13a4ab51d58b31a937001b
174
+ ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
169
175
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
170
176
  irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
171
177
  json (2.19.5) sha256=218a18553e4801d579ca7e0f5bc72bafd776d7397238a1fb4e74db5b0a812c59
172
178
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
173
179
  lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
174
180
  liquid (5.12.0) sha256=5a3c2c2430cd925d21c53e4ed9abea52cd0a9da53b541422f81dee79aca2a673
175
- lutaml-model (0.8.15)
176
- lutaml-store (0.1.1)
181
+ lutaml-model (0.8.15) sha256=8ee4181197c0dbfef4bcc0d4c63f783c33b8187f6fddeedf68bb0cd854959ca6
182
+ lutaml-store (0.2.0)
177
183
  memo_wise (1.13.0) sha256=30220c38c4cef410849bc73553c58664dc2c91c6379e4a1df22aea02358b716b
178
184
  mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289
179
- moxml (0.1.23)
185
+ moxml (0.1.23) sha256=d78a4f9c075973603d9b941908f2cac16a1f74de6f6d8247d7b44ecbe3322b3a
180
186
  nokogiri (1.19.3) sha256=78312cbac32a40c812780d9678221b79d51288eec00054c1a8d15f7ce05960e8
181
187
  nokogiri (1.19.3-arm64-darwin) sha256=71b9bd424b1b7abc18b05052a1a3cfd3627abdca62be280854cc411791357e42
188
+ nokogiri (1.19.3-x86_64-linux-gnu) sha256=2f5078620fe12e83669b5b17311b32532a8153d02eee7ad06948b926d6080976
182
189
  ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
183
190
  paint (2.3.0) sha256=327d623e4038619d5bd99ae5db07973859cd78400c7f0329eea283cef8e83be5
184
191
  parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
@@ -40,21 +40,57 @@ have been eliminated from `lib/lutaml/hal/`.
40
40
  - **lutaml-store**: 248 examples, 1 pre-existing failure (vary header spec) + 25 pre-existing failures in HTTP cache integration specs
41
41
  - **Anti-patterns in lib code**: 0 `instance_variable_set/get`, 0 `send`, 0 `respond_to?`
42
42
 
43
- ## Remaining (future work)
44
-
45
- ### Phase 1: Unify caching through lutaml-store
46
-
47
- Create `HalStore` as a thin wrapper around `Lutaml::Store` for HAL-specific
48
- caching. Remove `SimpleCacheStore` (replaced by lutaml-store memory adapter).
49
- Remove `Client`'s `@cache` Hash. Simplify `CacheManager`.
50
-
51
- ### Phase 2: Register ID tracking as proper attribute
52
-
53
- Replace `_global_register_id` instance variable with a proper
54
- `Lutaml::Model::Serializable` attribute on `Resource`. Make embedded data a
55
- proper attribute. Eliminates `Hal::REGISTER_ID_ATTR_NAME` constant.
56
-
57
- ### Phase 3: Store HAL resources as registered models
58
-
59
- Register HAL resource classes with lutaml-store's model registry for direct
60
- CRUD operations instead of wrapping them in `CacheEntry`.
43
+ ## Implemented in lutaml-hal#15
44
+
45
+ The realized-object cache (relaton/w3c_api#11) is working and opt-in
46
+ (`ModelRegister.new(..., cache: {...})`; no config keeps the previous
47
+ behavior). Delivered across four commits on `rt-add-lutaml-store`:
48
+
49
+ ### Phase 1: Make caching work / unify through lutaml-store — done (adapted)
50
+
51
+ - The cache path was crashing; fixed: require `lutaml/store` (so its autoloads
52
+ resolve), route `Link#realize` through the public `cache_manager` API, add
53
+ `Client#get_by_url_with_headers`, remove `Client`'s legacy `@cache` Hash,
54
+ make HTTP-aware caching explicit opt-in.
55
+ - **Deviation:** instead of a `HalStore` wrapper, `CacheManager` uses
56
+ lutaml-store's `CacheStore` directly for persistent adapters and keeps
57
+ `SimpleCacheStore` for the in-memory adapter (so cache hits avoid
58
+ serialization). `SimpleCacheStore` was therefore retained, not removed.
59
+
60
+ ### Phase 2: Register ID / embedded data as proper attributes — done
61
+
62
+ - Dropped the `Hal::REGISTER_ID_ATTR_NAME` constant and all dynamic
63
+ `instance_variable_get/set("@#{...}")`; `Resource`/`Link`/`LinkSet` use
64
+ `attr_accessor :_global_register_id`, embedded data is an `attr_accessor`.
65
+ - Also removed the remaining `register.send(:private_method)` calls from
66
+ `Link` by making `ModelRegister#find_matching_model_class` public.
67
+
68
+ ### Phase 3: Persistence + URL keying — done (alternative to model-registry)
69
+
70
+ - **URL keying:** `CacheManager` canonicalizes relative URLs to absolute before
71
+ keying, so a resource fetched by endpoint path and the same resource realized
72
+ from an absolute link href share one entry (the core repeated-realize fix).
73
+ - **Persistence — decision:** rather than registering HAL resource classes in
74
+ lutaml-store's model registry, `CacheEntry` gained a JSON storage form
75
+ (records the model class + lutaml-model JSON). With a `filesystem`/`sqlite`
76
+ adapter the cache persists via `Lutaml::Store::CacheStore` and rebuilds models
77
+ on retrieval. This keeps the cache shape (`URL => entry`) and was chosen over
78
+ the model-registry approach, whose `fetch(model:, key:)` API fits poorly with
79
+ a heterogeneous URL→object lookup. Note: persisted entries require **named**
80
+ resource classes with explicit `key_value` mappings.
81
+
82
+ ## Still remaining
83
+
84
+ ### HTTP-aware response cache (deferred)
85
+
86
+ Backing the HTTP-aware mode with lutaml-store's `HttpCache` (ETag / 304
87
+ revalidation against a cached response) is left as scaffolding
88
+ (`create_http_cache` / `*_http_cache` in `CacheManager`). It needs a realized
89
+ model to be reconstructed from a cached response (i.e. knowing the resource
90
+ class at read time) and is not required for the realized-object caching in #11.
91
+
92
+ ### Release coordination
93
+
94
+ lutaml-hal#15 depends on lutaml-store via a `path:` Gemfile entry. lutaml-store
95
+ needs a tagged release before lutaml-hal can depend on a published version and
96
+ the PR can ship.