Trackets
WIP gem for Trackets.com service
Installation
Add this line to your application's Gemfile:
gem 'trackets'
And then execute:
$ bundle
Usage
$ rails g trackets:install API_KEY
$ rake trackets:test # To send testing exception
Rails
To include JavaScript tracking code in your app just add this line to your app/views/layout/application.html.erb
<%= trackets_include_tag %>
Rack
Simple example.ru
require 'rack'
require 'trackets'
Trackets.setup do |config|
config.api_key = "insert-valid-api-key"
end
app = Rack::Builder.app do
run lambda { |env| raise "Testing Error" }
end
use Trackets::Middleware::RackExceptionHandler
run app
Rake tasks
$ rake trackets:notify MESSAGE="Custom message from Rake"
Contributing
- Fork it ( https://github.com/[my-github-username]/trackets/fork )
- 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 a new Pull Request