asciidoctor-diagram 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +13 -0
- data/README.adoc +54 -10
- data/lib/{asciidoctor-diagram-java-1.3.7.jar → asciidoctor-diagram-java-1.3.8.jar} +0 -0
- data/lib/asciidoctor-diagram.rb +2 -0
- data/lib/asciidoctor-diagram/blockdiag/extension.rb +1 -1
- data/lib/asciidoctor-diagram/ditaa/extension.rb +0 -10
- data/lib/asciidoctor-diagram/extensions.rb +22 -6
- data/lib/asciidoctor-diagram/graphviz/extension.rb +1 -1
- data/lib/asciidoctor-diagram/meme.rb +8 -0
- data/lib/asciidoctor-diagram/meme/extension.rb +116 -0
- data/lib/asciidoctor-diagram/mermaid.rb +9 -0
- data/lib/asciidoctor-diagram/mermaid/extension.rb +57 -0
- data/lib/asciidoctor-diagram/plantuml/extension.rb +7 -0
- data/lib/asciidoctor-diagram/shaape/extension.rb +1 -1
- data/lib/asciidoctor-diagram/util/binaryio.rb +18 -0
- data/lib/asciidoctor-diagram/util/cli_generator.rb +41 -21
- data/lib/asciidoctor-diagram/util/gif.rb +21 -0
- data/lib/asciidoctor-diagram/util/java.rb +1 -1
- data/lib/asciidoctor-diagram/util/platform.rb +25 -0
- data/lib/asciidoctor-diagram/util/svg.rb +3 -3
- data/lib/asciidoctor-diagram/util/which.rb +9 -3
- data/lib/asciidoctor-diagram/version.rb +1 -1
- data/lib/asciidoctor-diagram/wavedrom/extension.rb +18 -8
- data/spec/ditaa_spec.rb +1 -1
- data/spec/man.jpg +0 -0
- data/spec/meme_spec.rb +67 -0
- data/spec/mermaid_spec.rb +277 -0
- data/spec/plantuml_spec.rb +25 -0
- data/spec/shaape_spec.rb +2 -2
- data/spec/test_helper.rb +11 -1
- data/spec/wavedrom_spec.rb +2 -2
- metadata +15 -3
data/spec/plantuml_spec.rb
CHANGED
@@ -272,6 +272,31 @@ plantuml::plantuml.txt["foobaz"]
|
|
272
272
|
expect(File.exists?('plantuml.png')).to be false
|
273
273
|
end
|
274
274
|
|
275
|
+
it "should respect target attribute values with relative paths in block macros" do
|
276
|
+
code = <<-eos
|
277
|
+
User -> (Start)
|
278
|
+
User --> (Use the application) : Label
|
279
|
+
|
280
|
+
:Main Admin: ---> (Use the application) : Another label
|
281
|
+
eos
|
282
|
+
|
283
|
+
File.write('plantuml.txt', code)
|
284
|
+
|
285
|
+
doc = <<-eos
|
286
|
+
= Hello, PlantUML!
|
287
|
+
Doc Writer <doc@example.com>
|
288
|
+
|
289
|
+
== First Section
|
290
|
+
|
291
|
+
plantuml::plantuml.txt["test/foobar"]
|
292
|
+
plantuml::plantuml.txt["test2/foobaz"]
|
293
|
+
eos
|
294
|
+
|
295
|
+
Asciidoctor.load StringIO.new(doc)
|
296
|
+
expect(File.exists?('test/foobar.png')).to be true
|
297
|
+
expect(File.exists?('test2/foobaz.png')).to be true
|
298
|
+
expect(File.exists?('plantuml.png')).to be false
|
299
|
+
end
|
275
300
|
|
276
301
|
it "should write files to outdir if set" do
|
277
302
|
doc = <<-eos
|
data/spec/shaape_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative 'test_helper'
|
2
2
|
|
3
|
-
describe Asciidoctor::Diagram::ShaapeBlockMacroProcessor, :
|
3
|
+
describe Asciidoctor::Diagram::ShaapeBlockMacroProcessor, :broken_on_osx do
|
4
4
|
it "should generate PNG images when format is set to 'png'" do
|
5
5
|
code = <<-eos
|
6
6
|
+--------+ +-------------+
|
@@ -40,7 +40,7 @@ shaape::shaape.txt[format="png"]
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
describe Asciidoctor::Diagram::ShaapeBlockProcessor, :
|
43
|
+
describe Asciidoctor::Diagram::ShaapeBlockProcessor, :broken_on_osx do
|
44
44
|
it "should generate PNG images when format is set to 'png'" do
|
45
45
|
doc = <<-eos
|
46
46
|
= Hello, Shaape!
|
data/spec/test_helper.rb
CHANGED
@@ -9,10 +9,14 @@ require_relative '../lib/asciidoctor-diagram'
|
|
9
9
|
require_relative '../lib/asciidoctor-diagram/blockdiag/extension'
|
10
10
|
require_relative '../lib/asciidoctor-diagram/ditaa/extension'
|
11
11
|
require_relative '../lib/asciidoctor-diagram/graphviz/extension'
|
12
|
+
require_relative '../lib/asciidoctor-diagram/meme/extension'
|
13
|
+
require_relative '../lib/asciidoctor-diagram/mermaid/extension'
|
12
14
|
require_relative '../lib/asciidoctor-diagram/plantuml/extension'
|
13
15
|
require_relative '../lib/asciidoctor-diagram/shaape/extension'
|
14
16
|
require_relative '../lib/asciidoctor-diagram/wavedrom/extension'
|
15
17
|
|
18
|
+
require_relative '../lib/asciidoctor-diagram/util/platform'
|
19
|
+
|
16
20
|
module Asciidoctor
|
17
21
|
class AbstractBlock
|
18
22
|
def find(&block)
|
@@ -31,7 +35,13 @@ module Asciidoctor
|
|
31
35
|
end
|
32
36
|
|
33
37
|
RSpec.configure do |c|
|
34
|
-
|
38
|
+
if ::Asciidoctor::Diagram::Platform.os == :macosx
|
39
|
+
c.filter_run_excluding :broken_on_osx => true
|
40
|
+
end
|
41
|
+
|
42
|
+
if ENV['TRAVIS']
|
43
|
+
c.filter_run_excluding :broken_on_ci => true
|
44
|
+
end
|
35
45
|
|
36
46
|
TEST_DIR = File.expand_path('testing')
|
37
47
|
|
data/spec/wavedrom_spec.rb
CHANGED
@@ -8,7 +8,7 @@ code = <<-eos
|
|
8
8
|
]}
|
9
9
|
eos
|
10
10
|
|
11
|
-
describe Asciidoctor::Diagram::WavedromBlockMacroProcessor
|
11
|
+
describe Asciidoctor::Diagram::WavedromBlockMacroProcessor do
|
12
12
|
it "should generate PNG images when format is set to 'png'" do
|
13
13
|
File.write('wavedrom.txt', code)
|
14
14
|
|
@@ -68,7 +68,7 @@ wavedrom::wavedrom.txt[format="svg"]
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
describe Asciidoctor::Diagram::WavedromBlockProcessor
|
71
|
+
describe Asciidoctor::Diagram::WavedromBlockProcessor do
|
72
72
|
it "should generate PNG images when format is set to 'png'" do
|
73
73
|
doc = <<-eos
|
74
74
|
= Hello, Wavedrom!
|
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: 1.
|
4
|
+
version: 1.4.0
|
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: 2016-
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,7 +81,7 @@ files:
|
|
81
81
|
- examples/README.adoc
|
82
82
|
- examples/design.adoc
|
83
83
|
- examples/features.adoc
|
84
|
-
- lib/asciidoctor-diagram-java-1.3.
|
84
|
+
- lib/asciidoctor-diagram-java-1.3.8.jar
|
85
85
|
- lib/asciidoctor-diagram.rb
|
86
86
|
- lib/asciidoctor-diagram/blockdiag.rb
|
87
87
|
- lib/asciidoctor-diagram/blockdiag/extension.rb
|
@@ -90,6 +90,10 @@ files:
|
|
90
90
|
- lib/asciidoctor-diagram/extensions.rb
|
91
91
|
- lib/asciidoctor-diagram/graphviz.rb
|
92
92
|
- lib/asciidoctor-diagram/graphviz/extension.rb
|
93
|
+
- lib/asciidoctor-diagram/meme.rb
|
94
|
+
- lib/asciidoctor-diagram/meme/extension.rb
|
95
|
+
- lib/asciidoctor-diagram/mermaid.rb
|
96
|
+
- lib/asciidoctor-diagram/mermaid/extension.rb
|
93
97
|
- lib/asciidoctor-diagram/plantuml.rb
|
94
98
|
- lib/asciidoctor-diagram/plantuml/extension.rb
|
95
99
|
- lib/asciidoctor-diagram/salt.rb
|
@@ -97,9 +101,11 @@ files:
|
|
97
101
|
- lib/asciidoctor-diagram/shaape/extension.rb
|
98
102
|
- lib/asciidoctor-diagram/util/binaryio.rb
|
99
103
|
- lib/asciidoctor-diagram/util/cli_generator.rb
|
104
|
+
- lib/asciidoctor-diagram/util/gif.rb
|
100
105
|
- lib/asciidoctor-diagram/util/java.rb
|
101
106
|
- lib/asciidoctor-diagram/util/java_jruby.rb
|
102
107
|
- lib/asciidoctor-diagram/util/java_socket.rb
|
108
|
+
- lib/asciidoctor-diagram/util/platform.rb
|
103
109
|
- lib/asciidoctor-diagram/util/png.rb
|
104
110
|
- lib/asciidoctor-diagram/util/svg.rb
|
105
111
|
- lib/asciidoctor-diagram/util/which.rb
|
@@ -111,6 +117,9 @@ files:
|
|
111
117
|
- spec/blockdiag_spec.rb
|
112
118
|
- spec/ditaa_spec.rb
|
113
119
|
- spec/graphviz_spec.rb
|
120
|
+
- spec/man.jpg
|
121
|
+
- spec/meme_spec.rb
|
122
|
+
- spec/mermaid_spec.rb
|
114
123
|
- spec/plantuml_spec.rb
|
115
124
|
- spec/shaape_spec.rb
|
116
125
|
- spec/test_helper.rb
|
@@ -144,6 +153,9 @@ test_files:
|
|
144
153
|
- spec/blockdiag_spec.rb
|
145
154
|
- spec/ditaa_spec.rb
|
146
155
|
- spec/graphviz_spec.rb
|
156
|
+
- spec/man.jpg
|
157
|
+
- spec/meme_spec.rb
|
158
|
+
- spec/mermaid_spec.rb
|
147
159
|
- spec/plantuml_spec.rb
|
148
160
|
- spec/shaape_spec.rb
|
149
161
|
- spec/test_helper.rb
|