From 92da224d228be6a38b5e86ea43290e6e5a33df45 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Jan 2020 17:19:42 +0900 Subject: [ruby/io-console] Delegate to JRuby version Add `--platform` option tentatively. https://github.com/ruby/io-console/commit/3bf1a7b753 --- ext/io/console/io-console.gemspec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ext/io/console/io-console.gemspec') diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec index 8a0df83b2c..49c9b3ae40 100644 --- a/ext/io/console/io-console.gemspec +++ b/ext/io/console/io-console.gemspec @@ -21,5 +21,20 @@ Gem::Specification.new do |s| lib/io/console/size.rb ] s.extensions = %w[ext/io/console/extconf.rb] + + if i = ARGV.index("--") and !(argv = ARGV[i+1..-1]).empty? + OptionParser.new(__FILE__) do |opt| + opt.on("--platform=PLATFORM") {|p| s.platform = p} + end.parse!(argv) + end + if Gem::Platform === s.platform and s.platform =~ 'java' + s.files.delete_if {|f| f.start_with?("ext/")} + s.extensions.clear + s.require_paths.unshift("jruby") + s.files.concat(%w[ + jruby/io/console.rb + ]) + end + s.licenses = ["Ruby", "BSD-2-Clause"] end -- cgit v1.2.3