Sha256: 236770693ec97ac6ee33721436d4112ef5936ad326049797f1475826aabb2d0f

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

require_relative '../../../tracing/contrib/integration'

require_relative 'configuration/settings'
require_relative 'patcher'

module Datadog
  module CI
    module Contrib
      module Cucumber
        # Description of Cucumber integration
        class Integration
          include Datadog::Tracing::Contrib::Integration

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

          register_as :cucumber, auto_patch: true

          def self.version
            Gem.loaded_specs['cucumber'] \
              && Gem.loaded_specs['cucumber'].version
          end

          def self.loaded?
            !defined?(::Cucumber).nil? && !defined?(::Cucumber::Runtime).nil?
          end

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

          # test environments should not auto instrument test libraries
          def auto_instrument?
            false
          end

          def new_configuration
            Configuration::Settings.new
          end

          def patcher
            Patcher
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ddtrace-1.14.0 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.13.1 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.13.0 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.12.1 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.12.0 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.11.1 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.11.0 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.11.0.beta1 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.10.1 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-1.10.0 lib/datadog/ci/contrib/cucumber/integration.rb