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: f23d18c6906327076e4f78ca7402f6d85ac20bccb751d0ed736097ab8e199be2
4
- data.tar.gz: be4d5ed1169527b6d3eec66f7cdd6c0e3b3c4ae59f329c04b0785891be3aa1cc
3
+ metadata.gz: 35d549e631ed6401a8d401b28e77f192ffc0661ed7ad4afd5f6e70b7e85770a0
4
+ data.tar.gz: 2b118175b85d5d5be47c43c8c9359be7dd496502c056ec5694fb2cbad7778d04
5
5
  SHA512:
6
- metadata.gz: dc2595c05df7544a82f7a4a83500f3d5f9be7d0f37052cb2b57269d43f46026bca138dd33d555c7d313074be08d9059f6c2811525f499ff96f2b6217f3e82134
7
- data.tar.gz: 39b106fd6868f752999f80a8d18f00c9830f276dc1976cdae9826d3a4eec7ff39726df4c1d71fb6776189fe51d6edda8843f85ee4bedf1afc6bd856ef8183413
6
+ metadata.gz: a3279adc9b9e20800159b2cdcf0aaa173d58d030d22027dcb62818b3fafa12aa2ed5776f824261daf184d8a83cb011e74f617d71bd2d36d5e16aa46ce7446ed0
7
+ data.tar.gz: '0030582a6e0bc880adff6e350a0f38412dc04f40e04a902ef0aeb5b93d2f6eb5206e6d0960ed414e978d3c3604a789c0d199a93d95cf3da85f4fcc463ba70029'
@@ -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.flatten.map { |att| att&.to_sym }.map do |attrib|
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module CacheCrispies
4
4
  # The version of the gem
5
- VERSION = '1.1.2'
5
+ VERSION = '1.1.3'
6
6
  end
@@ -85,8 +85,7 @@ describe CacheCrispies::HashBuilder do
85
85
  { name: 'Other Kind of Sugar' },
86
86
  ]
87
87
  }
88
- },
89
- health: {}
88
+ }
90
89
  })
91
90
  end
92
91
 
@@ -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.2
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-01-31 00:00:00.000000000 Z
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: