Sha256: 0f9e5c4c6ddb28c6c3188b50c239e25ebf375cb4818bd84f95bd7e5e388b1a9a

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

# typed: false
require 'ddtrace/contrib/integration'

require 'datadog/ci/contrib/cucumber/configuration/settings'
require 'datadog/ci/contrib/cucumber/patcher'

module Datadog
  module CI
    module Contrib
      module Cucumber
        # Description of Cucumber integration
        class Integration
          include Datadog::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 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-0.54.2 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-0.54.1 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-0.54.0 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-0.53.0 lib/datadog/ci/contrib/cucumber/integration.rb
ddtrace-0.52.0 lib/datadog/ci/contrib/cucumber/integration.rb