asciidoctor-diagram 2.2.12 → 2.2.14
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 +4 -4
 - data/CHANGELOG.adoc +17 -0
 - data/lib/asciidoctor-diagram/a2s/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/blockdiag/converter.rb +12 -2
 - data/lib/asciidoctor-diagram/bpmn/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/bytefield/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/d2/converter.rb +2 -2
 - data/lib/asciidoctor-diagram/dbml/converter.rb +6 -1
 - data/lib/asciidoctor-diagram/diagram_processor.rb +10 -4
 - data/lib/asciidoctor-diagram/diagram_source.rb +8 -0
 - data/lib/asciidoctor-diagram/diagrams/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/dpic/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/erd/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/gnuplot/converter.rb +6 -1
 - data/lib/asciidoctor-diagram/graphviz/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/graphviz_py/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/http/converter.rb +0 -1
 - data/lib/asciidoctor-diagram/lilypond/converter.rb +2 -1
 - data/lib/asciidoctor-diagram/meme/converter.rb +3 -3
 - data/lib/asciidoctor-diagram/mermaid/converter.rb +4 -2
 - data/lib/asciidoctor-diagram/msc/converter.rb +5 -1
 - data/lib/asciidoctor-diagram/nomnoml/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/penrose/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/pikchr/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/shaape/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/smcat/converter.rb +5 -1
 - data/lib/asciidoctor-diagram/structurizr/renderers.rb +1 -1
 - data/lib/asciidoctor-diagram/svgbob/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/symbolator/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/syntrax/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/tikz/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/umlet/converter.rb +4 -1
 - data/lib/asciidoctor-diagram/vega/converter.rb +5 -3
 - data/lib/asciidoctor-diagram/version.rb +1 -1
 - data/lib/asciidoctor-diagram/wavedrom/converter.rb +12 -3
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c2447be8f4a47717d6ef4856ed210cbf44eaa09cd0ae154bb64119f3e309384d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 8e40700cddd6d026c7ae4cd7cfafdf22704e01b4941eba2d274db91e103d700e
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 2e4c640aaa5ce31f00f94a10398d9ab9a29eca0a97359073645a82cd777ec860ad2a90ebc5ed549e65186a88d3e1c43a9f39250c1d2b6ba2745f31d4b3dd3679
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9f54def1db4fd022b510a46daf33328b4854fb0d1dd7d3ba4bbc5a5dc1c966e4a37f548fdaa82c626024fdb31bdbf62218e1edbb1e8bdf1a7bf43fbf10116567
         
     | 
    
        data/CHANGELOG.adoc
    CHANGED
    
    | 
         @@ -1,5 +1,22 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            = Asciidoctor-diagram Changelog
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            == 2.2.14
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Bugfixes::
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            * Issue #441: Fix regression in Wavedrom integration.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            == 2.2.13
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            Enhancements::
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            * Issue #436: Allow diagram caching to be disabled using the `nocache` option.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            Bugfixes::
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            * Issue #437: Set working directory when generating diagrams.
         
     | 
| 
      
 18 
     | 
    
         
            +
            * Issue #439: Resolve errors when using relative imports in D2 diagrams
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
       3 
20 
     | 
    
         
             
            == 2.2.12
         
     | 
| 
       4 
21 
     | 
    
         | 
| 
       5 
22 
     | 
    
         
             
            Enhancements::
         
     | 
| 
         @@ -13,19 +13,29 @@ 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 =  
     | 
| 
      
 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}"]
         
     | 
| 
       26 
32 
     | 
    
         
             
                        args << "-f#{Platform.native_path(font_path)}" if font_path
         
     | 
| 
       27 
33 
     | 
    
         
             
                        args << '-'
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                        {
         
     | 
| 
      
 36 
     | 
    
         
            +
                          :args => args,
         
     | 
| 
      
 37 
     | 
    
         
            +
                          :chdir => source.base_dir
         
     | 
| 
      
 38 
     | 
    
         
            +
                        }
         
     | 
| 
       29 
39 
     | 
    
         
             
                      end
         
     | 
| 
       30 
40 
     | 
    
         
             
                    end
         
     | 
| 
       31 
