diff --git a/Gemfile b/Gemfile index 8d93ebc..ba9393b 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,9 @@ source 'http://rubygems.org' # Specify your gem's dependencies in child_process.gemspec gemspec +# Used for local development/testing only +gem 'rake' + if RUBY_VERSION =~ /^1\./ gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version diff --git a/README.md b/README.md index 952fc00..3875914 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ a standalone library. * Ruby 2.3+, JRuby 9+ +Windows users **must** ensure the `ffi` gem (`>= 1.0.11`) is installed in order to use ChildProcess. + # Usage The object returned from `ChildProcess.build` will implement `ChildProcess::AbstractProcess`. diff --git a/childprocess.gemspec b/childprocess.gemspec index d52c2b1..2825838 100644 --- a/childprocess.gemspec +++ b/childprocess.gemspec @@ -23,9 +23,4 @@ Gem::Specification.new do |s| s.add_development_dependency "rspec", "~> 3.0" s.add_development_dependency "yard", "~> 0.0" s.add_development_dependency 'coveralls', '< 1.0' - - s.add_runtime_dependency 'rake', '< 13.0' - - # Install FFI gem if we're running on Windows - s.extensions = 'ext/mkrf_conf.rb' end diff --git a/ext/mkrf_conf.rb b/ext/mkrf_conf.rb deleted file mode 100644 index 74e2266..0000000 --- a/ext/mkrf_conf.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Based on the example from https://en.wikibooks.org/wiki/Ruby_Programming/RubyGems#How_to_install_different_versions_of_gems_depending_on_which_version_of_ruby_the_installee_is_using -require 'rubygems' -require 'rubygems/command.rb' -require 'rubygems/dependency_installer.rb' - -begin - Gem::Command.build_args = ARGV -rescue NoMethodError # rubocop:disable Lint/HandleExceptions -end - -inst = Gem::DependencyInstaller.new - -begin - if Gem.win_platform? - inst.install 'ffi', Gem::Requirement.new('~> 1.0', '>= 1.0.11') - end -rescue # rubocop:disable Lint/RescueWithoutErrorClass - exit(1) -end - - # create dummy rakefile to indicate success -File.open(File.join(File.dirname(__FILE__), 'Rakefile'), 'w') do |f| - f.write("task :default\n") -end