Sha256: 0a79565e022888132475ea39647351725b6523a3002401d2ea051e81669dedd3

Contents?: true

Size: 792 Bytes

Versions: 3

Compression:

Stored size: 792 Bytes

Contents

# frozen_string_literal: true

require "active_support/configurable"

module DeprecationToolkit
  class Configuration
    include ActiveSupport::Configurable

    config_accessor(:allowed_deprecations) { [] }
    config_accessor(:attach_to) { [:rails] }
    config_accessor(:behavior) { Behaviors::Raise }
    config_accessor(:deprecation_path) { "test/deprecations" }
    config_accessor(:test_runner) { :minitest }
    config_accessor(:warnings_treated_as_deprecation) { [] }
    config_accessor(:deprecation_file_path_format) do
      proc do |test|
        if DeprecationToolkit::Configuration.test_runner == :rspec
          test.example_group.file_path.sub(%r{^./spec/}, "").sub(/_spec.rb$/, "")
        else
          test.class.name.underscore
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
deprecation_toolkit-2.2.1 lib/deprecation_toolkit/configuration.rb
deprecation_toolkit-2.2.0 lib/deprecation_toolkit/configuration.rb
deprecation_toolkit-2.1.0 lib/deprecation_toolkit/configuration.rb