|
10 | 10 | import org.asciidoctor.extension.JavaExtensionRegistry;
|
11 | 11 | import org.asciidoctor.extension.RubyExtensionRegistry;
|
12 | 12 | import org.asciidoctor.jruby.AsciidoctorJRuby;
|
13 |
| -import org.asciidoctor.jruby.DirectoryWalker; |
14 |
| -import org.asciidoctor.jruby.ast.impl.AuthorImpl; |
15 | 13 | import org.asciidoctor.jruby.ast.impl.DocumentHeaderImpl;
|
16 | 14 | import org.asciidoctor.jruby.ast.impl.NodeConverter;
|
17 | 15 | import org.asciidoctor.jruby.converter.internal.ConverterRegistryExecutor;
|
|
23 | 21 | import org.asciidoctor.log.LogHandler;
|
24 | 22 | import org.asciidoctor.log.LogRecord;
|
25 | 23 | import org.asciidoctor.syntaxhighlighter.SyntaxHighlighterRegistry;
|
26 |
| -import org.jruby.*; |
| 24 | +import org.jruby.Ruby; |
| 25 | +import org.jruby.RubyClass; |
| 26 | +import org.jruby.RubyHash; |
| 27 | +import org.jruby.RubyInstanceConfig; |
| 28 | +import org.jruby.RubyModule; |
27 | 29 | import org.jruby.exceptions.RaiseException;
|
28 | 30 | import org.jruby.javasupport.JavaEmbedUtils;
|
29 | 31 | import org.jruby.runtime.builtin.IRubyObject;
|
30 | 32 |
|
31 |
| -import java.io.*; |
32 |
| -import java.util.*; |
| 33 | +import java.io.File; |
| 34 | +import java.io.IOException; |
| 35 | +import java.io.InputStream; |
| 36 | +import java.io.OutputStream; |
| 37 | +import java.io.Reader; |
| 38 | +import java.io.Writer; |
| 39 | +import java.util.ArrayList; |
| 40 | +import java.util.Arrays; |
| 41 | +import java.util.Collection; |
| 42 | +import java.util.Collections; |
| 43 | +import java.util.HashMap; |
| 44 | +import java.util.List; |
| 45 | +import java.util.Map; |
| 46 | +import java.util.UUID; |
33 | 47 | import java.util.logging.Logger;
|
34 | 48 |
|
35 | 49 | public class JRubyAsciidoctor implements AsciidoctorJRuby, LogHandler {
|
@@ -60,6 +74,7 @@ private JRubyAsciidoctor(final Ruby rubyRuntime) {
|
60 | 74 |
|
61 | 75 | this.rubyGemsPreloader = new RubyGemsPreloader(this.rubyRuntime);
|
62 | 76 | this.logHandlers.add(new JULLogHandler());
|
| 77 | + RubyOutputStreamWrapper.getOrCreateOutputStreamWrapperClass(this.rubyRuntime); |
63 | 78 | }
|
64 | 79 |
|
65 | 80 | public static JRubyAsciidoctor create() {
|
@@ -184,7 +199,6 @@ public DocumentHeader readDocumentHeader(File file) {
|
184 | 199 | return toDocumentHeader(document);
|
185 | 200 | }
|
186 | 201 |
|
187 |
| - @SuppressWarnings("unchecked") |
188 | 202 | @Override
|
189 | 203 | public DocumentHeader readDocumentHeader(String content) {
|
190 | 204 |
|
@@ -217,10 +231,6 @@ private List<String> convertAllFiles(Map<String, Object> options, final Iterable
|
217 | 231 | return asciidoctorContent;
|
218 | 232 | }
|
219 | 233 |
|
220 |
| - private List<File> scanForAsciiDocFiles(DirectoryWalker directoryWalker) { |
221 |
| - return directoryWalker.scan(); |
222 |
| - } |
223 |
| - |
224 | 234 | @Override
|
225 | 235 | public void requireLibrary(String... library) {
|
226 | 236 | requireLibraries(Arrays.asList(library));
|
|
0 commit comments