This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
2.0.0
- New help system
self.help
method is no longer supported- Handler routes now take a
:help
option
- HTTP server and routing
- New
Lita.config.http
configuration options Handler.http
method for defining HTTP server routes- Handler HTTP callback methods take a
Rack::Request
andRack::Response
- New
Handler#http
for outgoing HTTP requests, backed by Faraday- Built-in web handler for basic info about Lita (GET /lita/info)
- New testing system
- Enable RSpec extra with
lita_handler: true
instead oflita: true
- Use
lita: true
for non-handler-specific tests that need the logger stubbed, interact with Redis, or useLita.config
- New routing helper method:
routes_command
- New HTTP routing helper methods
routes_http
doesnt_route_http
(alias:does_not_route_http
)
- Integration helper methods changes
expect_reply
andexpect_no_reply
(and aliases) removed- Replaced with an array of all sent messages called
replies
- Use normal RSpec expectations on
replies
send_test_message
replaced withsend_message
andsend_command
- Send a message or command as a specific user with the
:as
option
- Logger is stubbed during testing
Lita.config
is cleared before each example
- Enable RSpec extra with
- Handlers
route
now takes the method name as a second argument instead of using the:to
option.- Default configuration hook via
Handler.default_config
Lita::Response
, a new object for handlers to interact with- Many top-level methods moved from
Handler
to the response objectreply
args
user
matches
command?
(now on the message object only)scan
(now on the message object only)
- Many top-level methods moved from
- Shell adapter
Lita.config.adapter.private_chat = true
treats all messages as directed to Lita- "Shell User" is created in Redis so handlers can look it up
Lita.clear_config
method added to reset all configuration- Robot mention name is now case insensitive