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.
Files changed (3) hide show
  1. data/CHANGELOG +1 -0
  2. data/lib/lazy_load.rb +7 -2
  3. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  HEAD
3
+ show install gem suggestion when used like autoload
3
4
 
4
5
  0.1.0
5
6
  deprecate custom msgs and errors
data/lib/lazy_load.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  module LazyLoad
5
5
 
6
- VERSION = '0.1.0'
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
- require @actions[name]
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
- - 0
9
- version: 0.1.0
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-23 00:00:00 +02:00
17
+ date: 2011-06-24 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20