asciidoctor-diagram 1.1.3-java → 1.1.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: f0f69b3d47bad0cef1b5b515d030c2bdd41ef13d
4
- data.tar.gz: 84fab6e64ec3fc13e1638ab44c4104a20b369eb9
3
+ metadata.gz: 7551a9491db4c9dab76b1da491e9541f2ca8a7fe
4
+ data.tar.gz: 2923f841a55ed9ca7f1cc965a0dcc1299a951ff0
5
5
  SHA512:
6
- metadata.gz: 5c7f3dea8bb76b394345bec0354ad49b1fc0d94be25ac1ce38b02528076c96f14dc2b1eac7860916153dd41c269db57c7cd4c38ef52ff6479ef4ea3d0a583d8d
7
- data.tar.gz: c1ecba019813053288283abf6f529c6f0ca6eca836536445983e18028d1ce9fb09d9b6317725d8fb4f3f3c8b27041142287162a2a96091505dd5851362b407a9
6
+ metadata.gz: 0946b8cd28a26ee64dd31b298f67729d8b98f15b6f2cde2b2ebe05e6019bef6da46a306989d7d381bfefb5d786cd7931af875fe090b22de98003d3737bebb57a
7
+ data.tar.gz: 9ac14361407421bc48155c5f79a581480a54616c235e02ffb0b85cfc97db3507c9c283c6e9f9407e96067b6c933603def1b5a60f2a27f93a86bf7a8c0b387de2
data/CHANGELOG.adoc CHANGED
@@ -1,5 +1,26 @@
1
1
  = Asciidoctor-diagram Changelog
2
2
 
3
+ == 1.1.4
4
+
5
+ Bug Fixes::
6
+
7
+ * Under CRuby in combination with certain Java versions a FileNotFoundException could be triggered due to incorrect
8
+ method selection by RJB
9
+
10
+ == 1.1.3
11
+
12
+ Bug Fixes::
13
+
14
+ * Image regeneration logic did not always correctly detect cases where images did not need to be updated
15
+
16
+ == 1.1.2
17
+
18
+ Bug Fixes::
19
+
20
+ * Fix corrupt PNG images on Windows
21
+ * Fix NoSuchMethodError in block macro processing when target image file already existed
22
+ * Respect target attribute in block macros
23
+
3
24
  == 1.1.1
4
25
 
5
26
  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
@@ -21,15 +21,16 @@ module Asciidoctor
21
21
 
22
22
  flags += ['-charset', 'UTF-8', '-failonerror', '-graphvizdot', @graphvizdot]
23
23
 
24
- option = Java.net.sourceforge.plantuml.Option.new(Java.array_to_java_array(flags, :string))
25
- source_reader = Java.net.sourceforge.plantuml.SourceStringReader.new(
26
- Java.net.sourceforge.plantuml.preproc.Defines.new(),
27
- code,
28
- option.getConfig()
24
+ option = Java.new_object( Java.net.sourceforge.plantuml.Option, '[Ljava.lang.String;', Java.array_to_java_array(flags, :string) )
25
+ source_reader = Java.new_object( Java.net.sourceforge.plantuml.SourceStringReader,
26
+ 'Lnet.sourceforge.plantuml.preproc.Defines;Ljava.lang.String;Ljava.util.List;',
27
+ Java.new_object( Java.net.sourceforge.plantuml.preproc.Defines ),
28
+ code,
29
+ option.getConfig()
29
30
  )
30
31
 
31
- bos = Java.java.io.ByteArrayOutputStream.new
32
- ps = Java.java.io.PrintStream.new(bos)
32
+ bos = Java.new_object( Java.java.io.ByteArrayOutputStream )
33
+ ps = Java.new_object( Java.java.io.PrintStream, 'Ljava.io.OutputStream;', bos )
33
34
  source_reader.generateImage(ps, 0, option.getFileFormatOption())
34
35
  ps.close
35
36
  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.1.3"
3
+ VERSION = "1.1.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.1.3
4
+ version: 1.1.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