metanorma-plugin-lutaml 0.7.59 → 0.7.61

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: d96f09e7d7f1d19bbe312762e74ee2202906df8d101844b4f886cddf13a03835
4
- data.tar.gz: 3e58ee7adb78b9f8fe376c8903802e7ccba16649ad569b981b67670f2bd46c36
3
+ metadata.gz: e10152f9146a2100063d02e244208ed4acc105b8a105b6a15604a14e8522e9ab
4
+ data.tar.gz: 8c453ee0ba82bc78d20c78e7bf31d34c048874301a12bbd13a63810791db3a8e
5
5
  SHA512:
6
- metadata.gz: f25f543755e3a342f1cd640b2413a1bcaef5b5a9ab7706d71c4786f35814d76e0aa9c37f03b381a381420be714bf190f5fde568cb5d725f357448670a3b7b81b
7
- data.tar.gz: 646d8ddf3d4e5823a9a2740a8193d2e3109273587b33ffed2e02e338182e82241fc26e7b94dcc192922830b6d1ff8f3637eaec99564c4a4d422d3762ce6cb741
6
+ metadata.gz: aa862500cb613b0cfab7ce3816f197a23cab52a44d778fc6cc1945b0e7e48c3a466cec55a1d7601e439256deb9b327e15e840368174896371dadbd457aeb3fb3
7
+ data.tar.gz: 5cdcea37e490d21fcf555a952c836350570ab8e60499f2a1b98ed54a754af497832a2b749c052a2048a86c0be689f1c2be173e5f0ad74612d1363a4e6ada2cba
@@ -24,15 +24,36 @@ module Metanorma
24
24
  # docfile resolves to the same schema file at render time and is
25
25
  # byte-identical across build directories; the decorator joins it
26
26
  # as written rather than expanding it.
27
+ #
28
+ # The render resolves image targets against the imagesdir joined
29
+ # onto the docfile directory, not the bare docfile: a target
30
+ # relative to the bare docfile is re-anchored through the
31
+ # imagesdir prefix and every decorated diagram misses by its
32
+ # depth (metanorma/iso-10303 smol-all FATAL: emitted
33
+ # `../schemas/…`, resolved as `images/../schemas/…`). Compute the
34
+ # prefix against the directory the render resolves from.
27
35
  # The docfile directory may be relative ("."): relative_path_from
28
36
  # refuses mixed prefixes, so both sides expand first
29
37
  Pathname.new(File.expand_path(resolved))
30
38
  .relative_path_from(
31
- Pathname.new(File.expand_path(docfile_directory)),
39
+ Pathname.new(image_resolve_base(document, docfile_directory)),
32
40
  )
33
41
  .to_s
34
42
  end
35
43
 
44
+ # The directory image targets resolve against: the docfile
45
+ # directory with the imagesdir joined on. A web or absolute
46
+ # imagesdir bypasses the join; the bare docfile directory is the
47
+ # closest approximation.
48
+ def self.image_resolve_base(document, docfile_directory)
49
+ base = File.expand_path(docfile_directory)
50
+ imagesdir = document.attributes["imagesdir"]
51
+ return base if imagesdir.nil? || imagesdir.empty?
52
+ return base if imagesdir.match?(%r{\A(?:[a-z]+:|/)})
53
+
54
+ File.expand_path(imagesdir, base)
55
+ end
56
+
36
57
  def self.for(model)
37
58
  case model
38
59
  when Expressir::Model::Cache
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.59".freeze
4
+ VERSION = "0.7.61".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_dependency "isodoc", ">= 3.5.0"
36
36
  spec.add_dependency "liquid", "~> 5"
37
37
  spec.add_dependency "lutaml-lml"
38
- spec.add_dependency "lutaml-model", "~> 0.8.4"
38
+ spec.add_dependency "lutaml-model", "~> 0.8.156"
39
39
  spec.add_dependency "lutaml-uml", ">= 0.5", "< 2"
40
40
  spec.add_dependency "ogc-gml", "~> 1.1"
41
41
  spec.metadata["rubygems_mfa_required"] = "true"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.59
4
+ version: 0.7.61
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-02 00:00:00.000000000 Z
11
+ date: 2026-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 0.8.4
123
+ version: 0.8.156
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 0.8.4
130
+ version: 0.8.156
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: lutaml-uml
133
133
  requirement: !ruby/object:Gem::Requirement