ree_spec 0.0.3 → 0.0.5
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31fc4911be2ef72173d82b4d81ed810cf02db09bd91efd8c5181537745aaf9a5
|
4
|
+
data.tar.gz: 13f654e48d93ea78b7beae3d6fc499d2d2c35bf36f099e482ca44b957114894c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff794e13034853d5edf9518a3ba7548348710030ece9327cbdd5f56f89b662f6d67db60511b78aca397c42daaaa6694d028f272ec71c7f5e8e458cc7f00dd20b
|
7
|
+
data.tar.gz: 988f45cf4d197284bfae26c42e255a226952bc150a5cf448cf062863137cc968b6d425aaaa775f139828b490f24c75c66fb8003a7a6824f27ef3ffab4610c45d
|
data/Gemfile.lock
CHANGED
@@ -58,9 +58,30 @@ class ReeSpecCli::RunSpecs
|
|
58
58
|
result[i+1] = nil
|
59
59
|
end
|
60
60
|
|
61
|
+
['INT', 'TERM'].each do |signal|
|
62
|
+
trap(signal) do
|
63
|
+
shutdown(processes)
|
64
|
+
exit
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
61
68
|
result
|
62
69
|
end
|
63
70
|
|
71
|
+
def shutdown(processes)
|
72
|
+
processes.each do |number, pid|
|
73
|
+
Process.kill('TERM', pid) if !pid.nil?
|
74
|
+
rescue Errno::ESRCH
|
75
|
+
end
|
76
|
+
|
77
|
+
processes.each do |number, pid|
|
78
|
+
Process.wait(pid) if !pid.nil?
|
79
|
+
rescue Errno::ECHILD
|
80
|
+
end
|
81
|
+
|
82
|
+
puts "All child processes terminated"
|
83
|
+
end
|
84
|
+
|
64
85
|
def print_start_message(job)
|
65
86
|
puts("\n**** Running #{job.files.size} spec#{job.files.size == 1 ? "" : "s"} for #{job.package.name} ****\n")
|
66
87
|
end
|
@@ -92,15 +113,9 @@ class ReeSpecCli::RunSpecs
|
|
92
113
|
return process.first
|
93
114
|
end
|
94
115
|
|
95
|
-
|
96
|
-
|
97
|
-
processes
|
98
|
-
Process.wait(v)
|
99
|
-
processes[k] = nil
|
100
|
-
number = k
|
101
|
-
break
|
102
|
-
end
|
103
|
-
|
116
|
+
pid = Process.wait
|
117
|
+
number = processes.find { |_, v| v == pid }.first
|
118
|
+
processes[number] = nil
|
104
119
|
number
|
105
120
|
end
|
106
121
|
|
data/lib/ree_spec/version.rb
CHANGED