Sha256: 79beb8f332752f2d7a1a6541dff15bf1f8bc7b51a924da34214b79014caa4af7

Contents?: true

Size: 922 Bytes

Versions: 10

Compression:

Stored size: 922 Bytes

Contents

# frozen_string_literal: true

require_relative '../integration'

require_relative 'patcher'
require_relative 'request_middleware'
require_relative 'request_body_middleware'

module Datadog
  module AppSec
    module Contrib
      module Rack
        # Description of Rack integration
        class Integration
          include Datadog::AppSec::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.loaded?
            !defined?(::Rack).nil?
          end

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

          def self.auto_instrument?
            false
          end

          def patcher
            Patcher
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
datadog-2.7.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.6.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.5.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.4.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.3.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.2.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.1.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.0.0 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.0.0.beta2 lib/datadog/appsec/contrib/rack/integration.rb
datadog-2.0.0.beta1 lib/datadog/appsec/contrib/rack/integration.rb