class_loader 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/class_loader/file_system_adapter.rb +5 -4
- data/spec/file_system_adapter_spec.rb +3 -2
- metadata +4 -4
data/Rakefile
CHANGED
@@ -70,10 +70,11 @@ module ClassLoader
|
|
70
70
|
|
71
71
|
def add_path base_path, watch = false
|
72
72
|
base_path = File.expand_path(base_path)
|
73
|
-
raise "#{base_path} already added!" if paths.include? base_path
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
# raise "#{base_path} already added!" if paths.include? base_path
|
74
|
+
unless paths.include? base_path
|
75
|
+
paths << base_path
|
76
|
+
watched_paths << base_path if watch
|
77
|
+
end
|
77
78
|
end
|
78
79
|
|
79
80
|
def clear
|
@@ -47,10 +47,11 @@ describe ClassLoader::FileSystemAdapter do
|
|
47
47
|
@adapter.to_class_name("#{spec_dir}/common/SomeNamespace/SomeClass").should == "SomeNamespace::SomeClass"
|
48
48
|
end
|
49
49
|
|
50
|
-
it "shouldn't
|
50
|
+
it "shouldn't add path twice" do
|
51
51
|
@adapter.clear
|
52
52
|
@adapter.add_path "#{spec_dir}/common"
|
53
|
-
|
53
|
+
@adapter.add_path "#{spec_dir}/common"
|
54
|
+
@fs_adapter.instance_variable_get("@paths").size.should == 1
|
54
55
|
end
|
55
56
|
|
56
57
|
describe "file watching" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: class_loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 10
|
10
|
+
version: 0.3.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexey Petrushin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-13 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|