Manually bootstrap JRuby after all.

After discussing this with @headius I've decided to do this the manual way
anyway. Apparently the basic load service stuff is deprecated and not very
reliable.
This commit is contained in:
Yorick Peterse committed 2014-05-07 22:32:34 +02:00
1 parent 90fabe3f21
commit fe74d60138
3 files changed
+18 -38

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
package org.liboga;
import org.jruby.Ruby;
public class Liboga
{
/**
* Bootstraps the JRuby extension.
*/
public static void load(final Ruby runtime)
{
org.liboga.xml.Lexer.load(runtime);
}
}
-31
View File
@@ -1,31 +0,0 @@
import java.io.IOException;
import org.jruby.Ruby;
import org.jruby.RubyModule;
import org.jruby.RubyClass;
import org.jruby.runtime.load.BasicLibraryService;
import org.jruby.runtime.load.Library;
public class LibogaService implements BasicLibraryService
{
/**
* Bootstraps the JRuby extension.
*
* In order to load this extension properly you have to make sure that the
* lib/ directory is in the Ruby load path. If this is the case you can
* load it as following:
*
* require 'liboga'
*
* Using absolute paths (e.g. with `require_relative`) requires you to
* manually call this method:
*
* LibogaService.new.basicLoad(JRuby.runtime)
*/
public boolean basicLoad(final Ruby runtime) throws IOException
{
org.liboga.xml.Lexer.load(runtime);
return true;
}
}