Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atmos/merb_hoptoad_notifier
A merb plugin for hoptoad notification
https://github.com/atmos/merb_hoptoad_notifier
Last synced: 3 months ago
JSON representation
A merb plugin for hoptoad notification
- Host: GitHub
- URL: https://github.com/atmos/merb_hoptoad_notifier
- Owner: atmos
- License: mit
- Created: 2008-10-11T20:11:30.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2010-02-17T18:34:21.000Z (almost 15 years ago)
- Last Synced: 2024-09-18T11:50:06.925Z (4 months ago)
- Language: Ruby
- Homepage: http://github.com/atmos/merb_hoptoad_notifier
- Size: 111 KB
- Stars: 7
- Watchers: 6
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
merb_hoptoad_notifier
---------------------------------------------
This is merb plugin for exception notification with hoptoad. It should work with
any merb app that's based on merb 1.0 and higherThis plugin: http://github.com/atmos/merb_hoptoad_notifier/tree/master
The original: http://github.com/thoughtbot/hoptoad_notifier/tree/masterUsage:
1) Get your api key for your app from hoptoadapp.com
2) Add the api key to config/hoptoad.yml with a similar syntax as the following
---
:development: &defaults
:api_key: ZOMGLOLROFLMAO:rake:
<<: *defaults:test:
<<: *defaults:production:
:api_key: UBERSECRETSHIT3) Require hoptoad in init.rb
require 'merb_hoptoad_notifier'4) Add the following method to your Exceptions controller. Depending on your merb version you'll need to use the exceptions,standard_error, or internal_server error as the action name. Kinda weak, but the API changed a lot in 0.9.x
class Exceptions < Merb::Controller
if %w( staging production ).include?(Merb.env)
def standard_error
HoptoadNotifier.notify_hoptoad(request, session)
render
end
end
end5) Restart the server, trigger an error(in staging or prod) and check that it arrived at hoptoad :)
Filtersing your post environment
--------------------------------
If you have environmental variables set in your ruby process that should not be sent to hoptoad,
there's a mechanism for filtering those attributes now. Throw something like this in
config/init.rbMerb::BootLoader.after_app_loads do
HoptoadNotifier.environment_filters = %w(^AWS ^EC2 SECRET PRIVATE KEY)
endEach of these words will be compiled into a regex so you should be able to use anchors if needed.
Thanks to the following GitHubbers
----------------------------------
joakimk, fairchild and cv.