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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 201a53f5b4ca79442fa45bbd224c13028cc9d0d23fe1c9648d0e5c847af9bc12
4
- data.tar.gz: 5e89ad33bbbe3a5de586c4c1387782309f104fd01a1ee9a6bba97f55492e786b
3
+ metadata.gz: eb979251a3c5abfb4391233277520df3ae8d03d605cdae59166a80f1c8713b05
4
+ data.tar.gz: c5fa307e7db176c5f794f1e00da679cbb03463fb4a2ae588a7ae2bdd3b1df418
5
5
  SHA512:
6
- metadata.gz: 8271c50fce2d564962ae13dc97c4cea02a089c77317767065cfef7b912aa56732e967206f8e56d103d21b2395ffc6477a99587a8a23aee09f23be07c797c31fc
7
- data.tar.gz: 986822851f48f25085bfe2c5828b85bea56490e0874b699fbeb1808c15b7bedcb04b819c15ae355e1b2de10a1e3aaeeb0fedd3ff4e0538fa6628df929a4b2817
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
- if [Set, Array].include?(json.class)
28
- json.map do |json_item|
29
- deserialize(json_item)
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, **hash)
37
+ _deserialize(context, **parsed_data)
36
38
  end
37
39
  rescue Datory::Service::Exceptions::Input,
38
40
  Datory::Service::Exceptions::Internal,
@@ -5,7 +5,7 @@ module Datory
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = "rc16"
8
+ PRE = "rc18"
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
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.rc16
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-04-30 00:00:00.000000000 Z
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.0
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.0
60
+ version: 2.5.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: terminal-table
63
63
  requirement: !ruby/object:Gem::Requirement