datory 1.0.0.rc16 → 1.0.0.rc18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datory/context/callable.rb +7 -5
- data/lib/datory/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb979251a3c5abfb4391233277520df3ae8d03d605cdae59166a80f1c8713b05
|
4
|
+
data.tar.gz: c5fa307e7db176c5f794f1e00da679cbb03463fb4a2ae588a7ae2bdd3b1df418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5e6e7aedec61ea373c9e4df22fe2ded364bc02e9c37b0de0782fdde2e4a52d729b468dd7adfb6252c6b7ea886ffa0d8c3d1ecf37a80620fcff0289676ddc66c
|
7
|
+
data.tar.gz: 7ba8a8b89b44463649617203976bf99000a12d9e9748acc2c1d45f27bf592e6860d1839b5311b5dcae5825c12d008564b9b9eaf5f9ce12f487ff530745c7ccb0
|
@@ -24,15 +24,17 @@ module Datory
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def deserialize(json) # rubocop:disable Metrics/MethodLength
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
# TODO: Need to improve this place by adding more checks and an error exception.
|
28
|
+
parsed_data = json.is_a?(String) ? JSON.parse(json) : json
|
29
|
+
|
30
|
+
if [Set, Array].include?(parsed_data.class)
|
31
|
+
parsed_data.map do |item|
|
32
|
+
deserialize(item)
|
30
33
|
end
|
31
34
|
else
|
32
35
|
context = send(:new)
|
33
|
-
hash = JSON.parse(json.to_json)
|
34
36
|
|
35
|
-
_deserialize(context, **
|
37
|
+
_deserialize(context, **parsed_data)
|
36
38
|
end
|
37
39
|
rescue Datory::Service::Exceptions::Input,
|
38
40
|
Datory::Service::Exceptions::Internal,
|
data/lib/datory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.5.
|
53
|
+
version: 2.5.1
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 2.5.
|
60
|
+
version: 2.5.1
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: terminal-table
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|