BlameScope
Track events per user
Client mode
Rails setup
# config/application.rb
config.middleware.use Blamescope::Middleware, rabbit: 'amqp://user:pass@host:port/vhost'
Rack setup
# config.ru
use Blamescope::Middleware, rabbit: 'amqp://user:pass@host:port/vhost'
Usage
class User < ActiveRecord::Base
include Blamescope
blame_activerecord # Tracks create, update and delete action
def custom_action
# Some action
end
blame_method :custom_action
end
At the current time it adds such methods:
- blame_activerecord - track create, update, delete of ActiveRecord model
- blame_method - track specific method
- blame_methods - track multiple methods
You can also track static methods and Devise is the only authorization it supports.
Server mode
blamescope -d postgres://user:password@host/database -r amqp://user:pass@host:port/vhost
Installation
Add this line to your application's Gemfile:
gem 'blamescope'
And then execute:
$ bundle
Or install it yourself as:
$ gem install blamescope
Usage
TODO: Write usage instructions here
Contributing
- Fork it ( https://github.com/[my-github-username]/blamescope/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