deadly_serious 0.6.1 → 0.7.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: f8c708f31b70164549b925cce66e1db5ef352616
4
- data.tar.gz: 1d46419a7ac586050b7ab3778379f63159b2eb71
3
+ metadata.gz: 0f4399af427387bfce6f48e389b7d640afc5d359
4
+ data.tar.gz: 98beb9f02a0b48826a702d8a60bbc3e6d45ee418
5
5
  SHA512:
6
- metadata.gz: 555a430c27a7c48d678c60ca69d899f2dfd59c7e4efbde83cd7cb046607903e020996976271597e320b1d6e441847627bfb89106e186355f04e5b75a18282905
7
- data.tar.gz: d83717412377a9b27b1845866877e8b618532fe43d15d273df6a634a79748a816553ad49720e3aed134df063eb9327130c2c7a4d189cc79646f6092f430b3d03
6
+ metadata.gz: 4b1766a3982a0bbc9a07c0982cc2c5e118c1b50773095a5cb8d75e4d341cc6ca5393b307e8ed10778e3cd88ee9265482bdf816daccf584e6fcfca4e1258ee6e7
7
+ data.tar.gz: 68a509b17a15c9024c4b91876aeeaeae8ddc3f75ca2211418582a15970958dcbf23c8c1f2f58594c84aaf05ea22978b746171630370be89a666733f5a02e9b05
@@ -10,7 +10,11 @@ module DeadlySerious
10
10
 
11
11
  if reader
12
12
  reader.each do |packet|
13
- super(*packet)
13
+ if packet.is_a? Array
14
+ super(*packet)
15
+ else
16
+ super(packet)
17
+ end
14
18
  end
15
19
  else
16
20
  super()
@@ -23,6 +23,10 @@ module DeadlySerious
23
23
  Channel.teardown
24
24
  end
25
25
 
26
+ def wait_processes!
27
+ wait_children
28
+ end
29
+
26
30
  def spawn_process(a_class, *args, process_name: a_class.name, readers: [], writers: [])
27
31
  writers.each { |writer| create_pipe(writer) }
28
32
  fork_it do
@@ -103,10 +107,11 @@ module DeadlySerious
103
107
 
104
108
  def wait_children
105
109
  @ids.each { |id| Process.wait(id) }
110
+ @ids.clear
106
111
  end
107
112
 
108
113
  def kill_children
109
- @ids.each { |id| Process.kill('SIGTERM', id) }
114
+ @ids.each { |id| Process.kill('SIGTERM', id) rescue nil }
110
115
  wait_children
111
116
  end
112
117
 
@@ -1,3 +1,3 @@
1
1
  module DeadlySerious
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deadly_serious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronie Uliana
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-10 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler