Rnotifier
Events and Exception catcher libraray.
Installation
Add this line to your application's Gemfile:
gem 'rnotifier'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rnotifier
Usage
rnotifier install 'API-KEY' # This will create 'config/rnotifier.yaml' file.
Config file options
environments: development,test #default is production
capture_code: true #default false
api_host: 'http://yourapp.com' #default http://rnotifier.com
ignore_exceptions: ActiveRecord::RecordNotFound,AbstractController::ActionNotFound,ActionController::RoutingError
ignore_bots: Googlebot
To test config
rnotifier test #this will send test exception to rnotifier.
Send events and alerts
Rnotifier.event(:sign_up, {:username => 'Jiren', :email => '[email protected]', :using => 'facebook' })
Rnotifier.alert(:order_fail, {:user => 'Jiren', :product => 'PS3', :order_id => '321' })
You can also sends tags with 'event' and 'alert' i.e
Rnotifier.event(
:sign_up,
{:username => 'Jiren', :email => '[email protected]', :using => 'facebook' },
{:tags => ['newsletter']}
)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
This is released under the MIT license.