Sha256: 7f412571c8cc3235a65e9829a8e4e2869a42588e535b0711a933b90aeaf8af3c

Contents?: true

Size: 1 KB

Versions: 25

Compression:

Stored size: 1 KB

Contents

require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/active_model_serializers/configuration/settings'
require 'ddtrace/contrib/active_model_serializers/patcher'

module Datadog
  module Contrib
    module ActiveModelSerializers
      # Description of ActiveModelSerializers integration
      class Integration
        include Contrib::Integration

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

        register_as :active_model_serializers

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

        def self.loaded?
          !defined?(::ActiveModel::Serializer).nil? \
            && !defined?(::ActiveSupport::Notifications).nil?
        end

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

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
ddtrace-0.51.1 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.51.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.50.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.49.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.48.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.47.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.46.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.45.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.44.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.43.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.42.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.41.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ls-trace-0.2.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.40.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.39.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.38.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.37.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.36.0 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.35.2 lib/ddtrace/contrib/active_model_serializers/integration.rb
ddtrace-0.35.1 lib/ddtrace/contrib/active_model_serializers/integration.rb