activerecord-precount 0.6.3 → 0.7.0.beta1

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: bf58363c7ce0affb2cbb1a39d19e348fc1d8924c
4
- data.tar.gz: 2872afab02a9bc30db92dc0dacf225546109685a
3
+ metadata.gz: 42b9f498a5245831b450f2bbab6b957800bb4f2b
4
+ data.tar.gz: 7b22c90c01957b7ea4b261ea1dd888acfc148f46
5
5
  SHA512:
6
- metadata.gz: 796a87639f40c88f97d91c4f5f42b96870e81a14986faf0b0404367678cc827b4c6a9ea0422e43c502a5ee0b33880a741e74ec96fccf4194bb65c8fc3230cd60
7
- data.tar.gz: bef1cc5f6a82d932a2d9560e483ecd2e8a31af762fa8df69eaff345b42c46eb638a8f90245893ad3505058dfee359fdb8034e56a02146e4a525e284cffed15d2
6
+ metadata.gz: d6945cae93b943dff5d78b0a4b82ddb3f043b12b603ff537485c937c561680e95d47497bb05c404247abeb5ee5fb4ddc4862574330224d9ebca3cea781e8caa3
7
+ data.tar.gz: 43ceb4314d98f194f6a514caaa93f0c44b6e78d0eb61837a64aa7c5b6f72efb4ac27f290ce0d12cb82e20d432f7f46ab92a8e4cdc5aa76f46a383df25a2574da
@@ -10,26 +10,29 @@ matrix:
10
10
  - rvm: 2.1.10
11
11
  env: TASK=test ARCONN=mysql2
12
12
  gemfile: ci/Gemfile.activerecord-4.2.x
13
- - rvm: 2.2.6
13
+ - rvm: 2.2.7
14
14
  env: TASK=test ARCONN=mysql2
15
- gemfile: ci/Gemfile.activerecord-5.0.x
16
- - rvm: 2.3.3
15
+ gemfile: ci/Gemfile.activerecord-5.1.x
16
+ - rvm: 2.3.4
17
17
  env: TASK=test ARCONN=mysql2
18
- gemfile: ci/Gemfile.activerecord-5.0.x
19
- - rvm: 2.4.0
18
+ gemfile: ci/Gemfile.activerecord-5.1.x
19
+ - rvm: 2.4.1
20
20
  env: TASK=test ARCONN=mysql2
21
21
  gemfile: ci/Gemfile.activerecord-4.2.x
22
- - rvm: 2.4.0
23
- env: TASK=test ARCONN=sqlite3
24
- gemfile: ci/Gemfile.activerecord-5.0.x
25
- - rvm: 2.4.0
22
+ - rvm: 2.4.1
26
23
  env: TASK=test ARCONN=mysql2
27
24
  gemfile: ci/Gemfile.activerecord-5.0.x
28
- - rvm: 2.4.0
25
+ - rvm: 2.4.1
26
+ env: TASK=test ARCONN=sqlite3
27
+ gemfile: ci/Gemfile.activerecord-5.1.x
28
+ - rvm: 2.4.1
29
+ env: TASK=test ARCONN=mysql2
30
+ gemfile: ci/Gemfile.activerecord-5.1.x
31
+ - rvm: 2.4.1
29
32
  env: TASK=test ARCONN=postgresql
30
- gemfile: ci/Gemfile.activerecord-5.0.x
31
- - rvm: 2.4.0
33
+ gemfile: ci/Gemfile.activerecord-5.1.x
34
+ - rvm: 2.4.1
32
35
  env: TASK=benchmark ARCONN=mysql2
33
- gemfile: ci/Gemfile.activerecord-5.0.x
36
+ gemfile: ci/Gemfile.activerecord-5.1.x
34
37
  allow_failures:
35
38
  - env: TASK=benchmark ARCONN=mysql2
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.6.3](https://github.com/k0kubun/activerecord-precount/tree/v0.6.3) (2017-02-21)
4
+ [Full Changelog](https://github.com/k0kubun/activerecord-precount/compare/v0.6.2...v0.6.3)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Fix invalid count query with ordered association [\#23](https://github.com/k0kubun/activerecord-precount/pull/23) ([yujinakayama](https://github.com/yujinakayama))
9
+
3
10
  ## [v0.6.2](https://github.com/k0kubun/activerecord-precount/tree/v0.6.2) (2016-11-02)
4
11
  [Full Changelog](https://github.com/k0kubun/activerecord-precount/compare/v0.6.1...v0.6.2)
5
12
 
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rails', '~> 5.1.0'
4
+ gemspec path: '..'
@@ -23,7 +23,7 @@ module ActiveRecord
23
23
  end
24
24
  end
25
25
 
26
- def query_scope(ids)
26
+ def records_for(ids)
27
27
  key = model.reflections[reflection.name.to_s.sub(/_count\z/, '')].foreign_key
28
28
  scope.reorder(nil).where(key => ids).group(key).count(key)
29
29
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Precount
3
- VERSION = "0.6.3"
3
+ VERSION = "0.7.0.beta1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-precount
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-21 00:00:00.000000000 Z
11
+ date: 2017-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -203,6 +203,7 @@ files:
203
203
  - ci/.gitignore
204
204
  - ci/Gemfile.activerecord-4.2.x
205
205
  - ci/Gemfile.activerecord-5.0.x
206
+ - ci/Gemfile.activerecord-5.1.x
206
207
  - ci/travis.rb
207
208
  - lib/active_record/precount.rb
208
209
  - lib/active_record/precount/autosave_association_extension.rb
@@ -313,12 +314,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
313
314
  version: '2.1'
314
315
  required_rubygems_version: !ruby/object:Gem::Requirement
315
316
  requirements:
316
- - - ">="
317
+ - - ">"
317
318
  - !ruby/object:Gem::Version
318
- version: '0'
319
+ version: 1.3.1
319
320
  requirements: []
320
321
  rubyforge_project:
321
- rubygems_version: 2.5.2
322
+ rubygems_version: 2.6.11
322
323
  signing_key:
323
324
  specification_version: 4
324
325
  summary: N+1 count query killer for ActiveRecord