Permalink
Browse files

Add VERSION constant

  • Loading branch information...
1 parent 0702856 commit ccea55fff1b797043793b4bf2bb1acdc4cd225da @mperham committed Jul 11, 2011
Showing with 7 additions and 2 deletions.
  1. +3 −1 deadlock_retry.gemspec
  2. +4 −1 lib/deadlock_retry.rb
@@ -1,8 +1,10 @@
# -*- encoding: utf-8 -*-
+require './lib/deadlock_retry'
+
Gem::Specification.new do |s|
s.name = %q{deadlock_retry}
- s.version = "1.1.2"
+ s.version = DeadlockRetry::VERSION
s.authors = ["Jamis Buck", "Mike Perham"]
s.description = s.summary = %q{Provides automatic deadlock retry and logging functionality for ActiveRecord and MySQL}
s.email = %q{mperham@gmail.com}
@@ -1,4 +1,7 @@
module DeadlockRetry
+
+ VERSION = '1.1.2'
+
def self.included(base)
base.extend(ClassMethods)
base.class_eval do
@@ -98,4 +101,4 @@ def log_innodb_status
end
end
-ActiveRecord::Base.send(:include, DeadlockRetry)
+ActiveRecord::Base.send(:include, DeadlockRetry) if defined?(ActiveRecord)

0 comments on commit ccea55f

Please sign in to comment.