rubypitaya 3.2.0 → 3.3.0
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/rubypitaya/app-template/Gemfile +1 -1
- data/lib/rubypitaya/app-template/Gemfile.lock +2 -2
- data/lib/rubypitaya/app-template/app/constants/status_codes.rb +1 -0
- data/lib/rubypitaya/core/error.rb +9 -0
- data/lib/rubypitaya/core/main.rb +7 -2
- data/lib/rubypitaya/core/spec-helpers/handler_spec_helper.rb +8 -0
- data/lib/rubypitaya/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f57bbdb5e9f7f12097c4013871c3947a1655e3c79fe31b9e259d911c0563ef0d
|
|
4
|
+
data.tar.gz: bd54ecb7812fd7d16573f986f274abf0949cd0a7d460ec30ece58bef51201ec2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2440c10e3c923ccfbe29e6730bbfae01385caf00a8d9c2aff001740c5f3e91670d8cfc020bfd4655fd143062a1a1921a21dcc6846424cef48403344b9841497b
|
|
7
|
+
data.tar.gz: 2beb8d98dade8520167c774714bb71673ee6f8329494a8b0a80674ac44f63384b50dd2af32dd20e01975dcb622a0624c74457fd730ea6a77b44ea821dfb41ed6
|
|
@@ -103,7 +103,7 @@ GEM
|
|
|
103
103
|
rspec-support (~> 3.10.0)
|
|
104
104
|
rspec-support (3.10.3)
|
|
105
105
|
ruby2_keywords (0.0.5)
|
|
106
|
-
rubypitaya (3.
|
|
106
|
+
rubypitaya (3.3.0)
|
|
107
107
|
activerecord (= 6.1.4.1)
|
|
108
108
|
etcdv3 (= 0.11.4)
|
|
109
109
|
google-protobuf (= 3.18.1)
|
|
@@ -143,7 +143,7 @@ DEPENDENCIES
|
|
|
143
143
|
listen (= 3.7.0)
|
|
144
144
|
pry (= 0.14.1)
|
|
145
145
|
rspec (= 3.10.0)
|
|
146
|
-
rubypitaya (= 3.
|
|
146
|
+
rubypitaya (= 3.3.0)
|
|
147
147
|
sinatra-contrib (= 2.1.0)
|
|
148
148
|
|
|
149
149
|
BUNDLED WITH
|
|
@@ -11,6 +11,7 @@ class StatusCodes
|
|
|
11
11
|
#
|
|
12
12
|
#
|
|
13
13
|
## Error codes
|
|
14
|
+
# RubyPitaya::StatusCodes::CODE_ERROR = 'RP-201'
|
|
14
15
|
# RubyPitaya::StatusCodes::CODE_UNKNOWN = 'RP-000'
|
|
15
16
|
# RubyPitaya::StatusCodes::CODE_HANDLER_NOT_FOUND = 'RP-001'
|
|
16
17
|
# RubyPitaya::StatusCodes::CODE_ACTION_NOT_FOUND = 'RP-002'
|
data/lib/rubypitaya/core/main.rb
CHANGED
|
@@ -190,9 +190,14 @@ module RubyPitaya
|
|
|
190
190
|
|
|
191
191
|
response
|
|
192
192
|
end
|
|
193
|
+
rescue RubyPitaya::Error => error
|
|
194
|
+
@log.error "ROUTE ERROR: #{error.class} | #{error.message}} \n #{error.backtrace.join("\n")}"
|
|
195
|
+
response = {
|
|
196
|
+
code: error.code,
|
|
197
|
+
message: error.message
|
|
198
|
+
}
|
|
193
199
|
rescue Exception => error
|
|
194
|
-
@log.
|
|
195
|
-
@log.info error.backtrace.join("\n")
|
|
200
|
+
@log.error "INTERNAL ERROR: #{error.class} | #{error.message}} \n #{error.backtrace.join("\n")}"
|
|
196
201
|
run_nats_connection
|
|
197
202
|
end
|
|
198
203
|
end
|
data/lib/rubypitaya/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubypitaya
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luciano Prestes Cavalcanti
|
|
@@ -339,6 +339,7 @@ files:
|
|
|
339
339
|
- "./lib/rubypitaya/core/config_core.rb"
|
|
340
340
|
- "./lib/rubypitaya/core/database_config.rb"
|
|
341
341
|
- "./lib/rubypitaya/core/database_connector.rb"
|
|
342
|
+
- "./lib/rubypitaya/core/error.rb"
|
|
342
343
|
- "./lib/rubypitaya/core/etcd_connector.rb"
|
|
343
344
|
- "./lib/rubypitaya/core/handler_base.rb"
|
|
344
345
|
- "./lib/rubypitaya/core/handler_router.rb"
|