counter_culture 2.4.0 → 2.5.0

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
  SHA256:
3
- metadata.gz: df98e13e157dd1e7dc6bda49e350d020017ce7d28be3eec26f09bba70d1cbae8
4
- data.tar.gz: c8d0ae6f11a94a1a5d3e0ebac55ac2572805036b89f59f685e09cf672e3d9a05
3
+ metadata.gz: d23a499dee5870dc087f2e8ce149275601321728359755ece6f4143c1859e464
4
+ data.tar.gz: e4a114da0ca6ab7e8439e8f497c5924ca5c728699f6a939aaf53cd0bb82e4b22
5
5
  SHA512:
6
- metadata.gz: e896531ea63cdac8870cd6c977312080c2ae2600a9419fdf8f496eb1df37c008c53c42f420088c804cfa1c6dcac4fa3d8a4eb13a0ac76774cea6bde79940af1a
7
- data.tar.gz: e8a1d63b0e95d30fef050f20a8a25e7bc864f1753010272068bdd7f5cc9ac7f4805bb583b4f0df01951d4b6c9e41a5d7061162c1f6d52800d4ba27259ecefece
6
+ metadata.gz: 16d8b66aec6b846328a99596736f4faf8aca1b84b07cd3f5257ec476b4edecae0f4360ab073199c90850bd93c0d8b7705a2723f9644a1df33dafdccc759273f2
7
+ data.tar.gz: 871f23c424dcecf010f65f9cb948090246814bf5c691a2da3c03d750b320c655d0930107748a937a1926784c9ec1f2953e683a674288460d7e01952277f8dbcd
@@ -5,31 +5,27 @@ services:
5
5
  addons:
6
6
  postgresql: "9.6"
7
7
  rvm:
8
- - "2.3.8"
9
- - "2.4.7"
10
- - "2.5.6"
11
- - "2.6.4"
8
+ - "2.5.7"
9
+ - "2.6.5"
10
+ - "2.7.0"
12
11
  gemfile:
13
12
  - gemfiles/rails_4.2.gemfile
14
13
  - gemfiles/rails_5.0.gemfile
15
14
  - gemfiles/rails_5.1.gemfile
16
15
  - gemfiles/rails_5.2.gemfile
17
16
  - gemfiles/rails_6.0.gemfile
17
+ matrix:
18
+ exclude:
19
+ - rvm: "2.7.0"
20
+ gemfile: gemfiles/rails_4.2.gemfile
18
21
  env:
19
22
  - DB=postgresql
20
23
  - DB=sqlite3
21
24
  - DB=mysql2
22
- matrix:
23
- exclude:
24
- - rvm: "2.3.8"
25
- gemfile: gemfiles/rails_6.0.gemfile
26
- - rvm: "2.4.7"
27
- gemfile: gemfiles/rails_6.0.gemfile
28
25
  before_install:
29
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
30
- - gem install bundler -v '< 2'
26
+ - gem install bundler -v '1.17.3'
31
27
  install:
32
- - bundle update
28
+ - bundle _1.17.3_ update
33
29
  before_script:
34
30
  - psql -c 'create database counter_culture_test;' -U postgres
35
31
  - mysql -e 'CREATE DATABASE counter_culture_test;'
@@ -1,4 +1,12 @@
1
- ## 2.3.0 (January 28, 2020)
1
+ ## 2.5.0 (May 12, 2020)
2
+
3
+ Bugfixes:
4
+ - Fix `counter_culture_fix_counts` with Rails 4.2
5
+
6
+ Changes:
7
+ - Dropped support for Ruby 2.3 and 2.4
8
+
9
+ ## 2.4.0 (May 9, 2020)
2
10
 
3
11
  Improvements:
4
12
  - Allow specifying `start` and `finish` options to `counter_culture_fix_counts` (#279)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # counter_culture [![Build Status](https://travis-ci.org/magnusvk/counter_culture.svg)](https://travis-ci.org/magnusvk/counter_culture)
1
+ # counter_culture [![Build Status](https://travis-ci.com/magnusvk/counter_culture.svg)](https://travis-ci.com/magnusvk/counter_culture)
2
2
 
3
3
  Turbo-charged counter caches for your Rails app. Huge improvements over the Rails standard counter caches:
4
4
 
@@ -107,7 +107,11 @@ module CounterCulture
107
107
 
108
108
  counts_query = counts_query.where(options[:where]).group(full_primary_key(relation_class))
109
109
 
110
- counts_query.find_in_batches(batch_size: batch_size, start: start_index, finish: finish_index) do |records|
110
+ find_in_batches_args = { batch_size: batch_size }
111
+ find_in_batches_args[:start] = options[:start] if options[:start].present?
112
+ find_in_batches_args[:finish] = options[:finish] if options[:finish].present?
113
+
114
+ counts_query.find_in_batches(find_in_batches_args) do |records|
111
115
  # now iterate over all the models and see whether their counts are right
112
116
  update_count_for_batch(column_name, records)
113
117
  end
@@ -1,3 +1,3 @@
1
1
  module CounterCulture
2
- VERSION = '2.4.0'.freeze
2
+ VERSION = '2.5.0'.freeze
3
3
  end
@@ -3,11 +3,13 @@
3
3
  set -e
4
4
  source /usr/local/share/chruby/chruby.sh
5
5
 
6
- for RUBY_VERSION in 2.3.8 2.4.7 2.5.6 2.6.4; do
6
+ for RUBY_VERSION in 2.5.7 2.6.5 2.7.0; do
7
7
  chruby $RUBY_VERSION
8
8
  ruby --version
9
9
 
10
- (bundle check > /dev/null || bundle install)
10
+ gem install bundler -v '1.17.3'
11
+
12
+ (bundle _1.17.3_ check > /dev/null || bundle _1.17.3_ install)
11
13
  gem install appraisal
12
14
  bundle exec appraisal install
13
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: counter_culture
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus von Koeller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-09 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: after_commit_action
@@ -304,7 +304,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  - !ruby/object:Gem::Version
305
305
  version: '0'
306
306
  requirements: []
307
- rubygems_version: 3.1.2
307
+ rubyforge_project:
308
+ rubygems_version: 2.7.6.2
308
309
  signing_key:
309
310
  specification_version: 4
310
311
  summary: Turbo-charged counter caches for your Rails app.