suma 0.5.26 → 0.5.27

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: b74619fc760b15ff91e817419ca8153c5d44fc4585867fc71b313f8abf4b9319
4
- data.tar.gz: ef1be319fc5a2ececeedc657acc8b45af4cdca557708b9949eb0c419b04f4396
3
+ metadata.gz: 7fb668e697eab164d368667cd80b50ce35d338c1cb99ad7a8327907de0130243
4
+ data.tar.gz: 1cbccd547842a7b364edca669b2f78f98a7138636a08f5bfea1cb79bad5d57dc
5
5
  SHA512:
6
- metadata.gz: ab67208b4c286f162dda99822685a2bfc550c06690ee0afb9931f2e7e342d3291881020e114483228af3206bd0a8003157366bafc37ea8e3b494c47077b2f29a
7
- data.tar.gz: 96dc56715bc10acd63d12cd446b0ddf217ac7d53b64fb05570176300846b9404a8bf84e19bcb59cd46a9a082c23c337cf5966b477be5ff79c45aa86db1e64696
6
+ metadata.gz: 41bdaef08cd2fc18fa27890295ac2a2b1df89d32c56f2bbe87fc93b4315b90da733d4e7d3f75c056ccae9ca0bd271a7bcb016e06baa1a98fad0f1af7e056a7e1
7
+ data.tar.gz: 7b8747e0d60fd2e64064166df4dcf82df96887da9b218d99d2aef1dbe09092a4136bc13afd40bf9aedf9e19a0941274bd347d89b06926b615413e1e5a48409dd
@@ -304,6 +304,37 @@ module Suma
304
304
  end
305
305
  end
306
306
  end
307
+
308
+ # The corpus manifests carry no bibdata, so bibdatas is
309
+ # empty and the loop above never runs (suma#181): the
310
+ # artefacts stay keyed under the document's own docid and
311
+ # reinflate - looking up by the docref identifier - finds
312
+ # nothing on a cold store ("no stored artefact"). metanorma
313
+ # resolves every manifest identifier to the document docid
314
+ # during populate and records the mapping on the manifest
315
+ # itself (identifier_aliases, raw -> resolved). That map is
316
+ # the child's own post-render collection - reading it is
317
+ # race-free per the suma#167 discipline.
318
+ aliases = begin
319
+ collection.manifest.identifier_aliases || {}
320
+ rescue NoMethodError
321
+ {}
322
+ end
323
+ aliases.each do |original, resolved|
324
+ src = resolved.to_s
325
+ .gsub(/[^A-Za-z0-9._-]+/, "-").gsub(/-{2,}/, "-")
326
+ .gsub(/\A-|-\z/, "")
327
+ dst = original.to_s
328
+ .gsub(/[^A-Za-z0-9._-]+/, "-").gsub(/-{2,}/, "-")
329
+ .gsub(/\A-|-\z/, "")
330
+ next if src.empty? || dst.empty? || src == dst
331
+
332
+ Dir[File.join(store_dir, "#{src}.*.semantic.xml")].each do |f|
333
+ FileUtils.cp(
334
+ f, f.sub(%r{/#{Regexp.escape(src)}\.}, "/#{dst}."),
335
+ )
336
+ end
337
+ end
307
338
  warn format("[staged worker %d] batch %d/%d member %d OK (%ds)",
308
339
  Process.pid, idx + 1, count, j, Time.now - t0)
309
340
  ensure
data/lib/suma/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Suma
4
- VERSION = "0.5.26"
4
+ VERSION = "0.5.27"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.26
4
+ version: 0.5.27
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-11-05 00:00:00.000000000 Z
11
+ date: 2026-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: expressir