lib/ddtrace/contrib/mysql2/integration.rb in ddtrace-0.33.0 vs lib/ddtrace/contrib/mysql2/integration.rb in ddtrace-0.33.1
- old
+ new
@@ -7,21 +7,23 @@
module Mysql2
# Description of Mysql2 integration
class Integration
include Contrib::Integration
+ MINIMUM_VERSION = Gem::Version.new('0.3.21')
+
register_as :mysql2
def self.version
Gem.loaded_specs['mysql2'] && Gem.loaded_specs['mysql2'].version
end
def self.loaded?
- defined?(::Mysql2)
+ !defined?(::Mysql2).nil?
end
def self.compatible?
- super && version >= Gem::Version.new('0.3.21')
+ super && version >= MINIMUM_VERSION
end
def default_configuration
Configuration::Settings.new
end