goldiloader 2.0.1 → 2.1.0

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
2
  SHA1:
3
- metadata.gz: 0eb9e7e83e2023f73d88bbd044bba76e452e5eb3
4
- data.tar.gz: aaf853bba04d29f1ac111bc3c3c048735cb8b766
3
+ metadata.gz: 47531442377d70a4496f4c0e7887d1f907a8ca47
4
+ data.tar.gz: 8237c5844f7b0f0fb64b284f6d1cfb674f7faf2f
5
5
  SHA512:
6
- metadata.gz: 16106d1ea68ac57291e0e9bf0f5285d1fa7317af25f658dcb8d123b3f605fdb87e4617523ae1a693fd23b4adc05c821f1f9e1dc494c1042b711c92353fc9a31f
7
- data.tar.gz: 717893a31670aac38041fc842bfa0d026372f5985b966d8c8c8e5bfbbe0240f1c3e95333999febb82d2cfee62554cdacb0b30faa84ab02d3b863e55c1537a700
6
+ metadata.gz: 899cc984c1e472134d7217d33f3d4873edde8f9ccdceba32a11a344893f43c5dc0d6d28395e839a2cbcd6a8e53f92bd8d188cbef995224ba2e6456484274a370
7
+ data.tar.gz: 10cb34ba3adcaac3c769568aaa6195d0dd7a8d0f00acbea222572a0a50afa7e4f9c2433d068b082c25b77277052b3c78aba64e7fc20afc0f37c6a74596ac5b1a
@@ -103,7 +103,8 @@ module Goldiloader
103
103
  !association_info.group? &&
104
104
  !association_info.from? &&
105
105
  !association_info.instance_dependent? &&
106
- association_info.auto_include?
106
+ association_info.auto_include? &&
107
+ (!owner.destroyed? || ::Goldiloader::Compatibility.destroyed_model_associations_eager_loadable?)
107
108
  end
108
109
 
109
110
  def load_with_auto_include
@@ -3,6 +3,7 @@
3
3
  module Goldiloader
4
4
  module Compatibility
5
5
  ACTIVE_RECORD_VERSION = ::Gem::Version.new(::ActiveRecord::VERSION::STRING)
6
+ PRE_RAILS_5_2 = ACTIVE_RECORD_VERSION < ::Gem::Version.new('5.2.0')
6
7
 
7
8
  def self.rails_4?
8
9
  ::ActiveRecord::VERSION::MAJOR == 4
@@ -11,5 +12,10 @@ module Goldiloader
11
12
  def self.rails_5_0?
12
13
  ::ActiveRecord::VERSION::MAJOR == 5 && ::ActiveRecord::VERSION::MINOR == 0
13
14
  end
15
+
16
+ # See https://github.com/rails/rails/pull/32375
17
+ def self.destroyed_model_associations_eager_loadable?
18
+ PRE_RAILS_5_2
19
+ end
14
20
  end
15
21
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Goldiloader
4
- VERSION = '2.0.1'.freeze
4
+ VERSION = '2.1.0'.freeze
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: 2.0.1
4
+ version: 2.1.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: 2017-05-05 00:00:00.000000000 Z
11
+ date: 2018-04-10 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: '4.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.2'
22
+ version: '5.3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.2'
32
+ version: '5.3'
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: '4.2'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '5.2'
42
+ version: '5.3'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,21 @@ dependencies:
49
49
  version: '4.2'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '5.2'
52
+ version: '5.3'
53
+ - !ruby/object:Gem::Dependency
54
+ name: appraisal
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: coveralls
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -167,7 +181,11 @@ files:
167
181
  homepage: https://github.com/salsify/goldiloader
168
182
  licenses:
169
183
  - MIT
170
- metadata: {}
184
+ metadata:
185
+ homepage_uri: https://github.com/salsify/goldiloader
186
+ changelog_uri: https://github.com/salsify/goldiloader/blob/master/CHANGELOG.md
187
+ source_code_uri: https://github.com/salsify/goldiloader/
188
+ bug_tracker_uri: https://github.com/salsify/goldiloader/issues
171
189
  post_install_message:
172
190
  rdoc_options: []
173
191
  require_paths:
@@ -184,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
202
  version: '0'
185
203
  requirements: []
186
204
  rubyforge_project:
187
- rubygems_version: 2.6.10
205
+ rubygems_version: 2.6.14
188
206
  signing_key:
189
207
  specification_version: 4
190
208
  summary: Automatic Rails association eager loading