lp-serializable 1.0.0 → 1.0.1

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: 571bdc82cdc4daa0a04c7bc64ffc0eb6aa147e01a864f080d3defa30d2894077
4
- data.tar.gz: 6fb5aa279f61c83de4df3c31c72aa7f40fb570299dc66ee93a9a15c1fdd8dd0a
3
+ metadata.gz: a7075a5d45e3269b8dca2d8504bbc73b4e8dfd9de407c2676762f14013903ccf
4
+ data.tar.gz: 9874bc7adfee9b4173217b22243e34f64c02b268f083a1a6da6f9e2dfb428c16
5
5
  SHA512:
6
- metadata.gz: 18adea0133108a9ab4f8de8184da80176f9823cc97cb6a95af79ff081f3dd489f452d27caed37ae4f7e04932dba5014a5bc601bee63c5f13f717603274331286
7
- data.tar.gz: 7db2565d566e1b232a58be585e15726a7e2f0b1d699515c0941d5acd712e43fff9ff989a4cc613ae7caf1c3b2335a5224850ce9e0a439456fac90d991b586601
6
+ metadata.gz: 86ec74de30ed67b821d39814479b3c3af16a25d6c425c0a8bc938bccebf2c9c9b3c3b7507b91eea1c4aeb6580e0f14a1e2258a5c40a84546e57ee648af6c342a
7
+ data.tar.gz: 2617995b0005c59bd5302aac10fcfc13df80f8e41ee43a811c0d643bfef489bc6a8aac4c659685c2c8c3805baa7f77d4c77945b0941f9068677f9fa9e9e0ec57
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lp-serializable (1.0.0)
4
+ lp-serializable (1.0.1)
5
5
  activesupport (>= 4.2)
6
6
  fast_jsonapi (>= 1.3)
7
7
 
@@ -7,6 +7,7 @@ module Lp
7
7
  include Exceptions
8
8
 
9
9
  def serialize_and_flatten(resource, options = {})
10
+ return { :data => nil } if resource.nil? # Match the return of serializable_class when given nil
10
11
  collection_option = collection?(false)
11
12
  base_hash = serialize_hash(resource, options.merge(collection_option))
12
13
  flatten_and_nest_data(base_hash, set_nested_option(options))
@@ -1,5 +1,5 @@
1
1
  module Lp
2
2
  module Serializable
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lp-serializable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mrjonesbot
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal