metanorma-core 0.2.6 → 0.2.8

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: 3c990f6d36cdef2ab706c4dfe7fec3c9f907f07f3a13a684046dad22bd8963d2
4
- data.tar.gz: 9f286a92d6cbd320acf0e82a542deee25e0f71785943a9908293247d90f21922
3
+ metadata.gz: 9b7c80959a3e2a3b6e431468e8503be73bb8137da33dd9307939319b3c0ede25
4
+ data.tar.gz: 94dd09c4726c7ef72c76c5c955301838677ce1076f002a90481ef3b60fb22781
5
5
  SHA512:
6
- metadata.gz: c4602bee7990f224eafe646f1ee53f54f403d4dfb4e016031135d226fef8b152e8ef713d1810a113b0da4d01c4e99960182c2a649b55d68f2a05a6fcbf8a7f27
7
- data.tar.gz: a9f8cc76a73eeb02f4a8d78e6b495119a437d43fae6f519fb1cefaeca296670b0c993bba3969ff99ef2f82bbcdef608cccaded6f70614b1bca13dd2126ef6fdb
6
+ metadata.gz: e2dd1459024f781c1dab4fa44782f34d13d19dbef1cfbceb541371000e3432b6bf4093da2d1e7bcd73a9f44914c49780b1253565ab6bbc8118e693820c284111
7
+ data.tar.gz: 8547c4a5eb91f486bcd9195d62ed880cef3d6c54fdc16c1558ffa52473d2daba54f5935c1019996852a02fa0116b4fbf4b23e83428ee1f1a35d0c8d6b0295a35
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Core
3
- VERSION = "0.2.6".freeze
3
+ VERSION = "0.2.8".freeze
4
4
  end
5
5
  end
@@ -19,7 +19,10 @@ module Metanorma
19
19
  # +:standoc+).
20
20
  # @param options [Hash] passthrough options. Recognised:
21
21
  # +:log+ (Asciidoctor logger), +:novalid+ (skip validation),
22
- # +:output_dir+ (forwarded as the +output_dir+ attribute).
22
+ # +:output_dir+ (forwarded as the +output_dir+ attribute),
23
+ # +:base_dir+ (asset anchor: the directory that Asciidoctor
24
+ # resolves relative asset paths against and jails includes
25
+ # within; defaults to the process working directory).
23
26
  # @return [String] Asciidoctor convert output.
24
27
  def process(file, filename, type, options = {})
25
28
  require "asciidoctor"
@@ -33,6 +36,13 @@ module Metanorma
33
36
  header_footer: true, log: options[:log],
34
37
  novalid: options[:novalid],
35
38
  attributes: attrs }
39
+ # A string conversion without base_dir anchors Asciidoctor at the
40
+ # process working directory: asset macro targets and the
41
+ # safe-mode include jail all resolve against it, making the
42
+ # compile output depend on where it was invoked from. An
43
+ # explicit base_dir anchors them at the given directory instead.
44
+ options[:base_dir] and
45
+ out_opts[:base_dir] = File.expand_path(options[:base_dir])
36
46
  ::Asciidoctor.convert(file, out_opts)
37
47
  end
38
48
 
@@ -30,6 +30,11 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "metanorma-utils"
31
31
  spec.add_dependency "nokogiri", "~> 1.19"
32
32
 
33
+ # Bundled-gem successor required directly by lib code: registry.rb uses
34
+ # singleton. Ruby 4 warns on undeclared bundled gems and pruned bundles
35
+ # would fail (epic metanorma/metanorma#669).
36
+ spec.add_dependency "singleton"
37
+
33
38
  spec.add_development_dependency "debug"
34
39
  spec.add_development_dependency "rake", "~> 13.0"
35
40
  spec.add_development_dependency "rspec", "~> 3.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-30 00:00:00.000000000 Z
11
+ date: 2026-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.19'
69
+ - !ruby/object:Gem::Dependency
70
+ name: singleton
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: debug
71
85
  requirement: !ruby/object:Gem::Requirement