seri 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: 6cfa2981681193432bc52036121c8481f8558594fb4162e5ca7938e911ade897
4
- data.tar.gz: 005d6c9f9fa17d6aac6d1ec719cb4acd87e713782f46621899ff53c199ff9702
3
+ metadata.gz: 313e5ba332dabfed3cfa91812dad1a31858e2d49c54d7ae78746ca6772503954
4
+ data.tar.gz: 443d592e2055c07140d346e4ddc6578c44f41aabc65ca8e05881d781577a1319
5
5
  SHA512:
6
- metadata.gz: b004ae3a8febfd4ba2869390f7ba91a982835f44c83813fc8423b19ff214f28804feeb960659ca9e09c7a0fb25c92eb3d9d16cff7541acc6a584eb71d4f954cf
7
- data.tar.gz: 13dc8907b0083bbd8e251b10b23f58781d561e8f26deaefe013f56a825072bc640f08a58c3abddb9594a9074e61482a1fc324b7bb67c7c9a6e68d3f18c908edc
6
+ metadata.gz: 8e0c1fb217114e5b53d6cac78ace2e432665fbeb822176694184a0cb0402bb631aa474fa4980a363c81c72513f169efd6881be4d548546b44e21f01b025c74e2
7
+ data.tar.gz: 5f4db42c99d1320eaac033fd582426277d79d102487752d29b1c1c1d4bbb22c0e4d5ef1529b0688e1196e26584e93150004959106cde7834285fdb2f4b9cb0e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seri (0.1.5)
4
+ seri (1.0.0)
5
5
  appsignal (~> 2.7)
6
6
  oj (~> 3.7)
7
7
 
@@ -1,3 +1,3 @@
1
1
  class Serializer
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
data/lib/serializer.rb CHANGED
@@ -48,10 +48,12 @@ class Serializer
48
48
  value = extract_value(attribute)
49
49
  serializer = attribute.serializer
50
50
 
51
- if ARRAYS.any? { |match| value.class.to_s.end_with?(match) }
52
- value.map { |v| serializer.new(v).to_h }
53
- elsif serializer
54
- serializer.new(value).to_h
51
+ if serializer
52
+ if ARRAYS.any? { |match| value.class.to_s.end_with?(match) }
53
+ value.map { |v| serializer.new(v).to_h }
54
+ else
55
+ serializer.new(value).to_h
56
+ end
55
57
  else
56
58
  value
57
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seri
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
  - grdw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-11 00:00:00.000000000 Z
11
+ date: 2019-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appsignal