Module: DeprecationToolkit

Defined in:
lib/deprecation_toolkit.rb,
lib/deprecation_toolkit/version.rb,
lib/deprecation_toolkit/warning.rb,
lib/deprecation_toolkit/warning.rb,
lib/deprecation_toolkit/collector.rb,
lib/deprecation_toolkit/rspec_plugin.rb,
lib/deprecation_toolkit/configuration.rb,
lib/deprecation_toolkit/minitest_hook.rb,
lib/deprecation_toolkit/test_triggerer.rb,
lib/deprecation_toolkit/behaviors/raise.rb,
lib/deprecation_toolkit/behaviors/record.rb,
lib/deprecation_toolkit/read_write_helper.rb,
lib/deprecation_toolkit/behaviors/disabled.rb,
lib/deprecation_toolkit/deprecation_subscriber.rb,
lib/deprecation_toolkit/behaviors/ci_record_helper.rb

Defined Under Namespace

Modules: Behaviors, Minitest, RSpecPlugin, ReadWriteHelper, TestTriggerer, Warning, WarningPatch Classes: Collector, Configuration, DeprecationSubscriber

Constant Summary collapse

VERSION =
"2.2.0"

Class Method Summary collapse

Class Method Details

.add_notify_behaviorObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/deprecation_toolkit.rb', line 22

def add_notify_behavior
  notify = ActiveSupport::Deprecation::DEFAULT_BEHAVIORS[:notify]

  each_deprecator do |deprecator|
    behaviors = deprecator.behavior

    unless behaviors.find { |behavior| behavior == notify }
      deprecator.behavior = (behaviors << notify)
    end
  end
end

.attach_subscriberObject



34
35
36
37
38
39
40
# File 'lib/deprecation_toolkit.rb', line 34

def attach_subscriber
  return if DeprecationSubscriber.already_attached?

  Configuration.attach_to.each do |gem_name|
    DeprecationSubscriber.attach_to(gem_name)
  end
end