asciidoctor-diagram 2.2.13 → 2.2.14

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: 2bcfe1104d151f5da05b3f237b06e2310ca670ee84f6e4e9b6f43a769820fcf0
4
- data.tar.gz: 1d44562539b7320c7fd4b767d16428aa3bc896e181575be73e5e87f2dc59b93f
3
+ metadata.gz: c2447be8f4a47717d6ef4856ed210cbf44eaa09cd0ae154bb64119f3e309384d
4
+ data.tar.gz: 8e40700cddd6d026c7ae4cd7cfafdf22704e01b4941eba2d274db91e103d700e
5
5
  SHA512:
6
- metadata.gz: ce2fb9ac70813787758f76eccf886f4e538313c7c2574915c1034c19ebedd7b7af93ddeeed297c91e24db8d7056acecf9df98d7b01e522b61a7240ed52f8614e
7
- data.tar.gz: 1a68a3fa835c7fb8c9d61d4754f4a2a7d1a37eaad67895aabcdb0183d101e45b30c61067e4293a8392e70f54bf19ef327eab00fc6255ea3507fa7cde1a77293d
6
+ metadata.gz: 2e4c640aaa5ce31f00f94a10398d9ab9a29eca0a97359073645a82cd777ec860ad2a90ebc5ed549e65186a88d3e1c43a9f39250c1d2b6ba2745f31d4b3dd3679
7
+ data.tar.gz: 9f54def1db4fd022b510a46daf33328b4854fb0d1dd7d3ba4bbc5a5dc1c966e4a37f548fdaa82c626024fdb31bdbf62218e1edbb1e8bdf1a7bf43fbf10116567
data/CHANGELOG.adoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = Asciidoctor-diagram Changelog
2
2
 
3
+ == 2.2.14
4
+
5
+ Bugfixes::
6
+
7
+ * Issue #441: Fix regression in Wavedrom integration.
8
+
3
9
  == 2.2.13
4
10
 
5
11
  Enhancements::
@@ -13,13 +13,19 @@ module Asciidoctor
13
13
  [:png, :pdf, :svg]
14
14
  end
15
15
 
16
+ def collect_options(source)
17
+ {
18
+ :font_path => source.attr('fontpath')
19
+ }
20
+ end
21
+
16
22
  def convert(source, format, options)
17
23
  # On Debian based systems the Python 3.x packages python3-(act|block|nw|seq)diag executables with
18
24
  # a '3' suffix.
19
25
  cmd_name = self.class.const_get(:TOOL)
20
26
  alt_cmd_name = "#{cmd_name}3"
21
27
 
22
- font_path = source.attr('fontpath')
28
+ font_path = options[:font_path]
23
29
 
24
30
  generate_stdin(source.find_command(cmd_name, :alt_cmds => [alt_cmd_name]), format.to_s, source.to_s) do |tool_path, output_path|
25
31
  args = [tool_path, '-a', '-o', Platform.native_path(output_path), "-T#{format.to_s}"]
@@ -34,6 +34,10 @@ module Asciidoctor
34
34
  attr(name) || attr(name, default_value, 'diagram')
35
35
  end
36
36
 
37
+ def opt(opt)
38
+ attr("#{opt}-option")
39
+ end
40
+
37
41
  # Get the value for the specified attribute. First look in the attributes on
38
42
  # this document and return the value of the attribute if found. Otherwise, if
39
43
  # this document is a child of the Document document, look in the attributes of the
@@ -19,7 +19,6 @@ module Asciidoctor
19
19
  bg_img = source.attr('background')
20
20
  raise "background attribute is required" unless bg_img
21
21
 
22
- options = source.attr('options', '').split(',')
23
22
  margin = source.attr('margin', '')
24
23
  margin_parts = margin.split(' ')
25
24
  case margin_parts.length
@@ -55,7 +54,8 @@ module Asciidoctor
55
54
  :margin_right => mr,
56
55
  :margin_top => mt,
57
56
  :margin_bottom => mb,
58
- :noupcase => options.include?('noupcase'),
57
+ :noupcase => source.opt('noupcase'),
58
+ :imagesdir => source.attr('imagesdir')
59
59
  }
60
60
  end
61
61
 
@@ -74,7 +74,7 @@ module Asciidoctor
74
74
  bg_img = options[:bg_img]
75
75
  raise "background attribute is required" unless bg_img
76
76
 
77
- bg_img = source.resolve_path(bg_img, source.attr('imagesdir'))
77
+ bg_img = source.resolve_path(bg_img, options[:imagesdir])
78
78
 
79
79
  top_label = options[:top_label]
80
80
  bottom_label = options[:bottom_label]
@@ -40,7 +40,7 @@ module Asciidoctor
40
40
  end
41
41
 
42
42
  def self.get_renderer_type(source)
43
- source.attr('renderer', 'plantuml-c4')
43
+ source.attr('renderer', PLANTUML_C4)
44
44
  end
45
45
  def self.mime_type(renderer_type)
46
46
  case renderer_type
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Diagram
3
- VERSION = "2.2.13"
3
+ VERSION = "2.2.14"
4
4
  end
5
5
  end
@@ -18,9 +18,9 @@ module Asciidoctor
18
18
  def convert(source, format, options)
19
19
  wavedrom_cli = source.find_command('wavedrom-cli', :raise_on_error => false)
20
20
  if wavedrom_cli
21
- generate_stdin(wavedrom_cli, format.to_s, source.to_s) do |tool_path, output_path|
21
+ generate_file(wavedrom_cli, 'wvd', format.to_s, source.to_s) do |tool_path, input_path, output_path|
22
22
  {
23
- :args => [Platform.native_path(tool_path), '--input', '-', "--#{format.to_s}", Platform.native_path(output_path)],
23
+ :args => [Platform.native_path(tool_path), '--input', Platform.native_path(input_path), "--#{format.to_s}", Platform.native_path(output_path)],
24
24
  :chdir => source.base_dir
25
25
  }
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-diagram
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.13
4
+ version: 2.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pepijn Van Eeckhoudt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-16 00:00:00.000000000 Z
11
+ date: 2023-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler