load_path_find 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -25,4 +25,10 @@ $LOAD_PATH.instance_eval do
25
25
  self.unshift(__DIR_REL__(caller.first))
26
26
  end
27
27
 
28
+ end
29
+
30
+ module Kernel
31
+ def require_all(req)
32
+ $LOAD_PATH.find_all_files("#{req}.rb") { |file| require file }
33
+ end
28
34
  end
@@ -0,0 +1 @@
1
+ $state1 = true
@@ -0,0 +1 @@
1
+ $state2 = true
@@ -46,4 +46,12 @@ describe 'load path find' do
46
46
  $LOAD_PATH.first.should == __DIR__
47
47
  end
48
48
 
49
+ it "should require_all" do
50
+ $state1.should be_nil
51
+ $state2.should be_nil
52
+ require_all('test')
53
+ $state1.should be_true
54
+ $state2.should be_true
55
+ end
56
+
49
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: load_path_find
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hull
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-16 00:00:00 -05:00
12
+ date: 2010-01-17 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -36,7 +36,9 @@ files:
36
36
  - VERSION
37
37
  - lib/load_path_find.rb
38
38
  - spec/data/dir1/file1
39
+ - spec/data/dir1/test.rb
39
40
  - spec/data/dir2/file1
41
+ - spec/data/dir2/test.rb
40
42
  - spec/load_path_find_spec.rb
41
43
  - spec/spec.opts
42
44
  has_rdoc: true
@@ -68,4 +70,6 @@ signing_key:
68
70
  specification_version: 3
69
71
  summary: Convenient way to find stuff on the load path.
70
72
  test_files:
73
+ - spec/data/dir1/test.rb
74
+ - spec/data/dir2/test.rb
71
75
  - spec/load_path_find_spec.rb