metanorma-plugin-lutaml 0.4.18.1 → 0.4.18.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5165faae660810577a1463ae98dbc5be557abbc2c4fbc340365bded381b35eb6
4
- data.tar.gz: a3c8de27c1b23ea1097ed3a442d5c48863906d48520b0ffe1547ad8c38ed882b
3
+ metadata.gz: 064d8f98bd52afff8e006ba4fa16f4a008465409cd5e817f30d797b728354a02
4
+ data.tar.gz: ef86f1cb94f2b384cba57a2621f35826381e88ec4565ca0821f001d7836a044b
5
5
  SHA512:
6
- metadata.gz: 19083193db9cd41193a8927a833f3ab71051e6bcb48cd01477b7f8a0e9cdd7f48602e4335f296b47f7eb9c216819833e1447b031c4aab18cc6fcba7de3b9b236
7
- data.tar.gz: 450a07bb7a213404e26224abe7932500cc0d7839ce14167caf725f9af9caf95e6548549bfd9a4907861066f5e608102f5036c8080e7c847405cf27d2dc5620af
6
+ metadata.gz: 6ea24f0034a859174c135f3a3682f3891933a0b274921a3a7976ca9b089dc6751a3c0697a488add414a7d2bc2b3f538fb356e2a4a3b60e967e6176a8713ace18
7
+ data.tar.gz: 2d7a47613ee5c1460c66070f2eb8a3d145ea691e1b1e63ff4520f14e69bcc194f1a8ead7b93c7fe4c55fb9bac84be59441773631d1690a8f2c70ad5382ebfe13
@@ -45,10 +45,11 @@ module Metanorma
45
45
  formatter = ::Lutaml::Formatter::Graphviz.new
46
46
  formatter.type = :png
47
47
 
48
+ path_lutaml = "lutaml"
48
49
  imagesdir = if parent.document.attr("imagesdir")
49
- File.join(parent.document.attr("imagesdir"), "lutaml")
50
+ File.join(parent.document.attr("imagesdir"), path_lutaml)
50
51
  else
51
- "lutaml"
52
+ path_lutaml
52
53
  end
53
54
  result_path = Utils.relative_file_path(parent.document, imagesdir)
54
55
  result_pathname = Pathname.new(result_path)
@@ -58,6 +59,7 @@ module Metanorma
58
59
  outfile = Tempfile.new(["lutaml", ".png"])
59
60
  outfile.binmode
60
61
  outfile.puts(formatter.format(uml_document))
62
+ outfile.close
61
63
 
62
64
  # Warning: metanorma/metanorma-standoc#187
63
65
  # Windows Ruby 2.4 will crash if a Tempfile is "mv"ed.
@@ -65,7 +67,8 @@ module Metanorma
65
67
  filename = File.basename(outfile.path)
66
68
  FileUtils.cp(outfile, result_pathname) && outfile.unlink
67
69
 
68
- File.join(result_pathname, filename)
70
+ #File.join(result_pathname, filename)
71
+ File.join(path_lutaml, filename)
69
72
  end
70
73
 
71
74
  def generate_attrs(attrs)
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.4.18.1".freeze
4
+ VERSION = "0.4.18.2".freeze
5
5
  end
6
6
  end
7
7
  end
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.4.18.1
4
+ version: 0.4.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-06 00:00:00.000000000 Z
11
+ date: 2022-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor