postnord 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/postnord/response.rb +5 -7
- data/lib/postnord/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c5f62dbb4577260e7c50dcaccb1534ff94ff46c
|
4
|
+
data.tar.gz: 7b16b9fed310aa9e084d84a2263d8d3bdbe02bb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8eba2fb2c46debbb076c8e2ede04ee6f15ec6d170332335660940ba3879e0d856887d6ef7c99b90d2ae228eed76c813a33c77ee164570a55764effe2921d185
|
7
|
+
data.tar.gz: 56d61da20c0c8b8ab1f50ee08de53c381e77ca5822d2daf98f049619098430e11a8481817dd27ef1223841b51489a8d15a4df273323d3fbb603fd5c7cfbbdab3
|
data/lib/postnord/response.rb
CHANGED
@@ -7,7 +7,7 @@ module Postnord
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def code
|
10
|
-
@data.code
|
10
|
+
@data.code
|
11
11
|
end
|
12
12
|
|
13
13
|
def status
|
@@ -15,11 +15,9 @@ module Postnord
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def data
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
@data.body
|
22
|
-
end
|
18
|
+
JSON.parse(@data.body)
|
19
|
+
rescue JSON::ParserError
|
20
|
+
@data.body
|
23
21
|
end
|
24
22
|
|
25
23
|
def to_h
|
@@ -27,7 +25,7 @@ module Postnord
|
|
27
25
|
code: @code,
|
28
26
|
status: @status,
|
29
27
|
data: data,
|
30
|
-
}
|
28
|
+
}
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
data/lib/postnord/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postnord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Åhman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|