goldiloader 2.1.2 → 3.0.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: c7414c0de13b4e9b5c87d8106cedfdb2028a3640
4
- data.tar.gz: 2a0650488a2ebdc94d665fa12b3dc7d88282c791
3
+ metadata.gz: de665e9942d28b42bbc8358aef8a0988a6790916
4
+ data.tar.gz: ce84f8c27963cd4232cee01952143e5d2d6555e5
5
5
  SHA512:
6
- metadata.gz: 46d11df02dbae98f7915b06df38937ba93937671433403ff1f161def9568b92cb1a310eb55eed6c9edb073e5851660bb890d7c324cafca12c99585d269ebd0e9
7
- data.tar.gz: '09179806ac8786f88f059d0c3cba83c4a85acd7f9fe1794dca06ac6672da948b854264263c709911425689493c2932d7f242504a2b0d0d5f9818d0487b58da17'
6
+ metadata.gz: bc34b71e88333002565cfb97c2841318782e5e38a3255338f9a70a871d7828f1f8ea2308a7400280949d8893a083ed4fc12a86cf2af921ca35e093aba34c40eb
7
+ data.tar.gz: 89187ce69caf6a448c1bb887a7e33c7b9bee434376d53f62376069923572f3bac86f12b3a21238ff8411b0a4ea7292f4c1abb1de479700950c58d6a758d46bcc
data/lib/goldiloader.rb CHANGED
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/all'
4
4
  require 'active_record'
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
4
  module BasePatch
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
4
  class AssociationInfo
@@ -9,7 +9,7 @@ module Goldiloader
9
9
 
10
10
  delegate :association_scope, :reflection, to: :@association
11
11
 
12
- def has_one?
12
+ def has_one? # rubocop:disable Naming/PredicateName
13
13
  reflection.has_one?
14
14
  end
15
15
 
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
4
  module AssociationLoader
@@ -35,7 +35,7 @@ module Goldiloader
35
35
  model.association(association_name).auto_include?
36
36
  end
37
37
 
38
- def has_association?(model, association_name)
38
+ def has_association?(model, association_name) # rubocop:disable Naming/PredicateName
39
39
  model.class.reflect_on_association(association_name).present?
40
40
  end
41
41
  end
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
4
  module AssociationOptions
@@ -24,8 +24,6 @@ module Goldiloader
24
24
  ActiveRecord::Associations::Builder::Association.valid_options.concat(OPTIONS)
25
25
  end
26
26
  end
27
-
28
- private
29
27
  end
30
28
  end
31
29
 
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
4
  class AutoIncludeContext
@@ -13,10 +13,16 @@ module Goldiloader
13
13
  auto_include_context.register_models(models)
14
14
 
15
15
  Array.wrap(included_associations).each do |included_association|
16
- associations = included_association.is_a?(Hash) ?
17
- included_association.keys : Array.wrap(included_association)
18
- nested_associations = included_association.is_a?(Hash) ?
19
- included_association : Hash.new([])
16
+ associations = if included_association.is_a?(Hash)
17
+ included_association.keys
18
+ else
19
+ Array.wrap(included_association)
20
+ end
21
+ nested_associations = if included_association.is_a?(Hash)
22
+ included_association
23
+ else
24
+ Hash.new([])
25
+ end
20
26
 
21
27
  associations.each do |association|
22
28
  nested_models = models.flat_map do |model|
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
4
  module Compatibility
@@ -1,5 +1,5 @@
1
- # encoding: UTF-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Goldiloader
4
- VERSION = '2.1.2'.freeze
4
+ VERSION = '3.0.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: 2.1.2
4
+ version: 3.0.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: 2018-10-07 00:00:00.000000000 Z
11
+ date: 2018-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -92,6 +92,20 @@ dependencies:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '1.2'
95
+ - !ruby/object:Gem::Dependency
96
+ name: mime-types
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
95
109
  - !ruby/object:Gem::Dependency
96
110
  name: rake
97
111
  requirement: !ruby/object:Gem::Requirement
@@ -121,21 +135,21 @@ dependencies:
121
135
  - !ruby/object:Gem::Version
122
136
  version: '3'
123
137
  - !ruby/object:Gem::Dependency
124
- name: simplecov
138
+ name: salsify_rubocop
125
139
  requirement: !ruby/object:Gem::Requirement
126
140
  requirements:
127
- - - ">="
141
+ - - '='
128
142
  - !ruby/object:Gem::Version
129
- version: '0'
143
+ version: 0.52.1.1
130
144
  type: :development
131
145
  prerelease: false
132
146
  version_requirements: !ruby/object:Gem::Requirement
133
147
  requirements:
134
- - - ">="
148
+ - - '='
135
149
  - !ruby/object:Gem::Version
136
- version: '0'
150
+ version: 0.52.1.1
137
151
  - !ruby/object:Gem::Dependency
138
- name: mime-types
152
+ name: simplecov
139
153
  requirement: !ruby/object:Gem::Requirement
140
154
  requirements:
141
155
  - - ">="
@@ -194,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
208
  requirements:
195
209
  - - ">="
196
210
  - !ruby/object:Gem::Version
197
- version: '2.1'
211
+ version: '2.3'
198
212
  required_rubygems_version: !ruby/object:Gem::Requirement
199
213
  requirements:
200
214
  - - ">="