lazy_load 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/lib/lazy_load.rb +7 -2
- metadata +3 -3
data/CHANGELOG
CHANGED
data/lib/lazy_load.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module LazyLoad
|
5
5
|
|
6
|
-
VERSION = '0.1.
|
6
|
+
VERSION = '0.1.1'
|
7
7
|
|
8
8
|
module Mixin
|
9
9
|
|
@@ -43,7 +43,12 @@ module LazyLoad
|
|
43
43
|
when Proc then action.call
|
44
44
|
when nil then super
|
45
45
|
when String
|
46
|
-
|
46
|
+
begin
|
47
|
+
require @actions[name]
|
48
|
+
rescue LoadError => boom
|
49
|
+
raise(LoadError, boom.message +
|
50
|
+
"\nPossible fix: gem install #{@actions[name]}")
|
51
|
+
end
|
47
52
|
Kernel.const_get(name)
|
48
53
|
else raise "Invalid action for dependency #{action.inspect}"
|
49
54
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jostein Berre Eliassen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-06-
|
17
|
+
date: 2011-06-24 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|