rb_reloader 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rb_reloader.rb +7 -1
- data/lib/rb_reloader/version.rb +1 -1
- data/spec/rb_reloader/rb_reloader_spec.rb +7 -0
- metadata +3 -3
data/lib/rb_reloader.rb
CHANGED
@@ -6,7 +6,7 @@ module RbReloader
|
|
6
6
|
@map ||= {}
|
7
7
|
|
8
8
|
def self.new(file)
|
9
|
-
@map[file] ||= super
|
9
|
+
@map[file] ||= super
|
10
10
|
end
|
11
11
|
|
12
12
|
class << self
|
@@ -57,5 +57,11 @@ module RbReloader
|
|
57
57
|
def reload
|
58
58
|
FileWatcher.each {|x| x.reload}
|
59
59
|
end
|
60
|
+
|
61
|
+
def registered_rb
|
62
|
+
files = []
|
63
|
+
FileWatcher.each {|x| files << x.file }
|
64
|
+
files
|
65
|
+
end
|
60
66
|
end
|
61
67
|
end
|
data/lib/rb_reloader/version.rb
CHANGED
@@ -37,6 +37,13 @@ describe RbReloader do
|
|
37
37
|
change_back_test4
|
38
38
|
|
39
39
|
end
|
40
|
+
|
41
|
+
it "should has registered 4 files" do
|
42
|
+
current_folder = File.expand_path("..", __FILE__)
|
43
|
+
RbReloader.register(["#{current_folder}/**/t*.rb"])
|
44
|
+
|
45
|
+
RbReloader.registered_rb.size.should == 4
|
46
|
+
end
|
40
47
|
end
|
41
48
|
|
42
49
|
def change_test1
|
metadata
CHANGED