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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86062d5cd963a79e17fdf2d188771665a3d408c0
4
- data.tar.gz: 57f52d6a28cd0c1503495b3a7d6933cfaff6937b
3
+ metadata.gz: fc6ebd5fca28a63f0cc66f1694f31961aa8dbd59
4
+ data.tar.gz: 0a3a042ae2fa14dc9b70446553f296cedd4990f4
5
5
  SHA512:
6
- metadata.gz: e7eba1e0d430ca0bce9d5bd1fd74b311a57358a42016ce45d07d27ebb664995379df48d3e27eba783c2ba26333aae5d1a2b666dea9a01455e2285e48ed159245
7
- data.tar.gz: 321d64b5905c787e50c1de2a366f489274d8704dd746530980553768d851c0af64f8f7c703cff9e06e6e0798e67a2b015f150ed62814fa050a0b3de5f04e39b2
6
+ metadata.gz: 721fae3f6625d89823fcc87fbc2188d611cb4b0f120b26a7bd4ddc2c421d4791dc608dbfe90275a312a920d3620ec377e463d01a6b118bb3f2cf938230cd4f65
7
+ data.tar.gz: 1a1f9e46433a97dc71e2937c6270f775d0c82db387daea194011eb83befde3e96912b83adbb472efbe03a381b7ac8a41e9009546c7157083f93c78738eeab6d6
@@ -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.3
12
+ - 2.3.5
13
13
  - 2.4.0
14
14
  - ruby-head
15
- sudo: false
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
- - CHILDPROCESS_POSIX_SPAWN=true CHILDPROCESS_UNSET=should-be-unset
19
- - CHILDPROCESS_POSIX_SPAWN=false CHILDPROCESS_UNSET=should-be-unset
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
- env: "CHILDPROCESS_POSIX_SPAWN=true"
36
+ - env: "CHILDPROCESS_POSIX_SPAWN=true"
@@ -1,3 +1,8 @@
1
+ ### Version 0.8.0 / 2017-09-23
2
+
3
+ * Added a method for determining whether or nto a process had been started.
4
+
5
+
1
6
  ### Version 0.7.1 / 2017-06-26
2
7
 
3
8
  * Fixed a noisy uninitialized variable warning
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ChildProcess
2
- VERSION = '0.7.1'
2
+ VERSION = '0.8.0'
3
3
  end
@@ -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.7.1
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-06-26 00:00:00.000000000 Z
12
+ date: 2017-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi