clerk 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/clerk.gemspec +7 -4
  2. data/lib/clerk/version.rb +1 -1
  3. metadata +16 -46
@@ -2,13 +2,16 @@
2
2
  require File.expand_path('../lib/clerk/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Jesse House"]
6
- gem.email = ["jesse.house@gmail.com"]
7
- gem.description = File.open('README.md') { |f| f.read }
8
- gem.summary = %q{
5
+
6
+ summary = %q{
9
7
  For Rails applications - add creator and updater to your ActiveRecord models
10
8
  and automatically set these from current_user
11
9
  }
10
+
11
+ gem.authors = ["Jesse House"]
12
+ gem.email = ["jesse.house@gmail.com"]
13
+ gem.description = "#{summary}\nSee the README on github for more info"
14
+ gem.summary = summary
12
15
  gem.homepage = "https://github.com/house9/clerk"
13
16
 
14
17
  gem.files = `git ls-files`.split($\)
@@ -1,3 +1,3 @@
1
1
  module Clerk
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70208941589700 !ruby/object:Gem::Requirement
16
+ requirement: &70277505884660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70208941589700
24
+ version_requirements: *70277505884660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: railties
27
- requirement: &70208941588800 !ruby/object:Gem::Requirement
27
+ requirement: &70277505883260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70208941588800
35
+ version_requirements: *70277505883260
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sentient_user
38
- requirement: &70208941587760 !ruby/object:Gem::Requirement
38
+ requirement: &70277505882440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.3.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70208941587760
46
+ version_requirements: *70277505882440
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70208941586920 !ruby/object:Gem::Requirement
49
+ requirement: &70277505881640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.1.3
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70208941586920
57
+ version_requirements: *70277505881640
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &70208941586240 !ruby/object:Gem::Requirement
60
+ requirement: &70277505880820 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 2.9.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70208941586240
68
+ version_requirements: *70277505880820
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sqlite3
71
- requirement: &70208941585700 !ruby/object:Gem::Requirement
71
+ requirement: &70277505880280 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,40 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70208941585700
80
- description: ! "# Clerk\n\nClerk adds the following attributes to your ActiveRecord
81
- objects\n\n* creator\n* updater\n\nUsed in conjunction with the [`sentient_user`](https://github.com/bokmann/sentient_user)
82
- gem, \nClerk will automatically update these attributes using `before_create` and
83
- `before_update`\nActiveRecord callback methods\n\nThe gem assumes the following:\n\n*
84
- you have a User model\n* you have a `current_user` method on your ApplicationController\n*
85
- you are using columns named `created_by_id` and `updated_by_id` on your database
86
- tables\n* these columns are foreign keys to users.id\n\n## Installation\n\nAdd this
87
- line to your application's Gemfile:\n\n gem 'clerk'\n\nAnd then execute:\n\n
88
- \ $ bundle\n\nOr install it yourself as:\n\n $ gem install clerk\n \nThen
89
- follow the directions under Setup\n\n## Setup\n\nStep 1: include the `sentient_user`
90
- SentientUser module on your User `/app/models/user.rb`\n\n class User < ActiveRecord::Base\n
91
- \ include SentientUser\n endis\n \nStep 2: include the `sentient_user`
92
- SentientController module on your ApplicationController `/app/controllers/application_controller.rb`\n
93
- \ \n class ApplicationController < ActionController::Base\n protect_from_forgery\n
94
- \ include SentientController\n \n # ...\n end \n \nStep 3:
95
- Add the `track_who_does_it` macro to any ActiveRecord models that have `created_by_id`
96
- and `updated_by_id` database columns\n \n class Post < ActiveRecord::Base\n
97
- \ track_who_does_it\n end\n \nWe probably want our User model to `track_who_does_it`
98
- as well\n\n class User < ActiveRecord::Base\n include SentientUser\n track_who_does_it\n
99
- \ end\n\n## Usage \n\nOnce you have finished the Setup and restarted your rails
100
- server \nyour models should automatically update the creator and the updater attributes
101
- after being saved.\n\nSince your models have the creator and updater attributes
102
- you can display these in any views\n\n Updated by <%= @post.updater.full_name
103
- %> at <%= l(@post.updated_at, :format => :long) %>\n \nSince we are using `sentient_user`
104
- you can also set the updater or creator in tests or rake tasks\n\n user = User.find(5150)\n
105
- \ user.make_current # now all models marked as track_who_does_it will save with
106
- this user tracked\n Post.create!(:title => \"New Post\")\n Post.last.creator
107
- == user # => true\n\n## Resources used in the development of this gem\n\n* [http://ryanbigg.com/2011/01/extending-active-record/](http://ryanbigg.com/2011/01/extending-active-record/)\n*
108
- [http://charlotteruby.org/gem_workshop_tutorial/](http://charlotteruby.org/gem_workshop_tutorial/)\n*
109
- [http://yehudakatz.com/2009/11/12/better-ruby-idioms/](http://yehudakatz.com/2009/11/12/better-ruby-idioms/)\n*
110
- [http://www.cowboycoded.com/2011/01/31/developing-is_able-or-acts_as-plugins-for-rails/](http://www.cowboycoded.com/2011/01/31/developing-is_able-or-acts_as-plugins-for-rails/)\n*
111
- [http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html](http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html)\n*
112
- [https://github.com/bokmann/sentient_user](https://github.com/bokmann/sentient_user)\n"
79
+ version_requirements: *70277505880280
80
+ description: ! "\n For Rails applications - add creator and updater to your ActiveRecord
81
+ models \n and automatically set these from current_user\n \nSee the README on
82
+ github for more info"
113
83
  email:
114
84
  - jesse.house@gmail.com
115
85
  executables: []