Lita v4.5.0 Release Notes

Release Date: 2015-08-21 // almost 5 years ago
  • 🔋 Features:

    • Custom helper methods for templates. Make methods available to a template by using the new render_template_with_helpers method, which lets you pass in an array of modules to extend onto the template evaluation context.
    • 🆕 New event: :message_dispatched, fired every time an incoming message matches a handler's chat route. The payload includes the message, the route, the handler class, and the robot.
    • New event: :route_authorization_failed, fired whenever an incoming message fails to match a route because the sending user was not in the proper authorization group. The payload includes the message, the route, and the robot.

    👌 Improvements:

    • 🚚 Lita is now tested against JRuby and Rubinius 2.x. It works with both implementations, with the exception of the daemonization feature on JRuby. This feature is being removed in Lita 5 anyway, so anyone using it now should migrate to a dedicated process manager.
    • The send_message and send_command helper methods in RSpec now take a :from option to specify the source room.
    • New convenience methods to reduce Law of Demeter violations: Lita::Message#room_object, Lita::Message#private_message?, Lita::Response#private_message?, and Lita::Response#room.
    • ✅ Less verbose #inspect output for Lita::Robot objects, making test failure output easier to read.
    • 🔌 The line that registers a plugin with the global Lita registry in generated plugin files now uses self so it's less painful if you decide to rename the plugin.
    • ⚡️ The http_router gem was finally updated so Lita no longer monkey patches it.
    • 📚 Many small documentation and code quality improvements.

    🐛 Bug fixes:

    • Messages are now more strict about being interpreted as commands. If the message is directed at the bot by using its mention name, it must include a space (after an optional comma or colon) before any additional text. This prevents messages that start with words that happen to be the same characters as the bot's mention name from being accidentally treated as commands. This behavior does not apply to messages addressing the bot via its alias, which is intended to be a single character like a slash, exclamation point, or period.