41 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -18,7 +18,10 @@ module Asciidoctor 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    bytefield_path = source.find_command('bytefield-svg')
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                    generate_stdin(bytefield_path, format.to_s, source.to_s) do |tool_path, output_path|
         
     | 
| 
       21 
     | 
    
         
            -
                       
     | 
| 
      
 21 
     | 
    
         
            +
                      {
         
     | 
| 
      
 22 
     | 
    
         
            +
                        :args => [tool_path, "--output", Platform.native_path(output_path)],
         
     | 
| 
      
 23 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 24 
     | 
    
         
            +
                      }
         
     | 
| 
       22 
25 
     | 
    
         
             
                    end
         
     | 
| 
       23 
26 
     | 
    
         
             
                  end
         
     | 
| 
       24 
27 
     | 
    
         
             
                end
         
     | 
| 
         @@ -27,7 +27,7 @@ module Asciidoctor 
     | 
|
| 
       27 
27 
     | 
    
         
             
                  end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
                  def convert(source, format, options)
         
     | 
| 
       30 
     | 
    
         
            -
                     
     | 
| 
      
 30 
     | 
    
         
            +
                    generate_stdin(source.find_command('d2'), format.to_s, source.code) do |tool_path, output_path|
         
     | 
| 
       31 
31 
     | 
    
         
             
                      args = [tool_path, '--browser', 'false']
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                      options.each_pair do |key, value|
         
     | 
| 
         @@ -43,7 +43,7 @@ module Asciidoctor 
     | 
|
| 
       43 
43 
     | 
    
         
             
                        end
         
     | 
| 
       44 
44 
     | 
    
         
             
                      end
         
     | 
| 
       45 
45 
     | 
    
         | 
| 
       46 
     | 
    
         
            -
                      args <<  
     | 
| 
      
 46 
     | 
    
         
            +
                      args << '-'
         
     | 
| 
       47 
