make the jruby gem extension more java like. I just want to follow the way dropwizard "adds" their services to a jar file https://github.com/dropwizard/dropwizard/blob/master/dropwizard-metrics/src/main/resources/META-INF/services/io.dropwizard.metrics.ReporterFactory
- a jar with jruby extension has a file META-INF/services/org.jruby.Extension
- the file contains a list of class files which shall be loaded. assuming the loading of the class does activate the JRuby extension
example lib/ruby/shared/json/ext/parser.jar has the file META-INF/services/org.jruby.Extension with content
adding a jar to the jruby-classloader (via require or via $CLASSPATH << 'my.jar' will just do something along those lines to load the actual extension
for ( url : runtime.getJRubyClassLoader().getResources( "META-INF/services/org.jruby.Extension" ) ) {
for (line : loadUrl( url ) {
runtime.getJRubyClassLoader().loadClass( line );
}
}
whether to keep a list of already loaded extension may or may not be needed.
make the jruby gem extension more java like. I just want to follow the way dropwizard "adds" their services to a jar file https://github.com/dropwizard/dropwizard/blob/master/dropwizard-metrics/src/main/resources/META-INF/services/io.dropwizard.metrics.ReporterFactory
example lib/ruby/shared/json/ext/parser.jar has the file META-INF/services/org.jruby.Extension with content
adding a jar to the jruby-classloader (via require or via
$CLASSPATH << 'my.jar'will just do something along those lines to load the actual extensionwhether to keep a list of already loaded extension may or may not be needed.