rake-compiler 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66a05703cce796eea6b36e8666adaa6d983b090954babf81a9ad9207e2c30491
4
- data.tar.gz: e2a76f29210adc2fd8d2edeaeef3219856c868e1841793e800e80b8e7c77de5e
3
+ metadata.gz: 696eb29e8948609214395ddd4f48dc06dbb543699028810d1c971b421685beaa
4
+ data.tar.gz: 9c0947de89692e13350adee50106bdf5234d22a1c477a674e1a832a259b8c5f8
5
5
  SHA512:
6
- metadata.gz: 18c48fa7c58ec123a34e570df747cd94397e2941d595f0e081c2b66a0868fd05abc409ad4287b7fea8a34e0767397ec5af12c61a0b9aec4bc9861900988bf32b
7
- data.tar.gz: 2e0cbef56d9f8e22ebfd29b0bc56f7f398ba60f1985f1d98bff5ecd026d9bc1c71293ea333c4c195915fff988d0ed123f287754e037fad4ae55de7a01d063229
6
+ metadata.gz: e610e8f25275813ac474c116dd2d0767b53fd5bd4f1e3cd45004a4b0749708850cca8f3da4c1658f0b71c71b3298ad15ec620b55a17434dd520c4071c948395d
7
+ data.tar.gz: de264d6dcf8c7f95e7a47a8f8c74d7422cb6b9f95727e42f1590d1e361ccee1b6b505214880211306efb6a161dde0be4666e7d1fd0cffbdb040af9726211a677
@@ -1,3 +1,10 @@
1
+ === 1.0.7 / 2019-01-04
2
+
3
+ * Bugfixes:
4
+ * Fix a bug that JRuby class path detection is failed on
5
+ cross-compilation.
6
+ #149 #151 [Reported by Chalupa Petr][Patch by Prashant Vithani]
7
+
1
8
  === 1.0.6 / 2018-12-23
2
9
 
3
10
  * Enhancements:
@@ -212,13 +212,34 @@ execute the Rake compilation task using the JRuby interpreter.
212
212
  rescue => e
213
213
  end
214
214
  end
215
+
216
+ # jruby_cpath might not be present from Java-9 onwards as it removes
217
+ # sun.boot.class.path. Check if JRUBY_HOME is set as env variable and try
218
+ # to find jruby.jar under JRUBY_HOME
219
+ unless jruby_cpath
220
+ jruby_home = ENV['JRUBY_HOME']
221
+ if jruby_home
222
+ candidate = File.join(jruby_home, 'lib', 'jruby.jar')
223
+ jruby_cpath = candidate if File.exist?(candidate)
224
+ end
225
+ end
226
+
227
+ # JRUBY_HOME is not necessarily set in JRuby-9.x
228
+ # Find the libdir from RbConfig::CONFIG and find jruby.jar under the
229
+ # found lib path
215
230
  unless jruby_cpath
216
231
  libdir = RbConfig::CONFIG['libdir']
217
- if libdir.start_with? "classpath:"
218
- raise 'Cannot build with jruby-complete'
232
+ if libdir.start_with?("uri:classloader:")
233
+ raise 'Cannot build with jruby-complete from Java 9 onwards'
219
234
  end
220
- jruby_cpath = File.join(libdir, "jruby.jar")
235
+ candidate = File.join(libdir, "jruby.jar")
236
+ jruby_cpath = candidate if File.exist?(candidate)
221
237
  end
238
+
239
+ unless jruby_cpath
240
+ raise "Could not find jruby.jar. Please set JRUBY_HOME or use jruby in rvm"
241
+ end
242
+
222
243
  jruby_cpath += File::PATH_SEPARATOR + args.join(File::PATH_SEPARATOR) unless args.empty?
223
244
  jruby_cpath ? "-cp \"#{jruby_cpath}\"" : ""
224
245
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-23 00:00:00.000000000 Z
12
+ date: 2019-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: 1.8.23
147
147
  requirements: []
148
- rubygems_version: 3.0.1
148
+ rubygems_version: 3.0.2
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Rake-based Ruby Extension (C, Java) task generator.