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 CHANGED
@@ -2,7 +2,7 @@ require 'rake_ext'
2
2
 
3
3
  project(
4
4
  :name => "class_loader",
5
- :version => "0.3.9",
5
+ :version => "0.3.10",
6
6
  :summary => "Automatically finds and loads classes",
7
7
 
8
8
  :author => "Alexey Petrushin",
@@ -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
- paths << base_path
76
- watched_paths << base_path if watch
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 allow to add path twice" do
50
+ it "shouldn't add path twice" do
51
51
  @adapter.clear
52
52
  @adapter.add_path "#{spec_dir}/common"
53
- lambda{@adapter.add_path "#{spec_dir}/common"}.should raise_error(/already added/)
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: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 9
10
- version: 0.3.9
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-10-25 00:00:00 +04:00
18
+ date: 2010-12-13 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21