moysklad 0.4.2 → 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: 705793c278ca83f557d2df12ddde3d09972e4ef85dcb8f8b0e6b4e6d523f2734
4
- data.tar.gz: 6bda49d2e3d1e54df59ee1e75a39e404aba26a7eae8b21a1fad021937ba9bc78
3
+ metadata.gz: fb24a3feae7f239a193de031cb2734a7fa5a601e529ad9137ff0799c3db61ec8
4
+ data.tar.gz: 64cee4b18ed08c5f0ed001f5459a388544812b0d7c7448926d3d129dca397fd0
5
5
  SHA512:
6
- metadata.gz: 98fa23eb05c3d2176bad5e8a9a2b8ea97d5cbfebf87384bda832e1e7fde26ff038d5ee106b553692acae3f36eac541f185b1aa7413bf104f1cb80e4c2b75b6cf
7
- data.tar.gz: dd2c9037094646561832ec642be8f06ca18cf683c724f945a7f30991378f6b3b2e071d62de10c102b719697795f5e5daf4dcb8146c4266c65b10d628ee766c5a
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}]: #{res.body}"
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.2'
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.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danil Pismenny