lib 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lib.rb +1 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4be579ab369a262f0df68a28b1a05b5f7dc1c37
4
- data.tar.gz: c108730ba7360638a479c080b22c67c6f1a43435
3
+ metadata.gz: d273649cb28a1780a92a58a3f2e5c91a06f28b00
4
+ data.tar.gz: 015a687683d986dc641ab88522777b324be2a923
5
5
  SHA512:
6
- metadata.gz: 0935e70df15a875deecf68a5eb3fa34626bd0af571054c33d24f25e620b22c06c83e1a639db0b7a4b5a60bff1f63f82dc5de8195a927f1eaf0d50176d2dd91a7
7
- data.tar.gz: 881f80b62f72980ca0bf58f015c1ad594cce3b054a2032c317dd97e35b73300df13a0a82800ae193faccf644b284a140f87fd756c0e31172cbc74de85992ce34
6
+ metadata.gz: dd7609597dd4c8da4c18748600f105ebceca2bf31d90b4dd747524a96a8137c66773fac6e629a2286a5b0c0769164cab7eaf610a2c4a61b126375417ce470408
7
+ data.tar.gz: 6125797d996865ddd4f2f75cde6a5a45ac1f5e6d77f54687b45f275bf3821ff74a51f7db10cb4182b5706e980126af344a445aa9cbc70f64e863759330c13f5f
data/lib/lib.rb CHANGED
@@ -159,7 +159,7 @@ module Lib
159
159
  if contentType === 'application/json' then
160
160
  response = response.to_s
161
161
  begin
162
- response = JSON.parse(response);
162
+ response = ('{['.include? response[0]) ? JSON.parse(response) : JSON.parse("[#{response}]")[0]
163
163
  rescue
164
164
  response = nil
165
165
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Horwood