A plugin for debugging Lita interactively, in production.
Add lita-debug to your Lita instance's Gemfile:
gem "lita-debug"
# lita_config.rb
Lita.configure do |config|
config.handlers.debug.enable_eval = true
config.handlers.debug.restrict_eval_to = [:admins]
config.handlers.debug.restrict_debug_to = [:admins, :developers]
end
Lita > lita debug
---
:server:
:hostname: minion.local
:room: !ruby/object:Lita::Room
id: shell
metadata: {}
name: shell
:user: !ruby/object:Lita::User
id: '1'
metadata:
name: Shell User
name: Shell User
Lita > lita eval response.room.name
"shell"
Lita > lita eval robot.name
"Lita"
Lita > lita eval 1+2
3