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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc25a36fd2d2e6eece9acfa5049b5b7015b99247c5123573c48095f9a76e0459
4
- data.tar.gz: edb8be39a3d3b071505900fccbad8f53ac5ba29ad4f07397c24534e1729160fd
3
+ metadata.gz: fb24a3feae7f239a193de031cb2734a7fa5a601e529ad9137ff0799c3db61ec8
4
+ data.tar.gz: 64cee4b18ed08c5f0ed001f5459a388544812b0d7c7448926d3d129dca397fd0
5
5
  SHA512:
6
- metadata.gz: 73cfb20ec4f2a7e708099406f3f1373b9d8953cf3d19d592dc50c1281e0ff227171e23813a66190ccba8964ef141a554a3c8d2f861ebcdfa4673840089a6fccf
7
- data.tar.gz: 5ecf16f9e2362677f31e3b3ee8a7768f6505c5dddb59cdbdf004a5bc61781e6e38bb7286030d402f4974fdc88117ad05f04645581c6627976d1117bbbe837fd8
6
+ metadata.gz: 8abd4098182f952d5ceb473b115b095d7fcd47715bb6f16645a8f06f96ff8ff61f830315899194e0383d7f0e1fcb2aa60172b5223fa9e507fe29d8fbce99c59f
7
+ data.tar.gz: 97082340b4c8ab6974c403077e5a97a9c2450a9dad81bd0e928667241aca5765257edcc94c0c0046eb1007f1007c7ce096a4114248d2e95bcffe8e820099de56
@@ -77,11 +77,12 @@ class Moysklad::Client
77
77
  end
78
78
 
79
79
  def parse_response res
80
- Moysklad.logger.debug "Response [#{res.status}]"
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 res.body.blank?
84
- JSON.parse res.body
84
+ return if body.blank?
85
+ JSON.parse body
85
86
  else
86
87
  Moysklad::Client::Errors.build res
87
88
  end
@@ -1,3 +1,3 @@
1
1
  module Moysklad
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moysklad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danil Pismenny