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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/serializer/version.rb +1 -1
- data/lib/serializer.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 313e5ba332dabfed3cfa91812dad1a31858e2d49c54d7ae78746ca6772503954
|
4
|
+
data.tar.gz: 443d592e2055c07140d346e4ddc6578c44f41aabc65ca8e05881d781577a1319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e0c1fb217114e5b53d6cac78ace2e432665fbeb822176694184a0cb0402bb631aa474fa4980a363c81c72513f169efd6881be4d548546b44e21f01b025c74e2
|
7
|
+
data.tar.gz: 5f4db42c99d1320eaac033fd582426277d79d102487752d29b1c1c1d4bbb22c0e4d5ef1529b0688e1196e26584e93150004959106cde7834285fdb2f4b9cb0e3
|
data/Gemfile.lock
CHANGED
data/lib/serializer/version.rb
CHANGED
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
|
52
|
-
|
53
|
-
|
54
|
-
|
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.
|
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
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appsignal
|