class Pakyow::Fail::Handlers::Hipchat
Constants
- NICENAME
Public Class Methods
new(app)
click to toggle source
# File lib/pakyow-fail-hipchat.rb, line 17 def initialize(app) req = app.req body = [] body << "<strong>#{req.method.upcase} #{req.path} (#{req.error.class.name}) #{CGI.escapeHTML(req.error.message)}</strong>" body << "Params: #{app.params}" body << "Session: #{app.session}" body.concat(req.error.backtrace) client[Config.fail.hipchat_room].send(Config.fail.hipchat_sender, body.join('<br>'), color: Config.fail.hipchat_color) rescue StandardError => e app.logger.error "pakyow-hipchat failed: #{e.message}" end
Private Instance Methods
client()
click to toggle source
# File lib/pakyow-fail-hipchat.rb, line 33 def client @client ||= HipChat::Client.new(Config.fail.hipchat_api_token) end