asciidoctor-diagram 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +11 -0
- data/lib/asciidoctor-diagram/ditaa/ditaa-2.2.0.jar +0 -0
- data/lib/asciidoctor-diagram/http/converter.rb +9 -4
- data/lib/asciidoctor-diagram/http/server.rb +2 -2
- data/lib/asciidoctor-diagram/plantuml/plantuml-2.2.1.jar +0 -0
- data/lib/asciidoctor-diagram/structurizr/structurizr-2.2.0.jar +0 -0
- data/lib/asciidoctor-diagram/syntrax/converter.rb +6 -1
- data/lib/asciidoctor-diagram/syntrax/syntrax-2.2.0.jar +0 -0
- data/lib/asciidoctor-diagram/tikz/converter.rb +1 -1
- data/lib/asciidoctor-diagram/util/base64.rb +25 -0
- data/lib/asciidoctor-diagram/util/{server-2.1.0.jar → server-2.2.0.jar} +0 -0
- data/lib/asciidoctor-diagram/version.rb +1 -1
- data/lib/asciidoctor-diagram/wavedrom/converter.rb +1 -1
- metadata +8 -7
- data/lib/asciidoctor-diagram/ditaa/ditaa-2.1.0.jar +0 -0
- data/lib/asciidoctor-diagram/plantuml/plantuml-2.1.1.jar +0 -0
- data/lib/asciidoctor-diagram/structurizr/structurizr-2.1.1.jar +0 -0
- data/lib/asciidoctor-diagram/syntrax/syntrax-2.1.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba1fe3f7c564342dde9942ddb021de41fd84e10d2661b0fe29f8e716c960e145
|
4
|
+
data.tar.gz: 5b504adb1364e2c7a709adebebe54b68af6e5571de5192f3784567178839c24a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0ce65811837cd0ee3be1b00eb1e3fe8a951f3b4f0e8c94846450489adc8692d80eab616d1a653fc8bfc8444e92b345e9cb79acac007f5ef49e1fae99108553
|
7
|
+
data.tar.gz: 2289407dc63908392cdcd9bd3e4980b7ec95dd0f2e0ed38f493ea243d62c2f3fa68fff8128b4a3ef7a7dbbc7e46822696551e70b1ef4230f2bf9a7f130a37d49
|
data/CHANGELOG.adoc
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
= Asciidoctor-diagram Changelog
|
2
2
|
|
3
|
+
== 2.3.1
|
4
|
+
|
5
|
+
Enhancements::
|
6
|
+
|
7
|
+
* Issue #423: Add support for loading JSyntrax via the `asciidoctor-diagram-jsyntrax` gem (@inponomarev)
|
8
|
+
* Issue #464: Remove usage of 'base64' gem to resolve Ruby 3.3+ compatibility issues
|
9
|
+
|
10
|
+
Bugfixes::
|
11
|
+
|
12
|
+
* Issue #459: Fix lookup of `wavedrom-cli` location on Windows
|
13
|
+
|
3
14
|
== 2.3.0
|
4
15
|
|
5
16
|
Enhancements::
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../diagram_converter'
|
2
|
+
require_relative '../util/base64'
|
2
3
|
require_relative '../util/platform'
|
3
4
|
|
4
|
-
require 'base64'
|
5
5
|
require 'net/http'
|
6
6
|
require 'uri'
|
7
7
|
require 'zlib'
|
@@ -47,15 +47,20 @@ module Asciidoctor
|
|
47
47
|
compressed = deflate.deflate(code, Zlib::FINISH)
|
48
48
|
deflate.close
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
data = Base64.urlsafe_encode(compressed)
|
51
|
+
# See https://plantuml.com/text-encoding
|
52
|
+
# PlantUML uses a different alphabet than the one from RFC 4648
|
53
|
+
data.tr!(
|
54
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
|
55
|
+
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
56
|
+
)
|
52
57
|
|
53
58
|
path = uri.path.dup
|
54
59
|
path << '/' unless path.end_with? '/'
|
55
60
|
path << format.to_s
|
56
61
|
when :kroki_io
|
57
62
|
compressed = Zlib.deflate(code, Zlib::BEST_COMPRESSION)
|
58
|
-
data = Base64.
|
63
|
+
data = Base64.urlsafe_encode(compressed)
|
59
64
|
|
60
65
|
path = uri.path.dup
|
61
66
|
path << '/' unless path.end_with? '/'
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'base64'
|
2
1
|
require 'json'
|
3
2
|
require 'sinatra/base'
|
4
3
|
require 'zlib'
|
5
4
|
|
6
5
|
require_relative '../diagram_source'
|
7
6
|
require_relative '../graphviz/converter'
|
7
|
+
require_relative '../util/base64'
|
8
8
|
require_relative '../util/which'
|
9
9
|
|
10
10
|
module Asciidoctor
|
@@ -14,7 +14,7 @@ module Asciidoctor
|
|
14
14
|
type = params['type']
|
15
15
|
accepts = lambda { |t| params['format'].downcase.to_sym == t }
|
16
16
|
raw_source = params['source']
|
17
|
-
decoded_source = Base64.
|
17
|
+
decoded_source = Base64.urlsafe_decode(raw_source)
|
18
18
|
decompressed_source = Zlib::Inflate.inflate(decoded_source)
|
19
19
|
source = decompressed_source
|
20
20
|
render_diagram(type, accepts, source, {})
|
Binary file
|
Binary file
|
@@ -17,7 +17,12 @@ module Asciidoctor
|
|
17
17
|
lib_dir = File.expand_path('lib', CLI_HOME_ENV)
|
18
18
|
Dir.children(lib_dir).select { |c| c.end_with? '.jar' }.map { |c| File.expand_path(c, lib_dir) }
|
19
19
|
else
|
20
|
-
|
20
|
+
begin
|
21
|
+
require 'asciidoctor-diagram/jsyntrax/classpath'
|
22
|
+
::Asciidoctor::Diagram::JsyntraxClasspath::JAR_FILES
|
23
|
+
rescue LoadError
|
24
|
+
nil
|
25
|
+
end
|
21
26
|
end
|
22
27
|
|
23
28
|
if JSYNTRAX_JARS
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Asciidoctor
|
2
|
+
module Diagram
|
3
|
+
module Base64
|
4
|
+
def self.urlsafe_encode(bin, padding: true)
|
5
|
+
str = [bin].pack("m0")
|
6
|
+
str.chomp!("==") or str.chomp!("=") unless padding
|
7
|
+
str.tr!("+/", "-_")
|
8
|
+
str
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.urlsafe_decode(str)
|
12
|
+
# NOTE: RFC 4648 does say nothing about unpadded input, but says that
|
13
|
+
# "the excess pad characters MAY also be ignored", so it is inferred that
|
14
|
+
# unpadded input is also acceptable.
|
15
|
+
if !str.end_with?("=") && str.length % 4 != 0
|
16
|
+
str = str.ljust((str.length + 3) & ~3, "=")
|
17
|
+
str.tr!("-_", "+/")
|
18
|
+
else
|
19
|
+
str = str.tr("-_", "+/")
|
20
|
+
end
|
21
|
+
str.unpack1("m0")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
Binary file
|
@@ -35,7 +35,7 @@ module Asciidoctor
|
|
35
35
|
source.find_command('wavedrom-cli', :attrs => ['wavedrom'])
|
36
36
|
end
|
37
37
|
|
38
|
-
if wavedrom.
|
38
|
+
if wavedrom.include?('-cli')
|
39
39
|
generate_file(wavedrom, 'wvd', format.to_s, source.to_s) do |tool_path, input_path, output_path|
|
40
40
|
{
|
41
41
|
:args => [Platform.native_path(tool_path), '--input', Platform.native_path(input_path), "--#{format.to_s}", Platform.native_path(output_path)],
|
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.3.
|
4
|
+
version: 2.3.1
|
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: 2024-
|
11
|
+
date: 2024-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,7 +156,7 @@ files:
|
|
156
156
|
- lib/asciidoctor-diagram/diagrams/extension.rb
|
157
157
|
- lib/asciidoctor-diagram/ditaa.rb
|
158
158
|
- lib/asciidoctor-diagram/ditaa/converter.rb
|
159
|
-
- lib/asciidoctor-diagram/ditaa/ditaa-2.
|
159
|
+
- lib/asciidoctor-diagram/ditaa/ditaa-2.2.0.jar
|
160
160
|
- lib/asciidoctor-diagram/ditaa/extension.rb
|
161
161
|
- lib/asciidoctor-diagram/dpic.rb
|
162
162
|
- lib/asciidoctor-diagram/dpic/converter.rb
|
@@ -199,7 +199,7 @@ files:
|
|
199
199
|
- lib/asciidoctor-diagram/plantuml.rb
|
200
200
|
- lib/asciidoctor-diagram/plantuml/converter.rb
|
201
201
|
- lib/asciidoctor-diagram/plantuml/extension.rb
|
202
|
-
- lib/asciidoctor-diagram/plantuml/plantuml-2.
|
202
|
+
- lib/asciidoctor-diagram/plantuml/plantuml-2.2.1.jar
|
203
203
|
- lib/asciidoctor-diagram/salt.rb
|
204
204
|
- lib/asciidoctor-diagram/shaape.rb
|
205
205
|
- lib/asciidoctor-diagram/shaape/converter.rb
|
@@ -211,7 +211,7 @@ files:
|
|
211
211
|
- lib/asciidoctor-diagram/structurizr/converter.rb
|
212
212
|
- lib/asciidoctor-diagram/structurizr/extension.rb
|
213
213
|
- lib/asciidoctor-diagram/structurizr/renderers.rb
|
214
|
-
- lib/asciidoctor-diagram/structurizr/structurizr-2.
|
214
|
+
- lib/asciidoctor-diagram/structurizr/structurizr-2.2.0.jar
|
215
215
|
- lib/asciidoctor-diagram/svgbob.rb
|
216
216
|
- lib/asciidoctor-diagram/svgbob/converter.rb
|
217
217
|
- lib/asciidoctor-diagram/svgbob/extension.rb
|
@@ -221,13 +221,14 @@ files:
|
|
221
221
|
- lib/asciidoctor-diagram/syntrax.rb
|
222
222
|
- lib/asciidoctor-diagram/syntrax/converter.rb
|
223
223
|
- lib/asciidoctor-diagram/syntrax/extension.rb
|
224
|
-
- lib/asciidoctor-diagram/syntrax/syntrax-2.
|
224
|
+
- lib/asciidoctor-diagram/syntrax/syntrax-2.2.0.jar
|
225
225
|
- lib/asciidoctor-diagram/tikz.rb
|
226
226
|
- lib/asciidoctor-diagram/tikz/converter.rb
|
227
227
|
- lib/asciidoctor-diagram/tikz/extension.rb
|
228
228
|
- lib/asciidoctor-diagram/umlet.rb
|
229
229
|
- lib/asciidoctor-diagram/umlet/converter.rb
|
230
230
|
- lib/asciidoctor-diagram/umlet/extension.rb
|
231
|
+
- lib/asciidoctor-diagram/util/base64.rb
|
231
232
|
- lib/asciidoctor-diagram/util/binaryio.rb
|
232
233
|
- lib/asciidoctor-diagram/util/cli.rb
|
233
234
|
- lib/asciidoctor-diagram/util/cli_generator.rb
|
@@ -238,7 +239,7 @@ files:
|
|
238
239
|
- lib/asciidoctor-diagram/util/pdf.rb
|
239
240
|
- lib/asciidoctor-diagram/util/platform.rb
|
240
241
|
- lib/asciidoctor-diagram/util/png.rb
|
241
|
-
- lib/asciidoctor-diagram/util/server-2.
|
242
|
+
- lib/asciidoctor-diagram/util/server-2.2.0.jar
|
242
243
|
- lib/asciidoctor-diagram/util/svg.rb
|
243
244
|
- lib/asciidoctor-diagram/util/which.rb
|
244
245
|
- lib/asciidoctor-diagram/vega.rb
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|