merit 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Gemfile.lock +1 -1
  2. data/lib/merit.rb +8 -7
  3. data/merit.gemspec +1 -1
  4. metadata +1 -1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- merit (1.2.2)
4
+ merit (1.2.3)
5
5
  ambry (~> 0.3.0)
6
6
 
7
7
  GEM
data/lib/merit.rb CHANGED
@@ -50,16 +50,17 @@ module Merit
50
50
  end
51
51
 
52
52
  ActiveSupport.on_load(:action_controller) do
53
- # Load application defined rules on application boot up
54
- # Test if constant exists (doesn't while installing/generating files)
55
- if defined? '::Merit::BadgeRules'
53
+ begin
54
+ # Load application defined rules on application boot up
56
55
  ::Merit::AppBadgeRules = ::Merit::BadgeRules.new.defined_rules
57
- end
58
- if defined? '::Merit::PointRules'
59
56
  ::Merit::AppPointRules = ::Merit::PointRules.new.defined_rules
57
+ include Merit::ControllerExtensions
58
+ rescue NameError => e
59
+ # Trap NameError if installing/generating files
60
+ if !(e.to_s =~ /uninitialized constant Merit::BadgeRules/)
61
+ raise e
62
+ end
60
63
  end
61
-
62
- include Merit::ControllerExtensions
63
64
  end
64
65
  end
65
66
  end
data/merit.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.description = "Manage badges, points and rankings (reputation) of resources in a Rails application."
5
5
  s.homepage = "http://github.com/tute/merit"
6
6
  s.files = `git ls-files`.split("\n").reject{|f| f =~ /^\./ }
7
- s.version = '1.2.2'
7
+ s.version = '1.2.3'
8
8
  s.authors = ["Tute Costa"]
9
9
  s.email = 'tutecosta@gmail.com'
10
10
  s.add_dependency 'ambry', '~> 0.3.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: