honesty 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +35 -32
  2. data/lib/version.rb +1 -1
  3. metadata +7 -7
@@ -1,56 +1,59 @@
1
- Honesty
2
- =================
1
+ = Honesty
3
2
 
4
3
  Honesty allows developers to store and track user activities and system events in
5
4
  a human-readable, easily-searchable format.
6
5
 
7
- == Resources
6
+ == Installation
8
7
 
9
- Install
8
+ === Get the gem
10
9
 
11
- * gem install honesty
12
- * If using bundler:
13
- ** Add "gem 'honesty'" to your Gemfile
14
- ** "bundle install"
10
+ Add Honesty to your Gemfile:
15
11
 
16
-
17
- Generate the model:
12
+ gem 'honesty'
13
+
14
+ === Generate the model
15
+
16
+ Rails 3:
17
+
18
+ rails g honesty
18
19
 
19
- ** Rails 3: rails g honesty
20
- ** Rails 2: script/generate honesty
20
+ Rails 2:
21
+
22
+ script/generate honesty
21
23
 
22
24
  Migrate:
23
- ** rake db:migrate
25
+
26
+ rake db:migrate
24
27
 
25
28
  == Usage
26
29
 
27
- * use Honesty in your ActiveRecord model.
30
+ === Use Honesty in your ActiveRecord model:
28
31
 
29
- class Shoe < ActiveRecord::Base
30
- honesty
31
- end
32
-
33
- * Add a fact to a model instance
32
+ class Shoe < ActiveRecord::Base
33
+ honesty
34
+ end
35
+
36
+ === Add a fact to a model instance:
34
37
 
35
- Parameters:
36
- * Context - the object being acted on or the entity being tracked.
37
- * Agent - the actor, so to speak.
38
- * Action - the action taking place.
38
+ Parameters:
39
+ * Context - the object being acted on or the entity being tracked.
40
+ * Agent - the actor, so to speak.
41
+ * Action - the action taking place.
39
42
 
40
- shoe = Shoe.create
41
- shoe.fact("Shoe", "Tim Boisvert", "Created Adidas Superstar II")
43
+ If you want to explicitly denote the context, pass all three parameters
42
44
 
43
- * If you want to short-cut the fact and use the object's class name as the context:
45
+ shoe = Shoe.create
46
+ shoe.fact("Shoe", "Tim Boisvert", "Created Adidas Superstar II")
44
47
 
45
- shoe = Shoe.create
46
- shoe.fact("Tim Boisvert", "Created Adidas Superstar II")
48
+ If you want to short-cut the fact and use the object's class name as the context, just pass in the agent and the action
47
49
 
48
- In this case the context would've been set to the class name of the object calling it -- in this case, Shoe
50
+ shoe = Shoe.create
51
+ shoe.fact("Tim Boisvert", "Created Adidas Superstar II")
49
52
 
50
- * Get facts:
53
+ === Get facts
51
54
 
52
- shoe = Shoe.find(1)
53
- facts = shoe.facts.all
55
+ shoe = Shoe.find(1)
56
+ facts = shoe.facts.all
54
57
 
55
58
  == Credits
56
59
 
@@ -1,3 +1,3 @@
1
1
  module Honesty
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honesty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &14777840 !ruby/object:Gem::Requirement
16
+ requirement: &19185720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *14777840
24
+ version_requirements: *19185720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &14777140 !ruby/object:Gem::Requirement
27
+ requirement: &19185040 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *14777140
35
+ version_requirements: *19185040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rails
38
- requirement: &14776420 !ruby/object:Gem::Requirement
38
+ requirement: &19184620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *14776420
46
+ version_requirements: *19184620
47
47
  description: Store and track user activities and system events in a human-readable,
48
48
  easily-searchable format
49
49
  email: boisvert@gmail.com