moysklad 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moysklad/client.rb +4 -3
- data/lib/moysklad/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb24a3feae7f239a193de031cb2734a7fa5a601e529ad9137ff0799c3db61ec8
|
4
|
+
data.tar.gz: 64cee4b18ed08c5f0ed001f5459a388544812b0d7c7448926d3d129dca397fd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8abd4098182f952d5ceb473b115b095d7fcd47715bb6f16645a8f06f96ff8ff61f830315899194e0383d7f0e1fcb2aa60172b5223fa9e507fe29d8fbce99c59f
|
7
|
+
data.tar.gz: 97082340b4c8ab6974c403077e5a97a9c2450a9dad81bd0e928667241aca5765257edcc94c0c0046eb1007f1007c7ce096a4114248d2e95bcffe8e820099de56
|
data/lib/moysklad/client.rb
CHANGED
@@ -77,11 +77,12 @@ class Moysklad::Client
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def parse_response res
|
80
|
-
|
80
|
+
body = (res.body || '').force_encoding('utf-8')
|
81
|
+
Moysklad.logger.debug "Response [#{res.status}] with body #{body}"
|
81
82
|
|
82
83
|
if res.status == 200
|
83
|
-
return if
|
84
|
-
JSON.parse
|
84
|
+
return if body.blank?
|
85
|
+
JSON.parse body
|
85
86
|
else
|
86
87
|
Moysklad::Client::Errors.build res
|
87
88
|
end
|
data/lib/moysklad/version.rb
CHANGED