Skip to content
middleware for posting exceptions to http://hoptoadapp.com http://github.com/atmos/rack_hoptoad
Find file
Pull request Compare This branch is even with voxdolo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
LICENSE
README.md
Rakefile
TODO

README.md

rack_hoptoad

A gem that provides exception notifications to hoptoad as rack middleware.

Usage

Throw something like this in your config.ru to enable notifications.

require 'rack_hoptoad'

use Rack::HoptoadNotifier, 'fd48c7d26f724503a0280f808f44b339fc65fab8'

You can also exclude certain sensitive environmental variables using the block syntax

require 'rack_hoptoad'

use Rack::HoptoadNotifier, 'fd48c7d26f724503a0280f808f44b339fc65fab8' do |notifier|
  notifier.environment_filters << %w(MY_SECRET_KEY MY_SECRET_TOKEN)
end

If your RACK_ENV variable is set to production or staging it'll actually post to hoptoad. It won't process in the other environments.

Installation

% sudo gem install rack_hoptoad

Sinatra Notes

In order for exceptions to propagate up to Rack in Sinatra you need to enable raise_errors

class MyApp < Sinatra::Default
  enable :raise_errors
end

Note that the errors block does not execute so you'll need to handle the 500 elsewhere.

Something went wrong with that request. Please try again.