berbix 0.0.8 → 0.0.9
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/berbix.rb +4 -3
- 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: b9987708521ec087ad34bb2bccc7a2b00a6cf161d4b2e49b7f95cd6a4d449215
|
4
|
+
data.tar.gz: 6ac9676690b4269b550e6e401cab0b32cff20a9e87e52e7f1e32d1695b119cc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc15dc6022cd4ea92aa7bc845bc94b68e30141c1324fb0af1b934e7142df70d2445a71f3fba2c73864c32541357238e309a6c2ad972613afa16d6313d8ec323
|
7
|
+
data.tar.gz: a964e57ccd439700c726ed5c9fd9de01435f8f422b25e00e01f022552c45e3a4b2708420804b0dc089a046eaa852d9c0a441b89a38076cbc20234e6690040400
|
data/lib/berbix.rb
CHANGED
@@ -2,8 +2,7 @@ require 'net/https'
|
|
2
2
|
require 'json'
|
3
3
|
|
4
4
|
module Berbix
|
5
|
-
|
6
|
-
SDK_VERSION = '0.0.8'
|
5
|
+
SDK_VERSION = '0.0.9'
|
7
6
|
CLOCK_DRIFT = 300
|
8
7
|
|
9
8
|
class HTTPClient
|
@@ -48,7 +47,7 @@ module Berbix
|
|
48
47
|
res = cli.request(req)
|
49
48
|
code = res.code.to_i
|
50
49
|
if code < 200 || code >= 300
|
51
|
-
raise 'unexpected status code returned'
|
50
|
+
raise(Berbix::BerbixError, 'unexpected status code returned')
|
52
51
|
end
|
53
52
|
if code == 204
|
54
53
|
return
|
@@ -236,4 +235,6 @@ module Berbix
|
|
236
235
|
end
|
237
236
|
end
|
238
237
|
|
238
|
+
class BerbixError < StandardError
|
239
|
+
end
|
239
240
|
end
|