0.0
No commit activity in last 3 years
No release in over 3 years
Simple metric for rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
= 1.8.0
= 3.1.4
~> 3.2.13
>= 0
 Project Readme

GarudaMetric

Populate simple metric data, and store the to MongoDB

Installation

Add this line to your application's Gemfile:

gem 'garuda_metric'
gem 'mongoid', '~> 3.1.4'

And then execute:

$ bundle

Or install it yourself as:

$ gem install garuda_metric

Usage

Run this command

$ rails generate garuda_metric

change your mongoid.yml configuration in config/mongoid.yml depends on your MongoDB configuration

add these following lines to config/application.rb to prevent default mongoid overrides

config.generators do |g|
  g.orm :active_record
end

To get available data $ rails c

# get the first data
$ GarudaMetric::Metric.first

# get interval time data
$ GarudaMetric::MetricMetric.get_interval_data(start_time...end_time)

# Get 10 last subscribed notifications
$ GarudaMetric.order_last

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request