lutaml-model 0.8.80 → 0.8.82
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/lib/lutaml/key_value/transform.rb +5 -3
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/xml/plan_hydrator.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d3a688d65eecf6a2bedf13179644a42cbe3897a966976d82412b55c59bae51f
|
|
4
|
+
data.tar.gz: cefb330f731f866c5c571abd8859316e65c8539485729bc569634e0d4fdd0d2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a2d748a2bb6510884418473ca075860dc8207a9e966413856bf3c8f5c047409368559786bc7afdfc634d885d95022f142892f769ed58f49b4733c84d3360df1
|
|
7
|
+
data.tar.gz: 5e048ffbbe1a336acc02e577d555c7677ca13eb6bbb0c7401b99b069e8f30add953620ba802d4c1a13e92c820e67b8b570033ff6aaa32aaeed522990788d263b
|
|
@@ -206,14 +206,16 @@ module Lutaml
|
|
|
206
206
|
def kv_group_build(rows, doc, format, register, options)
|
|
207
207
|
setters = []
|
|
208
208
|
children = []
|
|
209
|
-
|
|
209
|
+
# Lazy: the present-key hot path never pushes, and this runs
|
|
210
|
+
# once per hydrated model instance.
|
|
211
|
+
absent = nil
|
|
210
212
|
rows.each do |rule, attr, kind, type, child_rows, child_register|
|
|
211
213
|
# One hash pass per row: fetch with a sentinel distinguishes
|
|
212
214
|
# absent keys from present-nil values (both read as nil), so
|
|
213
215
|
# the separate string_or_symbol_key? probe goes away.
|
|
214
216
|
v = Lutaml::Model::Utils.fetch_str_or_sym(doc, rule.name, MISSING)
|
|
215
217
|
if v.equal?(MISSING)
|
|
216
|
-
absent << rule
|
|
218
|
+
(absent ||= []) << rule
|
|
217
219
|
next
|
|
218
220
|
end
|
|
219
221
|
|
|
@@ -256,7 +258,7 @@ module Lutaml
|
|
|
256
258
|
end
|
|
257
259
|
instance = model_class.new(lutaml_register: register)
|
|
258
260
|
setters.each { |name, value| instance.public_send(name, value) }
|
|
259
|
-
absent
|
|
261
|
+
absent&.each do |rule|
|
|
260
262
|
process_mapping_rule(doc, instance, format, rule, options, nil)
|
|
261
263
|
end
|
|
262
264
|
children.each do |child|
|
data/lib/lutaml/model/version.rb
CHANGED
|
@@ -399,19 +399,19 @@ module Lutaml
|
|
|
399
399
|
end
|
|
400
400
|
|
|
401
401
|
def group_children(value, row_tags = nil)
|
|
402
|
+
# One crossing per subtree: names/tags/children come back in
|
|
403
|
+
# parallel arrays from leptris_plan_value_children_snapshot.
|
|
404
|
+
names, tags, children = value.children_snapshot
|
|
402
405
|
grouped = {}
|
|
403
406
|
want_tags = !row_tags.nil?
|
|
404
407
|
tagged = want_tags ? {} : nil
|
|
405
|
-
|
|
406
|
-
child = value.at(i)
|
|
407
|
-
# One FFI crossing per child: the name was read twice here
|
|
408
|
-
# (nil check + bucket key), doubling the hottest accessor.
|
|
409
|
-
name = child.name
|
|
408
|
+
names.each_with_index do |name, i|
|
|
410
409
|
next if name.nil? # content runs, read separately
|
|
411
410
|
|
|
411
|
+
child = children[i]
|
|
412
412
|
(grouped[name] ||= []) << child
|
|
413
|
-
if want_tags &&
|
|
414
|
-
(tagged[
|
|
413
|
+
if want_tags && tags[i] != 0
|
|
414
|
+
(tagged[tags[i]] ||= []) << child
|
|
415
415
|
end
|
|
416
416
|
end
|
|
417
417
|
[grouped, tagged]
|
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.82
|
|
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-09-
|
|
11
|
+
date: 2026-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|