cache_crispies 1.1.1 → 1.1.2

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: 50a80f969f0b9fc34f7c562df3ac6dc880503f1bc5aefd41ff1204b8b316bfb7
4
- data.tar.gz: 56474213e7cc52191ebc4a4083a7c82e998639c2ad90eb3bbe2bc0ab9a1701ed
3
+ metadata.gz: f23d18c6906327076e4f78ca7402f6d85ac20bccb751d0ed736097ab8e199be2
4
+ data.tar.gz: be4d5ed1169527b6d3eec66f7cdd6c0e3b3c4ae59f329c04b0785891be3aa1cc
5
5
  SHA512:
6
- metadata.gz: 3087ba57bb1db1bf7b27ae13d2e0ba9f11a31359218548b56c8e26555b6368b9f1c37bdd98529d56a9bc3d8b438fcaf97dea68734ebff9c6b25aac629346c463
7
- data.tar.gz: 223e0010500a5dc2bc9edef1db6f99804c3fce19ca08e28d516f789ee3980ff7a59ee8b4e85ebda00eb336c61b3c9b76ebcacdbd7f60dc14eb679226f4ff23d2
6
+ metadata.gz: dc2595c05df7544a82f7a4a83500f3d5f9be7d0f37052cb2b57269d43f46026bca138dd33d555c7d313074be08d9059f6c2811525f499ff96f2b6217f3e82134
7
+ data.tar.gz: 39b106fd6868f752999f80a8d18f00c9830f276dc1976cdae9826d3a4eec7ff39726df4c1d71fb6776189fe51d6edda8843f85ee4bedf1afc6bd856ef8183413
@@ -16,6 +16,8 @@ module CacheCrispies
16
16
  #
17
17
  # @return [Hash]
18
18
  def call
19
+ return unless @serializer.model
20
+
19
21
  hash = {}
20
22
 
21
23
  serializer.attributes.each do |attrib|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module CacheCrispies
4
4
  # The version of the gem
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.2'
6
6
  end
@@ -69,6 +69,26 @@ describe CacheCrispies::Base do
69
69
  parent_company: 'Disney probably'
70
70
  )
71
71
  end
72
+
73
+ context 'when nutrition_info is nil' do
74
+ before { model.nutrition_info = nil }
75
+
76
+ it 'serializes to a hash' do
77
+ expect(subject.as_json).to eq(
78
+ id: '42',
79
+ name: 'Cookie Crisp',
80
+ company: 'General Mills',
81
+ nested: {
82
+ nested_again: {
83
+ deeply_nested: 'TRUE'
84
+ }
85
+ },
86
+ nutrition_info: nil,
87
+ organic: true,
88
+ parent_company: 'Disney probably'
89
+ )
90
+ end
91
+ end
72
92
  end
73
93
 
74
94
  describe '.key' 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.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Crownoble
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2020-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties