asciidoctor-kroki 0.4.0 → 0.5.0
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/Gemfile.lock +2 -2
- data/asciidoctor-kroki.gemspec +1 -1
- data/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb +7 -6
- data/spec/asciidoctor_kroki_spec.rb +12 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b10096229def31407946a5f7e77eb57a991895d9407d334b6a4ca3dc7e8ba165
|
4
|
+
data.tar.gz: 81497c2124169974c072a57c496b37d8cbd5e96b4793a22d59a3152fb1693c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03e1e7d5dc886c9e4ff9d7199f3289aa1a94d8b97a21209ba4ea9c4b505129646297bb62c02cab6390803b157a7a505e3af944ff533c49086af11927647776ce
|
7
|
+
data.tar.gz: ad4cda7ce19c6ffa1223a224c1528c87e7b8864d554662f26a7534937f4bea49433e500373dad215feb09d71f748c84881ad720ea5c52765977383eb393a9f4c
|
data/Gemfile.lock
CHANGED
data/asciidoctor-kroki.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'asciidoctor-kroki'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '0.5.0'
|
6
6
|
s.summary = 'Asciidoctor extension to convert diagrams to images using Kroki'
|
7
7
|
s.description = 'An extension for Asciidoctor to convert diagrams to images using https://kroki.io'
|
8
8
|
|
@@ -17,11 +17,11 @@ module AsciidoctorExtensions
|
|
17
17
|
|
18
18
|
# @param name [String] name of the block macro (optional)
|
19
19
|
# @param config [Hash] a config hash (optional)
|
20
|
-
#
|
20
|
+
# - :logger a logger used to log warning and errors (optional)
|
21
21
|
#
|
22
|
-
def initialize(name = nil, config = {}
|
22
|
+
def initialize(name = nil, config = {})
|
23
|
+
@logger = (config || {}).delete(:logger) { ::Asciidoctor::LoggerManager.logger }
|
23
24
|
super(name, config)
|
24
|
-
@logger = logger
|
25
25
|
end
|
26
26
|
|
27
27
|
def process(parent, reader, attrs)
|
@@ -44,11 +44,11 @@ module AsciidoctorExtensions
|
|
44
44
|
|
45
45
|
# @param name [String] name of the block macro (optional)
|
46
46
|
# @param config [Hash] a config hash (optional)
|
47
|
-
#
|
47
|
+
# - :logger a logger used to log warning and errors (optional)
|
48
48
|
#
|
49
|
-
def initialize(name = nil, config = {}
|
49
|
+
def initialize(name = nil, config = {})
|
50
|
+
@logger = (config || {}).delete(:logger) { ::Asciidoctor::LoggerManager.logger }
|
50
51
|
super(name, config)
|
51
|
-
@logger = logger
|
52
52
|
end
|
53
53
|
|
54
54
|
def process(parent, target, attrs)
|
@@ -117,6 +117,7 @@ module AsciidoctorExtensions
|
|
117
117
|
nomnoml
|
118
118
|
nwdiag
|
119
119
|
packetdiag
|
120
|
+
pikchr
|
120
121
|
plantuml
|
121
122
|
rackdiag
|
122
123
|
seqdiag
|
@@ -130,12 +130,23 @@ describe ::AsciidoctorExtensions::KrokiBlockProcessor do
|
|
130
130
|
</div>)
|
131
131
|
end
|
132
132
|
end
|
133
|
+
context 'instantiate' do
|
134
|
+
it 'should instantiate block processor without warning' do
|
135
|
+
original_stderr = $stderr
|
136
|
+
$stderr = StringIO.new
|
137
|
+
::AsciidoctorExtensions::KrokiBlockProcessor.new 'plantuml'.to_sym, {}
|
138
|
+
output = $stderr.string
|
139
|
+
(expect output).to eql ''
|
140
|
+
ensure
|
141
|
+
$stderr = original_stderr
|
142
|
+
end
|
143
|
+
end
|
133
144
|
end
|
134
145
|
|
135
146
|
describe ::AsciidoctorExtensions::Kroki do
|
136
147
|
it 'should return the list of supported diagrams' do
|
137
148
|
diagram_names = ::AsciidoctorExtensions::Kroki::SUPPORTED_DIAGRAM_NAMES
|
138
|
-
expect(diagram_names).to include('vegalite', 'plantuml', 'bytefield', 'bpmn', 'excalidraw', 'wavedrom')
|
149
|
+
expect(diagram_names).to include('vegalite', 'plantuml', 'bytefield', 'bpmn', 'excalidraw', 'wavedrom', 'pikchr')
|
139
150
|
end
|
140
151
|
it 'should register the extension for the list of supported diagrams' do
|
141
152
|
doc = Asciidoctor::Document.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-kroki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Grossetie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.1.6
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Asciidoctor extension to convert diagrams to images using Kroki
|