https://github.com/zapnap/rack_hoptoad
middleware for posting exceptions to http://hoptoadapp.com
https://github.com/zapnap/rack_hoptoad
Last synced: 8 months ago
JSON representation
middleware for posting exceptions to http://hoptoadapp.com
- Host: GitHub
- URL: https://github.com/zapnap/rack_hoptoad
- Owner: zapnap
- License: mit
- Created: 2009-09-09T13:21:08.000Z (almost 17 years ago)
- Default Branch: master
- Last Pushed: 2009-05-15T00:40:37.000Z (about 17 years ago)
- Last Synced: 2025-03-01T12:49:26.646Z (over 1 year ago)
- Language: Ruby
- Homepage: http://github.com/atmos/rack_hoptoad
- Size: 83 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rack_hoptoad
============
A gem that provides exception notifications to [hoptoad](http://hoptoadapp.com) 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.