rubypitaya 3.12.2 → 3.12.4
Sign up to get free protection for your applications and to get access to all the features.
- 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/Makefile +1 -0
- data/lib/rubypitaya/core/main.rb +3 -3
- data/lib/rubypitaya/core/spec-helpers/app_spec_helper.rb +2 -3
- data/lib/rubypitaya/core/spec-helpers/config_spec_helper.rb +6 -3
- data/lib/rubypitaya/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 034b0c387c795c3cad25a54cc2ea8660a56aa24f4b0f5363e294ca035ce8a4a0
|
4
|
+
data.tar.gz: c36985e5cff0b62ad2e22ac7865cd07643646de6ac20cc484fdb116ac2239e68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bbea9ec3a11a67f507dfcb48f9aa22717a6fa906fd6e9c7cb1dba41818d7dbbd43e400f8ac63239f750ca26e5dce98b1b3d080d263bc5898a48ba98d3254c30
|
7
|
+
data.tar.gz: e592cc3c19d445ba540e1d8326d2f2415556f37892a8d41f63cc429ee0998a3890027395ad73e788e5c8b86fb037ec717f9ecce737b0250bb1f15c50a2f47a65
|
@@ -94,7 +94,7 @@ GEM
|
|
94
94
|
rspec-support (~> 3.12.0)
|
95
95
|
rspec-support (3.12.0)
|
96
96
|
ruby2_keywords (0.0.5)
|
97
|
-
rubypitaya (3.12.
|
97
|
+
rubypitaya (3.12.4)
|
98
98
|
activerecord (= 7.0.4)
|
99
99
|
etcdv3 (= 0.11.5)
|
100
100
|
google-protobuf (= 3.21.12)
|
@@ -132,7 +132,7 @@ DEPENDENCIES
|
|
132
132
|
listen (= 3.8.0)
|
133
133
|
pry (= 0.14.2)
|
134
134
|
rspec (= 3.12.0)
|
135
|
-
rubypitaya (= 3.12.
|
135
|
+
rubypitaya (= 3.12.4)
|
136
136
|
sinatra-contrib (= 3.0.5)
|
137
137
|
|
138
138
|
BUNDLED WITH
|
@@ -15,6 +15,7 @@ build:
|
|
15
15
|
@docker-compose build
|
16
16
|
@docker-compose pull
|
17
17
|
@echo "Copying vendor folder ..."
|
18
|
+
@rm -rf ./vendor
|
18
19
|
@sh -c "FOLDER=$(notdir $(shell pwd)); docker cp \$$(docker-compose run --no-deps --detach --name=rubypitaya rubypitaya):/app/rubypitaya/vendor ."
|
19
20
|
@docker rm -f rubypitaya
|
20
21
|
|
data/lib/rubypitaya/core/main.rb
CHANGED
@@ -152,10 +152,10 @@ module RubyPitaya
|
|
152
152
|
start_time_seconds = Time.now.to_f
|
153
153
|
|
154
154
|
message_route = request[:msg][:route]
|
155
|
-
message_data = request[:msg][:data]
|
156
|
-
|
155
|
+
message_data = request[:msg][:data]
|
156
|
+
message_json = JSON.parse(message_data) if !message_data.nil? && !message_data.empty?
|
157
157
|
|
158
|
-
params = Parameters.new(
|
158
|
+
params = Parameters.new(message_json || {})
|
159
159
|
|
160
160
|
session_id = request[:session][:id]
|
161
161
|
session_uid = request[:session].fetch(:uid, '')
|
@@ -11,16 +11,15 @@ module RubyPitaya
|
|
11
11
|
|
12
12
|
def self.initialize_before_suite
|
13
13
|
default_setup = Setup.new.get_config
|
14
|
+
default_config = ConfigCore.new
|
14
15
|
|
15
16
|
@@log = Logger.new('/dev/null')
|
16
17
|
@@setup = SetupSpecHelper.new(default_setup)
|
17
|
-
@@config = ConfigSpecHelper.new
|
18
|
+
@@config = ConfigSpecHelper.new(default_config)
|
18
19
|
@@session = Session.new
|
19
20
|
@@postman = PostmanSpecHelper.new
|
20
21
|
@@services = ServiceHolder.new
|
21
22
|
|
22
|
-
@@default_setup = Setup.new
|
23
|
-
|
24
23
|
is_cheats_enabled = @@setup.fetch('rubypitaya.server.cheats', true)
|
25
24
|
@@handler_router ||= HandlerRouter.new(is_cheats_enabled)
|
26
25
|
|
@@ -2,13 +2,16 @@ module RubyPitaya
|
|
2
2
|
|
3
3
|
class ConfigSpecHelper
|
4
4
|
|
5
|
-
def initialize
|
5
|
+
def initialize(default_config = {})
|
6
6
|
@config_mock = {}
|
7
|
+
@default_config = default_config
|
7
8
|
end
|
8
9
|
|
9
10
|
def [](key)
|
10
|
-
|
11
|
-
|
11
|
+
result = @config_mock[key]
|
12
|
+
return result unless result.nil?
|
13
|
+
|
14
|
+
return @default_config[key]
|
12
15
|
end
|
13
16
|
|
14
17
|
def auto_reload
|
data/lib/rubypitaya/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubypitaya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.12.
|
4
|
+
version: 3.12.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luciano Prestes Cavalcanti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|