Sha256: b48c8e9fddaf41d3e379aa907dc1b873ec35906fdd4bea328ee12f97e6bb6f06

Contents?: true

Size: 657 Bytes

Versions: 12

Compression:

Stored size: 657 Bytes

Contents

# typed: ignore

require_relative '../patcher'
require_relative 'gateway/watcher'

module Datadog
  module AppSec
    module Contrib
      module Rack
        # Patcher for Rack integration
        module Patcher
          include Datadog::AppSec::Contrib::Patcher

          module_function

          def patched?
            Patcher.instance_variable_get(:@patched) # TODO: Patcher.flag_patched
          end

          def target_version
            Integration.version
          end

          def patch
            Gateway::Watcher.watch
            Patcher.instance_variable_set(:@patched, true)
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.8.0 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.7.0 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.6.1 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.6.0 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.5.2 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.5.1 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.5.0 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.4.2 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.4.1 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.4.0 lib/datadog/appsec/contrib/rack/patcher.rb
ddtrace-1.3.0 lib/datadog/appsec/contrib/rack/patcher.rb