Sha256: 204f90566905cc7caaebd9964e14d261e44f00ce41682f3647defbde4882e3ae

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/faraday/configuration/settings'
require 'ddtrace/contrib/faraday/patcher'

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

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

        register_as :faraday, auto_patch: true

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

        def self.loaded?
          !defined?(::Faraday).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

1 entries across 1 versions & 1 rubygems

Version Path
ddtrace-0.33.1 lib/ddtrace/contrib/faraday/integration.rb