childprocess 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +18 -6
- data/CHANGELOG.md +5 -0
- data/lib/childprocess/abstract_process.rb +10 -5
- data/lib/childprocess/version.rb +1 -1
- data/spec/childprocess_spec.rb +25 -1
- 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: fc6ebd5fca28a63f0cc66f1694f31961aa8dbd59
|
4
|
+
data.tar.gz: 0a3a042ae2fa14dc9b70446553f296cedd4990f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721fae3f6625d89823fcc87fbc2188d611cb4b0f120b26a7bd4ddc2c421d4791dc608dbfe90275a312a920d3620ec377e463d01a6b118bb3f2cf938230cd4f65
|
7
|
+
data.tar.gz: 1a1f9e46433a97dc71e2937c6270f775d0c82db387daea194011eb83befde3e96912b83adbb472efbe03a381b7ac8a41e9009546c7157083f93c78738eeab6d6
|
data/.travis.yml
CHANGED
@@ -4,21 +4,33 @@ os:
|
|
4
4
|
|
5
5
|
rvm:
|
6
6
|
- 1.9.3
|
7
|
-
- jruby
|
7
|
+
- jruby-9.1.9.0
|
8
8
|
- rbx-3
|
9
9
|
- 2.0.0
|
10
10
|
- 2.1
|
11
11
|
- 2.2
|
12
|
-
- 2.3.
|
12
|
+
- 2.3.5
|
13
13
|
- 2.4.0
|
14
14
|
- ruby-head
|
15
|
-
|
15
|
+
|
16
|
+
sudo: true # Necessary to fix JRuby
|
17
|
+
|
16
18
|
cache: bundler
|
19
|
+
|
20
|
+
before_install:
|
21
|
+
- "echo 'gem: --no-document' > ~/.gemrc"
|
22
|
+
- gem update --system
|
23
|
+
- gem install bundler # Necessary to fix 1.9.3
|
24
|
+
|
17
25
|
env:
|
18
|
-
|
19
|
-
|
26
|
+
global:
|
27
|
+
matrix:
|
28
|
+
- CHILDPROCESS_POSIX_SPAWN=true CHILDPROCESS_UNSET=should-be-unset
|
29
|
+
- CHILDPROCESS_POSIX_SPAWN=false CHILDPROCESS_UNSET=should-be-unset
|
30
|
+
|
20
31
|
matrix:
|
21
32
|
allow_failures:
|
22
33
|
- rvm: rbx-3
|
34
|
+
- rvm: jruby-9.1.9.0
|
23
35
|
- rvm: ruby-head
|
24
|
-
|
36
|
+
- env: "CHILDPROCESS_POSIX_SPAWN=true"
|
data/CHANGELOG.md
CHANGED
@@ -24,7 +24,6 @@ module ChildProcess
|
|
24
24
|
#
|
25
25
|
attr_accessor :cwd
|
26
26
|
|
27
|
-
#
|
28
27
|
#
|
29
28
|
# Set this to true to make the child process the leader of a new process group
|
30
29
|
#
|
@@ -115,6 +114,16 @@ module ChildProcess
|
|
115
114
|
raise SubclassResponsibility, "exited?"
|
116
115
|
end
|
117
116
|
|
117
|
+
#
|
118
|
+
# Has the process started?
|
119
|
+
#
|
120
|
+
# @return [Boolean]
|
121
|
+
#
|
122
|
+
|
123
|
+
def started?
|
124
|
+
@started
|
125
|
+
end
|
126
|
+
|
118
127
|
#
|
119
128
|
# Is this process running?
|
120
129
|
#
|
@@ -159,10 +168,6 @@ module ChildProcess
|
|
159
168
|
raise SubclassResponsibility, "launch_process"
|
160
169
|
end
|
161
170
|
|
162
|
-
def started?
|
163
|
-
@started
|
164
|
-
end
|
165
|
-
|
166
171
|
def detach?
|
167
172
|
@detach
|
168
173
|
end
|
data/lib/childprocess/version.rb
CHANGED
data/spec/childprocess_spec.rb
CHANGED
@@ -352,7 +352,6 @@ describe ChildProcess do
|
|
352
352
|
|
353
353
|
let(:logger) { Logger.new($stdout) }
|
354
354
|
|
355
|
-
|
356
355
|
it "logs to configured logger" do
|
357
356
|
cap = capture_std { generate_log_messages }
|
358
357
|
|
@@ -364,4 +363,29 @@ describe ChildProcess do
|
|
364
363
|
|
365
364
|
end
|
366
365
|
|
366
|
+
describe '#started?' do
|
367
|
+
subject { process.started? }
|
368
|
+
|
369
|
+
context 'when not started' do
|
370
|
+
let(:process) { sleeping_ruby(1) }
|
371
|
+
|
372
|
+
it { is_expected.to be false }
|
373
|
+
end
|
374
|
+
|
375
|
+
context 'when started' do
|
376
|
+
let(:process) { sleeping_ruby(1).start }
|
377
|
+
|
378
|
+
it { is_expected.to be true }
|
379
|
+
end
|
380
|
+
|
381
|
+
context 'when finished' do
|
382
|
+
before(:each) { process.wait }
|
383
|
+
|
384
|
+
let(:process) { sleeping_ruby(0).start }
|
385
|
+
|
386
|
+
it { is_expected.to be true }
|
387
|
+
end
|
388
|
+
|
389
|
+
end
|
390
|
+
|
367
391
|
end
|
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.8.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: 2017-
|
12
|
+
date: 2017-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|