Sha256: 5b75144dc171d29298d990ef3594fe5a003cb159f61fe9e330b4b9a68bbab426

Contents?: true

Size: 1.64 KB

Versions: 4

Compression:

Stored size: 1.64 KB

Contents

= EotB Gem

Rails plugin which allow you easily track and observe your apps.

== Installation

=== RubyGems

Install gem in traditional way

  $ gem install eotb

=== GitHub

Install gem from GitHub repository

  $ git clone git://github.com/Quirke/eotb_rails_plugin.git
  $ cd eotb_rails_plugin
  $ rake build
  $ gem install ./pkg/eotb-0.4.2.gem

=== Bundler

Add this line to Gemfile in your rails application

  gem 'eotb'

And run

  $ bundle install

== Getting API Key

Create new account on Eotb website and add new application by clicking "Applications ยป Add application".
As a result you will get API Key of your application.

== Using in your apps

Add file <tt>eotb.rb</tt> in directory <tt>config/initializers</tt> of your rails application with content:

  require 'Eotb'
  Eotb.configure("your_api_key", "host", "port") # default host and port are 127.0.0.1 and 3000

Register events by:

  Eotb.register_event("user", "did_sth", {:username => "John", :time => "12:39:00"}) # actor, action, subject

=== Examples

Register actor and his action

  Eotb.register_event("user", "registered")

Register subject of event

  Eotb.register_event("user", "registered", {:username => "John", :when => "today"})

Use symbols instead of strings

  Eotb.register_event(:admin, :deleted, {:what => "News", :category => "Ruby"})

Register hashes and nested hashes

  Eotb.register_event({:username => "John", :mail => "john@example.com"}, :connected, {:with_values => {:a => 20, :b => 30}, :when => "Now"})

You can register any type of objects

  Eotb.register_event(Object.new, :fed, {:pet => Dog.new})

== Copyright

Copyright (c) 2010 Ragnarson. See LICENSE for details.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eotb-0.4.6 README.rdoc
eotb-0.4.5 README.rdoc
eotb-0.4.4 README.rdoc
eotb-0.4.3 README.rdoc