Skip to content
This repository was archived by the owner on May 19, 2019. It is now read-only.

Commit ad1ff9b

Browse files
committed
Added TODO notes
1 parent 8a4f659 commit ad1ff9b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/main/resources/META-INF/gradle-plugins/bootstrap.java.template

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,39 @@ package com.github.jrubygradle.jar.bootstrap;
22

33
import org.jruby.embed.ScriptingContainer;
44
import static org.jruby.embed.PathType.*;
5+
import org.jruby.CompatVersion;
56

67
class JarMain {
78

89
private JarMain(String[] args) throws Exception {
910
container = new ScriptingContainer();
1011
container.setArgv(args);
12+
13+
// TODO: Do we need to do anything extra for load paths ?
1114
// List<String> loadPaths = new ArrayList();
1215
// loadPaths.add(jrubyhome);
13-
// Ruby Version
14-
// container.setCompatVersion(CompatVersion.%%RUBY_COMPAT_VERSION%%);
15-
// RubyInstanceConfig config = container.getProvider().getRubyInstanceConfig();
1616

17+
// TODO: Allow compatinility version to be set
18+
// CompatVersion cv = CompatVersion.getVersionFromString("%%RUBY_COMPAT_VERSION%%");
19+
// if(cv != null) {
20+
// container.setCompatVersion(cv);
21+
// }
22+
23+
// TODO: Do we need to do seomthign extra for environment control?
1724
// container.setEnvironment(Map environment)
1825

1926
}
2027

2128
private int run() {
2229
try {
23-
Object outcome = container.runScriptlet(LAUNCH_SCRIPT /*, RELATIVE|CLASSPATH */ );
30+
Object outcome = container.runScriptlet(LAUNCH_SCRIPT);
2431
return ( outcome instanceof Number ) ? ( (Number) outcome ).intValue() : 0;
2532
} finally {
2633
container.terminate();
2734
}
2835
}
2936

37+
// TODO. Allow this to be changes via a system property at run-time
3038
private static final String LAUNCH_SCRIPT = "load '%%LAUNCH_SCRIPT%%'";
3139

3240
private ScriptingContainer container;

0 commit comments

Comments
 (0)