goldiloader 5.3.0 → 5.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3faf77c5a49c5d76b36f9bb124bf470d6f936b9e8a8df225e049967659f4f19b
4
- data.tar.gz: 45e0492000d0fffc306b7f06c2f34b65d11f0a80323b394d320664ab96046f56
3
+ metadata.gz: b0c7a3338be25c3de6d08f9606eeb0c8c849f4fb2e7d79559185a058f66622de
4
+ data.tar.gz: 6af451b0ca6ce176390822c4e727c29e0ed8edc8365cd1b4eac52352d0c9fcd8
5
5
  SHA512:
6
- metadata.gz: 41a1b471723660aaacd9cf55e3f1f0de1289c44f89dd70a7f0876b8a2d076ab24c123be2907a52b33f932942b717ac9977178dbc3a95a01f0538474dad802eed
7
- data.tar.gz: c9a4ddd6375a7d56020b163a8d0f0c9a4541e1cfc1c9ef78014a136b6611375b7a945ab952f3993948cb77c6b004837f7a8c91ab5ce8c4f8c69f993379ac7114
6
+ metadata.gz: 5a29fbe6b360cc2f2f08355666c71b7345eb0e4afe99f687b083165878a26a92971ba57194374e4471cb271fb5d8b0dafeaa5d979b31c4a6a098ba22c129c88a
7
+ data.tar.gz: 701bb0232a44e6a59ba69a67dde568aa2330c084b811711abf4dae47786e2870d3fc135f9d69ad4359fef59aa09a411208234856d4b8d26cb97d4a4c1770429b
@@ -152,7 +152,7 @@ module Goldiloader
152
152
  module SingularAssociationPatch
153
153
  private
154
154
 
155
- def find_target(*args)
155
+ def find_target(...)
156
156
  load_with_auto_include { super }
157
157
  end
158
158
  end
@@ -161,13 +161,13 @@ module Goldiloader
161
161
  module CollectionAssociationPatch
162
162
  # Force these methods to load the entire association for fully_load associations
163
163
  [:size, :ids_reader, :empty?].each do |method|
164
- define_method(method) do |*args, &block|
164
+ define_method(method) do |*args, **kwargs, &block|
165
165
  load_target if fully_load?
166
- super(*args, &block)
166
+ super(*args, **kwargs, &block)
167
167
  end
168
168
  end
169
169
 
170
- def load_target(*args)
170
+ def load_target(...)
171
171
  load_with_auto_include { super }
172
172
  end
173
173
 
@@ -203,14 +203,14 @@ module Goldiloader
203
203
  module CollectionProxyPatch
204
204
  # The CollectionProxy just forwards exists? to the underlying scope so we need to intercept this and
205
205
  # force it to use size which handles fully_load properly.
206
- def exists?(*args)
206
+ def exists?(*args, **kwargs)
207
207
  # We don't fully_load the association when arguments are passed to exists? since Rails always
208
208
  # pushes this query into the database without any caching (and it likely not a common
209
209
  # scenario worth optimizing).
210
- if args.empty? && @association.fully_load?
210
+ if args.empty? && kwargs.empty? && @association.fully_load?
211
211
  size > 0
212
212
  else
213
- scope.exists?(*args)
213
+ scope.exists?(*args, **kwargs)
214
214
  end
215
215
  end
216
216
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
- VERSION = '5.3.0'
4
+ VERSION = '5.4.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goldiloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Turkel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-15 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '6.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '8'
22
+ version: '8.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '6.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '8'
32
+ version: '8.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '6.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '8'
42
+ version: '8.1'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '6.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '8'
52
+ version: '8.1'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: appraisal
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -216,14 +216,14 @@ dependencies:
216
216
  requirements:
217
217
  - - "~>"
218
218
  - !ruby/object:Gem::Version
219
- version: '1.4'
219
+ version: '2.0'
220
220
  type: :development
221
221
  prerelease: false
222
222
  version_requirements: !ruby/object:Gem::Requirement
223
223
  requirements:
224
224
  - - "~>"
225
225
  - !ruby/object:Gem::Version
226
- version: '1.4'
226
+ version: '2.0'
227
227
  description: Automatically eager loads Rails associations as associations are traversed
228
228
  email:
229
229
  - jturkel@salsify.com