jruby-launcher 1.1.9-java → 1.1.10-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -1
  3. data/argparser.cpp +21 -12
  4. data/lib/jruby-launcher.rb +1 -1
  5. data/pkg/{jruby-launcher-1.1.5-java → jruby-launcher-1.1.9-java}/extconf.rb +0 -0
  6. data/pkg/{jruby-launcher-1.1.8-java → jruby-launcher-1.1.9-java}/lib/jruby-launcher.rb +1 -1
  7. data/pkg/{jruby-launcher-1.1.5-java → jruby-launcher-1.1.9-java}/lib/rubygems/defaults/jruby_native.rb +0 -0
  8. data/pkg/{jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java → jruby-launcher-1.1.9-java}/spec/launcher_spec.rb +20 -0
  9. data/pkg/{jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java → jruby-launcher-1.1.9-java}/spec/spec_helper.rb +0 -0
  10. data/spec/launcher_spec.rb +20 -0
  11. data/version.h +1 -1
  12. metadata +9 -79
  13. data/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb +0 -3
  14. data/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  15. data/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  16. data/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  17. data/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb +0 -258
  18. data/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb +0 -81
  19. data/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  20. data/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  21. data/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  22. data/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  23. data/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  24. data/pkg/jruby-launcher-1.1.7-java/extconf.rb +0 -5
  25. data/pkg/jruby-launcher-1.1.7-java/lib/jruby-launcher.rb +0 -3
  26. data/pkg/jruby-launcher-1.1.7-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  27. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/extconf.rb +0 -5
  28. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb +0 -3
  29. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  30. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  31. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  32. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  33. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  34. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  35. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb +0 -258
  36. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb +0 -81
  37. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  38. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  39. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  40. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  41. data/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  42. data/pkg/jruby-launcher-1.1.7-java/spec/launcher_spec.rb +0 -258
  43. data/pkg/jruby-launcher-1.1.7-java/spec/spec_helper.rb +0 -81
  44. data/pkg/jruby-launcher-1.1.8-java/extconf.rb +0 -5
  45. data/pkg/jruby-launcher-1.1.8-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  46. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/extconf.rb +0 -5
  47. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb +0 -3
  48. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  49. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  50. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  51. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  52. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  53. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  54. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb +0 -258
  55. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb +0 -81
  56. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  57. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  58. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  59. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  60. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  61. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/extconf.rb +0 -5
  62. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/lib/jruby-launcher.rb +0 -3
  63. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  64. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/extconf.rb +0 -5
  65. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb +0 -3
  66. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  67. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  68. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  69. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  70. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  71. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  72. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb +0 -258
  73. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb +0 -81
  74. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb +0 -5
  75. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb +0 -3
  76. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb +0 -4
  77. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb +0 -258
  78. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb +0 -81
  79. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/spec/launcher_spec.rb +0 -258
  80. data/pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/spec/spec_helper.rb +0 -81
  81. data/pkg/jruby-launcher-1.1.8-java/spec/launcher_spec.rb +0 -258
  82. data/pkg/jruby-launcher-1.1.8-java/spec/spec_helper.rb +0 -81
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a24cd17a7e856fa27004cd2ecae5be7f6fe133bec57528e9cfcdd287293eb76
4
- data.tar.gz: 7a5c616e66f9423f27ea5ed477c5500960527e84fcccb0c12fe53056959c581b
3
+ metadata.gz: 3b24c5f7f39dc16c443b3023c06d46d7c2aca8fad7b8a00df2edda6247d00873
4
+ data.tar.gz: a5f8980eac3ecf0a8aa90f9bbae75263ffbe2fd789105c29a01abf4e9e62ad18
5
5
  SHA512:
