lib/ddtrace/contrib/rack/integration.rb in ls-trace-0.1.2 vs lib/ddtrace/contrib/rack/integration.rb in ls-trace-0.2.0

- old
+ new

@@ -7,17 +7,23 @@ module Rack # Description of Rack integration class Integration include Contrib::Integration + MINIMUM_VERSION = Gem::Version.new('1.1.0') + register_as :rack, auto_patch: false def self.version Gem.loaded_specs['rack'] && Gem.loaded_specs['rack'].version end - def self.present? - super && defined?(::Rack) + def self.loaded? + !defined?(::Rack).nil? + end + + def self.compatible? + super && version >= MINIMUM_VERSION end def default_configuration Configuration::Settings.new end