README.md in meter_cat-0.0.6 vs README.md in meter_cat-0.0.7

- old
+ new

@@ -1,5 +1,11 @@ +[![Build Status](https://travis-ci.org/schrodingersbox/meter_cat.svg?branch=master)](https://travis-ci.org/schrodingersbox/meter_cat) +[![Coverage Status](https://coveralls.io/repos/schrodingersbox/meter_cat/badge.png?branch=master)](https://coveralls.io/r/schrodingersbox/meter_cat?branch=master) +[![Code Climate](https://codeclimate.com/github/schrodingersbox/meter_cat.png)](https://codeclimate.com/github/schrodingersbox/meter_cat) +[![Dependency Status](https://gemnasium.com/schrodingersbox/meter_cat.png)](https://gemnasium.com/schrodingersbox/meter_cat) +[![Gem Version](https://badge.fury.io/rb/meter_cat.png)](http://badge.fury.io/rb/meter_cat) + # schrodingersbox/meter_cat README This Rails engine makes monitoring the usage history of your Rails environment easier. It provides meters, similar to the odometer in a car, which can be incremented when significant actions happen in your app, and are recorded on a daily basis. @@ -14,11 +20,11 @@ ## Getting Started 1. Add this to your `Gemfile` and `bundle install` - gem 'meter_cat', :git => 'https://github.com/schrodingersbox/meter_cat.git' + gem 'meter_cat' 2. Add this to your `config/routes.rb` mount MeterCat::Engine => '/meter_cat' @@ -51,10 +57,18 @@ config.to = 'ops@schrodingersbox.com' config.from = 'ops@schrodingersbox.com' config.subject = "#{Rails.env.upcase} MeterCat Report" config.mail_days = 7 + config.authenticate_with do + warden.authenticate! scope: :user + end + + config.authorize_with do + redirect_to main_app.root_path unless current_user.try(:admin?) + end + end ## How To ### Increment A Meter @@ -63,21 +77,21 @@ MeterCat.add( :any_name_you_like ) You can also optionally pass a value and date. - MeterCat.add( value = 1, created_on = Date.today ) + MeterCat.add( :any_name_you_like, value = 1, created_on = Date.today ) ### Set A Meter The easiest way is to call `MeterCat.set`. MeterCat.set( :any_name_you_like ) You can also optionally pass a value and date. - MeterCat.set( value = 1, created_on = Date.today ) + MeterCat.set( :any_name_you_like, value = 1, created_on = Date.today ) This is useful where you want to record a single value for the day, such as from a daily cron job. ### Add Calculated Values @@ -164,11 +178,8 @@ * [Add Achievement Badges to Your Gem README](http://elgalu.github.io/2013/add-achievement-badges-to-your-gem-readme/) * [Publishing your gem](http://guides.rubygems.org/publishing/) ## TODO - * Badge it up - see split cat - - * Publish as gem - * Action to bump meter and return an image, default to 1px transparent * Rake task to bump a meter with args + * Group report table and descriptions by prefixes ( e.g. foo_a and foo_b = a + b in a foo group )