test-loop 5.0.2 → 5.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/bin/test-loop +7 -5
- metadata +8 -8
data/README.md
CHANGED
data/bin/test-loop
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
process_invocation_vector = [$0, *ARGV].map! {|s| s.dup }
|
26
26
|
|
27
|
-
require 'diff'
|
27
|
+
require 'diff/lcs'
|
28
28
|
|
29
29
|
begin
|
30
30
|
notify = lambda {|message| puts "test-loop: #{message}" }
|
@@ -39,7 +39,7 @@ begin
|
|
39
39
|
push('{test,spec}/*{test,spec}_helper.rb').uniq!
|
40
40
|
|
41
41
|
(config[:reabsorb_file_globs] ||= []).concat(config[:overhead_file_globs]).
|
42
|
-
push(config_file, 'config/*.{rb,yml}', 'Gemfile').uniq!
|
42
|
+
push(config_file, 'config/*.{rb,yml}', 'Gemfile.lock').uniq!
|
43
43
|
|
44
44
|
(config[:test_file_matchers] ||= {}).merge!(
|
45
45
|
# source files that correspond to test files
|
@@ -115,11 +115,11 @@ begin
|
|
115
115
|
|
116
116
|
fork do
|
117
117
|
# determine which test blocks have changed inside the test file
|
118
|
-
test_names = Diff.
|
118
|
+
test_names = Diff::LCS.diff(old_lines, new_lines).flatten.map do |change|
|
119
119
|
catch :found do
|
120
120
|
# search backwards from the line that changed up to
|
121
121
|
# the first line in the file for test definitions
|
122
|
-
|
122
|
+
change.position.downto(0) do |i|
|
123
123
|
if test_name = config[:test_name_parser].call(new_lines[i])
|
124
124
|
throw :found, test_name
|
125
125
|
end
|
@@ -161,7 +161,9 @@ begin
|
|
161
161
|
end
|
162
162
|
|
163
163
|
rescue Interrupt
|
164
|
-
# user wants to quit the loop
|
164
|
+
# user wants to quit the loop; terminate worker processes
|
165
|
+
# NOTE: negative PID causes signal to propagate to all child processes
|
166
|
+
Process.kill :SIGKILL, -$$
|
165
167
|
|
166
168
|
rescue Exception => error
|
167
169
|
STDERR.puts error.inspect, error.backtrace
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 5
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 5.0.
|
8
|
+
- 3
|
9
|
+
version: 5.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Suraj N. Kurapati
|
@@ -14,11 +14,11 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-25 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: diff
|
21
|
+
name: diff-lcs
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
@@ -26,10 +26,10 @@ dependencies:
|
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
segments:
|
29
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
version:
|
29
|
+
- 1
|
30
|
+
- 1
|
31
|
+
- 2
|
32
|
+
version: 1.1.2
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
35
|
description:
|