jruby-launcher 1.0.5-java → 1.0.6-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2009-2010 JRuby Team (www.jruby.org).
2
+ * Copyright 2009-2011 JRuby Team (www.jruby.org).
3
3
  */
4
4
 
5
5
  #include <cstring>
@@ -23,8 +23,8 @@ using namespace std;
23
23
 
24
24
  const char *ArgParser::HELP_MSG =
25
25
  "JRuby Launcher usage: jruby" EXEEXT " {options} arguments\n\n\
26
+ To see general JRuby options, type 'jruby -h' or 'jruby --help'.\n\n\
26
27
  Options:\n\
27
- -Xhelp show this help\n\
28
28
  -Xversion print launcher's version\n\
29
29
  \nJvm Management:\n\
30
30
  -Xjdkhome <path> set path to JDK\n\
@@ -37,13 +37,14 @@ Options:\n\
37
37
  -Xnobootclasspath don't put jruby jars on the bootclasspath\n\
38
38
  \nMisc:\n\
39
39
  -Xtrace <path> path for launcher log (for troubleshooting)\n\
40
- -Xcommand just print the equivalent java command and exit\n\
40
+ -Xcommand just print the equivalent java command and exit\n\n\
41
41
  -Xprop.erty[=value] equivalent to -J-Djruby.<prop.erty>[=value]\n\
42
42
  -Xproperties list supported properties (omit \"jruby.\" with -X)\n"
43
43
  #ifdef WIN32
44
- " -Xconsole <mode> jrubyw console attach mode (new|attach|suppress)\n\n"
44
+ " -Xconsole <mode> jrubyw console attach mode (new|attach|suppress)\n"
45
45
  #endif
46
- "To see general JRuby options, type 'jruby -h' or 'jruby --help'.\n";
46
+ "\n"
47
+ ;
47
48
 
48
49
  const char *ArgParser::REQ_JAVA_VERSION = "1.5";
49
50
 
@@ -309,11 +310,15 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
309
310
  noBootClassPath = true;
310
311
  }
311
312
  javaOptions.push_back(javaOpt);
312
- } else if (strcmp(it->c_str(), "-Xhelp") == 0) {
313
+ } else if (strcmp(it->c_str(), "-Xhelp") == 0 || strcmp(it->c_str(), "-X") == 0) {
313
314
  printToConsole(HELP_MSG);
314
315
  if (!appendHelp.empty()) {
315
316
  printToConsole(appendHelp.c_str());
316
317
  }
318
+ javaOptions.push_back("-Djruby.launcher.nopreamble=true");
319
+ progArgs.push_back("-X");
320
+ } else if (strcmp(it->c_str(), "-Xversion") == 0) {
321
+ printToConsole("JRuby Launcher Version " JRUBY_LAUNCHER_VERSION "\n");
317
322
  return false;
318
323
  } else if (strcmp(it->c_str(), "-Xversion") == 0) {
319
324
  printToConsole("JRuby Launcher Version " JRUBY_LAUNCHER_VERSION "\n");
@@ -419,8 +424,8 @@ void ArgParser::prepareOptions() {
419
424
  }
420
425
 
421
426
  void ArgParser::setupMaxHeapAndStack() {
422
- // Hard-coded 500m, 1024k is for consistency with jruby shell script.
423
- string heapSize("500m"), stackSize("1024k");
427
+ // Hard-coded 500m, 2048k is for consistency with jruby shell script.
428
+ string heapSize("500m"), stackSize("2048k");
424
429
  bool maxHeap = false, maxStack = false;
425
430
  for (list<string>::iterator it = javaOptions.begin(); it != javaOptions.end(); it++) {
426
431
  if (!maxHeap && strncmp("-Xmx", it->c_str(), 4) == 0) {
@@ -1,3 +1,3 @@
1
1
  module JRubyLauncher
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  class Gem::ConfigFile
2
- PLATFORM_DEFAULTS.delete('install')
3
- PLATFORM_DEFAULTS.delete('update')
2
+ PLATFORM_DEFAULTS['install'] = '--no-rdoc --no-ri'
3
+ PLATFORM_DEFAULTS['update'] = '--no-rdoc --no-ri'
4
4
  end
@@ -10,7 +10,12 @@ describe "JRuby native launcher" do
10
10
  end
11
11
 
12
12
  it "should print help message" do
13
- jruby_launcher("-Xhelp 2>&1").should =~ /JRuby Launcher usage/
13
+ args = jruby_launcher_args("-Xhelp 2>&1")
14
+ args.detect{|l| l =~ /JRuby Launcher usage/}.should be_true
15
+ args[-1].should == "-X"
16
+ args = jruby_launcher_args("-X 2>&1")
17
+ args.detect{|l| l =~ /JRuby Launcher usage/}.should be_true
18
+ args[-1].should == "-X"
14
19
  end
15
20
 
16
21
  it "should use $JAVACMD when JAVACMD is specified" do
@@ -86,8 +91,8 @@ describe "JRuby native launcher" do
86
91
  jruby_launcher_args("-J-Xmx256m").should include("-Xmx256m", "-Djruby.memory.max=256m")
87
92
  end
88
93
 
89
- it "should default to 1024k max stack" do
90
- jruby_launcher_args("").should include("-Xss1024k", "-Djruby.stack.max=1024k")
94
+ it "should default to 2048k max stack" do
95
+ jruby_launcher_args("").should include("-Xss2048k", "-Djruby.stack.max=2048k")
91
96
  end
92
97
 
93
98
  it "should allow max stack to be overridden" do
data/version.h CHANGED
@@ -6,6 +6,6 @@
6
6
  #ifndef _VERSION_H_
7
7
  #define _VERSION_H_
8
8
 
9
- #define JRUBY_LAUNCHER_VERSION "1.0.5"
9
+ #define JRUBY_LAUNCHER_VERSION "1.0.6"
10
10
 
11
11
  #endif // ! _VERSION_H_
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 5
9
- version: 1.0.5
8
+ - 6
9
+ version: 1.0.6
10
10
  platform: java
11
11
  authors:
12
12
  - Nick Sieger
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-11 00:00:00 -06:00
18
+ date: 2011-01-27 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies: []
21
21