test_console 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/test_console/monitor.rb +9 -6
- data/lib/test_console/utility.rb +1 -1
- data/lib/test_console/version.rb +1 -1
- data/test/dummy/log/test.log +27 -0
- metadata +18 -4
data/lib/test_console/monitor.rb
CHANGED
@@ -12,13 +12,16 @@ module TestConsole
|
|
12
12
|
|
13
13
|
WATCH_PATHS.each do |p|
|
14
14
|
watch_folder = File.join(Rails.root.to_s, p)
|
15
|
-
Dir.glob(File.join(
|
15
|
+
Dir.glob(File.join('..', p, '**', '*.*rb')).each do |f|
|
16
16
|
if File.mtime(f) > @last_reload_time
|
17
|
-
|
17
|
+
abs_path = File.join(Dir.pwd, f)
|
18
|
+
rel_path = f.gsub /#{Rails.root.to_s}/, ''
|
19
|
+
rel_path = rel_path.gsub /..\//, ''
|
20
|
+
rel_path = rel_path.gsub /#{p}\//, ''
|
18
21
|
TestConsole.out "Reloading #{rel_path}", :cyan
|
19
22
|
klass = Utility.class_from_filename(rel_path)
|
20
|
-
const_remove(klass) if const_defined?(klass)
|
21
|
-
load
|
23
|
+
Utility.const_remove(klass) if Utility.const_defined?(klass)
|
24
|
+
load abs_path
|
22
25
|
end
|
23
26
|
end
|
24
27
|
end
|
@@ -32,8 +35,8 @@ module TestConsole
|
|
32
35
|
return false if @last_init_time.nil?
|
33
36
|
|
34
37
|
STOP_FOLDERS.each do |p|
|
35
|
-
watch_folder = File.join(Rails.root.to_s, p)
|
36
|
-
Dir.glob(File.join(
|
38
|
+
#watch_folder = File.join(Rails.root.to_s, p)
|
39
|
+
Dir.glob(File.join('..', p, '**', '*.{rb,yml}')).each do |f|
|
37
40
|
if File.mtime(f) > @last_init_time
|
38
41
|
error "#{f} has been changed.\nYou will need to restart the console to reload the environment"
|
39
42
|
return true
|
data/lib/test_console/utility.rb
CHANGED
data/lib/test_console/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
4
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
8
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
9
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
10
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
11
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
12
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
13
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
14
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
18
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
20
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
21
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
22
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
23
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
24
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
26
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Phillips
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-07-
|
18
|
+
date: 2012-07-15 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
prerelease: false
|
@@ -74,6 +74,20 @@ dependencies:
|
|
74
74
|
requirement: *id004
|
75
75
|
name: sqlite3
|
76
76
|
type: :development
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
requirement: *id005
|
89
|
+
name: ruby-debug
|
90
|
+
type: :development
|
77
91
|
description: Console for testing Rails applications with TestUnit.
|
78
92
|
email:
|
79
93
|
- adam@indivisible.org.uk
|