counter_culture 3.5.2 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +3 -0
- data/CHANGELOG.md +10 -0
- data/counter_culture.gemspec +1 -1
- data/gemfiles/rails_5.2.gemfile +1 -0
- data/gemfiles/rails_6.0.gemfile +1 -0
- data/gemfiles/rails_6.1.gemfile +1 -0
- data/gemfiles/rails_7.0.gemfile +1 -0
- data/gemfiles/rails_7.1.gemfile +1 -0
- data/lib/counter_culture/counter.rb +2 -0
- data/lib/counter_culture/reconciler.rb +2 -2
- data/lib/counter_culture/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f4fd84b17129a9385e310381e0a19d5dc94a77f99bc6375e296cbf88c08fe72
|
4
|
+
data.tar.gz: a717e7ce645837b369e9fa5d40f7e721efaa8815b0ece0d814e124b798ede467
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74b120975400617101789ac7721b839e57e210e68a28d1edc307e2b8e03086e0d6adc652cb9a96be7cd0a7921c7e8033216316d63f0c74da9e3b929a9d24ad39
|
7
|
+
data.tar.gz: 050d42b195d1c947aa79f8cbbaf2dea74441020c67b96aa2493463c6cdcf0a1ccb649b7a322921174a64a30f4ba9287a0450ab217915dd62844adafdc5f934cd
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 3.6.0 (June 18, 2024)
|
2
|
+
|
3
|
+
Improvements:
|
4
|
+
- Don't perform a query if the `delta_magnitude` is zero (#394)
|
5
|
+
|
6
|
+
## 3.5.3 (February 16, 2024)
|
7
|
+
|
8
|
+
Bugfixes:
|
9
|
+
- Correct polymorphic table name alias reference in join clauses (#388)
|
10
|
+
|
1
11
|
## 3.5.2 (January 16, 2024)
|
2
12
|
|
3
13
|
Bugfixes:
|
data/counter_culture.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
|
|
43
43
|
spec.add_development_dependency 'rspec-extra-formatters'
|
44
44
|
spec.add_development_dependency 'simplecov', '~> 0.16.1'
|
45
45
|
spec.add_development_dependency 'timecop'
|
46
|
-
spec.add_development_dependency 'sqlite3'
|
46
|
+
spec.add_development_dependency 'sqlite3', ">= 1.4"
|
47
47
|
spec.add_development_dependency 'mysql2'
|
48
48
|
spec.add_development_dependency 'pg'
|
49
49
|
end
|
data/gemfiles/rails_5.2.gemfile
CHANGED
data/gemfiles/rails_6.0.gemfile
CHANGED
data/gemfiles/rails_6.1.gemfile
CHANGED
data/gemfiles/rails_7.0.gemfile
CHANGED
data/gemfiles/rails_7.1.gemfile
CHANGED
@@ -274,13 +274,13 @@ module CounterCulture
|
|
274
274
|
# child in a Single Table Inheritance
|
275
275
|
if reflect.active_record.column_names.include?('type') &&
|
276
276
|
!model.descends_from_active_record?
|
277
|
-
joins_sql += " AND #{
|
277
|
+
joins_sql += " AND #{target_table_alias}.type IN ('#{model.name}')"
|
278
278
|
end
|
279
279
|
if polymorphic?
|
280
280
|
# adds 'type' condition to JOIN clause if the current model is a
|
281
281
|
# polymorphic relation
|
282
282
|
# NB only works for one-level relations
|
283
|
-
joins_sql += " AND #{
|
283
|
+
joins_sql += " AND #{target_table_alias}.#{reflect.foreign_type} = '#{relation_class.name}'"
|
284
284
|
end
|
285
285
|
if index == reverse_relation.size - 1
|
286
286
|
# conditions must be applied to the join on which we are counting
|
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: 3.
|
4
|
+
version: 3.6.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: 2024-
|
11
|
+
date: 2024-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -254,14 +254,14 @@ dependencies:
|
|
254
254
|
requirements:
|
255
255
|
- - ">="
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version: '
|
257
|
+
version: '1.4'
|
258
258
|
type: :development
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
262
|
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version: '
|
264
|
+
version: '1.4'
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: mysql2
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
@@ -345,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
345
345
|
- !ruby/object:Gem::Version
|
346
346
|
version: '0'
|
347
347
|
requirements: []
|
348
|
-
rubygems_version: 3.
|
348
|
+
rubygems_version: 3.5.10
|
349
349
|
signing_key:
|
350
350
|
specification_version: 4
|
351
351
|
summary: Turbo-charged counter caches for your Rails app.
|