6
- metadata.gz: fc086ec3f19e35e4c70d0a8176230785cefc796032ce32f85dfc6c84e723c721e924fe6fd345a3682164e66430e6eb10f569c55342d124a1f6fd0a6dc22b5ba8
7
- data.tar.gz: 07e802263388bb7395b879beef5883189775296c07b4ab81b0a9191a560d797207ebafadb870316a261ef11f9d4b97179a7f2203f1d7089d7e7463d3f16deb54
6
+ metadata.gz: 48a8a233f7bdcf6ad4f9ed1356a5583222408913710715e6b270b9d65c005e55a89b48b6a7c94d255bdf895db592109ff5d72adbfe504ea84ad7f90b82729b20
7
+ data.tar.gz: 0cbf35cfaed6b9ff60e4bd9cbfdde9dae18434ca4004ab983a13c0a29ff94f4f1cf5aad32f7b4f476efc8405b154cd58145065a50c2ebfd3ea79b0471cc4390c
data/Rakefile CHANGED
@@ -28,7 +28,6 @@ task :gemspec => './lib/jruby-launcher.rb' do
28
28
  s.extensions = ["extconf.rb"]
29
29
  s.files = FileList["COPYING", "README.md", "Makefile", "Rakefile", "*.c", "*.cpp", "*.h", "inc/*.*", "**/*.rb", "resources/*.*"]
30
30
  s.homepage = %q{http://jruby.org}
31
- s.rubyforge_project = %q{jruby-extras}
32
31
  end
33
32
  end
34
33
 
@@ -247,6 +247,7 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
247
247
  }
248
248
  #endif
249
249
 
250
+
250
251
  // Force OpenJDK-based JVMs to use /dev/urandom for random number generation
251
252
  // See https://github.com/jruby/jruby/issues/4685 among others.
252
253
  struct stat buffer;
