counter_culture 2.4.0 → 2.5.0
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/.travis.yml +9 -13
- data/CHANGELOG.md +9 -1
- data/README.md +1 -1
- data/lib/counter_culture/reconciler.rb +5 -1
- data/lib/counter_culture/version.rb +1 -1
- data/run_tests_locally.sh +4 -2
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d23a499dee5870dc087f2e8ce149275601321728359755ece6f4143c1859e464
|
|
4
|
+
data.tar.gz: e4a114da0ca6ab7e8439e8f497c5924ca5c728699f6a939aaf53cd0bb82e4b22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16d8b66aec6b846328a99596736f4faf8aca1b84b07cd3f5257ec476b4edecae0f4360ab073199c90850bd93c0d8b7705a2723f9644a1df33dafdccc759273f2
|
|
7
|
+
data.tar.gz: 871f23c424dcecf010f65f9cb948090246814bf5c691a2da3c03d750b320c655d0930107748a937a1926784c9ec1f2953e683a674288460d7e01952277f8dbcd
|
data/.travis.yml
CHANGED
|
@@ -5,31 +5,27 @@ services:
|
|
|
5
5
|
addons:
|
|
6
6
|
postgresql: "9.6"
|
|
7
7
|
rvm:
|
|
8
|
-
- "2.
|
|
9
|
-
- "2.
|
|
10
|
-
- "2.
|
|
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
|
|
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;'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
## 2.
|
|
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 [](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
|
-
|
|
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
|
data/run_tests_locally.sh
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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
|
+
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-
|
|
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
|
-
|
|
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.
|