47 
     | 
    
         
             
                      args << Platform.native_path(output_path)
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
                      {
         
     | 
| 
         @@ -15,7 +15,12 @@ module Asciidoctor 
     | 
|
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                  def convert(source, format, options)
         
     | 
| 
       18 
     | 
    
         
            -
                    generate_stdin_stdout(source.find_command('dbml-renderer'), source.code)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    generate_stdin_stdout(source.find_command('dbml-renderer'), source.code) do |tool|
         
     | 
| 
      
 19 
     | 
    
         
            +
                      {
         
     | 
| 
      
 20 
     | 
    
         
            +
                        :args => [tool],
         
     | 
| 
      
 21 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 22 
     | 
    
         
            +
                      }
         
     | 
| 
      
 23 
     | 
    
         
            +
                    end
         
     | 
| 
       19 
24 
     | 
    
         
             
                  end
         
     | 
| 
       20 
25 
     | 
    
         
             
                end
         
     | 
| 
       21 
26 
     | 
    
         
             
              end
         
     | 
| 
         @@ -165,7 +165,9 @@ module Asciidoctor 
     | 
|
| 
       165 
165 
     | 
    
         
             
                    image_file = parent.normalize_system_path(image_name, image_output_dir(parent))
         
     | 
| 
       166 
166 
     | 
    
         
             
                    metadata_file = parent.normalize_system_path("#{image_name}.cache", cache_dir(source, parent))
         
     | 
| 
       167 
167 
     | 
    
         | 
| 
       168 
     | 
    
         
            -
                     
     | 
| 
      
 168 
     | 
    
         
            +
                    use_cache = !source.global_opt('nocache')
         
     | 
| 
      
 169 
     | 
    
         
            +
             
     | 
| 
      
 170 
     | 
    
         
            +
                    if use_cache && File.exist?(metadata_file)
         
     | 
| 
       169 
171 
     | 
    
         
             
                      metadata = File.open(metadata_file, 'r') {|f| JSON.load(f, nil, :symbolize_names => true, :create_additions => false) }
         
     | 
| 
       170 
172 
     | 
    
         
             
                    else
         
     | 
| 
       171 
173 
     | 
    
         
             
                      metadata = {}
         
     | 
| 
         @@ -191,14 +193,18 @@ module Asciidoctor 
     | 
|
| 
       191 
193 
     | 
    
         
             
                      metadata = source.create_image_metadata
         
     | 
| 
       192 
194 
     | 
    
         
             
                      metadata[:options] = options
         
     | 
| 
       193 
195 
     | 
    
         | 
| 
       194 
     | 
    
         
            -
                      allow_image_optimisation = source. 
     | 
| 
      
 196 
     | 
    
         
            +
                      allow_image_optimisation = !source.global_opt('nooptimise')
         
     | 
| 
       195 
197 
     | 
    
         
             
                      result, metadata[:width], metadata[:height] = params[:decoder].post_process_image(result, allow_image_optimisation)
         
     | 
| 
       196 
198 
     | 
    
         | 
| 
       197 
199 
     | 
    
         
             
                      FileUtils.mkdir_p(File.dirname(image_file)) unless Dir.exist?(File.dirname(image_file))
         
     | 
| 
       198 
200 
     | 
    
         
             
                      File.open(image_file, 'wb') {|f| f.write result}
         
     | 
| 
       199 
201 
     | 
    
         | 
| 
       200 
     | 
    
         
            -
                       
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
      
 202 
     | 
    
         
            +
                      if use_cache
         
     | 
| 
      
 203 
     | 
    
         
            +
                        FileUtils.mkdir_p(File.dirname(metadata_file)) unless Dir.exist?(File.dirname(metadata_file))
         
     | 
| 
      
 204 
     | 
    
         
            +
                        File.open(metadata_file, 'w') { |f| JSON.dump(metadata, f) }
         
     | 
| 
      
 205 
     | 
    
         
            +
                      else
         
     | 
| 
      
 206 
     | 
    
         
            +
                        File.delete(metadata_file) if File.exist?(metadata_file)
         
     | 
| 
      
 207 
     | 
    
         
            +
                      end
         
     | 
| 
       202 
208 
     | 
    
         
             
                    end
         
     | 
| 
       203 
209 
     | 
    
         | 
| 
       204 
210 
     | 
    
         
             
                    scale = image_attributes['scale']
         
     | 
| 
         @@ -26,10 +26,18 @@ module Asciidoctor 
     | 
|
| 
       26 
26 
     | 
    
         
             
                    raise NotImplementedError.new
         
     | 
| 
       27 
27 
     | 
    
         
             
                  end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
      
 29 
     | 
    
         
            +
                  def global_opt(opt)
         
     | 
| 
      
 30 
     | 
    
         
            +
                    global_attr("#{opt}-option")
         
     | 
| 
      
 31 
     | 
    
         
            +
                  end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
       29 
33 
     | 
    
         
             
                  def global_attr(name, default_value = nil)
         
     | 
| 
       30 
34 
     | 
    
         
             
                    attr(name) || attr(name, default_value, 'diagram')
         
     | 
| 
       31 
35 
     | 
    
         
             
                  end
         
     | 
| 
       32 
36 
     | 
    
         | 
| 
      
 37 
     | 
    
         
            +
                  def opt(opt)
         
     | 
| 
      
 38 
     | 
    
         
            +
                    attr("#{opt}-option")
         
     | 
| 
      
 39 
     | 
    
         
            +
                  end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
       33 
41 
     | 
    
         
             
                  # Get the value for the specified attribute. First look in the attributes on
         
     | 
| 
       34 
42 
     | 
    
         
             
                  # this document and return the value of the attribute if found. Otherwise, if
         
     | 
| 
       35 
43 
     | 
    
         
             
                  # this document is a child of the Document document, look in the attributes of the
         
     | 
| 
         @@ -22,7 +22,10 @@ module Asciidoctor 
     | 
|
| 
       22 
22 
     | 
    
         
             
                    code << "\n.PE" unless code.start_with?("\n.PE")
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                    generate_file_stdout(dpic_path, format.to_s, code) do |tool_path, input_path|
         
     | 
| 
       25 
     | 
    
         
            -
                       
     | 
| 
      
 25 
     | 
    
         
            +
                      {
         
     | 
| 
      
 26 
     | 
    
         
            +
                        :args => [tool_path, "-v", "-z", input_path],
         
     | 
| 
      
 27 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 28 
     | 
    
         
            +
                      }
         
     | 
| 
       26 
29 
     | 
    
         
             
                    end
         
     | 
| 
       27 
30 
     | 
    
         
             
                  end
         
     | 
| 
       28 
31 
     | 
    
         
             
                end
         
     | 
| 
         @@ -23,7 +23,10 @@ module Asciidoctor 
     | 
|
| 
       23 
23 
     | 
    
         
             
                    end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
                    generate_stdin(dot_path, format.to_s, dot_code) do |tool_path, output_path|
         
     | 
| 
       26 
     | 
    
         
            -
                       
     | 
| 
      
 26 
     | 
    
         
            +
                      {
         
     | 
| 
      
 27 
     | 
    
         
            +
                        :args => [tool_path, "-o#{Platform.native_path(output_path)}", "-T#{format.to_s}"],
         
     | 
| 
      
 28 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 29 
     | 
    
         
            +
                      }
         
     | 
| 
       27 
30 
     | 
    
         
             
                    end
         
     | 
| 
       28 
31 
     | 
    
         
             
                  end
         
     | 
| 
       29 
32 
     | 
    
         
             
                end
         
     | 
| 
         @@ -56,7 +56,12 @@ module Asciidoctor 
     | 
|
| 
       56 
56 
     | 
    
         
             
                    code << "\n"
         
     | 
| 
       57 
57 
     | 
    
         
             
                    code << source.to_s
         
     | 
| 
       58 
58 
     | 
    
         | 
| 
       59 
     | 
    
         
            -
                    generate_stdin_stdout(source.find_command('gnuplot'), code)
         
     | 
| 
      
 59 
     | 
    
         
            +
                    generate_stdin_stdout(source.find_command('gnuplot'), code) do |tool|
         
     | 
| 
      
 60 
     | 
    
         
            +
                      {
         
     | 
| 
      
 61 
     | 
    
         
            +
                        :args => [tool],
         
     | 
| 
      
 62 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 63 
     | 
    
         
            +
                      }
         
     | 
| 
      
 64 
     | 
    
         
            +
                    end
         
     | 
| 
       60 
65 
     | 
    
         
             
                  end
         
     | 
| 
       61 
66 
     | 
    
         
             
                end
         
     | 
| 
       62 
67 
     | 
    
         
             
              end
         
     | 
| 
         @@ -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 =>  
     | 
| 
      
 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,  
     | 
| 
      
 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]
         
     | 
