hairtrigger 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/hair_trigger.rb +2 -2
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/lib/hair_trigger.rb CHANGED
@@ -13,9 +13,9 @@ module HairTrigger
13
13
  Dir[model_path + '/*rb'].each do |model|
14
14
  class_name = model.sub(/\A.*\/(.*?)\.rb\z/, '\1').camelize
15
15
  begin
16
- require model
16
+ require model unless klass = Kernel.const_get(class_name) rescue nil
17
17
  klass = Kernel.const_get(class_name)
18
- rescue LoadError
18
+ rescue StandardError, LoadError
19
19
  raise "unable to load #{class_name} and its trigger(s)" if File.read(model) =~ /^\s*trigger[\.\(]/
20
20
  next
21
21
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hairtrigger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jon Jensen