acts_as_blamable 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +4 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/acts_as_blamable.gemspec +8 -8
- data/spec/acts_as_blamable_spec.rb +6 -6
- data/spec/spec_helper.rb +2 -1
- metadata +11 -11
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -43,3 +43,7 @@ Modify the defaults if necessary
|
|
43
43
|
class Comment < ActiveRecord::Base
|
44
44
|
acts_as_blamable :class_name => 'Person', :creator_foreign_key => :creator_id, :updater_foreign_key => :updater_id, :current_user_method => 'current_person'
|
45
45
|
end
|
46
|
+
|
47
|
+
== Specs
|
48
|
+
|
49
|
+
Tested with Ruby on Rails version: <tt>3.0.0.beta4</tt> and ruby version <tt>Ruby Enterprise Edition 1.8.7 build 2010.02</tt>.
|
data/Rakefile
CHANGED
@@ -11,8 +11,8 @@ begin
|
|
11
11
|
gem.homepage = 'http://github.com/create-philipp-ullmann/acts_as_blamable'
|
12
12
|
gem.authors = ['Philipp Ullmann']
|
13
13
|
gem.add_development_dependency 'rspec', '>= 1.3.0'
|
14
|
-
gem.add_development_dependency 'sqlite3-ruby', '>=1.
|
15
|
-
gem.add_development_dependency 'activerecord', '>= 3.0.0.
|
14
|
+
gem.add_development_dependency 'sqlite3-ruby', '>= 1.3.0'
|
15
|
+
gem.add_development_dependency 'activerecord', '>= 3.0.0.beta4'
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
18
18
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/acts_as_blamable.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_blamable}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Philipp Ullmann"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-06-28}
|
13
13
|
s.description = %q{Automatically set created_by and updated_by fields}
|
14
14
|
s.email = %q{philipp.ullmann@create.at}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,17 +46,17 @@ Gem::Specification.new do |s|
|
|
46
46
|
|
47
47
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
48
48
|
s.add_development_dependency(%q<rspec>, [">= 1.3.0"])
|
49
|
-
s.add_development_dependency(%q<sqlite3-ruby>, [">= 1.
|
50
|
-
s.add_development_dependency(%q<activerecord>, [">= 3.0.0.
|
49
|
+
s.add_development_dependency(%q<sqlite3-ruby>, [">= 1.3.0"])
|
50
|
+
s.add_development_dependency(%q<activerecord>, [">= 3.0.0.beta4"])
|
51
51
|
else
|
52
52
|
s.add_dependency(%q<rspec>, [">= 1.3.0"])
|
53
|
-
s.add_dependency(%q<sqlite3-ruby>, [">= 1.
|
54
|
-
s.add_dependency(%q<activerecord>, [">= 3.0.0.
|
53
|
+
s.add_dependency(%q<sqlite3-ruby>, [">= 1.3.0"])
|
54
|
+
s.add_dependency(%q<activerecord>, [">= 3.0.0.beta4"])
|
55
55
|
end
|
56
56
|
else
|
57
57
|
s.add_dependency(%q<rspec>, [">= 1.3.0"])
|
58
|
-
s.add_dependency(%q<sqlite3-ruby>, [">= 1.
|
59
|
-
s.add_dependency(%q<activerecord>, [">= 3.0.0.
|
58
|
+
s.add_dependency(%q<sqlite3-ruby>, [">= 1.3.0"])
|
59
|
+
s.add_dependency(%q<activerecord>, [">= 3.0.0.beta4"])
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe Post do
|
4
4
|
before(:each) do
|
5
5
|
setup_db
|
6
6
|
@user = User.create!
|
@@ -11,19 +11,19 @@ describe 'A Post' do
|
|
11
11
|
teardown_db
|
12
12
|
end
|
13
13
|
|
14
|
-
it '
|
14
|
+
it '#creator' do
|
15
15
|
@post.creator.reload.should == @user
|
16
16
|
@post.updater.should be_nil
|
17
17
|
end
|
18
18
|
|
19
|
-
it '
|
19
|
+
it '#updater' do
|
20
20
|
@post.update_attributes :content => 'content'
|
21
21
|
@post.creator.reload.should == @user
|
22
22
|
@post.updater.reload.should == @user
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
describe
|
26
|
+
describe Comment do
|
27
27
|
before(:each) do
|
28
28
|
setup_db
|
29
29
|
@person = Person.create!
|
@@ -34,12 +34,12 @@ describe 'A Comment' do
|
|
34
34
|
teardown_db
|
35
35
|
end
|
36
36
|
|
37
|
-
it '
|
37
|
+
it '#creator' do
|
38
38
|
@comment.creator.reload.should == @person
|
39
39
|
@comment.updater.should be_nil
|
40
40
|
end
|
41
41
|
|
42
|
-
it '
|
42
|
+
it '#updater' do
|
43
43
|
@comment.update_attributes :content => 'content'
|
44
44
|
@comment.creator.reload.should == @person
|
45
45
|
@comment.updater.reload.should == @person
|
data/spec/spec_helper.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
2
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'rubygems'
|
3
4
|
require 'active_record'
|
4
5
|
require 'acts_as_blamable'
|
5
6
|
require 'spec'
|
6
7
|
require 'spec/autorun'
|
7
8
|
|
8
|
-
ActiveRecord::Base.establish_connection(:adapter =>
|
9
|
+
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')
|
9
10
|
|
10
11
|
def setup_db
|
11
12
|
ActiveRecord::Schema.define(:version => 1) do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_blamable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Philipp Ullmann
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-06-28 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -42,12 +42,12 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
hash:
|
45
|
+
hash: 27
|
46
46
|
segments:
|
47
47
|
- 1
|
48
|
-
-
|
49
|
-
-
|
50
|
-
version: 1.
|
48
|
+
- 3
|
49
|
+
- 0
|
50
|
+
version: 1.3.0
|
51
51
|
type: :development
|
52
52
|
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|
@@ -58,13 +58,13 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
61
|
+
hash: -1848230024
|
62
62
|
segments:
|
63
63
|
- 3
|
64
64
|
- 0
|
65
65
|
- 0
|
66
|
-
-
|
67
|
-
version: 3.0.0.
|
66
|
+
- beta4
|
67
|
+
version: 3.0.0.beta4
|
68
68
|
type: :development
|
69
69
|
version_requirements: *id003
|
70
70
|
description: Automatically set created_by and updated_by fields
|