| 
         @@ -164,7 +164,8 @@ module Asciidoctor 
     | 
|
| 
       164 
164 
     | 
    
         | 
| 
       165 
165 
     | 
    
         
             
                      {
         
     | 
| 
       166 
166 
     | 
    
         
             
                          :args => args,
         
     | 
| 
       167 
     | 
    
         
            -
                          :env => {'NODE_OPTIONS' => '--unhandled-rejections=strict'}
         
     | 
| 
      
 167 
     | 
    
         
            +
                          :env => {'NODE_OPTIONS' => '--unhandled-rejections=strict'},
         
     | 
| 
      
 168 
     | 
    
         
            +
                          :chdir => source.base_dir
         
     | 
| 
       168 
169 
     | 
    
         
             
                      }
         
     | 
| 
       169 
170 
     | 
    
         
             
                    end
         
     | 
| 
       170 
171 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -200,7 +201,8 @@ module Asciidoctor 
     | 
|
| 
       200 
201 
     | 
    
         | 
| 
       201 
202 
     | 
    
         
             
                      {
         
     | 
| 
       202 
203 
     | 
    
         
             
                          :args => args,
         
     | 
| 
       203 
     | 
    
         
            -
                          :out_file => output_file
         
     | 
| 
      
 204 
     | 
    
         
            +
                          :out_file => output_file,
         
     | 
| 
      
 205 
     | 
    
         
            +
                          :chdir => source.base_dir
         
     | 
| 
       204 
206 
     | 
    
         
             
                      }
         
     | 
| 
       205 
207 
     | 
    
         
             
                    end
         
     | 
| 
       206 
208 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -17,7 +17,10 @@ module Asciidoctor 
     | 
|
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                  def convert(source, format, options)
         
     | 
| 
       19 
19 
     | 
    
         
             
                    generate_file(source.find_command('nomnoml'), 'nomnoml', format.to_s, source.to_s) do |tool_path, input_path, output_path|
         
     | 
| 
       20 
     | 
    
         
            -
                       
     | 
| 
      
 20 
     | 
    
         
            +
                      {
         
     | 
| 
      
 21 
     | 
    
         
            +
                        :args => [tool_path, Platform.native_path(input_path), Platform.native_path(output_path)],
         
     | 
| 
      
 22 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 23 
     | 
    
         
            +
                      }
         
     | 
| 
       21 
24 
     | 
    
         
             
                    end
         
     | 
| 
       22 
25 
     | 
    
         
             
                  end
         
     | 
| 
       23 
26 
     | 
    
         
             
                end
         
     | 
| 
         @@ -18,7 +18,10 @@ module Asciidoctor 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    pikchr_path = source.find_command('pikchr')
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                    output = generate_file_stdout(pikchr_path, format.to_s, source.to_s) do |tool_path, input_path|
         
     | 
| 
       21 
     | 
    
         
            -
                       
     | 
| 
      
 21 
     | 
    
         
            +
                      {
         
     | 
| 
      
 22 
     | 
    
         
            +
                        :args => [tool_path, "--svg-only", input_path],
         
     | 
| 
      
 23 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 24 
     | 
    
         
            +
                      }
         
     | 
| 
       22 
25 
     | 
    
         
             
                    end
         
     | 
| 
       23 
26 
     | 
    
         | 
| 
       24 
27 
     | 
    
         
             
                    if output.start_with? '<svg'
         
     | 
| 
         @@ -17,7 +17,10 @@ module Asciidoctor 
     | 
|
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                  def convert(source, format, options)
         
     | 
| 
       19 
19 
     | 
    
         
             
                    generate_stdin(source.find_command('shaape'), format.to_s, source.to_s) do |tool_path, output_path|
         
     | 
| 
       20 
     | 
    
         
            -
                       
     | 
| 
      
 20 
     | 
    
         
            +
                      {
         
     | 
| 
      
 21 
     | 
    
         
            +
                        :args => [tool_path, '-o', Platform.native_path(output_path), '-t', format.to_s, '-'],
         
     | 
| 
      
 22 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 23 
     | 
    
         
            +
                      }
         
     | 
| 
       21 
24 
     | 
    
         
             
                    end
         
     | 
| 
       22 
25 
     | 
    
         
             
                  end
         
     | 
| 
       23 
26 
     | 
    
         
             
                end
         
     | 
| 
         @@ -46,7 +46,10 @@ module Asciidoctor 
     | 
|
| 
       46 
46 
     | 
    
         
             
                    end
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
                    generate_stdin(source.find_command('svgbob', :alt_cmds => ['svgbob_cli']), format.to_s, source.to_s) do |tool_path, output_path|
         
     | 
| 
       49 
     | 
    
         
            -
                       
     | 
| 
      
 49 
     | 
    
         
            +
                      {
         
     | 
| 
      
 50 
     | 
    
         
            +
                        :args => ([tool_path, '-o', Platform.native_path(output_path)] + flags),
         
     | 
| 
      
 51 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 52 
     | 
    
         
            +
                      }
         
     | 
| 
       50 
53 
     | 
    
         
             
                    end
         
     | 
| 
       51 
54 
     | 
    
         
             
                  end
         
     | 
| 
       52 
55 
     | 
    
         
             
                end
         
     | 
| 
         @@ -15,7 +15,10 @@ module Asciidoctor 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                  def convert(source, format, options)
         
     | 
| 
       17 
17 
     | 
    
         
             
                    generate_stdin(source.find_command('symbolator'), format.to_s, source.to_s) do |tool_path, output_path|
         
     | 
| 
       18 
     | 
    
         
            -
                       
     | 
| 
      
 18 
     | 
    
         
            +
                      {
         
     | 
| 
      
 19 
     | 
    
         
            +
                        :args => [tool_path, "-i-", "-o#{Platform.native_path(output_path)}", "-f#{format.to_s}"],
         
     | 
| 
      
 20 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 21 
     | 
    
         
            +
                      }
         
     | 
