cache_crispies 1.1.2 → 1.1.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35d549e631ed6401a8d401b28e77f192ffc0661ed7ad4afd5f6e70b7e85770a0
|
|
4
|
+
data.tar.gz: 2b118175b85d5d5be47c43c8c9359be7dd496502c056ec5694fb2cbad7778d04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3279adc9b9e20800159b2cdcf0aaa173d58d030d22027dcb62818b3fafa12aa2ed5776f824261daf184d8a83cb011e74f617d71bd2d36d5e16aa46ce7446ed0
|
|
7
|
+
data.tar.gz: '0030582a6e0bc880adff6e350a0f38412dc04f40e04a902ef0aeb5b93d2f6eb5206e6d0960ed414e978d3c3604a789c0d199a93d95cf3da85f4fcc463ba70029'
|
data/lib/cache_crispies/base.rb
CHANGED
|
@@ -223,7 +223,8 @@ module CacheCrispies
|
|
|
223
223
|
from: nil, with: nil, through: nil, to: nil, collection: nil,
|
|
224
224
|
&block
|
|
225
225
|
)
|
|
226
|
-
attribute_names.
|
|
226
|
+
attribute_names.flat_map do |attrib|
|
|
227
|
+
attrib = attrib&.to_sym
|
|
227
228
|
current_nesting = Array(@nesting).dup
|
|
228
229
|
current_conditions = Array(@conditions).dup
|
|
229
230
|
|
|
@@ -23,13 +23,13 @@ module CacheCrispies
|
|
|
23
23
|
serializer.attributes.each do |attrib|
|
|
24
24
|
deepest_hash = hash
|
|
25
25
|
|
|
26
|
+
next unless show?(attrib)
|
|
27
|
+
|
|
26
28
|
attrib.nesting.each do |key|
|
|
27
29
|
deepest_hash[key] ||= {}
|
|
28
30
|
deepest_hash = deepest_hash[key]
|
|
29
31
|
end
|
|
30
32
|
|
|
31
|
-
next unless show?(attrib)
|
|
32
|
-
|
|
33
33
|
value = value_for(attrib)
|
|
34
34
|
|
|
35
35
|
if attrib.key
|
|
@@ -20,7 +20,7 @@ describe CacheCrispies::Plan do
|
|
|
20
20
|
let(:model) { OpenStruct.new(name: 'Sugar Smacks', cache_key: model_cache_key) }
|
|
21
21
|
let(:cacheable) { model }
|
|
22
22
|
let(:options) { {} }
|
|
23
|
-
let(:instance) { described_class.new(serializer, cacheable, options) }
|
|
23
|
+
let(:instance) { described_class.new(serializer, cacheable, **options) }
|
|
24
24
|
subject { instance }
|
|
25
25
|
|
|
26
26
|
before do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cache_crispies
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Crownoble
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -134,7 +134,7 @@ dependencies:
|
|
|
134
134
|
- - "~>"
|
|
135
135
|
- !ruby/object:Gem::Version
|
|
136
136
|
version: '0.17'
|
|
137
|
-
description:
|
|
137
|
+
description:
|
|
138
138
|
email: adam@codenoble.com
|
|
139
139
|
executables: []
|
|
140
140
|
extensions: []
|
|
@@ -168,7 +168,7 @@ homepage: https://github.com/codenoble/cache-crispies
|
|
|
168
168
|
licenses:
|
|
169
169
|
- MIT
|
|
170
170
|
metadata: {}
|
|
171
|
-
post_install_message:
|
|
171
|
+
post_install_message:
|
|
172
172
|
rdoc_options: []
|
|
173
173
|
require_paths:
|
|
174
174
|
- lib
|
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
184
184
|
version: '0'
|
|
185
185
|
requirements: []
|
|
186
186
|
rubygems_version: 3.0.3
|
|
187
|
-
signing_key:
|
|
187
|
+
signing_key:
|
|
188
188
|
specification_version: 4
|
|
189
189
|
summary: Fast Rails serializer with built-in caching
|
|
190
190
|
test_files:
|