Incorporate features from Sergio Oliveria's JRubyInterpreter into JavaEmbedUtils
--------------------------------------------------------------------------------
Key: JRUBY-3216
URL: http://jira.codehaus.org/browse/JRUBY-3216
Project: JRuby
Issue Type: New Feature
Reporter: Charles Oliver Nutter
Assignee: Thomas E Enebo
Fix For: JRuby 1.1.7
See what Sergio has put together here. I'd rather not have a proliferation of
different interfaces if we can make one true interface to rule them all.
{noformat}
Plug and Play JRuby: http://recipes.mentaframework.org/posts/list/61.page
I have recently worked with JRuby to make the Mentawai support for the Ruby
language. I wanted to call any Ruby code from my web application as well as be
able to have actions fully implemented in Ruby. I also wanted to have a special
directory where any Ruby file would be reloaded when modified. JRuby was up for
the task and I have decided to offer my solution as a standalone library so
that other people can easily leverage all the power of JRuby in a simple plug
and play Java class.
The features of my JRubyInterpreter class are:
- Simple API to call ruby methods on any Ruby object from Java
- JRubyWrapper for making ruby method calls even easier
- Auto-reload any ruby file from the loadpath
- Load any ruby file from the classpath (even from jars) with the
loadFromClasspath method
- Get a singleton instance of the JRubyInterpreter anywhere in your code with
the JRubyInterpreter.getInstance() method
- Support all JRuby environment variables and provide defaults for them. Ex:
JRUBY_OPTS for -rubygems and -Ku , JRUBY_SHELL, JRUBY_SCRIPT, JRUBY_LIB and
JRUBY_HOME.
- Windows and Linux support
Code speaks better than 1000 words, so here are an example:
http://recipes.mentaframework.org/posts/list/61.page
Please feel free to reply with comments, suggestions and improvements.
-Sergio Oliveira Jr.
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email