| 
       19 
22 
     | 
    
         
             
                    end
         
     | 
| 
       20 
23 
     | 
    
         
             
                  end
         
     | 
| 
       21 
24 
     | 
    
         
             
                end
         
     | 
| 
         @@ -91,7 +91,10 @@ module Asciidoctor 
     | 
|
| 
       91 
91 
     | 
    
         
             
                      response[:body]
         
     | 
| 
       92 
92 
     | 
    
         
             
                    else
         
     | 
| 
       93 
93 
     | 
    
         
             
                      generate_file(source.find_command('syntrax'), 'spec', format.to_s, source.to_s) do |tool_path, input_path, output_path|
         
     | 
| 
       94 
     | 
    
         
            -
                         
     | 
| 
      
 94 
     | 
    
         
            +
                        {
         
     | 
| 
      
 95 
     | 
    
         
            +
                          :args => ([tool_path, '-i', Platform.native_path(input_path), '-o', Platform.native_path(output_path)] + shared_args),
         
     | 
| 
      
 96 
     | 
    
         
            +
                          :chdir => source.base_dir
         
     | 
| 
      
 97 
     | 
    
         
            +
                        }
         
     | 
| 
       95 
98 
     | 
    
         
             
                      end
         
     | 
| 
       96 
99 
     | 
    
         
             
                    end
         
     | 
| 
       97 
100 
     | 
    
         | 
| 
         @@ -64,7 +64,10 @@ END 
     | 
|
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
                    if svgpath
         
     | 
| 
       66 
66 
     | 
    
         
             
                      generate_file(svgpath, 'pdf', 'svg', pdf) do |tool_path, input_path, output_path|
         
     | 
| 
       67 
     | 
    
         
            -
                         
     | 
| 
      
 67 
     | 
    
         
            +
                        {
         
     | 
| 
      
 68 
     | 
    
         
            +
                          :args => [tool_path, Platform.native_path(input_path), Platform.native_path(output_path)],
         
     | 
| 
      
 69 
     | 
    
         
            +
                          :chdir => source.base_dir
         
     | 
| 
      
 70 
     | 
    
         
            +
                        }
         
     | 
| 
       68 
71 
     | 
    
         
             
                      end
         
     | 
| 
       69 
72 
     | 
    
         
             
                    else
         
     | 
| 
       70 
73 
     | 
    
         
             
                      pdf
         
     | 
| 
         @@ -25,7 +25,10 @@ module Asciidoctor 
     | 
|
| 
       25 
25 
     | 
    
         
             
                    end
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
                    generate_file(java, 'uxf', format.to_s, source.to_s) do |tool_path, input_path, output_path|
         
     | 
| 
       28 
     | 
    
         
            -
                       
     | 
| 
      
 28 
     | 
    
         
            +
                      {
         
     | 
| 
      
 29 
     | 
    
         
            +
                        :args => [tool_path, '-jar', Platform.native_path(umlet), '-action=convert', "-format=#{format.to_s}", "-filename=#{Platform.native_path(input_path)}", "-output=#{Platform.native_path(output_path)}"],
         
     | 
| 
      
 30 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 31 
     | 
    
         
            +
                      }
         
     | 
| 
       29 
32 
     | 
    
         
             
                    end
         
     | 
| 
       30 
33 
     | 
    
         
             
                  end
         
     | 
| 
       31 
34 
     | 
    
         
             
                end
         
     | 
| 
         @@ -32,14 +32,16 @@ module Asciidoctor 
     | 
|
| 
       32 
32 
     | 
    
         
             
                      vega_code = code
         
     | 
| 
       33 
33 
     | 
    
         
             
                    end
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
                     
     | 
| 
      
 35 
     | 
    
         
            +
                    generate_stdin_stdout(source.find_command("vg2#{format}"), vega_code) do |tool_path|
         
     | 
| 
       36 
36 
     | 
    
         
             
                      args = [tool_path, '--base', Platform.native_path(base_dir)]
         
     | 
| 
       37 
37 
     | 
    
         
             
                      if format == :svg
         
     | 
| 
       38 
