asciidoctor-diagram 1.3.0.preview.2 → 1.3.0.preview.3
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.
- data/CHANGELOG.adoc +5 -0
- data/lib/asciidoctor-diagram/ditaa/extension.rb +3 -1
- data/lib/asciidoctor-diagram/plantuml/extension.rb +3 -1
- data/lib/asciidoctor-diagram/util/cli_generator.rb +1 -1
- data/lib/asciidoctor-diagram/util/java_socket.rb +18 -4
- data/lib/asciidoctor-diagram/version.rb +1 -1
- data/spec/test_helper.rb +2 -6
- metadata +1 -1
data/CHANGELOG.adoc
CHANGED
@@ -11,6 +11,11 @@ Enhancements::
|
|
11
11
|
* Updated PlantUML to revision 8004 (23/08/2014)
|
12
12
|
* Remove dependency on RJB to simplify installation
|
13
13
|
|
14
|
+
Bug Fixes::
|
15
|
+
|
16
|
+
* Issue #49: Resolve issue that made Java 6 installation prompt appear on Mac OS X
|
17
|
+
* Issue #51: Resolved issue where PNG files generated by Graphviz were not processed correctly on Windows
|
18
|
+
|
14
19
|
== 1.2.0
|
15
20
|
|
16
21
|
Enhancements::
|
@@ -18,7 +18,9 @@ module Asciidoctor
|
|
18
18
|
:body => code
|
19
19
|
)
|
20
20
|
|
21
|
-
|
21
|
+
unless response[:code] == 200
|
22
|
+
raise "Ditaa image generation failed: #{response[:reason]} #{response[:body]}"
|
23
|
+
end
|
22
24
|
|
23
25
|
response[:body]
|
24
26
|
end
|
@@ -31,7 +31,9 @@ module Asciidoctor
|
|
31
31
|
:headers => headers
|
32
32
|
)
|
33
33
|
|
34
|
-
|
34
|
+
unless response[:code] == 200
|
35
|
+
raise "PlantUML image generation failed: #{response[:reason]} #{response[:body]}"
|
36
|
+
end
|
35
37
|
|
36
38
|
response[:body]
|
37
39
|
end
|
@@ -24,6 +24,11 @@ module Asciidoctor
|
|
24
24
|
def io
|
25
25
|
@client
|
26
26
|
end
|
27
|
+
|
28
|
+
def shutdown
|
29
|
+
# KILL is a bit heavy handed, but TERM does not seem to shut down the JVM on Windows.
|
30
|
+
Process.kill('KILL', @server.pid)
|
31
|
+
end
|
27
32
|
end
|
28
33
|
|
29
34
|
def self.load
|
@@ -31,18 +36,27 @@ module Asciidoctor
|
|
31
36
|
return
|
32
37
|
end
|
33
38
|
|
34
|
-
|
39
|
+
instance
|
35
40
|
@loaded = true
|
36
41
|
end
|
37
42
|
|
38
|
-
def self.
|
43
|
+
def self.instance
|
39
44
|
@java_exe ||= find_java
|
40
45
|
raise "Could not find Java executable" unless @java_exe
|
41
|
-
|
46
|
+
|
47
|
+
unless @command_server
|
48
|
+
server = CommandServer.new(@java_exe, classpath)
|
49
|
+
@command_server = server
|
50
|
+
at_exit do
|
51
|
+
server.shutdown
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
@command_server
|
42
56
|
end
|
43
57
|
|
44
58
|
def self.send_request(req)
|
45
|
-
svr =
|
59
|
+
svr = instance
|
46
60
|
headers = req[:headers] ||= {}
|
47
61
|
headers['Host'] = "localhost:#{svr.port}"
|
48
62
|
format_request(req, svr.io)
|
data/spec/test_helper.rb
CHANGED
@@ -30,7 +30,7 @@ module Asciidoctor
|
|
30
30
|
end
|
31
31
|
|
32
32
|
RSpec.configure do |c|
|
33
|
-
TEST_DIR = 'testing'
|
33
|
+
TEST_DIR = File.expand_path('testing')
|
34
34
|
|
35
35
|
c.before(:suite) do
|
36
36
|
FileUtils.rm_r TEST_DIR if Dir.exists? TEST_DIR
|
@@ -45,12 +45,8 @@ RSpec.configure do |c|
|
|
45
45
|
test_dir = File.expand_path(metadata[:description].gsub(/[^\w]+/, '_'), group_dir)
|
46
46
|
Dir.mkdir(test_dir)
|
47
47
|
|
48
|
-
|
49
|
-
Dir.chdir test_dir
|
50
|
-
begin
|
48
|
+
Dir.chdir(test_dir) do
|
51
49
|
example.run
|
52
|
-
ensure
|
53
|
-
Dir.chdir old_wd
|
54
50
|
end
|
55
51
|
end
|
56
52
|
end
|