standardapi 5.2.0.8 → 5.2.0.9
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc23801e0efd324a12cd008b60189eeb928f83bf61521a1007c0f4e557a62a33
|
4
|
+
data.tar.gz: 77c05742aa31ac7db81eb54f451fb575ce3a1e62873c99a5f6ffc80dac016821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b46fc52c901f782067480f96142b55819227be4df904d8467fe977e7eb78e95bf94e2959669713a0b3f488e9cab75b1a4c981ad81652a78105921b9a9505c85c
|
7
|
+
data.tar.gz: 208e6f0c9c4fdef2fc5f9afcf673ece3707265fe4a74a175b9e599d47b9e4a9ab88772f3e1bdabf27aee80dd3cc4a5c261285c8d6c741f7dae7058e26458494a
|
data/lib/standard_api/version.rb
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
if !includes.empty?
|
2
|
-
|
2
|
+
preloads = includes.keys.select do |key|
|
3
|
+
case includes[key]
|
4
|
+
when true
|
5
|
+
true
|
6
|
+
when Hash
|
7
|
+
!(includes[key].keys.any? { |x| ['where', 'limit', 'offset', 'order'].include?(x) })
|
8
|
+
else
|
9
|
+
false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
instance_variable_set("@#{model.model_name.plural}", instance_variable_get("@#{model.model_name.plural}").preload(preloads))
|
3
14
|
end
|
4
15
|
|
5
16
|
if !includes.empty? && can_cache?(model, includes)
|
@@ -1,5 +1,16 @@
|
|
1
1
|
if !includes.empty?
|
2
|
-
|
2
|
+
preloads = includes.keys.select do |key|
|
3
|
+
case includes[key]
|
4
|
+
when true
|
5
|
+
true
|
6
|
+
when Hash
|
7
|
+
!(includes[key].keys.any? { |x| ['where', 'limit', 'offset', 'order'].include?(x) })
|
8
|
+
else
|
9
|
+
false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
instance_variable_set("@#{model.model_name.plural}", instance_variable_get("@#{model.model_name.plural}").preload(preloads))
|
3
14
|
end
|
4
15
|
|
5
16
|
if !includes.empty? && can_cache?(model, includes)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standardapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.0.
|
4
|
+
version: 5.2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|