rubypitaya 3.3.0 → 3.3.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e526e596bef23aa113c700a8e2ab6311241ebd9257d2f030026cf53ed3d49d5
|
4
|
+
data.tar.gz: 5f932845d7c382c26c4c948508fd1855fb4dfb3eecc533f0560c378ce6c87f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 025faa43f9e73e44f79a6cad82815ba445fb14be623a99dcf560200b2d4002b5fdf2e3ab8429eefd5110aa30611ca5eb3965f01da65ed6c3ba06e386962294e4
|
7
|
+
data.tar.gz: 4d8f19ca632af76c3329a9d658522089d776baba03b6fc6c83e8e61e8607b26479738d5836feb08da52967d82ddf606bfc92fec026d1849d190018dffb45230e
|
@@ -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.3.
|
106
|
+
rubypitaya (3.3.4)
|
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.3.
|
146
|
+
rubypitaya (= 3.3.4)
|
147
147
|
sinatra-contrib (= 2.1.0)
|
148
148
|
|
149
149
|
BUNDLED WITH
|
data/lib/rubypitaya/core/main.rb
CHANGED
@@ -10,6 +10,7 @@ require 'rubypitaya/core/session'
|
|
10
10
|
require 'rubypitaya/core/postman'
|
11
11
|
require 'rubypitaya/core/parameters'
|
12
12
|
require 'rubypitaya/core/http_routes'
|
13
|
+
require 'rubypitaya/core/route_error'
|
13
14
|
require 'rubypitaya/core/routes_base'
|
14
15
|
require 'rubypitaya/core/status_codes'
|
15
16
|
require 'rubypitaya/core/handler_router'
|
@@ -179,10 +180,20 @@ module RubyPitaya
|
|
179
180
|
|
180
181
|
@config.clear_cache
|
181
182
|
|
182
|
-
response =
|
183
|
-
|
184
|
-
|
185
|
-
|
183
|
+
response = {}
|
184
|
+
|
185
|
+
begin
|
186
|
+
response = @handler_router.call(handler_name, action_name, @session,
|
187
|
+
@postman, @redis_connector.redis,
|
188
|
+
@mongo_connector.mongo, @setup, @config,
|
189
|
+
@log, params)
|
190
|
+
rescue RouteError => error
|
191
|
+
@log.error "ROUTE ERROR: #{error.class} | #{error.message}} \n #{error.backtrace.join("\n")}"
|
192
|
+
response = {
|
193
|
+
code: error.code,
|
194
|
+
message: error.message
|
195
|
+
}
|
196
|
+
end
|
186
197
|
|
187
198
|
delta_time_seconds = ((Time.now.to_f - start_time_seconds) * 1000).round(2)
|
188
199
|
|
@@ -190,12 +201,6 @@ module RubyPitaya
|
|
190
201
|
|
191
202
|
response
|
192
203
|
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
|
-
}
|
199
204
|
rescue Exception => error
|
200
205
|
@log.error "INTERNAL ERROR: #{error.class} | #{error.message}} \n #{error.backtrace.join("\n")}"
|
201
206
|
run_nats_connection
|
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.3.
|
4
|
+
version: 3.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luciano Prestes Cavalcanti
|
@@ -339,7 +339,6 @@ 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"
|
343
342
|
- "./lib/rubypitaya/core/etcd_connector.rb"
|
344
343
|
- "./lib/rubypitaya/core/handler_base.rb"
|
345
344
|
- "./lib/rubypitaya/core/handler_router.rb"
|
@@ -359,6 +358,7 @@ files:
|
|
359
358
|
- "./lib/rubypitaya/core/protos/nats_connector.proto"
|
360
359
|
- "./lib/rubypitaya/core/protos/nats_connector_pb.rb"
|
361
360
|
- "./lib/rubypitaya/core/redis_connector.rb"
|
361
|
+
- "./lib/rubypitaya/core/route_error.rb"
|
362
362
|
- "./lib/rubypitaya/core/routes_base.rb"
|
363
363
|
- "./lib/rubypitaya/core/session.rb"
|
364
364
|
- "./lib/rubypitaya/core/setup.rb"
|