test-loop 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/test-loop +5 -3
- metadata +3 -3
data/bin/test-loop
CHANGED
@@ -5,6 +5,7 @@ require 'rake' # for String#pathmap
|
|
5
5
|
overhead_file_glob = '{test,spec}/*{test,spec}_helper.rb'
|
6
6
|
$LOAD_PATH.unshift 'lib' # for non-Rails applications
|
7
7
|
|
8
|
+
puts 'test-loop: Absorbing overhead...'
|
8
9
|
Dir[overhead_file_glob].each do |file|
|
9
10
|
$LOAD_PATH.insert 1, file.pathmap('%d')
|
10
11
|
require file.pathmap('%n')
|
@@ -12,15 +13,16 @@ end
|
|
12
13
|
|
13
14
|
# continuously watch for and test changed code
|
14
15
|
started_at = last_ran_at = Time.now
|
16
|
+
never_ran_at = Time.at(0)
|
15
17
|
|
16
18
|
trap :QUIT do
|
17
|
-
puts 'test-loop:
|
18
|
-
started_at =
|
19
|
+
puts 'test-loop: Re-executing loop...'
|
20
|
+
started_at = never_ran_at
|
19
21
|
end
|
20
22
|
|
21
23
|
trap :TSTP do
|
22
24
|
puts 'test-loop: Testing everything...'
|
23
|
-
last_ran_at =
|
25
|
+
last_ran_at = never_ran_at
|
24
26
|
end
|
25
27
|
|
26
28
|
puts 'test-loop: Ready for testing!'
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
version: 1.
|
9
|
+
version: 1.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Suraj N. Kurapati
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-23 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|