counter_culture 2.6.1 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/counter_culture.gemspec +1 -2
- data/lib/counter_culture.rb +0 -1
- data/lib/counter_culture/extensions.rb +0 -2
- data/lib/counter_culture/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa2c63a1888a7dd52c62d2f8e3680e1e3f78833fb40fced5ad47feb93c1e15f3
|
4
|
+
data.tar.gz: 72b10a0d6c9a130b81b183aec2bcd53d190e497d8fd32e9fb212ae545d68e655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5c8ab72cd34d55394b0b62a588913df03fd8a939137667b18f47841cc103833c19ae811e20d10dd49df07acd79ac61c1c2ce1fb3df6386849c234d46a4ccc1f
|
7
|
+
data.tar.gz: 9157a71361ffc1cf0f40acfff1840f55ebdc485e13f6765428395612f14e3b07c8fa17077623baa191456e7e2cf359546990d00c0958b21277fe158d03a24e20
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -187,6 +187,8 @@ end
|
|
187
187
|
|
188
188
|
Now, the ```Category``` model will keep the counter cache in ```special_count``` up-to-date. Only products where ```special?``` returns true will affect the special_count.
|
189
189
|
|
190
|
+
If you would like to use this with `counter_culture_fix_counts`, make sure to also provide [the `column_names` configuration](#handling-dynamic-column-names).
|
191
|
+
|
190
192
|
### Totaling instead of counting
|
191
193
|
|
192
194
|
Instead of keeping a running count, you may want to automatically track a running total.
|
data/counter_culture.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = 'Turbo-charged counter caches for your Rails app.'
|
12
12
|
spec.description = 'counter_culture provides turbo-charged counter caches that are kept up-to-date not just on create and destroy, that support multiple levels of indirection through relationships, allow dynamic column names and that avoid deadlocks by updating in the after_commit callback.'
|
13
|
-
spec.homepage = '
|
13
|
+
spec.homepage = 'https://github.com/magnusvk/counter_culture'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
|
28
|
-
spec.add_dependency 'after_commit_action', '~> 1.0'
|
29
28
|
spec.add_dependency 'activerecord', '>= 4.2'
|
30
29
|
spec.add_dependency 'activesupport', '>= 4.2'
|
31
30
|
|
data/lib/counter_culture.rb
CHANGED
@@ -15,8 +15,6 @@ module CounterCulture
|
|
15
15
|
# called to configure counter caches
|
16
16
|
def counter_culture(relation, options = {})
|
17
17
|
unless @after_commit_counter_cache
|
18
|
-
include AfterCommitAction unless include?(AfterCommitAction)
|
19
|
-
|
20
18
|
# initialize callbacks only once
|
21
19
|
after_create :_update_counts_after_create
|
22
20
|
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: counter_culture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
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-
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: after_commit_action
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: activerecord
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -285,7 +271,7 @@ files:
|
|
285
271
|
- lib/generators/counter_culture_generator.rb
|
286
272
|
- lib/generators/templates/counter_culture_migration.rb.erb
|
287
273
|
- run_tests_locally.sh
|
288
|
-
homepage:
|
274
|
+
homepage: https://github.com/magnusvk/counter_culture
|
289
275
|
licenses:
|
290
276
|
- MIT
|
291
277
|
metadata: {}
|