wrappi 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wrappi/response.rb +13 -1
- data/lib/wrappi/version.rb +1 -1
- 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: cdf93a36321552af49d6edd7b1e613f36d8294098e3702a3182adfca15dc664d
|
4
|
+
data.tar.gz: 5c3ebb3d3507c5fc11ed7404a1f631fadc6a401c22828cffd0573b09c1f694ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42e98a0e070fa90e2eff25dcf2731630a8e1f9583f4a7a834ce56f71e78044ee22af1c1d9fbd4df7ed1a9de99337108b7257b36eb7a0714c8662e85d80970e17
|
7
|
+
data.tar.gz: 13190e49c3a13054c473e7e2e345f26ba5602b35a679d0a70831c8359ca75fddfd3a31372266f89afb03e5ca7e9f76e9d95d3dbe4e8965baf932d1298012fec1
|
data/lib/wrappi/response.rb
CHANGED
@@ -20,7 +20,7 @@ module Wrappi
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def body
|
23
|
-
@body ||=
|
23
|
+
@body ||= parse
|
24
24
|
end
|
25
25
|
|
26
26
|
def success?
|
@@ -53,6 +53,18 @@ module Wrappi
|
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
56
|
+
def parse
|
57
|
+
request.parse
|
58
|
+
rescue
|
59
|
+
json_parse
|
60
|
+
end
|
61
|
+
|
62
|
+
def json_parse
|
63
|
+
JSON.parse(raw_body)
|
64
|
+
rescue
|
65
|
+
raw_body
|
66
|
+
end
|
67
|
+
|
56
68
|
def method_missing(method_name, *arguments, &block)
|
57
69
|
if request.respond_to?(method_name)
|
58
70
|
request.send(method_name, *arguments, &block)
|
data/lib/wrappi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrappi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artur Pañach
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|