@@ -485,12 +486,27 @@ void ArgParser::prepareOptions() {
485
486
  option += cmdName;
486
487
  javaOptions.push_back(option);
487
488
 
488
- if (useModulePath) {
489
- // When modules are present, use module path
490
- option = OPT_CMDLINE_MODULE_PATH;
491
- option += classPath;
489
+ if (!bootClassPath.empty()) {
490
+ if (useModulePath) {
491
+ // When modules are present, use module path for the jruby libs (aka bootClassPath)
492
+ option = OPT_CMDLINE_MODULE_PATH;
493
+ } else {
494
+ option = OPT_BOOT_CLASS_PATH;
495
+ }
496
+ option += bootClassPath;
492
497
  javaOptions.push_back(option);
493
- } else if (separateProcess) {
498
+ }
499
+
500
+ if (useModulePath) {
501
+ javaOptions.push_back("--add-opens");
502
+ javaOptions.push_back("java.base/java.io=org.jruby.dist");
503
+ javaOptions.push_back("--add-opens");
504
+ javaOptions.push_back("java.base/java.nio.channels=org.jruby.dist");
505
+ javaOptions.push_back("--add-opens");
506
+ javaOptions.push_back("java.base/sun.nio.ch=org.jruby.dist");
507
+ }
508
+
509
+ if (separateProcess) {
494
510
  // When launching a separate process, use '-cp' which expands embedded wildcards
495
511
  javaOptions.push_back(OPT_CMDLINE_CLASS_PATH);
496
512
  javaOptions.push_back(classPath);
@@ -500,12 +516,6 @@ void ArgParser::prepareOptions() {
500
516
  javaOptions.push_back(option);
501
517
  }
502
518
 
503
- if (!bootClassPath.empty()) {
504
- option = OPT_BOOT_CLASS_PATH;
505
- option += bootClassPath;
506
- javaOptions.push_back(option);
507
- }
508
-
509
519
  javaOptions.insert(javaOptions.end(), userOptions.begin(), userOptions.end());
510
520
  }
511
521
 
@@ -531,7 +541,6 @@ void ArgParser::useModulesIfPresent() {
531
541
  logMsg("Unable to detect JPMS modules as JAVA_HOME is not specified");
532
542
  } else if (access((jdkhome + "/jmods").c_str(), R_OK) == 0) {
533
543
  logMsg("JPMS jmods dir detected, using module flags");
534
- noBootClassPath = 1;
535
544
  useModulePath = 1;
536
545
  }
537
546
  }
@@ -1,3 +1,3 @@
1
1
  module JRubyLauncher
2
- VERSION = "1.1.9"
2
+ VERSION = "1.1.10"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module JRubyLauncher
2
- VERSION = "1.1.9"
2
+ VERSION = "1.1.10"
3
3
  end
@@ -1,3 +1,4 @@
1
+ require 'tmpdir'
1
2
  require File.expand_path('../spec_helper.rb', __FILE__)
2
3
  load File.expand_path('../../lib/jruby-launcher.rb', __FILE__)
3
4
 
@@ -255,4 +256,23 @@ describe "JRuby native launcher" do
255
256
  it "should not crash on format-strings" do
256
257
  jruby_launcher_args("-e %s%s%s%s%s 2>&1").should include('-e', '%s%s%s%s%s')
257
258
  end
259
+
260
+ it "should use --module-path on java9+" do
261
+ Dir.mktmpdir do |java_home|
262
+ Dir.mkdir(File.join(java_home, 'jmods'))
263
+ with_environment 'JAVA_HOME' => java_home do
264
+ jruby_launcher_args('').grep(/^--module-path=.*jruby.jar/).should_not be_empty
265
+ end
266
+ end
267
+ end
268
+
269
+ it "should not treat CLASSPATH entries as modules on java9+" do
270
+ Dir.mktmpdir do |java_home|
271
+ Dir.mkdir(File.join(java_home, 'jmods'))
272
+ with_environment 'JAVA_HOME' => java_home, 'CLASSPATH' => '/some/lib.jar' do
273
+ jruby_launcher_args('').grep(/^--module-path=.*\/some\/lib.jar/).should be_empty
274
+ classpath_arg(jruby_launcher_args('')).should =~ /\/some\/lib.jar/
275
+ end
276
+ end
277
+ end
258
278
  end
@@ -1,3 +1,4 @@
1
+ require 'tmpdir'
1
2
  require File.expand_path('../spec_helper.rb', __FILE__)
2
3
  load File.expand_path('../../lib/jruby-launcher.rb', __FILE__)
3
4
 
@@ -255,4 +256,23 @@ describe "JRuby native launcher" do
255
256
  it "should not crash on format-strings" do
256
257
  jruby_launcher_args("-e %s%s%s%s%s 2>&1").should include('-e', '%s%s%s%s%s')
257
258
  end
259
+
260
+ it "should use --module-path on java9+" do
261
+ Dir.mktmpdir do |java_home|
262
+ Dir.mkdir(File.join(java_home, 'jmods'))
263
+ with_environment 'JAVA_HOME' => java_home do
264
+ jruby_launcher_args('').grep(/^--module-path=.*jruby.jar/).should_not be_empty
265
+ end
266
+ end
267
+ end
268
+
269
+ it "should not treat CLASSPATH entries as modules on java9+" do
270
+ Dir.mktmpdir do |java_home|
271
+ Dir.mkdir(File.join(java_home, 'jmods'))
272
+ with_environment 'JAVA_HOME' => java_home, 'CLASSPATH' => '/some/lib.jar' do
273
+ jruby_launcher_args('').grep(/^--module-path=.*\/some\/lib.jar/).should be_empty
274
+ classpath_arg(jruby_launcher_args('')).should =~ /\/some\/lib.jar/
275
+ end
276
+ end
277
+ end
258
278
  end
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.1.9"
9
+ #define JRUBY_LAUNCHER_VERSION "1.1.10"
10
10
 
11
11
  #endif // ! _VERSION_H_
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: java
6
6
  authors:
7
7
  - Nick Sieger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-27 00:00:00.000000000 Z
12
+ date: 2019-09-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Builds and installs a native launcher for JRuby on your system
15
15
  email:
@@ -39,81 +39,11 @@ files:
39
39
  - lib/rubygems/defaults/jruby_native.rb
40
40
  - nbexecloader.h
41
41
  - ng.c
42
- - pkg/jruby-launcher-1.1.5-java/extconf.rb
43
- - pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb
44
- - pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb
45
- - pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
46
- - pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
47
- - pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
48
- - pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
49
- - pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
50
- - pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb
51
- - pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb
52
- - pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
53
- - pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
54
- - pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
55
- - pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
56
- - pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
57
- - pkg/jruby-launcher-1.1.7-java/extconf.rb
58
- - pkg/jruby-launcher-1.1.7-java/lib/jruby-launcher.rb
59
- - pkg/jruby-launcher-1.1.7-java/lib/rubygems/defaults/jruby_native.rb
60
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/extconf.rb
61
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb
62
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb
63
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
64
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
65
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
66
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
67
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
68
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb
69
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb
70
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
71
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
72
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
73
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
74
- - pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
75
- - pkg/jruby-launcher-1.1.7-java/spec/launcher_spec.rb
76
- - pkg/jruby-launcher-1.1.7-java/spec/spec_helper.rb
77
- - pkg/jruby-launcher-1.1.8-java/extconf.rb
78
- - pkg/jruby-launcher-1.1.8-java/lib/jruby-launcher.rb
79
- - pkg/jruby-launcher-1.1.8-java/lib/rubygems/defaults/jruby_native.rb
80
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/extconf.rb
81
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb
82
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb
83
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
84
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
85
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
86
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
87
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
88
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb
89
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb
90
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
91
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
92
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
93
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
94
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
95
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/extconf.rb
96
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/lib/jruby-launcher.rb
97
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/lib/rubygems/defaults/jruby_native.rb
98
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/extconf.rb
99
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/jruby-launcher.rb
100
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/lib/rubygems/defaults/jruby_native.rb
101
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
102
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
103
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
104
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
105
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
106
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/launcher_spec.rb
107
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5-java/spec/spec_helper.rb
108
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/extconf.rb
109
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/jruby-launcher.rb
110
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/lib/rubygems/defaults/jruby_native.rb
111
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/launcher_spec.rb
112
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/pkg/jruby-launcher-1.1.5.pre-java/spec/spec_helper.rb
113
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/spec/launcher_spec.rb
114
- - pkg/jruby-launcher-1.1.8-java/pkg/jruby-launcher-1.1.7-java/spec/spec_helper.rb
115
- - pkg/jruby-launcher-1.1.8-java/spec/launcher_spec.rb
116
- - pkg/jruby-launcher-1.1.8-java/spec/spec_helper.rb
42
+ - pkg/jruby-launcher-1.1.9-java/extconf.rb
43
+ - pkg/jruby-launcher-1.1.9-java/lib/jruby-launcher.rb
44
+ - pkg/jruby-launcher-1.1.9-java/lib/rubygems/defaults/jruby_native.rb
45
+ - pkg/jruby-launcher-1.1.9-java/spec/launcher_spec.rb
46
+ - pkg/jruby-launcher-1.1.9-java/spec/spec_helper.rb
117
47
  - platformlauncher.cpp
118
48
  - platformlauncher.h
119
49
  - rb_w32_cmdvector.h
@@ -146,8 +76,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
76
  - !ruby/object:Gem::Version
147
77
  version: '0'
148
78
  requirements: []
149
- rubyforge_project: jruby-extras
150
- rubygems_version: 2.7.6
79
+ rubyforge_project:
80
+ rubygems_version: 2.7.9
151
81
  signing_key:
152
82
  specification_version: 4
153
83
  summary: Native launcher for JRuby
@@ -1,3 +0,0 @@
1
- module JRubyLauncher
2
- VERSION = "1.1.6.pre"
3
- end
@@ -1,5 +0,0 @@
1
- mf = File.read('Makefile')
2
- mf = mf.gsub(/^BINDIR\s*=.*$/, "BINDIR = #{RbConfig::CONFIG['bindir']}")
3
- mf = mf.gsub(/^PREFIX\s*=.*$/, "PREFIX = #{File.dirname(RbConfig::CONFIG['libdir'])}")
4
- puts mf
5
- File.open('Makefile', 'wb') {|f| f << mf}
@@ -1,3 +0,0 @@
1
- module JRubyLauncher
2
- VERSION = "1.1.6.pre"
3
- end
@@ -1,4 +0,0 @@
1
- class Gem::ConfigFile
2
- PLATFORM_DEFAULTS['install'] = '--no-rdoc --no-ri'
3
- PLATFORM_DEFAULTS['update'] = '--no-rdoc --no-ri'
4
- end
@@ -1,258 +0,0 @@
1
- require File.expand_path('../spec_helper.rb', __FILE__)
2
- load File.expand_path('../../lib/jruby-launcher.rb', __FILE__)
3
-
4
- describe "JRuby native launcher" do
5
- it "should run org.jruby.Main" do
6
- jruby_launcher_args("").last.should == "org/jruby/Main"
7
- end
8
-
9
- it "should pass unrecognized arguments to JRuby" do
10
- jruby_launcher_args("-J-Dsome.option -v --help")[-3..-1].should == ["org/jruby/Main", "-v", "--help"]
11
- end
12
-
13
- it "should print help message" do
14
- args = jruby_launcher_args("-Xhelp 2>&1")
15
- args.select {|l| l =~ /JRuby Launcher usage/}.should_not be_empty
16
- args.should include("-X")
17
- args = jruby_launcher_args("-X 2>&1")
18
- args.detect {|l| l =~ /JRuby Launcher usage/}.should_not be_empty
19
- args.should include("-X")
20
- end
21
-
22
- it "should use $JAVACMD when JAVACMD is specified" do
23
- with_environment "JAVACMD" => File.join("jato") do
24
- if windows?
25
- jruby_launcher_args("-v 2>&1").join.should =~ %r{jato}
26
- else
27
- jruby_launcher_args("-v").first.should == File.join("jato")
28
- end
29
- end
30
- end
31
-
32
- it "should use $JAVA_HOME/bin/java when JAVA_HOME is specified" do
33
- with_environment "JAVA_HOME" => File.join("some", "java", "home") do
34
- if windows?
35
- jruby_launcher_args("-v 2>&1").join.should =~ %r{some/java/home}
36
- else
37
- jruby_launcher_args("-v").first.should == File.join("some", "java", "home", "bin", "java")
38
- end
39
- end
40
- end
41
-
42
- it "should use -Xjdkhome argument above JAVA_HOME" do
43
- with_environment "JAVA_HOME" => File.join("env", "java", "home") do
44
- if windows?
45
- jruby_launcher_args("-Xjdkhome some/java/home 2>&1").join.should =~ %r{some/java/home}
46
- else
47
- jruby_launcher_args("-Xjdkhome some/java/home").first.should == File.join("some", "java", "home", "bin", "java")
48
- end
49
- end
50
- end
51
-
52
- it "should drop the backslashes at the end of JAVA_HOME" do
53
- with_environment "JAVA_HOME" => File.join("some", "java", "home\\\\") do
54
- if windows?
55
- jruby_launcher_args("").join.should =~ %r{some/java/home}
56
- else
57
- jruby_launcher_args("").first.should == File.join("some", "java", "home", "bin", "java")
58
- end
59
- end
60
- end
61
-
62
- it "should complain about a missing log argument" do
63
- jruby_launcher("-Xtrace 2>&1").should =~ /Argument is missing for "-Xtrace"/
64
- jruby_launcher("-Xtrace -- 2>&1").should =~ /Argument is missing for "-Xtrace"/
65
- end
66
-
67
- it "should complain about a missing jdkhome argument" do
68
- jruby_launcher("-Xjdkhome 2>&1").should =~ /Argument is missing/
69
- jruby_launcher("-Xjdkhome -- 2>&1").should =~ /Argument is missing/
70
- end
71
-
72
- it "should complain about a missing classpath append argument" do
73
- jruby_launcher("-Xcp:a 2>&1").should =~ /Argument is missing/
74
- jruby_launcher("-Xcp:a -- 2>&1").should =~ /Argument is missing/
75
- end
76
-
77
- it "should run nailgun server with --ng-server option" do
78
- jruby_launcher_args("--ng-server").last.should == "com/martiansoftware/nailgun/NGServer"
79
- end
80
-
81
- it "should run nailgun client with --ng option" do
82
- jruby_launcher_args('--ng -e "puts 1"').should == ["org.jruby.util.NailMain", "-e", "puts 1"]
83
- end
84
-
85
- it "should handle -J JVM options" do
86
- jruby_launcher_args("-J-Darg1=value1 -J-Darg2=value2").should include("-Darg1=value1", "-Darg2=value2")
87
- end
88
-
89
- it "should pass -Xprop.erty=value as -J-Djruby.prop.erty=value" do
90
- jruby_launcher_args("-Xprop.erty=value").should include("-Djruby.prop.erty=value")
91
- end
92
-
93
- it "should pass -Xproperties as --properties" do
94
- jruby_launcher_args("-Xproperties").should include("--properties")
95
- end
96
-
97
- it "should allow max heap to be overridden" do
98
- jruby_launcher_args("-J-Xmx256m").should include("-Xmx256m")
99
- end
100
-
101
- it "should default to 2048k max stack" do
102
- jruby_launcher_args("").should include("-Xss2048k")
103
- end
104
-
105
- it "should allow max stack to be overridden" do
106
- jruby_launcher_args("-J-Xss512k").should include("-Xss512k")
107
- end
108
-
109
- it "should add the contents of the CLASSPATH environment variable" do
110
- with_environment "CLASSPATH" => "some.jar" do
111
- classpath_arg(jruby_launcher_args("")).should =~ /some.jar/
112
- end
113
- end
114
-
115
- it "should add the classpath elements in proper order" do
116
- s = File::PATH_SEPARATOR
117
- with_environment "CLASSPATH" => "some-env.jar" do
118
- args = jruby_launcher_args("-Xcp:a some-other.jar -Xcp:p some.jar")
119
- classpath_arg(args).should =~ /some.jar.*#{s}some-env.jar#{s}some-other.jar/
120
- end
121
- end
122
-
123
- it "should use the --server compiler" do
124
- jruby_launcher_args("--server").should include("-server")
125
- end
126
-
127
- it "should use the --client compiler" do
128
- jruby_launcher_args("--client").should include("-client")
129
- end
130
-
131
- it "should set the JMX settings when --manage is present" do
132
- jruby_launcher_args("--manage").should include("-Dcom.sun.management.jmxremote", "-Djruby.management.enabled=true")
133
- end
134
-
135
- it "should set the headless flag when --headless is present" do
136
- jruby_launcher_args("--headless").should include("-Djava.awt.headless=true")
137
- end
138
-
139
- it "should pass -Xprof when --sample is present" do
140
- jruby_launcher_args("--sample").should include("-Xprof")
141
- end
142
-
143
- it "should stop argument processing when a -- is seen" do
144
- jruby_launcher_args("-- -Xhelp -Xtrace --headless").should include("-Xhelp", "-Xtrace", "--headless")
145
- end
146
-
147
- # JRUBY-4151
148
- it "should properly handle single quotes" do
149
- jruby_launcher_args("-e 'ABC DEF'").should include("ABC DEF")
150
- end
151
-
152
- # JRUBY-4581
153
- it "should prepend JRUBY_OPTS to the start of the argument list to process" do
154
- with_environment "JRUBY_OPTS" => "--server -J-Dsome.key=val -rubygems" do
155
- jruby_launcher_args("-e 'ABC DEF'").should include("-server", "-Dsome.key=val", "-rubygems", "-e", "ABC DEF")
156
- end
157
- end
158
-
159
- # JRUBY-4611
160
- it "stops argument processing on first non-option argument" do
161
- jruby_launcher_args("foo.rb --sample")[-2..-1].should == ["foo.rb", "--sample"]
162
- end
163
-
164
- # JRUBY-4608
165
- if RbConfig::CONFIG['target_os'] =~ /darwin/i
166
- it "includes file.encoding=UTF-8 on Mac if JAVA_ENCODING is not set" do
167
- jruby_launcher_args("-e true").should include("-Dfile.encoding=UTF-8")
168
- with_environment "JAVA_ENCODING" => "MacRoman" do
169
- jruby_launcher_args("-e true").should_not include("-Dfile.encoding=UTF-8")
170
- end
171
- end
172
- end
173
-
174
- it "does not crash on empty args" do
175
- jruby_launcher_args("-e ''").should include("-e")
176
- jruby_launcher("-Xtrace '' 2>&1").should =~ /-Xtrace/
177
- jruby_launcher("-Xjdkhome '' 2>&1").should =~ /-Xjdkhome/
178
- end
179
-
180
- # JRUBY-4706
181
- it "should put JRuby on regular classpath when -Xnobootclasspath is used" do
182
- args = jruby_launcher_args("-e true")
183
- args.grep(/Xbootclasspath/).should_not be_empty
184
- args = jruby_launcher_args("-Xnobootclasspath -e true")
185
- args.grep(/Xbootclasspath/).should be_empty
186
- end
187
-
188
- it "should put JRuby on regular classpath when VERIFY_JRUBY is set" do
189
- with_environment "VERIFY_JRUBY" => "true" do
190
- args = jruby_launcher_args("-e true")
191
- args.grep(/Xbootclasspath/).should be_empty
192
- end
193
- end
194
-
195
- # JRUBY-4709
196
- it "should include a bare : or ; at the end of the classpath, to include PWD in the path" do
197
- classpath_arg(jruby_launcher_args("-Xnobootclasspath -e true")).should =~
198
- if windows?
199
- /;$/
200
- else
201
- /:$/
202
- end
203
- end
204
-
205
- # JRUBY-6016
206
- it "should honor JAVA_MEM" do
207
- with_environment "JAVA_MEM" => "-Xmx768m" do
208
- jruby_launcher_args("").should include("-Xmx768m")
209
- end
210
- end
211
-
212
- it "should honor JAVA_STACK" do
213
- with_environment "JAVA_STACK" => "-Xss3072k" do
214
- jruby_launcher_args("").should include("-Xss3072k")
215
- end
216
- end
217
-
218
- it "should honor JRUBY_HOME" do
219
- with_environment "JRUBY_HOME" => "/tmp" do
220
- jruby_launcher_args("").should include("-Djruby.home=/tmp")
221
- end
222
- end
223
-
224
- context "JRUBY_HOME set and JRUBY_HOME/lib/jruby.jar exists" do
225
- let(:jruby_home) do
226
- require 'tempfile'
227
- t = Tempfile.new("jruby_home")
228
- t.path.tap { t.close! }
229
- end
230
-
231
- before do
232
- FileUtils.mkdir_p(File.join(jruby_home, "lib"))
233
- FileUtils.touch(File.join(jruby_home, "lib", "jruby.jar"))
234
- end
235
- after { FileUtils.rm_rf jruby_home }
236
-
237
- it "should add jruby.jar to the bootclasspath" do
238
- with_environment "JRUBY_HOME" => jruby_home do
239
- jruby_launcher_args("").should include("-Xbootclasspath/a:#{jruby_home}/lib/jruby.jar")
240
- end
241
- end
242
- end
243
-
244
- it "should place user-supplied options after default options" do
245
- args = jruby_launcher_args("-J-Djruby.home=/tmp")
246
- home_args = args.select {|x| x =~ /^-Djruby\.home/ }
247
- home_args.length.should == 2
248
- home_args.last.should == "-Djruby.home=/tmp"
249
- end
250
-
251
- it "should print the version" do
252
- jruby_launcher("-Xversion 2>&1").should =~ /Launcher Version #{JRubyLauncher::VERSION}/
253
- end
254
-
255
- it "should not crash on format-strings" do
256
- jruby_launcher_args("-e %s%s%s%s%s 2>&1").should include('-e', '%s%s%s%s%s')
257
- end
258
- end