Skip to content

Commit

Permalink
Compile with JDK9
Browse files Browse the repository at this point in the history
* updated groovy to a java 9 compatible version
* fixed classpath issues in tests

Closes asciidoctor#591
  • Loading branch information
tisoft committed Jan 10, 2018
1 parent 75c3efb commit 7e59136
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ matrix:
- jdk: oraclejdk8
- jdk: oraclejdk7
- jdk: openjdk7
allow_failures:
- jdk: oraclejdk9
before_script: unset GEM_PATH GEM_HOME JRUBY_OPTS
before_install:
- sudo hostname "$(hostname | cut -c1-63)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class WhenRubyExtensionGroupIsRegistered {
public void ruby_extension_should_be_registered() {

this.asciidoctor.createGroup()
.loadRubyClass(Class.class.getResourceAsStream("/YellRubyBlock.rb")).rubyBlock("rubyyell", "YellRubyBlock")
.loadRubyClass(getClass().getResourceAsStream("/YellRubyBlock.rb")).rubyBlock("rubyyell", "YellRubyBlock")
.register();

String content = asciidoctor.renderFile(
Expand All @@ -47,7 +47,7 @@ public void ruby_extension_should_be_registered() {
public void ruby_extension_should_be_unregistered() {

ExtensionGroup extensionGroup = this.asciidoctor.createGroup()
.loadRubyClass(Class.class.getResourceAsStream("/YellRubyBlock.rb"))
.loadRubyClass(getClass().getResourceAsStream("/YellRubyBlock.rb"))
.rubyBlock("rubyyell", "YellRubyBlock");

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class WhenRubyExtensionIsRegistered {
public void ruby_extension_should_be_registered() {

RubyExtensionRegistry rubyExtensionRegistry = this.asciidoctor.rubyExtensionRegistry();
rubyExtensionRegistry.loadClass(Class.class.getResourceAsStream("/YellRubyBlock.rb")).block("rubyyell", "YellRubyBlock");
rubyExtensionRegistry.loadClass(getClass().getResourceAsStream("/YellRubyBlock.rb")).block("rubyyell", "YellRubyBlock");

String content = asciidoctor.renderFile(
classpath.getResource("sample-with-ruby-yell-block.ad"),
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ext {
coderayGemVersion = '1.1.0'

codenarcVersion = '0.24.1'
groovyVersion = '2.4.7'
groovyVersion = '2.4.13'
erubisGemVersion = '2.7.0'
hamlGemVersion = '4.0.5'
openUriCachedGemVersion = '0.0.5'
Expand Down

0 comments on commit 7e59136

Please sign in to comment.