Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ffi conditional install on Windows platforms #160

Merged
merged 4 commits into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### dev (unreleased)

* Remove extension to conditionally install `ffi` gem on Windows platforms
* Remove runtime dependency on `rake` gem
* Remove unused `rubyforge_project` from gemspec

### Version 2.0.0 / 2019-07-11

* [#148](https://github.com/enkessler/childprocess/pull/148): Drop support for Ruby 2.0, 2.1, and 2.2
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
5 changes: 0 additions & 5 deletions childprocess.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 0 additions & 24 deletions ext/mkrf_conf.rb

This file was deleted.

4 changes: 2 additions & 2 deletions lib/childprocess/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class LaunchError < Error

class MissingFFIError < Error
def initialize
message = "FFI is a required pre-requisite for posix_spawn, falling back to default implementation. " +
"Please add it to your deployment to unlock this functionality. " +
message = "FFI is a required pre-requisite for Windows or posix_spawn support in the ChildProcess gem. " +
"Ensure the `ffi` gem is installed. " +
"If you believe this is an error, please file a bug at http://github.com/enkessler/childprocess/issues"

super(message)
Expand Down
2 changes: 1 addition & 1 deletion lib/childprocess/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ChildProcess
VERSION = '2.0.0'
VERSION = '3.0.0'
end
7 changes: 6 additions & 1 deletion lib/childprocess/windows.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require "ffi"
require "rbconfig"

begin
require 'ffi'
rescue LoadError
raise ChildProcess::MissingFFIError
end

module ChildProcess
module Windows
module Lib
Expand Down