38 
     | 
    
         
             
                        args << '--header'
         
     | 
| 
       39 
39 
     | 
    
         
             
                      end
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
                       
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
      
 41 
     | 
    
         
            +
                      {
         
     | 
| 
      
 42 
     | 
    
         
            +
                        :args => args,
         
     | 
| 
      
 43 
     | 
    
         
            +
                        :chdir => source.base_dir
         
     | 
| 
      
 44 
     | 
    
         
            +
                      }
         
     | 
| 
       43 
45 
     | 
    
         
             
                    end
         
     | 
| 
       44 
46 
     | 
    
         
             
                  end
         
     | 
| 
       45 
47 
     | 
    
         
             
                end
         
     | 
| 
         @@ -19,7 +19,10 @@ module Asciidoctor 
     | 
|
| 
       19 
19 
     | 
    
         
             
                    wavedrom_cli = source.find_command('wavedrom-cli', :raise_on_error => false)
         
     | 
| 
       20 
20 
     | 
    
         
             
                    if wavedrom_cli
         
     | 
| 
       21 
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', Platform.native_path(input_path), "--#{format.to_s}", Platform.native_path(output_path)],
         
     | 
| 
      
 24 
     | 
    
         
            +
                          :chdir => source.base_dir
         
     | 
| 
      
 25 
     | 
    
         
            +
                        }
         
     | 
| 
       23 
26 
     | 
    
         
             
                      end
         
     | 
| 
       24 
27 
     | 
    
         
             
                    else
         
     | 
| 
       25 
28 
     | 
    
         
             
                      wavedrom_cli = source.find_command('wavedrom', :raise_on_error => false)
         
     | 
| 
         @@ -27,7 +30,10 @@ module Asciidoctor 
     | 
|
| 
       27 
30 
     | 
    
         | 
| 
       28 
31 
     | 
    
         
             
                      if wavedrom_cli && !wavedrom_cli.include?('WaveDromEditor') && phantomjs
         
     | 
| 
       29 
32 
     | 
    
         
             
                        generate_file(wavedrom_cli, 'wvd', format.to_s, source.to_s) do |tool_path, input_path, output_path|
         
     | 
| 
       30 
     | 
    
         
            -
                           
     | 
| 
      
 33 
     | 
    
         
            +
                          {
         
     | 
| 
      
 34 
     | 
    
         
            +
                            :args => [phantomjs, Platform.native_path(tool_path), '-i', Platform.native_path(input_path), "-#{format.to_s[0]}", Platform.native_path(output_path)],
         
     | 
| 
      
 35 
     | 
    
         
            +
                            :chdir => source.base_dir
         
     | 
| 
      
 36 
     | 
    
         
            +
                          }
         
     | 
| 
       31 
37 
     | 
    
         
             
                        end
         
     | 
| 
       32 
38 
     | 
    
         
             
                      else
         
     | 
| 
       33 
39 
     | 
    
         
             
                        if ::Asciidoctor::Diagram::Platform.os == :macosx
         
     | 
| 
         @@ -40,7 +46,10 @@ module Asciidoctor 
     | 
|
| 
       40 
46 
     | 
    
         
             
                        end
         
     | 
| 
       41 
47 
     | 
    
         | 
| 
       42 
48 
     | 
    
         
             
                        generate_file(wavedrom, 'wvd', format.to_s, source.to_s) do |tool_path, input_path, output_path|
         
     | 
| 
       43 
     | 
    
         
            -
                           
     | 
| 
      
 49 
     | 
    
         
            +
                          {
         
     | 
| 
      
 50 
     | 
    
         
            +
                            :args => [tool_path, 'source', Platform.native_path(input_path), format.to_s, Platform.native_path(output_path)],
         
     | 
| 
      
 51 
     | 
    
         
            +
                            :chdir => source.base_dir
         
     | 
| 
      
 52 
     | 
    
         
            +
                          }
         
     | 
| 
       44 
53 
     | 
    
         
             
                        end
         
     | 
| 
       45 
54 
     | 
    
         
             
                      end
         
     | 
| 
       46 
55 
     | 
    
         
             
                    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. 
     | 
| 
      
 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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-09-20 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |