= hoptoad-notifier-client
Posts exceptions to http://www.optoadapp.com using their api: http://wesmaldonado.hoptoadapp.com/pages/api
== DESCRIPTION:
Sends exceptions to Hoptoad [http://www.hoptoadapp.com/]. Supports reporting against multiple api keys and customized error_types/messages when you're too lazy to subclass exception but still want to report something.
or...
A standalone tiny HoptoadNotifier. Supports posting to multiple projects (aka api keys). Posting exceptions or information ala Eugene Bolshakov's post http://www.taknado.com/2008/10/19/hoptoad-as-an-online-events-log with ease.
== FEATURES/PROBLEMS:
=== Features ===
- Easy to use in non-rails apps and less code than doing it yourself.
- Matches the HoptoadNotifier API
- Supports multiple projects (api keys) so you can configure it once via an intializer in rails and have it report against many projects (or business units/features/etc.)
=== Problems ===
- Its only a few lines of code, so why use it at all? :)
- I'm lazy and need to move the specs from the work project into this branch.
== SYNOPSIS:
HoptoadNotifierClient.configure do |toad|
# Only have one project on Hoptoad?
# Register a default and you can use the shorter HoptoadNotifierClient.notify(exception) method
toad.register(:default, 'default-api-key')
# What!?!? Several projects or sub components you want to report via separate projects?
# Register them with a names like :profitable_feature
toad.register(:profitable_feature, 'profitable-feature-api-key')
end
Sometime later in your code...
begin
raise 'Not a happy camper!'
rescue => ex
# reports using :default project
HoptoadNotifierClient.notify(ex)
# reports using profitable feature project, unbelievable!
HoptoadNotifierClient.create(:profitable_feature).notify(exception)
# reports random information for the profitable feature project, unbelievable!
error_report = OpenStruct.new(:error_type => 'random thing', :custom_message => 'where am I?')
# Hoptoad Notifcation Subject Line looks like this
# [Profitable Feature] : #{error_type}: #{custom_message}
HoptoadNotifierClient.create(:profitable_feature).notify(error_report, more_detail_as_request_parameter)
end
== REQUIREMENTS:
== INSTALL:
- TODO (sudo gem install, anything else)
== LICENSE:
(The MIT License)
Copyright (c) 2008 Wes Maldonado
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.