mongoid-likeable 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,38 @@
1
+ # Linux.gitignore
2
+ *~
3
+
4
+ # OSX.gitignore
5
+ .DS_Store
6
+ .AppleDouble
7
+ .LSOverride
8
+ Icon
9
+
10
+ # Thumbnails
11
+ ._*
12
+
13
+ # Files that might appear on external disk
14
+ .Spotlight-V100
15
+ .Trashes
16
+
17
+
18
+ # Ruby.gitignore
1
19
  *.gem
2
- Gemfile.lock
20
+ *.rbc
21
+ .bundle
22
+ .config
23
+ coverage
24
+ InstalledFiles
25
+ lib/bundler/man
26
+ pkg
27
+ rdoc
28
+ spec/reports
29
+ test/tmp
30
+ test/version_tmp
31
+ tmp
3
32
 
4
- # Coverage
5
- /coverage
33
+ # YARD artifacts
34
+ .yardoc
35
+ _yardoc
36
+ doc/
37
+
38
+ Gemfile.lock
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 3.0.2
2
+ -----
3
+ * Cleaning up code
4
+
1
5
  3.0.1
2
6
  -----
3
7
  * Updated dependencies
@@ -13,18 +13,18 @@ module Mongoid
13
13
  def like(liker)
14
14
  id = liker_id(liker)
15
15
  unless liked?(id)
16
- self.inc :likes, 1
17
- self.push :likers, id
18
- self.touch
16
+ inc :likes, 1
17
+ push :likers, id
18
+ touch
19
19
  end
20
20
  end
21
21
 
22
22
  def unlike(liker)
23
23
  id = liker_id(liker)
24
24
  if liked?(id)
25
- self.inc :likes, -1
26
- self.pull :likers, id
27
- self.touch
25
+ inc :likes, -1
26
+ pull :likers, id
27
+ touch
28
28
  end
29
29
  end
30
30
 
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'mongoid-likeable'
6
- s.version = '3.0.1'
6
+ s.version = '3.0.2'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Diowa']
9
9
  s.email = ['dev@diowa.com']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-likeable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -153,4 +153,9 @@ rubygems_version: 1.8.25
153
153
  signing_key:
154
154
  specification_version: 3
155
155
  summary: Add likes to your Mongoid documents
156
- test_files: []
156
+ test_files:
157
+ - test/models/story.rb
158
+ - test/models/story_with_timestamps.rb
159
+ - test/models/user.rb
160
+ - test/mongoid_likeable_test.rb
161
+ - test/test_helper.rb