thumbs_up 0.6.8 → 0.6.9
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.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/thumbs_up/version.rb +1 -1
- metadata +15 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd9d635c61cb6fcbdb8e74e4311939aaf590a5e1
|
|
4
|
+
data.tar.gz: 4aff9013bed369c60311ccc903fd53e48b1e0905
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96c8196618f48c3b86652d08728b8a4e51f6ff9b7792c36cc4829ebc87db856a6289f67075fabcc333c0de7a009270808ad6078d4f891210a46c9dfaebd1e8d2
|
|
7
|
+
data.tar.gz: 7ebe6fc14d99ba765c72f7f74728dccad369087b31185a5204dd8944413ef320b8b85c994d2cd2cfdfeab93ea0496efd06f571b52826f17b9e2675e5599a173e
|
data/README.md
CHANGED
|
@@ -90,11 +90,13 @@ end
|
|
|
90
90
|
```ruby
|
|
91
91
|
voter.vote_for(voteable) # Adds a +1 vote
|
|
92
92
|
voter.vote_against(voteable) # Adds a -1 vote
|
|
93
|
-
voter.vote(voteable, vote) # Adds either a +1 or -1 vote: vote => true (+1), vote => false (-1)
|
|
94
93
|
|
|
95
94
|
voter.vote_exclusively_for(voteable) # Removes any previous votes by that particular voter, and votes for.
|
|
96
95
|
voter.vote_exclusively_against(voteable) # Removes any previous votes by that particular voter, and votes against.
|
|
97
96
|
|
|
97
|
+
# Alternative method, can pass a hash that includes `:exclusive` and `:direction` options.
|
|
98
|
+
voter.vote(voteable, { :exclusive => false, :direction => :up }) # Votes non-exclusively, either a +1 or -1 depending on the `:direction` value
|
|
99
|
+
|
|
98
100
|
voter.unvote_for(voteable) # Clears all votes for that user
|
|
99
101
|
```
|
|
100
102
|
|
data/lib/thumbs_up/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thumbs_up
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brady Bouchard
|
|
@@ -13,22 +13,28 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date:
|
|
16
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: activerecord
|
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
|
21
21
|
requirements:
|
|
22
|
-
- - "
|
|
22
|
+
- - ">"
|
|
23
23
|
- !ruby/object:Gem::Version
|
|
24
|
-
version: 4.2
|
|
24
|
+
version: '4.2'
|
|
25
|
+
- - "<"
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: '6'
|
|
25
28
|
type: :runtime
|
|
26
29
|
prerelease: false
|
|
27
30
|
version_requirements: !ruby/object:Gem::Requirement
|
|
28
31
|
requirements:
|
|
29
|
-
- - "
|
|
32
|
+
- - ">"
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '4.2'
|
|
35
|
+
- - "<"
|
|
30
36
|
- !ruby/object:Gem::Version
|
|
31
|
-
version:
|
|
37
|
+
version: '6'
|
|
32
38
|
- !ruby/object:Gem::Dependency
|
|
33
39
|
name: statistics2
|
|
34
40
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -89,14 +95,14 @@ dependencies:
|
|
|
89
95
|
name: mysql2
|
|
90
96
|
requirement: !ruby/object:Gem::Requirement
|
|
91
97
|
requirements:
|
|
92
|
-
- - "
|
|
98
|
+
- - ">"
|
|
93
99
|
- !ruby/object:Gem::Version
|
|
94
100
|
version: 0.3.20
|
|
95
101
|
type: :development
|
|
96
102
|
prerelease: false
|
|
97
103
|
version_requirements: !ruby/object:Gem::Requirement
|
|
98
104
|
requirements:
|
|
99
|
-
- - "
|
|
105
|
+
- - ">"
|
|
100
106
|
- !ruby/object:Gem::Version
|
|
101
107
|
version: 0.3.20
|
|
102
108
|
- !ruby/object:Gem::Dependency
|
|
@@ -187,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
187
193
|
version: '0'
|
|
188
194
|
requirements: []
|
|
189
195
|
rubyforge_project:
|
|
190
|
-
rubygems_version: 2.
|
|
196
|
+
rubygems_version: 2.5.1
|
|
191
197
|
signing_key:
|
|
192
198
|
specification_version: 4
|
|
193
199
|
summary: Voting for ActiveRecord with multiple vote sources and karma calculation.
|