suma 0.5.18 → 0.5.19
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/suma/staged_collection_builder.rb +9 -9
- data/lib/suma/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df03b41b1c8ad66d68f1f6bb711f9cc49396e1b9217b2819eef5f1a9ae98b997
|
|
4
|
+
data.tar.gz: 04f0d313dbe23ce6579b0c2736d264c7934dcc250a84c9e55f8bc39014e50a8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1eb98f1e8d9cd8ead0c40db5867929d74a50d440cd964848a0fbafaac2b23e0ad0d484522cc98a1ea5afc9c4cf88137ed8670af848088059c37c0c718da2dfdc
|
|
7
|
+
data.tar.gz: 85bf0f0ea57ac912398b33264550a89f7b0118cac0b76f7a239cc33b49a78d39d9e535abdeb6a801022fb462dabb02727bbc38a055ee99b9f7ac7a88e50b8afe
|
|
@@ -168,7 +168,7 @@ module Suma
|
|
|
168
168
|
# Metanorma boot is paid once per child, and GC runs between members to
|
|
169
169
|
# bound the heap. Any render failure exits nonzero and fails the build.
|
|
170
170
|
def child_script
|
|
171
|
-
<<~RUBY
|
|
171
|
+
<<~'RUBY'
|
|
172
172
|
require "yaml"
|
|
173
173
|
require "fileutils"
|
|
174
174
|
require "metanorma"
|
|
@@ -178,7 +178,7 @@ module Suma
|
|
|
178
178
|
loop do
|
|
179
179
|
idx = (0...count).find do |i|
|
|
180
180
|
begin
|
|
181
|
-
File.open(File.join(config_dir, "._suma_batch_
|
|
181
|
+
File.open(File.join(config_dir, "._suma_batch_#{i}.claim"),
|
|
182
182
|
File::RDWR | File::CREAT | File::EXCL) {}
|
|
183
183
|
true
|
|
184
184
|
rescue Errno::EEXIST
|
|
@@ -188,11 +188,11 @@ module Suma
|
|
|
188
188
|
break unless idx
|
|
189
189
|
|
|
190
190
|
manifests = Marshal.load(File.binread(File.join(
|
|
191
|
-
config_dir, "._suma_batch_
|
|
191
|
+
config_dir, "._suma_batch_#{idx}.bin")))
|
|
192
192
|
manifests.each_with_index do |manifest, j|
|
|
193
193
|
one_path = File.join(config_dir,
|
|
194
|
-
"._suma_staged_b
|
|
195
|
-
out = File.join(out_dir, "._staged_out_b
|
|
194
|
+
"._suma_staged_b#{idx}_#{j}.yml")
|
|
195
|
+
out = File.join(out_dir, "._staged_out_b#{idx}_#{j}")
|
|
196
196
|
t0 = Time.now
|
|
197
197
|
begin
|
|
198
198
|
File.write(one_path, YAML.dump(manifest))
|
|
@@ -236,10 +236,10 @@ module Suma
|
|
|
236
236
|
next if src_slug.empty? || src_slug == id_slug
|
|
237
237
|
|
|
238
238
|
Dir[File.join(store_dir,
|
|
239
|
-
"
|
|
239
|
+
"#{src_slug}.*.semantic.xml")].each do |f|
|
|
240
240
|
alias_name = f.sub(
|
|
241
|
-
%r{
|
|
242
|
-
"
|
|
241
|
+
%r{/#{Regexp.escape(src_slug)}.},
|
|
242
|
+
"/#{id_slug}.",
|
|
243
243
|
)
|
|
244
244
|
FileUtils.cp(f, alias_name)
|
|
245
245
|
end
|
|
@@ -247,7 +247,7 @@ module Suma
|
|
|
247
247
|
end
|
|
248
248
|
produced.each do |f|
|
|
249
249
|
if (m = f.match(/\A(.*).([0-9a-f]+).semantic.xml\z/))
|
|
250
|
-
alias_name = "
|
|
250
|
+
alias_name = "#{id_slug}.#{m[2]}.semantic.xml"
|
|
251
251
|
alias_path = File.join(store_dir, alias_name)
|
|
252
252
|
FileUtils.cp(File.join(store_dir, f), alias_path)
|
|
253
253
|
end
|
data/lib/suma/version.rb
CHANGED