Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elcuervo/minuteman-rails
Use Minuteman easily in your Rails app
https://github.com/elcuervo/minuteman-rails
Last synced: 3 months ago
JSON representation
Use Minuteman easily in your Rails app
- Host: GitHub
- URL: https://github.com/elcuervo/minuteman-rails
- Owner: elcuervo
- License: mit
- Created: 2012-11-29T02:37:34.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-11T19:30:12.000Z (almost 11 years ago)
- Last Synced: 2024-04-29T19:20:32.598Z (9 months ago)
- Language: Ruby
- Homepage:
- Size: 143 KB
- Stars: 64
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Minuteman Rails
[![Code Climate](https://codeclimate.com/github/elcuervo/minuteman-rails.png)](https://codeclimate.com/github/elcuervo/minuteman-rails)
[![Build Status](https://secure.travis-ci.org/elcuervo/minuteman-rails.png?branch=master)](https://travis-ci.org/elcuervo/minuteman-rails)Track everything in your Rails app using Minuteman
You can use it within your Controllers to track stuff:
This are the new toys you'll have: `track`, `events`, `analytics`.
## Installation
```bash
gem install minuteman-rails
```## Initializer
```ruby
# Optional
# config/initializers/minuteman.rbMinuteman::Rails.configure |c|
c.silent = true
end
```## Example
```ruby
class SomethingController < ApplicationController
def create
# Track an event as you would using Minuteman
track("something:create", current_user.id) if current_user
enddef index
# List all the events
@current_events = events
enddef show
# Access the analytics and make operations
@group = analytics.month("something:create") - analytics.month("free:users")
end
end
```