acts_as_votable 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +5 -4
- data/lib/acts_as_votable/version.rb +1 -1
- data/lib/acts_as_votable/votable.rb +2 -2
- data/lib/acts_as_votable/voter.rb +1 -1
- data/spec/votable_spec.rb +1 -1
- data/spec/voter_spec.rb +4 -4
- metadata +16 -14
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
acts_as_votable (0.1.
|
4
|
+
acts_as_votable (0.1.3)
|
5
5
|
rails (>= 3.0.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -46,7 +46,7 @@ GEM
|
|
46
46
|
mime-types (~> 1.16)
|
47
47
|
treetop (~> 1.4.8)
|
48
48
|
mime-types (1.16)
|
49
|
-
polyglot (0.3.
|
49
|
+
polyglot (0.3.2)
|
50
50
|
rack (1.2.3)
|
51
51
|
rack-mount (0.6.14)
|
52
52
|
rack (>= 1.0.0)
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
rake (>= 0.8.7)
|
67
67
|
rdoc (~> 3.4)
|
68
68
|
thor (~> 0.14.4)
|
69
|
-
rake (0.
|
69
|
+
rake (0.9.2)
|
70
70
|
rdoc (3.8)
|
71
71
|
rspec (2.3.0)
|
72
72
|
rspec-core (~> 2.3.0)
|
@@ -78,7 +78,8 @@ GEM
|
|
78
78
|
rspec-mocks (2.3.0)
|
79
79
|
sqlite3 (1.3.3)
|
80
80
|
thor (0.14.6)
|
81
|
-
treetop (1.4.
|
81
|
+
treetop (1.4.10)
|
82
|
+
polyglot
|
82
83
|
polyglot (>= 0.3.1)
|
83
84
|
tzinfo (0.3.29)
|
84
85
|
|
@@ -12,12 +12,12 @@ module ActsAsVotable
|
|
12
12
|
|
13
13
|
:vote_up => [
|
14
14
|
:up_by, :upvote_by, :like_by, :liked_by, :vote_by,
|
15
|
-
:up_from, :upvote_from, :like_from, :liked_from, :vote_from
|
15
|
+
:up_from, :upvote_from, :upvote_by, :like_from, :liked_from, :vote_from
|
16
16
|
],
|
17
17
|
|
18
18
|
:vote_down => [
|
19
19
|
:down_by, :downvote_by, :dislike_by, :disliked_by,
|
20
|
-
:down_from, :downvote_by, :dislike_by, :disliked_by
|
20
|
+
:down_from, :downvote_from, :downvote_by, :dislike_by, :disliked_by
|
21
21
|
],
|
22
22
|
|
23
23
|
:up_votes => [
|
@@ -55,7 +55,7 @@ module ActsAsVotable
|
|
55
55
|
return nil if votes.size == 0
|
56
56
|
return votes.first.vote_flag
|
57
57
|
end
|
58
|
-
alias :
|
58
|
+
alias :voted_as_when_voted_for :voted_as_when_voting_on
|
59
59
|
|
60
60
|
def find_votes extra_conditions = {}
|
61
61
|
ActsAsVotable::Vote.find(:all, :conditions => default_conditions.merge(extra_conditions))
|
data/spec/votable_spec.rb
CHANGED
data/spec/voter_spec.rb
CHANGED
@@ -43,12 +43,12 @@ describe ActsAsVotable::Voter do
|
|
43
43
|
|
44
44
|
it "should be voted as true when a voter has voted true" do
|
45
45
|
@votable.vote :voter => @voter
|
46
|
-
@voter.
|
46
|
+
@voter.voted_as_when_voted_for(@votable).should be true
|
47
47
|
end
|
48
48
|
|
49
49
|
it "should be voted as false when a voter has voted false" do
|
50
50
|
@votable.vote :voter => @voter, :vote => false
|
51
|
-
@voter.
|
51
|
+
@voter.voted_as_when_voted_for(@votable).should be false
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should be voted as nil when a voter has never voted" do
|
@@ -103,7 +103,7 @@ describe ActsAsVotable::Voter do
|
|
103
103
|
@voter.find_down_votes_for_class(Votable).size.should == 1
|
104
104
|
end
|
105
105
|
|
106
|
-
it "should be
|
106
|
+
it "should be contained to instances" do
|
107
107
|
@voter.vote :votable => @votable, :vote => false
|
108
108
|
@voter2.vote :votable => @votable
|
109
109
|
|
@@ -113,4 +113,4 @@ describe ActsAsVotable::Voter do
|
|
113
113
|
end
|
114
114
|
|
115
115
|
|
116
|
-
end
|
116
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_votable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-11-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &16691480 !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: *
|
24
|
+
version_requirements: *16691480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3
|
27
|
-
requirement: &
|
27
|
+
requirement: &16690620 !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: *
|
35
|
+
version_requirements: *16690620
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &16689540 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 3.0.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *16689540
|
47
47
|
description: Rails gem to allowing records to be votable
|
48
48
|
email:
|
49
49
|
- ryanto
|
@@ -83,20 +83,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
hash: -862519095556043161
|
86
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
90
|
none: false
|
88
91
|
requirements:
|
89
92
|
- - ! '>='
|
90
93
|
- !ruby/object:Gem::Version
|
91
94
|
version: '0'
|
95
|
+
segments:
|
96
|
+
- 0
|
97
|
+
hash: -862519095556043161
|
92
98
|
requirements: []
|
93
99
|
rubyforge_project: acts_as_votable
|
94
|
-
rubygems_version: 1.8.
|
100
|
+
rubygems_version: 1.8.6
|
95
101
|
signing_key:
|
96
102
|
specification_version: 3
|
97
103
|
summary: Rails gem to allowing records to be votable
|
98
|
-
test_files:
|
99
|
-
- spec/spec_helper.rb
|
100
|
-
- spec/votable_spec.rb
|
101
|
-
- spec/voter_spec.rb
|
102
|
-
- spec/words_spec.rb
|
104
|
+
test_files: []
|