childprocess 0.8.0 → 0.9.0
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 +4 -4
- data/.travis.yml +10 -2
- data/CHANGELOG.md +7 -2
- data/README.md +5 -1
- data/appveyor.yml +18 -1
- data/lib/childprocess.rb +1 -1
- data/lib/childprocess/version.rb +1 -1
- data/spec/childprocess_spec.rb +31 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f7bcd4a74bf8315015b61ff4a5dcf5774fec372
|
4
|
+
data.tar.gz: ebb386c0ffd4b05121cbc8c3f18ded1d8721552b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 264821e0ea3147f6d19f63d76f5e290462e0ae8991d6858839b949a470f8ef173b716f5000f24fdfe9b86446eab1da593e7ad81e7cac83880fa7af81e7441563
|
7
|
+
data.tar.gz: 26f5534f0cb73ad3482e513706ca7a53d87c7f610efeaf09f64f0c4205b293db565548c097290d27a4b49a2b831f9593edbfc4cf7c0da73903d05c1c3fd98b23
|
data/.travis.yml
CHANGED
@@ -9,8 +9,9 @@ rvm:
|
|
9
9
|
- 2.0.0
|
10
10
|
- 2.1
|
11
11
|
- 2.2
|
12
|
-
- 2.3
|
13
|
-
- 2.4
|
12
|
+
- 2.3
|
13
|
+
- 2.4
|
14
|
+
- 2.5
|
14
15
|
- ruby-head
|
15
16
|
|
16
17
|
sudo: true # Necessary to fix JRuby
|
@@ -34,3 +35,10 @@ matrix:
|
|
34
35
|
- rvm: jruby-9.1.9.0
|
35
36
|
- rvm: ruby-head
|
36
37
|
- env: "CHILDPROCESS_POSIX_SPAWN=true"
|
38
|
+
exclude:
|
39
|
+
# Travis does not provide 1.9.3 on OSX
|
40
|
+
- rvm: 1.9.3
|
41
|
+
os: osx
|
42
|
+
# Travis does not provide 2.0.0 on it latest version of OSX
|
43
|
+
- rvm: 2.0.0
|
44
|
+
os: osx
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
### Version 0.9.0 / 2018-03-10
|
2
|
+
|
3
|
+
* Added support for DragonFly BSD.
|
4
|
+
|
5
|
+
|
1
6
|
### Version 0.8.0 / 2017-09-23
|
2
7
|
|
3
|
-
* Added a method for determining whether or
|
8
|
+
* Added a method for determining whether or not a process had been started.
|
4
9
|
|
5
10
|
|
6
11
|
### Version 0.7.1 / 2017-06-26
|
@@ -30,7 +35,7 @@ See beta release notes.
|
|
30
35
|
|
31
36
|
### Version 0.6.1 / 2017-01-22
|
32
37
|
|
33
|
-
* Bug fix: Fixed a dependency that was accidentally declared as a runtime
|
38
|
+
* Bug fix: Fixed a dependency that was accidentally declared as a runtime
|
34
39
|
dependency instead of a development dependency.
|
35
40
|
|
36
41
|
|
data/README.md
CHANGED
@@ -12,6 +12,10 @@ a standalone library.
|
|
12
12
|
[](https://codeclimate.com/github/enkessler/childprocess)
|
13
13
|
[](https://coveralls.io/r/enkessler/childprocess?branch=master)
|
14
14
|
|
15
|
+
***
|
16
|
+
**This project currently needs a new maintainer. If anyone is interested, please contact me, [enkessler](https://github.com/enkessler).**
|
17
|
+
***
|
18
|
+
|
15
19
|
# Usage
|
16
20
|
|
17
21
|
The object returned from `ChildProcess.build` will implement `ChildProcess::AbstractProcess`.
|
@@ -166,7 +170,7 @@ ChildProcess.logger = logger
|
|
166
170
|
|
167
171
|
## Caveats
|
168
172
|
|
169
|
-
* With JRuby on Unix, modifying `ENV["PATH"]` before using childprocess could lead to 'Command not found' errors, since JRuby is unable to modify the
|
173
|
+
* With JRuby on Unix, modifying `ENV["PATH"]` before using childprocess could lead to 'Command not found' errors, since JRuby is unable to modify the environment used for PATH searches in `java.lang.ProcessBuilder`. This can be avoided by setting `ChildProcess.posix_spawn = true`.
|
170
174
|
|
171
175
|
# Implementation
|
172
176
|
|
data/appveyor.yml
CHANGED
@@ -26,7 +26,24 @@ environment:
|
|
26
26
|
- CHILDPROCESS_POSIX_SPAWN: false
|
27
27
|
CHILDPROCESS_UNSET: should-be-unset
|
28
28
|
RUBY_VERSION: 22-x64
|
29
|
-
|
29
|
+
- CHILDPROCESS_POSIX_SPAWN: true
|
30
|
+
CHILDPROCESS_UNSET: should-be-unset
|
31
|
+
RUBY_VERSION: 23-x64
|
32
|
+
- CHILDPROCESS_POSIX_SPAWN: false
|
33
|
+
CHILDPROCESS_UNSET: should-be-unset
|
34
|
+
RUBY_VERSION: 23-x64
|
35
|
+
- CHILDPROCESS_POSIX_SPAWN: true
|
36
|
+
CHILDPROCESS_UNSET: should-be-unset
|
37
|
+
RUBY_VERSION: 24-x64
|
38
|
+
- CHILDPROCESS_POSIX_SPAWN: false
|
39
|
+
CHILDPROCESS_UNSET: should-be-unset
|
40
|
+
RUBY_VERSION: 24-x64
|
41
|
+
- CHILDPROCESS_POSIX_SPAWN: true
|
42
|
+
CHILDPROCESS_UNSET: should-be-unset
|
43
|
+
RUBY_VERSION: 25-x64
|
44
|
+
- CHILDPROCESS_POSIX_SPAWN: false
|
45
|
+
CHILDPROCESS_UNSET: should-be-unset
|
46
|
+
RUBY_VERSION: 25-x64
|
30
47
|
|
31
48
|
install:
|
32
49
|
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
|
data/lib/childprocess.rb
CHANGED
data/lib/childprocess/version.rb
CHANGED
data/spec/childprocess_spec.rb
CHANGED
@@ -289,6 +289,37 @@ describe ChildProcess do
|
|
289
289
|
expect(proc).to be_exited
|
290
290
|
end
|
291
291
|
|
292
|
+
describe 'OS detection' do
|
293
|
+
|
294
|
+
before(:all) do
|
295
|
+
# Save off original OS so that it can be restored later
|
296
|
+
@original_host_os = RbConfig::CONFIG['host_os']
|
297
|
+
end
|
298
|
+
|
299
|
+
after(:each) do
|
300
|
+
# Restore things to the real OS instead of the fake test OS
|
301
|
+
RbConfig::CONFIG['host_os'] = @original_host_os
|
302
|
+
ChildProcess.instance_variable_set(:@os, nil)
|
303
|
+
end
|
304
|
+
|
305
|
+
|
306
|
+
# TODO: add tests for other OSs
|
307
|
+
context 'on a BSD system' do
|
308
|
+
|
309
|
+
let(:bsd_patterns) { ['bsd', 'dragonfly'] }
|
310
|
+
|
311
|
+
it 'correctly identifies BSD systems' do
|
312
|
+
bsd_patterns.each do |pattern|
|
313
|
+
RbConfig::CONFIG['host_os'] = pattern
|
314
|
+
ChildProcess.instance_variable_set(:@os, nil)
|
315
|
+
|
316
|
+
expect(ChildProcess.os).to eq(:bsd)
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
end
|
321
|
+
|
322
|
+
end
|
292
323
|
|
293
324
|
it 'has a logger' do
|
294
325
|
expect(ChildProcess).to respond_to(:logger)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: childprocess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jari Bakken
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|