Class: Lita::Handlers::DeprecationCheck

Inherits:
Object
  • Object
show all
Extended by:
Lita::Handler::EventRouter
Defined in:
lib/lita/handlers/deprecation_check.rb

Overview

Warns about any handlers using deprecated features.

Since:

  • 4.0.0

Instance Method Summary collapse

Methods included from Lita::Handler::EventRouter

event_subscriptions_for, extended, on, trigger

Instance Method Details

#check_handlers_for_default_config(_payload) ⇒ Object

Warns about handlers using the old default_config method.

Since:

  • 4.0.0



11
12
13
14
15
16
17
18
19
# File 'lib/lita/handlers/deprecation_check.rb', line 11

def check_handlers_for_default_config(_payload)
  robot.registry.handlers.each do |handler|
    if handler.respond_to?(:default_config)
      Lita.logger.warn(
        I18n.t("lita.config.handler_default_config_deprecated", name: handler.namespace)
      )
    end
  end
end