lib/ddtrace/contrib/sequel/integration.rb in ls-trace-0.1.2 vs lib/ddtrace/contrib/sequel/integration.rb in ls-trace-0.2.0
- old
+ new
@@ -7,17 +7,23 @@
module Sequel
# Description of Sequel integration
class Integration
include Contrib::Integration
+ MINIMUM_VERSION = Gem::Version.new('3.41')
+
register_as :sequel, auto_patch: false
def self.version
Gem.loaded_specs['sequel'] && Gem.loaded_specs['sequel'].version
end
- def self.present?
- super && defined?(::Sequel)
+ def self.loaded?
+ !defined?(::Sequel).nil?
+ end
+
+ def self.compatible?
+ super && version >= MINIMUM_VERSION
end
def default_configuration
Configuration::Settings.new
end