coinsetter 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: 4e4f21f963b3b6bcc840ce8829ccc9e908183a45
4
- data.tar.gz: 6a51f4322a133292beea56ecdd5d72196620a4ce
3
+ metadata.gz: afeffb31dcc3d845af188921bbf992e29c673bc7
4
+ data.tar.gz: 72cfe313d63a7acea8d723f6cc4e50af18c64327
5
5
  SHA512:
6
- metadata.gz: b36e788153fd3971e46a3767c8ad318fc18b21924d132872e17feca65dc0e831d8f0dce1df67e5117ca98138f25ca1474e164c33dca78350c748287ade92f156
7
- data.tar.gz: f7466b937d796ba90fa9ae9707a3b86b327a5b5915bcb1e4e4636991925e8b7af74c06506af7e00b4886098e9905be7e17b0aac89aaeedaf6a08ce3db124874d
6
+ metadata.gz: ffccf55b06cb5a9fbf1180783c687e806707d25b912e9412783279c032293bffa2ef24a17e47b7838f5738a9128aa283a6ad4555da91bd79dc196acaba0789fd
7
+ data.tar.gz: fee5fff28bac73aadd6f8b4df6694b62addacfe252c0d1541389ea92f20f2542e535fbc7f680db04e28b6d7667d690e42e594c3e93d988592446446f63ef8d5f
@@ -40,10 +40,10 @@ module Coinsetter
40
40
 
41
41
  private
42
42
  def parse
43
- if response.include? "\"requestStatus\":\"SUCCESS\""
44
- Coinsetter::Helper.parse_object! response, model
45
- else
43
+ if response.include? "\"response\":\"error\""
46
44
  Coinsetter::Helper.parse_message! response
45
+ else
46
+ Coinsetter::Helper.parse_object! response, model
47
47
  end
48
48
  end
49
49
 
@@ -49,7 +49,7 @@ module Coinsetter
49
49
  if res.status == 200
50
50
  res.body
51
51
  else
52
- JSON.generate({status: res.status, message: res.body})
52
+ JSON.generate({response: "error", status: res.status, message: res.body})
53
53
  end
54
54
  end
55
55
 
@@ -1,3 +1,3 @@
1
1
  module Coinsetter
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinsetter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Galaviz