*No longer mantained* hoptoad notification client for merb, for a replacement, check the merb_hoptoad_notifier or rack_hoptoad projects.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
hoptoad_notifier.rb

README

This plugin is no longer being maintained.

It seems that the rack_hoptoad project is what you should use for Merb now:
http://github.com/atmos/rack_hoptoad

If you need a merb specific hoptoad plugin check:
http://github.com/atmos/merb_hoptoad_notifier

--

This is a basic adaption of the rails hoptoad plugin for use with merb (only essential features included).

This plugin: http://github.com/joakimk/hoptoad_notifier_merb/tree/master
The original: http://github.com/thoughtbot/hoptoad_notifier/tree/master

Usage:

1) Download the plugin into vendor/plugins.

2) Create an exceptions controller like this:

class Exceptions < Merb::Controller
   
  def internal_server_error
    HoptoadNotifier.notify_hoptoad(request, session) if [ 'staging', 'production' ].include?(Merb.env)
    @exception = request.params[:exception]
    @exception_name = @exception.name.camelize 
    render
  end
  
end

3) Add the following to init.rb:

load File.join(File.join(File.dirname(__FILE__)), "..", "vendor", "plugins", "hoptoad_notifier_merb", "hoptoad_notifier.rb")

HoptoadNotifier.configure do |config|
  config.api_key = '...'
end

4) Restart the server, trigger an error and check that it arrived at hoptoad :)