mongoid_countercache 0.0.3 → 1.0.0.mongoidalpha1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab1ea11fe2faa8ff16844654f91c7f9c33466e59
4
- data.tar.gz: 3be0271688b98d721cce4ce961bb70a5f1642408
3
+ metadata.gz: c7fcdf60766a01df53a22e54c93b29e2d05a9a8b
4
+ data.tar.gz: 230a556d27c442d2b115243184ee5c5b78ef1d46
5
5
  SHA512:
6
- metadata.gz: b7678328a05842e4683ad0b728597a8ee096401308090f75c190c95554fecd48db31b99df342bf32b66fdce2be331cee30ca6a10e18771a3d60e7b2500153a7e
7
- data.tar.gz: bb6ee47b83f007d20e671bca09685da3f8a6e3f288c64d6f20df3c3dd90cb2d1285e010188f85181313982395b1ae8c492695768404d0a0ea868796f6b0d5029
6
+ metadata.gz: 16ce774c4921b6c098d7f2b03337c94f46df9c5b3e2c64c2e25012725039f299cf9cafcef8d69cc876bcf28c72ae92ed30743cca508ec4d9947aeacae13839d4
7
+ data.tar.gz: 05724c958b3b392a81165663fc3bc33813929bbfcfc4ece14072d76c99b022678653794b93958cc1f9ec13cd675b82ceb0da6465a29eafbd6530eed1ae587139
data/README.md CHANGED
@@ -1,4 +1,10 @@
1
- # MongoidCounterCache [![Build Status](https://travis-ci.org/Intrepidd/mongoid_countercache.png?branch=master)](https://travis-ci.org/Intrepidd/mongoid_countercache)
1
+ # MongoidCounterCache [![Build Status](https://travis-ci.org/Intrepidd/mongoid_countercache.png?branch=mongoid4)](https://travis-ci.org/Intrepidd/mongoid_countercache)
2
+
3
+ ## Version
4
+
5
+ This is the mongoid 4 compatible version, if you want the mongoid 3 version, please have a look at the master branch.
6
+
7
+ ## Description
2
8
 
3
9
  This gem is used to maintain a cached counter of an object's children, this avoids N + 1 queries issues when doing a ``count`` in a loop.
4
10
 
@@ -8,7 +14,7 @@ This is basically an implementation of ActiveRecord counter cache for Mongoid.
8
14
 
9
15
  Add this line to your application's Gemfile:
10
16
 
11
- gem 'mongoid_countercache'
17
+ gem 'mongoid_countercache', '1.0.0.mongoidalpha1'
12
18
 
13
19
  And then execute:
14
20
 
@@ -16,7 +22,7 @@ And then execute:
16
22
 
17
23
  Or install it yourself as:
18
24
 
19
- $ gem install mongoid_countercache
25
+ $ gem install mongoid_countercache -v '1.0.0.mongoidalpha1'
20
26
 
21
27
  ## Usage
22
28
 
@@ -40,7 +40,7 @@ module Mongoid
40
40
 
41
41
  def update_parent_counter(parent, field, inc, proc = nil)
42
42
  return unless parent && parent[field]
43
- parent.inc(field, inc) if proc.nil? || proc.bind(self).call
43
+ parent.inc(field => inc) if proc.nil? || instance_exec(&proc)
44
44
  end
45
45
 
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module MongoidCounterCache
2
- VERSION = "0.0.3"
2
+ VERSION = "1.0.0.mongoidalpha1"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'mongoid', '>= 3.0.0', '< 4.0.0'
21
+ spec.add_dependency 'mongoid', '4.0.0.alpha1'
22
22
  spec.add_dependency("rake")
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_countercache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 1.0.0.mongoidalpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Siami
@@ -14,22 +14,16 @@ dependencies:
14
14
  name: mongoid
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: 3.0.0
20
- - - <
17
+ - - '='
21
18
  - !ruby/object:Gem::Version
22
- version: 4.0.0
19
+ version: 4.0.0.alpha1
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
24
+ - - '='
28
25
  - !ruby/object:Gem::Version
29
- version: 3.0.0
30
- - - <
31
- - !ruby/object:Gem::Version
32
- version: 4.0.0
26
+ version: 4.0.0.alpha1
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rake
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -124,9 +118,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
118
  version: '0'
125
119
  required_rubygems_version: !ruby/object:Gem::Requirement
126
120
  requirements:
127
- - - '>='
121
+ - - '>'
128
122
  - !ruby/object:Gem::Version
129
- version: '0'
123
+ version: 1.3.1
130
124
  requirements: []
131
125
  rubyforge_project:
132
126
  rubygems_version: 2.0.3