childprocess 0.5.5 → 0.5.6

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: 5ff6c21571973bc86342b2e8f604487ead0ac6d5
4
- data.tar.gz: f6603ff7e7c6244d3f740a045b505e5b2b7f4d9e
3
+ metadata.gz: 13d6fa4c53bfc8bced81226a842c321cd1f9efd6
4
+ data.tar.gz: a3d8088d705d267bc4705ce7c5943c947da24904
5
5
  SHA512:
6
- metadata.gz: e275ff71f12bef3f8fc39657bfa4bd1ac350bcd98fadd1dc12794da8abf62d83acda8b21e244acfefa5f11c42937792e1d7b3b23cbcd97d5ecaf4aa77e7d13e0
7
- data.tar.gz: c3ed5e6312b4457066585d02487b7bbf7a887702a89ea66bfc99f9bc3710e37d4c25a92af6496cf4ddbc1311035102bf975b2627e0d3417fd9e2fc774a4e2f7e
6
+ metadata.gz: 14f144cceccd0b92c3ef4b6380a2769c0243440c8458ae71df738b621ac0075e0efd1eeaba13111cdd267e362abcc6462364f6227e3dedbf819665c10559aaaf
7
+ data.tar.gz: c23654e897ac4d32bba1383fa20f89a792c58a42b1bed1e69afa8c5da031b43fa171d915e9bfe043e2da4f58f46cebfdf633e84fb479da949a31848f64388f08
@@ -5,6 +5,8 @@ rvm:
5
5
  - 2.0.0
6
6
  - 2.1.0
7
7
  - ruby-head
8
+ sudo: false
9
+ cache: bundler
8
10
  env:
9
11
  - CHILDPROCESS_POSIX_SPAWN=true CHILDPROCESS_UNSET=should-be-unset
10
12
  - CHILDPROCESS_POSIX_SPAWN=false CHILDPROCESS_UNSET=should-be-unset
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2014 Jari Bakken
1
+ Copyright (c) 2010-2015 Jari Bakken
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -171,4 +171,4 @@ How the process is launched and killed depends on the platform:
171
171
 
172
172
  # Copyright
173
173
 
174
- Copyright (c) 2010-2014 Jari Bakken. See LICENSE for details.
174
+ Copyright (c) 2010-2015 Jari Bakken. See LICENSE for details.
@@ -39,6 +39,9 @@ module ChildProcess
39
39
  end
40
40
 
41
41
  !!pid
42
+ rescue Errno::ECHILD
43
+ # may be thrown for detached processes
44
+ true
42
45
  end
43
46
 
44
47
  def wait
@@ -1,3 +1,3 @@
1
1
  module ChildProcess
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
@@ -241,4 +241,16 @@ describe ChildProcess do
241
241
 
242
242
  threads.each { |t| t.join }
243
243
  end
244
+
245
+ it 'can check if a detached child is alive' do
246
+ proc = ruby_process("-e", "sleep")
247
+ proc.detach = true
248
+
249
+ proc.start
250
+
251
+ expect(proc).to be_alive
252
+ proc.stop(0)
253
+
254
+ expect(proc).to be_exited
255
+ end
244
256
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: childprocess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-01 00:00:00.000000000 Z
11
+ date: 2015-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec