ree_spec 0.0.3 → 0.0.4
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: 68eb3e82ab6595a8e4115ecfccea6c639c7d4de80a8c2daf4a33bb2fd68b2c3f
|
4
|
+
data.tar.gz: 9b31bb1cb252ba420461afd259e108fa77e1388f8e18a50c1377d6f7e7e4d5c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a62c797bc3d2419a5fb8c53a4905aac5660be16a8916f8309c44ad569b8fc407081808621aeb4713cecb3c999ae222d73b0b653794aeebefb87fa9621770ce
|
7
|
+
data.tar.gz: 2e81850bedb0f88b5ddf72c779160f45b2627f6141b10b1ccbf6225150489dca3b5a4e88021fb380bd3b314e495881332b3fc3519893605dbed1a8b39fcd8388
|
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 }
|
118
|
+
processes[number] = nil
|
104
119
|
number
|
105
120
|
end
|
106
121
|
|
data/lib/ree_spec/version.rb
CHANGED