counter_cache_update 0.0.4 → 0.0.5

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
- SHA1:
3
- metadata.gz: da60d0659cc80bc69235f6c6d8e3da19e9ff9b8d
4
- data.tar.gz: efe7c55d60d096aa73dfe7df01bb02ed0fba690c
2
+ SHA256:
3
+ metadata.gz: 9a60bf00dc880c81e2a77d509fc99c1e5787a19ea0e253e681e2324a96345f06
4
+ data.tar.gz: 5ac890de48519835d50d39e42a85e6c3667a4b5f96f6ad3a7e85755f7986594b
5
5
  SHA512:
6
- metadata.gz: 8d7cb3a66131cea09114c11025503d6471914fcca61bb0e88c499dae815fdd8bd9523dda9f13e272c22817a63198a29ba39d245dae96a09b07c30d8c9335798e
7
- data.tar.gz: a4ec4d8c17afd0c1b0f572eb3b6978d7c0c34c9582f5f517b680bf3ba98c8fccde36e4d28a9fb876a867c113ed35c1af65bcf0678dcd53eeb5eff33f06053968
6
+ metadata.gz: ba7c15aab1cbba116816fde5527ffc6aa8dab89f35896715a071676ffb41b79b5e84371eda7e5758029635ddc93585328954d144ade0d87b8f8a854252504f3a
7
+ data.tar.gz: 6525734ed0ac097750b93e535f95f7ab8cd6790076477c98b0631ec5cbd19c8d24a6f3fa086e3ec5cbafd9586ce7c673ad7689e7328d657bf7c828b0edb9aeb5
@@ -4,10 +4,12 @@ class CounterCacheUpdate::PolymorphicUpdatorService < ServicePattern::Service
4
4
  @reflection = reflection
5
5
  end
6
6
 
7
- def execute!
7
+ def execute
8
8
  foreign_types.each do |foreign_type|
9
9
  CounterCacheUpdate::TableUpdatorService.execute!(reflection: @reflection, model_class: foreign_type.constantize)
10
10
  end
11
+
12
+ succeed!
11
13
  end
12
14
 
13
15
  private
@@ -8,9 +8,9 @@ class CounterCacheUpdate::TableUpdatorService < ServicePattern::Service
8
8
  @model_class ||= @reflection.class_name.constantize
9
9
  end
10
10
 
11
- def execute!
11
+ def execute
12
12
  model_class.connection.execute(sql)
13
- ServicePattern::Response.new(success: true)
13
+ succeed!
14
14
  end
15
15
 
16
16
  private
@@ -5,7 +5,7 @@ class CounterCacheUpdate::UpdateService < ServicePattern::Service
5
5
  @use_progress_bar = use_progress_bar
6
6
  end
7
7
 
8
- def execute!
8
+ def execute
9
9
  Rails.application.eager_load!
10
10
 
11
11
  if use_progress_bar
@@ -14,7 +14,7 @@ class CounterCacheUpdate::UpdateService < ServicePattern::Service
14
14
  end
15
15
 
16
16
  update_relationships!
17
- ServicePattern::Response.new(success: true)
17
+ succeed!
18
18
  end
19
19
 
20
20
  private
@@ -1,3 +1,3 @@
1
1
  module CounterCacheUpdate
2
- VERSION = "0.0.4".freeze
2
+ VERSION = "0.0.5".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: counter_cache_update
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-17 00:00:00.000000000 Z
11
+ date: 2020-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,28 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.3
33
+ version: 0.0.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.3
40
+ version: 0.0.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.6
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: tzinfo-data
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: 0.3.6
68
+ version: '0'
55
69
  description: Scans all your models and updates all counter caches with optimised SQL.
56
70
  email:
57
71
  - kaspernj@gmail.com
@@ -98,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
112
  - !ruby/object:Gem::Version
99
113
  version: '0'
100
114
  requirements: []
101
- rubyforge_project:
102
- rubygems_version: 2.6.13
115
+ rubygems_version: 3.0.6
103
116
  signing_key:
104
117
  specification_version: 4
105
118
  summary: Scans all your models and updates all counter caches with optimised SQL.