github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

atmos / rack_hoptoad

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 58
    • 7
  • Source
  • Commits
  • Network (7)
  • Issues (1)
  • Downloads (5)
  • Wiki (2)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (5)
    • v0.1.1
    • v0.1.0
    • v0.0.4
    • v0.0.3
    • v0.0.2
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

middleware for posting exceptions to http://hoptoadapp.com — Read more

  cancel

http://github.com/atmos/rack_hoptoad

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

next version is 0.1.2 
atmos (author)
Fri Dec 25 14:06:31 -0800 2009
commit  b705a5cb563f0407d1b38f4309c3bc429d326155
tree    26713796f2927297a68ac8990a7f81a25407bfa3
parent  5cb0c31d349c11d94359e0d481c0fccf85e19210
rack_hoptoad /
name age
history
message
file .gitignore Fri Nov 20 16:58:25 -0800 2009 update to the v2 api of hoptoad to silence thei... [atmos]
file Gemfile Fri Dec 25 14:04:32 -0800 2009 actually filter environmental variables posted ... [atmos]
file LICENSE Sun May 10 17:14:06 -0700 2009 initial import of the hoptoad notifier code. i... [atmos]
file README.md Fri Dec 25 14:04:32 -0800 2009 actually filter environmental variables posted ... [atmos]
file Rakefile Fri Dec 25 14:04:32 -0800 2009 actually filter environmental variables posted ... [atmos]
file TODO Sun May 10 17:14:06 -0700 2009 initial import of the hoptoad notifier code. i... [atmos]
directory lib/ Fri Dec 25 14:06:31 -0800 2009 next version is 0.1.2 [atmos]
directory spec/ Fri Dec 25 14:04:32 -0800 2009 actually filter environmental variables posted ... [atmos]
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::Hoptoad, 'fd48c7d26f724503a0280f808f44b339fc65fab8'

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

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

If you want to post exceptions in an environment other than staging or production(the defaults)

use Rack::Hoptoad, 'fd48c7d26f724503a0280f808f44b339fc65fab8' do |notifier|
  notifier.report_under << 'custom'
end

If you want to use an environmental variable other than RACK_ENV and still have it post

use Rack::Hoptoad, 'fd48c7d26f724503a0280f808f44b339fc65fab8', 'MERB_ENV' do |notifier|
  notifier.report_under        << 'custom'
  notifier.environment_filters << %w(MY_SECRET_KEY MY_SECRET_TOKEN)
end

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. Normally this is done with a 500.html in the document root.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server