Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
enkessler committed Mar 10, 2018
2 parents 16c30fc + 9ca62d3 commit c005912
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 7 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3.5
- 2.4.0
- 2.3
- 2.4
- 2.5
- ruby-head

sudo: true # Necessary to fix JRuby
Expand All @@ -34,3 +35,10 @@ matrix:
- rvm: jruby-9.1.9.0
- rvm: ruby-head
- env: "CHILDPROCESS_POSIX_SPAWN=true"
exclude:
# Travis does not provide 1.9.3 on OSX
- rvm: 1.9.3
os: osx
# Travis does not provide 2.0.0 on it latest version of OSX
- rvm: 2.0.0
os: osx
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
### Version 0.9.0 / 2018-03-10

* Added support for DragonFly BSD.


### Version 0.8.0 / 2017-09-23

* Added a method for determining whether or nto a process had been started.
* Added a method for determining whether or not a process had been started.


### Version 0.7.1 / 2017-06-26
Expand Down Expand Up @@ -30,7 +35,7 @@ See beta release notes.

### Version 0.6.1 / 2017-01-22

* Bug fix: Fixed a dependency that was accidentally declared as a runtime
* Bug fix: Fixed a dependency that was accidentally declared as a runtime
dependency instead of a development dependency.


Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ a standalone library.
[![Code Climate](https://codeclimate.com/github/enkessler/childprocess.svg)](https://codeclimate.com/github/enkessler/childprocess)
[![Coverage Status](https://coveralls.io/repos/enkessler/childprocess/badge.svg?branch=master)](https://coveralls.io/r/enkessler/childprocess?branch=master)

***
**This project currently needs a new maintainer. If anyone is interested, please contact me, [enkessler](https://github.com/enkessler).**
***

# Usage

The object returned from `ChildProcess.build` will implement `ChildProcess::AbstractProcess`.
Expand Down
19 changes: 18 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,24 @@ environment:
- CHILDPROCESS_POSIX_SPAWN: false
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 22-x64

- CHILDPROCESS_POSIX_SPAWN: true
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 23-x64
- CHILDPROCESS_POSIX_SPAWN: false
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 23-x64
- CHILDPROCESS_POSIX_SPAWN: true
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 24-x64
- CHILDPROCESS_POSIX_SPAWN: false
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 24-x64
- CHILDPROCESS_POSIX_SPAWN: true
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 25-x64
- CHILDPROCESS_POSIX_SPAWN: false
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 25-x64

install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
Expand Down
2 changes: 1 addition & 1 deletion lib/childprocess.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def os
:cygwin
when /solaris|sunos/
:solaris
when /bsd/
when /bsd|dragonfly/
:bsd
when /aix/
:aix
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 = '0.8.0'
VERSION = '0.9.0'
end
31 changes: 31 additions & 0 deletions spec/childprocess_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,37 @@
expect(proc).to be_exited
end

describe 'OS detection' do

before(:all) do
# Save off original OS so that it can be restored later
@original_host_os = RbConfig::CONFIG['host_os']
end

after(:each) do
# Restore things to the real OS instead of the fake test OS
RbConfig::CONFIG['host_os'] = @original_host_os
ChildProcess.instance_variable_set(:@os, nil)
end


# TODO: add tests for other OSs
context 'on a BSD system' do

let(:bsd_patterns) { ['bsd', 'dragonfly'] }

it 'correctly identifies BSD systems' do
bsd_patterns.each do |pattern|
RbConfig::CONFIG['host_os'] = pattern
ChildProcess.instance_variable_set(:@os, nil)

expect(ChildProcess.os).to eq(:bsd)
end
end

end

end

it 'has a logger' do
expect(ChildProcess).to respond_to(:logger)
Expand Down

0 comments on commit c005912

Please sign in to comment.