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

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9f55fc39f6f8cb962714d683847a914da57605b
4
- data.tar.gz: 3410e9e1a782f07fd8e9143118f08b6f3b7a9739
3
+ metadata.gz: 5c7b56725f992456b1db4a30dd0ae93edd938199
4
+ data.tar.gz: 2c8873445a87aa168fd05599a6b7b9820754aa10
5
5
  SHA512:
6
- metadata.gz: 65555754f853801c0380791eb75084674dd3fc9ebd8f59413d422be56867ee6f6c598d3acc39809ea113b6e29a2a265933c5f7dcb4ada80c99518b6d86d4f597
7
- data.tar.gz: 37fbe270d7885a05cf16e6301be67ba0a7c5c51e79c74013bef0e13c95978197b575bb0f516d8cd2e006f839a1b422384ee3f0c666af7f5205a56e4361e3737c
6
+ metadata.gz: b0241f45b59097a383e5a6decf5684da7a23abc0a4b68ef59ea9856ca67f2c9cafc577c0ea3afb15cceee65b284c31245fe496b53eaf1d29aadc8e5f345ec452
7
+ data.tar.gz: b0e45122847855e14016940dc60aff72cc78f3724a8979d0bd1e175f4b5272b6883dcac331aa061be14d41da8a835c32bab2e7975db983d0e6fe0a1fe92034f7
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: ruby
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