ci_block_io 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ci_block_io.rb +5 -9
- data/lib/ci_block_io/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: 06b4166ccace6d50382ca48dd5923b932a8a3bc3bcd3816a4c1f1fc574568235
|
|
4
|
+
data.tar.gz: 803956987bd0e3e716966e8c580a865985266c2d5a34458a3f0252ac2bcc7c6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5d9377aef97edd7485053c814d669ee0f40a548595a0e3bc48fa0ce85141e8d2828fc705a32ddf93b1d7e1457dc0111046712b6479467f25d749a45a71d9351
|
|
7
|
+
data.tar.gz: 5db50d701bede363917f214563059cd66c084477dae67de593bcb1b2407144f604fa40e215480253412a29d26ac204138e456cf72f9fefe55236fa6fbe5429ba
|
data/lib/ci_block_io.rb
CHANGED
|
@@ -146,15 +146,11 @@ module CiBlockIo
|
|
|
146
146
|
|
|
147
147
|
response = @client.post(base_url + @api_key, endpoint[1])
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
raise Exception.new(body['data']['error_message']) if !body['status'].eql?('success')
|
|
155
|
-
end
|
|
156
|
-
rescue
|
|
157
|
-
raise Exception.new('Unknown error occurred. Please report this.')
|
|
149
|
+
body = Oj.load(response.body)
|
|
150
|
+
if endpoint[0] == 'withdraw'
|
|
151
|
+
raise CiBlockIoWithdrawException.new(body['data']['error_message']) if !body['status'].eql?('success')
|
|
152
|
+
else
|
|
153
|
+
raise Exception.new(body['data']['error_message']) if !body['status'].eql?('success')
|
|
158
154
|
end
|
|
159
155
|
body
|
|
160
156
|
end
|
data/lib/ci_block_io/version.rb
CHANGED