Sha256: 0623172e42262b219e91ef9a6412dd719ef5860c93c7589797f1ff1cca3114a3

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

# typed: false
require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/sinatra/configuration/settings'
require 'ddtrace/contrib/sinatra/patcher'

module Datadog
  module Contrib
    module Sinatra
      # Description of Sinatra integration
      class Integration
        include Contrib::Integration

        MINIMUM_VERSION = Gem::Version.new('1.4')

        register_as :sinatra

        def self.version
          Gem.loaded_specs['sinatra'] && Gem.loaded_specs['sinatra'].version
        end

        def self.loaded?
          !defined?(::Sinatra).nil?
        end

        def self.compatible?
          super && version >= MINIMUM_VERSION
        end

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-0.54.2 lib/ddtrace/contrib/sinatra/integration.rb
ddtrace-0.54.1 lib/ddtrace/contrib/sinatra/integration.rb
ddtrace-0.54.0 lib/ddtrace/contrib/sinatra/integration.rb
ddtrace-0.53.0 lib/ddtrace/contrib/sinatra/integration.rb
ddtrace-0.52.0 lib/ddtrace/contrib/sinatra/integration.rb