This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
Releases: litaio/lita
Releases · litaio/lita
4.0.1
- Fixed: Handlers with no configuration will no longer cause an attribute to appear on
Lita.config.handlers
.
4.0.0
See the Lita 4 release announcement on Lita.io.
3.3.1
3.3.0
- Added: Readline support for the shell adapter.
- Fixed: The abstract methods in
Lita::Adapter
will no longer crash due to number of arguments supplied. - Changed: Generated plugins now use the final release version of RSpec 3.0.
- Changed: The "info" command and /lita/info HTTP endpoint now return information about Redis.
- Changed: The
:validate_route
hook now receives the handler class in the hook payload under the key:handler
. - Changed: The
:validate_route
hook is now invoked as the last check during incoming message dispatch, so hooks can assume the incoming message would otherwise have been dispatched to the current route. - Added:
Lita::Handler.dispatch_to_route
, which allows a handler route to be invoked directly, bypassing the usual conditional checks.
3.2.0
- Added: A new plugin type, extensions, allow developers to hook into core Lita behavior to extend the capabilities of the core, and to provide new features to adapters and handlers.
- Added: A generator command to create new extension plugins:
lita extension NAME
. - Added: A new hook system extensions can use to tap into Lita's core. Register callback objects with
Lita.register_hook(:hook_name, MyCallbackObject)
.MyCallbackObject
is any object that responds to:call
and accepts a hash of arbitrary payload data. - Added: New hook:
:before_run
. Called whenLita.run
is called. Useful for extensions that need to do something just as the robot starts. The payload contains the path to the Lita config file, if any. - Added: New hook:
:validate_route
. Called during incoming message dispatch. Can be used for custom logic to determine whether or not a message should match a route. The payload contains the route object, the incoming message object, and the currently running robot. - Added: New hook:
:trigger_route
. Called when a message has matched a route, just before the handler's callback method is invoked. The payload contains the route object and the response object. - Changed:
Lita::Handler.route
now accepts arbitrary keyword arguments. Any extra arguments will be accessible by hooks viaLita::Handler::Route#extensions
. - Added:
Lita::Response#extensions
, a hash of arbitrary data Lita extensions can use to enhance handler functionality. - Added:
Lita::Handler#config
, a shortcut handlers can use to access their own Config object. - Added:
Lita::Handler#log
, a shortcut handlers can use to access the global Lita logger object. - Changed:
Lita.clear_config
's primary method name isLita.reset_config
, thoughclear_config
still works as well. - Added: New methods for resetting (clearing) various global registries:
Lita.reset_adapters
,Lita.reset_handlers
, andLita.reset_hooks
.Lita.reset
will reset everything: adapters, config, handlers, and hooks.
3.1.0
- Added:
Lita::Message#reply_with_mention
(also accessible viaLita::Response#reply_with_mention
) for replying to messages in group chat and prepending the mention name of the original message sender. - Added:
Lita::Robot#send_messages_with_mention
for mentioning a user in a message that is not a direct response to an incoming message. - Added:
Lita::User#mention_name
as an official accessor method for the mention name of a user. - Added:
Lita::Adapter#mention_format
, which allows adapters to define the syntax for triggering a user mention for the chat service.
3.0.4
- Fixed:
User.create
will now persist the provided metadata when the provided ID is for an existing user. - Changed: User metadata keys are now normalized to strings.
- Fixed: Timers created with
Handler#after
andHandler#every
will no longer block the handler thread. - Changed: The memory profile of recurring timers has been improved.
3.0.3
Fixed: The plugin generator will now create plugins structured so that localization files will be properly loaded before the plugin class is defined.
3.0.2
- Changed: Generated plugins will depend on RSpec 3.
- Changed: Generated
lita_config.rb
files show an example for configuring the locale.
3.0.1
Fixed: Lita will abort with a nice error message if Lita::RSpec
is required without RSpec 3.