metanorma 2.5.3 → 2.5.4

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: 4882b98a473b69b9729ddc48af5d8754c0c3cc2e0e64ba9ef06482b7f9671eb0
4
- data.tar.gz: ccbc44588f0a8610e5d6cff9c73dce8a90d66b8d65678ae9b1cf884a179ab453
3
+ metadata.gz: 4f36a841296240362316b293a3353c54b85b83485b81d21e762d639fe26ce100
4
+ data.tar.gz: 7302ecaa3bbf5893fa6a0c52199ce7080475efb00a9973fe8e21ace651a996b8
5
5
  SHA512:
6
- metadata.gz: 6d14656e113f0eac2e715ba4f7d51b5fb57e2029a54cb947f94b47fbe4ce7f0e3ba0334b92474d74c4fc1d5ad699efd61e8e3f5cfbf1850e5ca31a5066753b38
7
- data.tar.gz: f579166fec3baaae273925ad3fa63e60e85240f468b696948a50cffd435ee5c444f07482373c7605fe3200ba7f82b34da345bb93dbe2c6831d3d8e92b5c94117
6
+ metadata.gz: b9d143219d4f9a9130321c675e3b1bc8f5966dcb09961f13527381d493e7d6a6e7efffce28bd807bf5a07b2ae040048a321f498a8d15ecab002a756d8c493f8a
7
+ data.tar.gz: fd1c20bd7b7d1062130781c1276b95b921a9408d4da2a17d622f5b21053b8a20ab168daa710bfbdefbc652901bea7d5e7c75e891e7a1fb91d2dd74075edbe39b
@@ -161,13 +161,32 @@ module Metanorma
161
161
  abs = Pathname.new(val).absolute?
162
162
  directives.reject! { |d| d.key == name }
163
163
  val = Util::rel_path_resolve(@dirname, val)
164
- abs or
165
- val = Pathname.new(val).relative_path_from(Pathname.new(@outdir)).to_s
164
+ val =
165
+ if abs then directives_host_materialise(val)
166
+ else Pathname.new(val).relative_path_from(Pathname.new(@outdir)).to_s
167
+ end
166
168
  directives << ::Metanorma::Collection::Config::Directive
167
169
  .new(key: name, value: val)
168
170
  directives
169
171
  end
170
172
 
173
+ # An absolute directive value can point inside a gem payload (e.g. a
174
+ # taste's data/ file from Util.taste2coverpage_pdf_portfolio). A
175
+ # spawned child process that is not this Ruby (mn2pdf/java) may be
176
+ # unable to read such a path (a packaged virtual filesystem mount,
177
+ # e.g. tebako on Windows). Copy the file into the output folder —
178
+ # the child already reads the collection XML from there — and point
179
+ # the directive at the copy. A missing file keeps its value: the
180
+ # child reports that as it always has.
181
+ def directives_host_materialise(val)
182
+ File.exist?(val) or return val
183
+ dst = File.expand_path(File.join(@outdir, File.basename(val)))
184
+ dst == File.expand_path(val) and return val
185
+ FileUtils.mkdir_p(@outdir)
186
+ FileUtils.cp(val, dst)
187
+ dst
188
+ end
189
+
171
190
  def flush_files
172
191
  warn "\n\n\n\n\nDone: #{DateTime.now.strftime('%H:%M:%S')}"
173
192
  warn "\nFiles to delete:\n"
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "2.5.3".freeze
2
+ VERSION = "2.5.4".freeze
3
3
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.3
4
+ version: 2.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-08-30 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: asciidoctor
@@ -211,9 +212,9 @@ email:
211
212
  executables: []
212
213
  extensions: []
213
214
  extra_rdoc_files:
215
+ - README.adoc
214
216
  - CHANGELOG.adoc
215
217
  - LICENSE.txt
216
- - README.adoc
217
218
  files:
218
219
  - ".envrc"
219
220
  - ".gitignore"
@@ -277,6 +278,7 @@ homepage: https://github.com/metanorma/metanorma
277
278
  licenses:
278
279
  - BSD-2-Clause
279
280
  metadata: {}
281
+ post_install_message:
280
282
  rdoc_options: []
281
283
  require_paths:
282
284
  - lib
@@ -291,7 +293,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
293
  - !ruby/object:Gem::Version
292
294
  version: '0'
293
295
  requirements: []
294
- rubygems_version: 4.0.16
296
+ rubygems_version: 3.5.22
297
+ signing_key:
295
298
  specification_version: 4
296
299
  summary: Metanorma is the standard of standards; the metanorma gem allows you to create
297
300
  any standard document type supported by Metanorma.