kybus-core 0.2.0 → 0.2.2

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
  SHA256:
3
- metadata.gz: cd55b83dbc2c6e862925f961aa4fec0cb29203e259e272594bd88d1ec3d7c129
4
- data.tar.gz: f534b7e922576f5aa7441cf8e9936a47aa0c5b8b0de660e9735dbca1d846449f
3
+ metadata.gz: a6dd64a9816eede65a22c02765ca94ddab54380e8fcde6824f8af4c24602d553
4
+ data.tar.gz: 95b5a99c2f24814d69b2068465cfc1dd70b2e3e3f8023c3d13d3df6a5b98e53d
5
5
  SHA512:
6
- metadata.gz: 4647c134aae920e83eba384e3404a9820ee2a604875591e157f69a8ba4328039ef4894a23b869df6d01da876935ca896962ade60e9cdc5f5ceeb5b5e770a0cf3
7
- data.tar.gz: 43a844b37b6479368c0ebbc67a9b027c4e33d595bb0bdcc7007e7182a6dfbeb227cc34e60367a851147222b386f7f053271d691b9dc0dcad3a6dd499716081d2
6
+ metadata.gz: 3a2e53e4813e4f896f5d4a7471362596be49de28e5df89da03a9528a799f14e764eaaa8dcc69f099df02992c2049861fbab6485fd999a1191d61c860a056e289
7
+ data.tar.gz: '08b6999b78690060b851e72412639f5dc320d32d6d6dc5297ca208a5a38c73d910e9d01bcf5f82a16a78e2ce21c18258cf9196acf17031824e49fe5beb17747d'
@@ -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 AntBaseException < StandardError
18
+ class KybusBaseException < StandardError
19
19
  attr_reader :message, :code, :data
20
20
 
21
21
  def initialize(message, code, data)
@@ -41,20 +41,20 @@ module Kybus
41
41
 
42
42
  ##
43
43
  # Is used to express a success with the client's request.
44
- class AntSuccess < AntBaseException
44
+ class KybusSuccess < KybusBaseException
45
45
  def initialize(message, code = nil, data = {})
46
46
  code ||= self.class.name.split('::').last
47
- super(message, code, data)
47
+ super
48
48
  end
49
49
  end
50
50
 
51
51
  ##
52
52
  # Is used to express a problem with the client's request.
53
- class AntFail < AntBaseException
53
+ class KybusFail < KybusBaseException
54
54
  def initialize(message, code = nil, data = {})
55
55
  code ||= self.class.name.split('::').last
56
- code = 'BadRequest' if code == 'AntFail'
57
- super(message, code, data)
56
+ code = 'BadRequest' if code == 'KybusFail'
57
+ super
58
58
  end
59
59
  end
60
60
 
@@ -62,11 +62,11 @@ 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 AntError < AntBaseException
65
+ class KybusError < KybusBaseException
66
66
  def initialize(message, code = nil, data = {})
67
67
  code ||= self.class.name.split('::').last
68
- code = 'ServerError' if code == 'AntError'
69
- super(message, code, data)
68
+ code = 'ServerError' if code == 'kybusError'
69
+ super
70
70
  end
71
71
  end
72
72
  end
@@ -8,9 +8,9 @@ module Kybus
8
8
  module HTTP
9
9
  class << self
10
10
  EXCEPTION_TYPES = {
11
- success: Kybus::Exceptions::AntSuccess,
12
- fail: Kybus::Exceptions::AntFail,
13
- error: Kybus::Exceptions::AntError
11
+ success: Kybus::Exceptions::KybusSuccess,
12
+ fail: Kybus::Exceptions::KybusFail,
13
+ error: Kybus::Exceptions::KybusError
14
14
  }.freeze
15
15
 
16
16
  def new_http_exception(class_name, http_code, type)
data/lib/kybus/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kybus
4
4
  module Core
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,141 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kybus-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilberto Vargas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-17 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: kybus-logger
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.1'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.1'
27
- - !ruby/object:Gem::Dependency
28
- name: minitest
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '5.11'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '5.11'
41
- - !ruby/object:Gem::Dependency
42
- name: mocha
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.8'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.8'
55
- - !ruby/object:Gem::Dependency
56
- name: pry
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.12'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0.12'
69
- - !ruby/object:Gem::Dependency
70
- name: rack-minitest
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '12.3'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '12.3'
97
- - !ruby/object:Gem::Dependency
98
- name: rdoc
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '6.1'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '6.1'
111
- - !ruby/object:Gem::Dependency
112
- name: simplecov
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '0.16'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '0.16'
125
- - !ruby/object:Gem::Dependency
126
- name: webmock
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '3.5'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '3.5'
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
+ dependencies: []
139
13
  description: |2
140
14
  Kybus::Core will be used across all the kybus gems. Provides the most basic
141
15
  functionality or what might be used along with more than one gem.
@@ -172,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
46
  - !ruby/object:Gem::Version
173
47
  version: '0'
174
48
  requirements: []
175
- rubygems_version: 3.3.7
49
+ rubygems_version: 3.5.14
176
50
  signing_key:
177
51
  specification_version: 4
178
52
  summary: Kybus framework core functionality