asciidoctor-diagram 1.2.0.preview.3-java → 1.2.0.preview.4-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 952619d93cde27f68bf1739980da524a726ffdc5
4
- data.tar.gz: 3410e9e1a782f07fd8e9143118f08b6f3b7a9739
3
+ metadata.gz: 043f19546d87bf380b9033fcaf0484b7b3c3e8c9
4
+ data.tar.gz: 7177c6504241eeffda1853fa9d829486db7bc96b
5
5
  SHA512:
6
- metadata.gz: 81352018260910259419b91d3d4858206b4b5cc762f4b3504bd12eb325233d191469fd697a3257c9c6c8420414d9136e0d6090c34c122e29d442bc8b6e6fb7f0
7
- data.tar.gz: 37fbe270d7885a05cf16e6301be67ba0a7c5c51e79c74013bef0e13c95978197b575bb0f516d8cd2e006f839a1b422384ee3f0c666af7f5205a56e4361e3737c
6
+ metadata.gz: d20500b05fc3f0a63da62968038212a2fd1a0fce575cfbd4b779fcac91b75faf8eb505bf672d84d3b9b741109fd77898a7c13732a2712403d8898fe9dcfdd4ca
7
+ data.tar.gz: db1febbb4e68a028d57662e65f8efd360db70da99dd7e2c5809d0250be96dc0d65cb73873ee5c7a4912d89463c6677ced409a7200168993ebe773a6395e2f595
data/CHANGELOG.adoc CHANGED
@@ -6,6 +6,27 @@ Enhancements::
6
6
 
7
7
  * Updated to Asciidoctor 1.5.0
8
8
 
9
+ == 1.1.4
10
+
11
+ Bug Fixes::
12
+
13
+ * Under CRuby in combination with certain Java versions a FileNotFoundException could be triggered due to incorrect
14
+ method selection by RJB
15
+
16
+ == 1.1.3
17
+
18
+ Bug Fixes::
19
+
20
+ * Image regeneration logic did not always correctly detect cases where images did not need to be updated
21
+
22
+ == 1.1.2
23
+
24
+ Bug Fixes::
25
+
26
+ * Fix corrupt PNG images on Windows
27
+ * Fix NoSuchMethodError in block macro processing when target image file already existed
28
+ * Respect target attribute in block macros
29
+
9
30
  == 1.1.1
10
31
 
11
32
  Bug Fixes::
@@ -14,8 +14,8 @@ module Asciidoctor
14
14
  args = ['-e', 'UTF-8']
15
15
 
16
16
  bytes = code.encode(Encoding::UTF_8).bytes.to_a
17
- bis = Java.java.io.ByteArrayInputStream.new(Java.array_to_java_array(bytes, :byte))
18
- bos = Java.java.io.ByteArrayOutputStream.new
17
+ bis = Java.new_object( Java.java.io.ByteArrayInputStream, '[B', Java.array_to_java_array(bytes, :byte))
18
+ bos = Java.new_object( Java.java.io.ByteArrayOutputStream )
19
19
  result_code = Java.org.stathissideris.ascii2image.core.CommandLineConverter.convert(Java.array_to_java_array(args, :string), bis, bos)
20
20
  bis.close
21
21
  bos.close
@@ -25,16 +25,17 @@ module Asciidoctor
25
25
  if config_file
26
26
  flags += ['-config', File.expand_path(config_file, parent.document.attributes['docdir'])]
27
27
  end
28
-
29
- option = Java.net.sourceforge.plantuml.Option.new(Java.array_to_java_array(flags, :string))
30
- source_reader = Java.net.sourceforge.plantuml.SourceStringReader.new(
31
- Java.net.sourceforge.plantuml.preproc.Defines.new(),
32
- code,
33
- option.getConfig()
28
+
29
+ option = Java.new_object( Java.net.sourceforge.plantuml.Option, '[Ljava.lang.String;', Java.array_to_java_array(flags, :string) )
30
+ source_reader = Java.new_object( Java.net.sourceforge.plantuml.SourceStringReader,
31
+ 'Lnet.sourceforge.plantuml.preproc.Defines;Ljava.lang.String;Ljava.util.List;',
32
+ Java.new_object( Java.net.sourceforge.plantuml.preproc.Defines ),
33
+ code,
34
+ option.getConfig()
34
35
  )
35
36
 
36
- bos = Java.java.io.ByteArrayOutputStream.new
37
- ps = Java.java.io.PrintStream.new(bos)
37
+ bos = Java.new_object( Java.java.io.ByteArrayOutputStream )
38
+ ps = Java.new_object( Java.java.io.PrintStream, 'Ljava.io.OutputStream;', bos )
38
39
  source_reader.generateImage(ps, 0, option.getFileFormatOption())
39
40
  ps.close
40
41
  Java.string_from_java_bytes(bos.toByteArray)
@@ -31,6 +31,10 @@ module Asciidoctor
31
31
  load
32
32
  ::Java.send(meth)
33
33
  end
34
+
35
+ def self.new_object(java_class, signature = nil, *args)
36
+ java_class.new(*args)
37
+ end
34
38
  end
35
39
  end
36
40
  end
@@ -77,6 +77,14 @@ module Asciidoctor
77
77
  @root_package ||= Package.send(:create_package, nil)
78
78
  @root_package.send(meth, *args)
79
79
  end
80
+
81
+ def self.new_object(java_class, signature = nil, *args)
82
+ if signature
83
+ java_class.new_with_sig(signature, *args)
84
+ else
85
+ java_class.new(*args)
86
+ end
87
+ end
80
88
  end
81
89
  end
82
90
  end
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Diagram
3
- VERSION = "1.2.0.preview.3"
3
+ VERSION = "1.2.0.preview.4"
4
4
  end
5
5
  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: 1.2.0.preview.3
4
+ version: 1.2.0.preview.4
5
5
  platform: java
6
6
  authors:
7
7
  - Pepijn Van Eeckhoudt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-27 00:00:00.000000000 Z
11
+ date: 2014-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler