dhl_api 0.1.3 → 0.1.4

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: 9b12f7af254bba77f9d7d87e5a3a78929e2c742ca36b2c6f371a83f8f9fe5ebf
4
- data.tar.gz: e4b97029dac457ee558241fcc0761093c1464fa0014db9fe38809cdf7ff01ced
3
+ metadata.gz: b126cc02ae47ac827f742a8a8f614e436a23e1189d9ccc51d635c9746b1fd9d4
4
+ data.tar.gz: 1ab4c06499dfef7822cfc96212671f0959db8128201dea6d18e95af7d846edd0
5
5
  SHA512:
6
- metadata.gz: f3742aeacb22214a7fad55047eebe7286ebccb36b1f376e09ef06152f4270fee016abb8edc735c3723c88700da566795b69f2f53a13ede83375496303ff6f22c
7
- data.tar.gz: 9bdaf6a5c171217e7b8009543dddaffea81b007e2f16845ea9c79283cdb2eaa95ac287affaac059d95576a174712baff6a1d6d86b217df674bbf54e1ca7da016
6
+ metadata.gz: 8e58f6dd2dbd912db675de70b8a841477f512f66659e1fd6bb0cab181132fd3befc60da989327a0a56801aa70b6f75fcbb7f90cf6de8914fd5896f5af1b228d6
7
+ data.tar.gz: b6e3afbdb7f851622420db9d982b1ef30b887805ce404720e9304a46d87b033f2bd10743d644bd0dcc1ac573654901f82656867e40f3a784e9b3c4e266c9ff0b
data/Gemfile.lock CHANGED
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dhl_api (0.1.2)
4
+ dhl_api (0.1.3)
5
5
  activesupport (>= 4.0.2)
6
6
  http (~> 5.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.2.4)
11
+ activesupport (7.0.7.2)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 1.6, < 2)
14
14
  minitest (>= 5.1)
15
15
  tzinfo (~> 2.0)
16
- addressable (2.8.4)
16
+ addressable (2.8.5)
17
17
  public_suffix (>= 2.0.2, < 6.0)
18
18
  ast (2.4.2)
19
19
  byebug (11.1.3)
20
20
  coderay (1.1.3)
21
- concurrent-ruby (1.1.10)
21
+ concurrent-ruby (1.2.2)
22
22
  diff-lcs (1.5.0)
23
23
  domain_name (0.5.20190701)
24
24
  unf (>= 0.0.5, < 1.0.0)
@@ -51,7 +51,7 @@ GEM
51
51
  http-cookie (1.0.5)
52
52
  domain_name (~> 0.5)
53
53
  http-form_data (2.3.0)
54
- i18n (1.10.0)
54
+ i18n (1.14.1)
55
55
  concurrent-ruby (~> 1.0)
56
56
  json (2.6.3)
57
57
  language_server-protocol (3.17.0.3)
@@ -64,7 +64,7 @@ GEM
64
64
  rake (~> 13.0)
65
65
  lumberjack (1.2.8)
66
66
  method_source (1.0.0)
67
- minitest (5.15.0)
67
+ minitest (5.19.0)
68
68
  nenv (0.3.0)
69
69
  notiffany (0.1.3)
70
70
  nenv (~> 0.1)
@@ -79,7 +79,7 @@ GEM
79
79
  pry-byebug (3.10.1)
80
80
  byebug (~> 11.0)
81
81
  pry (>= 0.13, < 0.15)
82
- public_suffix (5.0.1)
82
+ public_suffix (5.0.3)
83
83
  racc (1.7.1)
84
84
  rainbow (3.1.1)
85
85
  rake (13.0.6)
@@ -130,7 +130,7 @@ GEM
130
130
  lint_roller (~> 1.0)
131
131
  rubocop-performance (~> 1.18.0)
132
132
  thor (1.2.2)
133
- tzinfo (2.0.4)
133
+ tzinfo (2.0.6)
134
134
  concurrent-ruby (~> 1.0)
135
135
  unf (0.1.4)
136
136
  unf_ext
@@ -4,7 +4,9 @@ module DHLAPI
4
4
 
5
5
  def initialize(attributes = {})
6
6
  @attributes = attributes
7
- super to_ostruct(attributes)
7
+ ostruct = to_ostruct(attributes)
8
+ ostruct = ostruct.empty? ? nil : ostruct
9
+ super ostruct
8
10
  end
9
11
 
10
12
  private
@@ -13,9 +15,9 @@ module DHLAPI
13
15
  if obj.is_a?(Hash)
14
16
  OpenStruct.new(obj.map { |key, val| [key.to_s.underscore, to_ostruct(val)] }.to_h)
15
17
  elsif obj.is_a?(Array)
16
- return if obj.empty?
17
-
18
18
  obj.map { |o| to_ostruct(o) }
19
+ else # Assumed to be a primitive value
20
+ obj
19
21
  end
20
22
  end
21
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DHLAPI
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhl_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Chong
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-23 00:00:00.000000000 Z
11
+ date: 2023-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport