kybus-core 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kybus/exceptions.rb +4 -4
- data/lib/kybus/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: a6dd64a9816eede65a22c02765ca94ddab54380e8fcde6824f8af4c24602d553
|
4
|
+
data.tar.gz: 95b5a99c2f24814d69b2068465cfc1dd70b2e3e3f8023c3d13d3df6a5b98e53d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a2e53e4813e4f896f5d4a7471362596be49de28e5df89da03a9528a799f14e764eaaa8dcc69f099df02992c2049861fbab6485fd999a1191d61c860a056e289
|
7
|
+
data.tar.gz: '08b6999b78690060b851e72412639f5dc320d32d6d6dc5297ca208a5a38c73d910e9d01bcf5f82a16a78e2ce21c18258cf9196acf17031824e49fe5beb17747d'
|
data/lib/kybus/exceptions.rb
CHANGED
@@ -15,7 +15,7 @@ module Kybus
|
|
15
15
|
# The default is the exception class, so it won't change
|
16
16
|
# almost never.
|
17
17
|
# @param data. Contains additional data to detail the error.
|
18
|
-
class
|
18
|
+
class KybusBaseException < StandardError
|
19
19
|
attr_reader :message, :code, :data
|
20
20
|
|
21
21
|
def initialize(message, code, data)
|
@@ -41,7 +41,7 @@ module Kybus
|
|
41
41
|
|
42
42
|
##
|
43
43
|
# Is used to express a success with the client's request.
|
44
|
-
class
|
44
|
+
class KybusSuccess < KybusBaseException
|
45
45
|
def initialize(message, code = nil, data = {})
|
46
46
|
code ||= self.class.name.split('::').last
|
47
47
|
super
|
@@ -50,7 +50,7 @@ module Kybus
|
|
50
50
|
|
51
51
|
##
|
52
52
|
# Is used to express a problem with the client's request.
|
53
|
-
class
|
53
|
+
class KybusFail < KybusBaseException
|
54
54
|
def initialize(message, code = nil, data = {})
|
55
55
|
code ||= self.class.name.split('::').last
|
56
56
|
code = 'BadRequest' if code == 'KybusFail'
|
@@ -62,7 +62,7 @@ module Kybus
|
|
62
62
|
# Is used to express an error that was found during the execution of the
|
63
63
|
# program but it also means that the invoked endpoint has not the power to
|
64
64
|
# fix it, so it will only complain.
|
65
|
-
class
|
65
|
+
class KybusError < KybusBaseException
|
66
66
|
def initialize(message, code = nil, data = {})
|
67
67
|
code ||= self.class.name.split('::').last
|
68
68
|
code = 'ServerError' if code == 'kybusError'
|
data/lib/kybus/version.rb
CHANGED