Sha256: 201b6517c217b4d675b52e5fd1a5129edeb76d8514df92d421af32b837283c74

Contents?: true

Size: 992 Bytes

Versions: 5

Compression:

Stored size: 992 Bytes

Contents

require_relative '../integration'

require_relative 'configuration/settings'
require_relative 'patcher'
require_relative 'request_middleware'

module Datadog
  module AppSec
    module Contrib
      module Rails
        # Description of Rails integration
        class Integration
          include Datadog::AppSec::Contrib::Integration

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

          register_as :rails, auto_patch: false

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

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

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

          def self.auto_instrument?
            true
          end

          def default_configuration
            Configuration::Settings.new
          end

          def patcher
            Patcher
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-1.11.1 lib/datadog/appsec/contrib/rails/integration.rb
ddtrace-1.11.0 lib/datadog/appsec/contrib/rails/integration.rb
ddtrace-1.11.0.beta1 lib/datadog/appsec/contrib/rails/integration.rb
ddtrace-1.10.1 lib/datadog/appsec/contrib/rails/integration.rb
ddtrace-1.10.0 lib/datadog/appsec/contrib/rails/integration.rb