rubypitaya 2.27.0 → 3.0.2
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 +6 -5
- data/lib/rubypitaya/app-template/Gemfile.lock +49 -57
- data/lib/rubypitaya/app-template/Makefile +2 -2
- data/lib/rubypitaya/app-template/app/app_initializer.rb +3 -1
- data/lib/rubypitaya/app-template/app/handlers/player_handler.rb +9 -3
- data/lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb +1 -1
- data/lib/rubypitaya/app-template/app/setup/rubypitaya.yml +1 -0
- data/lib/rubypitaya/app-template/docker/dev/Dockerfile +1 -1
- data/lib/rubypitaya/app-template/docker/prod/Dockerfile +14 -5
- data/lib/rubypitaya/app-template/docker-compose.yml +4 -4
- data/lib/rubypitaya/app-template/features/step_definitions/rubypitaya_steps.rb +2 -0
- data/lib/rubypitaya/app-template/helm/templates/deployments/rubypitaya.yaml +2 -0
- data/lib/rubypitaya/app-template/helm/templates/statefulsets/etcd.yaml +1 -1
- data/lib/rubypitaya/app-template/helm/templates/statefulsets/nats.yaml +1 -1
- data/lib/rubypitaya/app-template/helm/values.yaml +1 -0
- data/lib/rubypitaya/app-template/kubernetes/statefulset-etcd.yaml +1 -1
- data/lib/rubypitaya/app-template/kubernetes/statefulset-nats.yaml +1 -1
- data/lib/rubypitaya/app-template/kubernetes/statefulset-postgres.yaml +1 -1
- data/lib/rubypitaya/core/database_connector.rb +2 -1
- data/lib/rubypitaya/core/handler_base.rb +6 -5
- data/lib/rubypitaya/core/handler_router.rb +7 -2
- data/lib/rubypitaya/core/http_base.rb +20 -0
- data/lib/rubypitaya/core/http_routes.rb +1 -1
- data/lib/rubypitaya/core/instance_holder.rb +1 -1
- data/lib/rubypitaya/core/main.rb +6 -8
- data/lib/rubypitaya/core/nats_connector.rb +12 -57
- data/lib/rubypitaya/core/postman.rb +3 -1
- data/lib/rubypitaya/core/protos/nats_connector.proto +47 -0
- data/lib/rubypitaya/core/protos/nats_connector_pb.rb +56 -0
- data/lib/rubypitaya/core/session.rb +8 -0
- data/lib/rubypitaya/core/spec-helpers/handler_spec_helper.rb +2 -1
- data/lib/rubypitaya/core/spec-helpers/setup_spec_helper.rb +4 -0
- data/lib/rubypitaya/core/templates/template_migration.rb.erb +4 -1
- data/lib/rubypitaya/version.rb +1 -1
- metadata +47 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0308a5654cdfbb6aa96c6c680a27af78ca4a7ed6ca4830afdf352587e930967d'
|
4
|
+
data.tar.gz: bdaeef1f2af9594c8b0a39c8b954d2008c84383d8fa4a318637224e30c2507d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e9f17d2cdb1e12dd2a1e37f693506e81054a7f91a313db0ae5873fd8423f3ff461782906db78f2a2494452a638eb26a464f6b186a81602c9023c501f61b265a
|
7
|
+
data.tar.gz: eda610ea2ca327de2f2fcf47f49ba8225d0e7500745ec3d3a7247f7371a6634cd1e4694734d2ba4da6c14243d05fe6df661d55bb9679a7dcf944d3221e7cd687
|
@@ -1,11 +1,12 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem 'rubypitaya', '
|
3
|
+
gem 'rubypitaya', '3.0.2'
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem 'pry', '0.14.
|
7
|
-
gem 'bundler', '2.1.4'
|
6
|
+
gem 'pry', '0.14.1'
|
8
7
|
gem 'rspec', '3.10.0'
|
9
|
-
gem 'listen', '3.
|
10
|
-
gem '
|
8
|
+
gem 'listen', '3.7.0'
|
9
|
+
gem 'bundler', '2.2.22'
|
10
|
+
gem 'cucumber', '7.0.0'
|
11
|
+
gem 'sinatra-contrib', '2.1.0'
|
11
12
|
end
|
@@ -16,55 +16,57 @@ GEM
|
|
16
16
|
builder (3.2.4)
|
17
17
|
coderay (1.1.3)
|
18
18
|
concurrent-ruby (1.1.9)
|
19
|
-
cucumber (
|
19
|
+
cucumber (7.0.0)
|
20
20
|
builder (~> 3.2, >= 3.2.4)
|
21
|
-
cucumber-core (~>
|
22
|
-
cucumber-create-meta (~>
|
23
|
-
cucumber-cucumber-expressions (~>
|
24
|
-
cucumber-gherkin (~>
|
25
|
-
cucumber-html-formatter (~>
|
26
|
-
cucumber-messages (~>
|
27
|
-
cucumber-wire (~>
|
21
|
+
cucumber-core (~> 10.0, >= 10.0.1)
|
22
|
+
cucumber-create-meta (~> 6.0, >= 6.0.1)
|
23
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
24
|
+
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
25
|
+
cucumber-html-formatter (~> 16.0, >= 16.0.1)
|
26
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
27
|
+
cucumber-wire (~> 6.0, >= 6.0.1)
|
28
28
|
diff-lcs (~> 1.4, >= 1.4.4)
|
29
|
+
mime-types (~> 3.3, >= 3.3.1)
|
29
30
|
multi_test (~> 0.1, >= 0.1.2)
|
30
|
-
sys-uname (~> 1.2, >= 1.2.
|
31
|
-
cucumber-core (
|
32
|
-
cucumber-gherkin (~>
|
33
|
-
cucumber-messages (~>
|
34
|
-
cucumber-tag-expressions (~>
|
35
|
-
cucumber-create-meta (
|
36
|
-
cucumber-messages (~>
|
37
|
-
sys-uname (~> 1.2, >= 1.2.
|
38
|
-
cucumber-cucumber-expressions (
|
39
|
-
cucumber-gherkin (
|
40
|
-
cucumber-messages (~>
|
41
|
-
cucumber-html-formatter (
|
42
|
-
cucumber-messages (~>
|
43
|
-
cucumber-messages (
|
44
|
-
|
45
|
-
cucumber-
|
46
|
-
|
47
|
-
cucumber-
|
48
|
-
cucumber-
|
49
|
-
cucumber-messages (~> 13.0, >= 13.0.1)
|
31
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
32
|
+
cucumber-core (10.0.1)
|
33
|
+
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
34
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
35
|
+
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
36
|
+
cucumber-create-meta (6.0.1)
|
37
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
38
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
39
|
+
cucumber-cucumber-expressions (12.1.3)
|
40
|
+
cucumber-gherkin (20.0.1)
|
41
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
42
|
+
cucumber-html-formatter (16.0.1)
|
43
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
44
|
+
cucumber-messages (17.1.1)
|
45
|
+
cucumber-tag-expressions (3.0.1)
|
46
|
+
cucumber-wire (6.1.1)
|
47
|
+
cucumber-core (~> 10.0, >= 10.0.1)
|
48
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
|
49
|
+
cucumber-messages (~> 17.0, >= 17.0.1)
|
50
50
|
diff-lcs (1.4.4)
|
51
|
-
etcdv3 (0.11.
|
51
|
+
etcdv3 (0.11.4)
|
52
52
|
grpc (~> 1.17)
|
53
53
|
eventmachine (1.2.7)
|
54
54
|
ffi (1.15.4)
|
55
|
-
google-protobuf (3.
|
56
|
-
googleapis-common-protos-types (1.
|
55
|
+
google-protobuf (3.18.0-x86_64-linux)
|
56
|
+
googleapis-common-protos-types (1.2.0)
|
57
57
|
google-protobuf (~> 3.14)
|
58
|
-
grpc (1.
|
58
|
+
grpc (1.40.0-x86_64-linux)
|
59
59
|
google-protobuf (~> 3.15)
|
60
60
|
googleapis-common-protos-types (~> 1.0)
|
61
61
|
i18n (1.8.10)
|
62
62
|
concurrent-ruby (~> 1.0)
|
63
|
-
listen (3.
|
63
|
+
listen (3.7.0)
|
64
64
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
65
65
|
rb-inotify (~> 0.9, >= 0.9.10)
|
66
66
|
method_source (1.0.0)
|
67
|
-
|
67
|
+
mime-types (3.3.1)
|
68
|
+
mime-types-data (~> 3.2015)
|
69
|
+
mime-types-data (3.2021.0901)
|
68
70
|
minitest (5.14.4)
|
69
71
|
mongo (2.15.0)
|
70
72
|
bson (>= 4.8.2, < 5.0.0)
|
@@ -76,17 +78,7 @@ GEM
|
|
76
78
|
eventmachine (~> 1.2, >= 1.2)
|
77
79
|
ostruct (0.4.0)
|
78
80
|
pg (1.2.3)
|
79
|
-
|
80
|
-
activesupport (>= 3.2)
|
81
|
-
middleware
|
82
|
-
thor
|
83
|
-
thread_safe
|
84
|
-
protobuf-cucumber (3.10.8)
|
85
|
-
activesupport (>= 3.2)
|
86
|
-
middleware
|
87
|
-
thor
|
88
|
-
thread_safe
|
89
|
-
pry (0.14.0)
|
81
|
+
pry (0.14.1)
|
90
82
|
coderay (~> 1.1)
|
91
83
|
method_source (~> 1.0)
|
92
84
|
rack (2.2.3)
|
@@ -111,18 +103,19 @@ GEM
|
|
111
103
|
rspec-support (~> 3.10.0)
|
112
104
|
rspec-support (3.10.2)
|
113
105
|
ruby2_keywords (0.0.5)
|
114
|
-
rubypitaya (
|
106
|
+
rubypitaya (3.0.2)
|
115
107
|
activerecord (= 6.1.4.1)
|
116
|
-
etcdv3 (= 0.11.
|
108
|
+
etcdv3 (= 0.11.4)
|
109
|
+
google-protobuf (= 3.18.0)
|
117
110
|
mongo (= 2.15.0)
|
118
111
|
nats (= 0.11.0)
|
119
112
|
ostruct (= 0.4.0)
|
120
113
|
pg (= 1.2.3)
|
121
|
-
protobuf (= 3.10.4)
|
122
114
|
rake (= 13.0.6)
|
123
115
|
redis (= 4.4.0)
|
124
116
|
sinatra (= 2.1.0)
|
125
117
|
sinatra-contrib (= 2.1.0)
|
118
|
+
webrick (= 1.7.0)
|
126
119
|
sinatra (2.1.0)
|
127
120
|
mustermann (~> 1.0)
|
128
121
|
rack (~> 2.2)
|
@@ -136,23 +129,22 @@ GEM
|
|
136
129
|
tilt (~> 2.0)
|
137
130
|
sys-uname (1.2.2)
|
138
131
|
ffi (~> 1.1)
|
139
|
-
thor (1.1.0)
|
140
|
-
thread_safe (0.3.6)
|
141
132
|
tilt (2.0.10)
|
142
133
|
tzinfo (2.0.4)
|
143
134
|
concurrent-ruby (~> 1.0)
|
135
|
+
webrick (1.7.0)
|
144
136
|
zeitwerk (2.4.2)
|
145
137
|
|
146
138
|
PLATFORMS
|
147
|
-
|
139
|
+
x86_64-linux
|
148
140
|
|
149
141
|
DEPENDENCIES
|
150
|
-
bundler (= 2.
|
151
|
-
cucumber (=
|
152
|
-
listen (= 3.
|
153
|
-
pry (= 0.14.
|
142
|
+
bundler (= 2.2.22)
|
143
|
+
cucumber (= 7.0.0)
|
144
|
+
listen (= 3.7.0)
|
145
|
+
pry (= 0.14.1)
|
154
146
|
rspec (= 3.10.0)
|
155
|
-
rubypitaya (=
|
147
|
+
rubypitaya (= 3.0.2)
|
156
148
|
|
157
149
|
BUNDLED WITH
|
158
|
-
2.
|
150
|
+
2.2.22
|
@@ -36,12 +36,12 @@ test-rspec:
|
|
36
36
|
|
37
37
|
## Run cucumber tests. FILE=something.feature
|
38
38
|
test-cucumber:
|
39
|
-
@docker-compose run --service-ports --rm rubypitaya bundle exec cucumber $(FILE)
|
39
|
+
@docker-compose run --service-ports --rm rubypitaya bundle exec cucumber --publish-quiet $(FILE)
|
40
40
|
|
41
41
|
## Update gems dependencies on Gemfile.lock
|
42
42
|
update-dependencies:
|
43
43
|
@rm -f Gemfile.lock
|
44
|
-
@docker run --rm -v "$(PWD)":/usr/src/app -w /usr/src/app ruby:
|
44
|
+
@docker run --rm -v "$(PWD)":/usr/src/app -w /usr/src/app ruby:3.0.2 bundle install
|
45
45
|
|
46
46
|
## + Improve metagame
|
47
47
|
|
@@ -5,9 +5,11 @@ class AppInitializer < RubyPitaya::InitializerBase
|
|
5
5
|
# attributes:
|
6
6
|
# - redis
|
7
7
|
# - link: https://github.com/redis/redis-rb/
|
8
|
+
#
|
8
9
|
# - mongo
|
9
10
|
# - class: Mongo::Client
|
10
11
|
# - link: https://docs.mongodb.com/ruby-driver/current/tutorials/quick-start/
|
12
|
+
#
|
11
13
|
# - config
|
12
14
|
# - class: RubyPitaya::Config
|
13
15
|
# - link: https://gitlab.com/LucianoPC/ruby-pitaya/-/blob/master/lib/rubypitaya/core/config.rb
|
@@ -30,7 +32,7 @@ class AppInitializer < RubyPitaya::InitializerBase
|
|
30
32
|
def run(initializer_content)
|
31
33
|
playerBll = PlayerBLL.new
|
32
34
|
|
33
|
-
PlayerHandler.
|
35
|
+
PlayerHandler.objects.add(:bll, playerBll)
|
34
36
|
end
|
35
37
|
|
36
38
|
def self.path
|
@@ -2,11 +2,11 @@ class PlayerHandler < RubyPitaya::HandlerBase
|
|
2
2
|
|
3
3
|
# class: HandlerBase
|
4
4
|
# attributes:
|
5
|
-
# - @
|
5
|
+
# - @objects
|
6
6
|
# - class: InstanceHolder
|
7
7
|
# - methods:
|
8
8
|
# - [](key)
|
9
|
-
# - info: get
|
9
|
+
# - info: get object by key
|
10
10
|
#
|
11
11
|
# - @redis
|
12
12
|
# - link: https://github.com/redis/redis-rb/
|
@@ -51,7 +51,7 @@ class PlayerHandler < RubyPitaya::HandlerBase
|
|
51
51
|
user_id = @params[:userId]
|
52
52
|
|
53
53
|
player = Player.find_by_user_id(user_id)
|
54
|
-
player =
|
54
|
+
player = bll.create_new_player(@setup, @config) if player.nil?
|
55
55
|
|
56
56
|
@session.uid = player.user_id
|
57
57
|
|
@@ -80,4 +80,10 @@ class PlayerHandler < RubyPitaya::HandlerBase
|
|
80
80
|
data: player.to_hash,
|
81
81
|
}
|
82
82
|
end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
def bll
|
87
|
+
@bll ||= @objects[:bll]
|
88
|
+
end
|
83
89
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
FROM ruby:
|
1
|
+
FROM ruby:3.0.2-slim as builder
|
2
2
|
|
3
3
|
RUN apt update && \
|
4
4
|
apt install -y --no-install-recommends \
|
@@ -15,9 +15,21 @@ RUN bundle config --global jobs 4 && \
|
|
15
15
|
bundle config --global without "development test" && \
|
16
16
|
bundle install
|
17
17
|
|
18
|
+
RUN rm -rf /usr/local/bundle/cache && \
|
19
|
+
rm -rf /usr/local/bundle/build_info && \
|
20
|
+
rm -rf /usr/local/bundle/doc && \
|
21
|
+
rm -rf /usr/local/bundle/doc && \
|
22
|
+
find /usr/local/bundle/gems/grpc-*/src/ruby/lib/grpc/2.4/ -name "*.so" -delete && \
|
23
|
+
find /usr/local/bundle/gems/grpc-*/src/ruby/lib/grpc/2.5/ -name "*.so" -delete && \
|
24
|
+
find /usr/local/bundle/gems/grpc-*/src/ruby/lib/grpc/2.6/ -name "*.so" -delete && \
|
25
|
+
find /usr/local/bundle/gems/grpc-*/src/ruby/lib/grpc/2.7/ -name "*.so" -delete && \
|
26
|
+
find /usr/local/bundle/gems/ -name "*.c" -delete && \
|
27
|
+
find /usr/local/bundle/gems/ -name "*.o" -delete && \
|
28
|
+
find /usr/local/bundle/gems/ -name "spec" -exec rm -rv {} +
|
29
|
+
|
18
30
|
# RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
19
31
|
|
20
|
-
FROM ruby:
|
32
|
+
FROM ruby:3.0.2-slim
|
21
33
|
|
22
34
|
ENV LANG=C.UTF-8
|
23
35
|
ENV LC_ALL=C.UTF-8
|
@@ -29,9 +41,6 @@ RUN apt update && \
|
|
29
41
|
&& rm -rf /var/lib/apt/lists/*
|
30
42
|
|
31
43
|
COPY --from=builder /usr/local/bundle /usr/local/bundle
|
32
|
-
RUN rm -rf /usr/local/bundle/cache
|
33
|
-
RUN rm -rf /usr/local/bundle/build_info
|
34
|
-
RUN rm -rf /usr/local/bundle/doc
|
35
44
|
|
36
45
|
# COPY --from=builder /kubectl /usr/local/bin/kubectl
|
37
46
|
# RUN chmod +x /usr/local/bin/kubectl
|
@@ -1,12 +1,12 @@
|
|
1
1
|
version: '3'
|
2
2
|
services:
|
3
3
|
nats:
|
4
|
-
image: 'nats:2.
|
4
|
+
image: 'nats:2.6.2-alpine'
|
5
5
|
ports:
|
6
6
|
- '4222:4222'
|
7
7
|
|
8
8
|
etcd:
|
9
|
-
image: 'appcelerator/etcd:3.
|
9
|
+
image: 'appcelerator/etcd:3.3.3'
|
10
10
|
ports:
|
11
11
|
- '2379:2379'
|
12
12
|
- '2380:2380'
|
@@ -17,7 +17,7 @@ services:
|
|
17
17
|
- '9001:6379'
|
18
18
|
|
19
19
|
db:
|
20
|
-
image: 'postgres:
|
20
|
+
image: 'postgres:14.0-alpine'
|
21
21
|
volumes:
|
22
22
|
- 'postgres:/var/lib/postgresql/data'
|
23
23
|
environment:
|
@@ -27,7 +27,7 @@ services:
|
|
27
27
|
- '9100:5432'
|
28
28
|
|
29
29
|
mongo:
|
30
|
-
image: mongo:5.0.
|
30
|
+
image: mongo:5.0.3
|
31
31
|
restart: always
|
32
32
|
ports:
|
33
33
|
- 27017:27017
|
@@ -12,6 +12,8 @@ Given(/^[Ss]erver should response the following json[:]*$/) do |expected_json|
|
|
12
12
|
expected_json = JSON.generate(JSON.parse(expected_json.strip))
|
13
13
|
response_json = JSON.generate(@handler_helper.response)
|
14
14
|
|
15
|
+
puts JSON.pretty_generate(@handler_helper.response) if expected_json != response_json
|
16
|
+
|
15
17
|
expect(response_json).to eq(expected_json)
|
16
18
|
end
|
17
19
|
|
@@ -27,6 +27,8 @@ spec:
|
|
27
27
|
env:
|
28
28
|
- name: RUBYPITAYA_SERVER_ENVIRONMENT
|
29
29
|
value: {{ .Values.rubypitaya.server.environment | quote }}
|
30
|
+
- name: RUBYPITAYA_SERVER_CHEATS
|
31
|
+
value: {{ .Values.rubypitaya.server.cheats | quote }}
|
30
32
|
- name: RUBYPITAYA_NATS_URL
|
31
33
|
value: "nats://nats.{{ .Values.namespace }}.svc.cluster.local:4222"
|
32
34
|
- name: RUBYPITAYA_ETCD_URL
|
@@ -5,9 +5,9 @@ module RubyPitaya
|
|
5
5
|
class HandlerBase
|
6
6
|
|
7
7
|
class_attribute :non_authenticated_routes, default: []
|
8
|
-
class_attribute :
|
8
|
+
class_attribute :handler_objects, default: nil, instance_reader: false, instance_writer: false, instance_accessor: false, instance_predicate: false
|
9
9
|
|
10
|
-
attr_reader :
|
10
|
+
attr_reader :objects, :log, :redis, :setup, :config, :params, :session, :postman
|
11
11
|
|
12
12
|
def initialize
|
13
13
|
@log = nil
|
@@ -18,7 +18,7 @@ module RubyPitaya
|
|
18
18
|
@session = nil
|
19
19
|
@postman = nil
|
20
20
|
|
21
|
-
@
|
21
|
+
@objects = self.class.objects
|
22
22
|
end
|
23
23
|
|
24
24
|
def set_attributes(log, redis, mongo, setup, config, params, session, postman)
|
@@ -32,8 +32,9 @@ module RubyPitaya
|
|
32
32
|
@postman = postman
|
33
33
|
end
|
34
34
|
|
35
|
-
def self.
|
36
|
-
self.
|
35
|
+
def self.objects
|
36
|
+
self.handler_objects ||= InstanceHolder.new
|
37
|
+
return self.handler_objects
|
37
38
|
end
|
38
39
|
|
39
40
|
def self.non_authenticated_actions(*action_names)
|
@@ -8,7 +8,9 @@ module RubyPitaya
|
|
8
8
|
|
9
9
|
INVALID_ACTION_NAMES = ['initialize', 'set_attributes']
|
10
10
|
|
11
|
-
def initialize()
|
11
|
+
def initialize(is_cheats_enabled)
|
12
|
+
@is_cheats_enabled = is_cheats_enabled
|
13
|
+
|
12
14
|
routes_path = Path::ROUTES_FILE_PATH
|
13
15
|
handler_folder_paths = Path::Plugins::HANDLERS_FOLDER_PATHS + [Path::HANDLERS_FOLDER_PATH]
|
14
16
|
|
@@ -35,7 +37,10 @@ module RubyPitaya
|
|
35
37
|
end
|
36
38
|
|
37
39
|
def import_handler_files(handler_folder_path)
|
38
|
-
Gem.find_files("#{handler_folder_path}/*.rb")
|
40
|
+
handler_files = Gem.find_files("#{handler_folder_path}/*.rb")
|
41
|
+
handler_files = handler_files.select { |a| !a[/.+_cheats.rb/] && !a[/.+_cheat.rb/] } unless @is_cheats_enabled
|
42
|
+
|
43
|
+
handler_files.each { |path| require path }
|
39
44
|
end
|
40
45
|
|
41
46
|
def import_handler_classes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rubypitaya/core/instance_holder'
|
2
|
+
|
3
|
+
module RubyPitaya
|
4
|
+
|
5
|
+
class HttpBase
|
6
|
+
|
7
|
+
class_attribute :handler_objects, default: nil, instance_reader: false, instance_writer: false, instance_accessor: false, instance_predicate: false
|
8
|
+
|
9
|
+
attr_reader :objects
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@objects = self.class.objects
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.objects
|
16
|
+
self.handler_objects ||= InstanceHolder.new
|
17
|
+
return self.handler_objects
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -23,12 +23,12 @@ module RubyPitaya
|
|
23
23
|
before do
|
24
24
|
content_type :json
|
25
25
|
|
26
|
-
@bll = settings.bll
|
27
26
|
@log = settings.log
|
28
27
|
@mongo = settings.mongo
|
29
28
|
@setup = settings.setup
|
30
29
|
@redis = settings.redis
|
31
30
|
@config = settings.config
|
31
|
+
@objects = settings.objects
|
32
32
|
@session = nil
|
33
33
|
@postman = nil
|
34
34
|
|
data/lib/rubypitaya/core/main.rb
CHANGED
@@ -28,8 +28,6 @@ module RubyPitaya
|
|
28
28
|
|
29
29
|
class Main
|
30
30
|
|
31
|
-
attr_reader :redis_connector, :config, :bll
|
32
|
-
|
33
31
|
def initialize
|
34
32
|
@setup = Setup.new
|
35
33
|
@environment_name = @setup.fetch('rubypitaya.server.environment', 'development')
|
@@ -69,7 +67,7 @@ module RubyPitaya
|
|
69
67
|
@redis_connector.connect
|
70
68
|
|
71
69
|
@database_config = DatabaseConfig.new
|
72
|
-
@database_connector = DatabaseConnector.new(@database_config)
|
70
|
+
@database_connector = DatabaseConnector.new(@database_config, @log)
|
73
71
|
@database_connector.connect
|
74
72
|
|
75
73
|
@mongo_address = @setup['rubypitaya.mongo.url']
|
@@ -85,7 +83,7 @@ module RubyPitaya
|
|
85
83
|
@config = Config.new
|
86
84
|
@config.auto_reload if @is_development_environment
|
87
85
|
|
88
|
-
@
|
86
|
+
@objects = InstanceHolder.new
|
89
87
|
|
90
88
|
@initializer_content = InitializerContent.new(@log,
|
91
89
|
@redis_connector.redis,
|
@@ -95,7 +93,8 @@ module RubyPitaya
|
|
95
93
|
@initializer_broadcast = InitializerBroadcast.new
|
96
94
|
@initializer_broadcast.run(@initializer_content)
|
97
95
|
|
98
|
-
@
|
96
|
+
@is_cheats_enabled = @setup.fetch('rubypitaya.server.cheats', false)
|
97
|
+
@handler_router = HandlerRouter.new(@is_cheats_enabled)
|
99
98
|
|
100
99
|
run_http
|
101
100
|
run_server
|
@@ -104,12 +103,12 @@ module RubyPitaya
|
|
104
103
|
private
|
105
104
|
|
106
105
|
def run_http
|
107
|
-
HttpRoutes.set :bll, @bll
|
108
106
|
HttpRoutes.set :log, @log
|
109
107
|
HttpRoutes.set :redis, @redis_connector.redis
|
110
108
|
HttpRoutes.set :mongo, @mongo_connector.mongo
|
111
109
|
HttpRoutes.set :setup, @setup
|
112
110
|
HttpRoutes.set :config, @config
|
111
|
+
HttpRoutes.set :objects, @objects
|
113
112
|
HttpRoutes.set :views, [Path::HTTP_VIEWS_PATH] + Path::Plugins::HTTP_VIEWS_PATHS
|
114
113
|
|
115
114
|
HttpRoutes.auto_reload if @is_development_environment
|
@@ -158,7 +157,7 @@ module RubyPitaya
|
|
158
157
|
|
159
158
|
message_route = request[:msg][:route]
|
160
159
|
message_data = request[:msg][:data] || {}
|
161
|
-
message_data = JSON.parse(message_data)
|
160
|
+
message_data = JSON.parse(message_data) if message_data.class == String
|
162
161
|
|
163
162
|
params = Parameters.new(message_data)
|
164
163
|
|
@@ -173,7 +172,6 @@ module RubyPitaya
|
|
173
172
|
@session.update(session_id, session_uid, session_data, metadata,
|
174
173
|
frontend_id)
|
175
174
|
|
176
|
-
# TODO: Validate if handler and action names are not nil
|
177
175
|
handler_name, action_name = message_route.scan(/\A\w+\.(\w+)\.(\w+)\z/)[0]
|
178
176
|
|
179
177
|
@log.info "request -> route: #{message_route}"
|
@@ -1,5 +1,7 @@
|
|
1
|
-
require 'protobuf'
|
2
1
|
require 'nats/client'
|
2
|
+
require 'google/protobuf'
|
3
|
+
|
4
|
+
require 'rubypitaya/core/protos/nats_connector_pb'
|
3
5
|
|
4
6
|
module RubyPitaya
|
5
7
|
|
@@ -23,14 +25,16 @@ module RubyPitaya
|
|
23
25
|
NATS.start(:servers => [@nats_address]) do |nc|
|
24
26
|
|
25
27
|
NATS.subscribe(subscribe_topic) do |message, reply, a, b|
|
26
|
-
request = NatsRequest.decode(message).
|
28
|
+
request = NatsRequest.decode(message).to_h
|
27
29
|
|
28
30
|
Fiber.new do
|
29
31
|
response = yield request
|
30
32
|
|
31
33
|
nats_response = NatsResponse.new(data: response.to_json)
|
32
34
|
|
33
|
-
|
35
|
+
response = NatsResponse.encode(nats_response)
|
36
|
+
|
37
|
+
NATS.publish(reply, response)
|
34
38
|
end.resume
|
35
39
|
end
|
36
40
|
|
@@ -61,8 +65,11 @@ module RubyPitaya
|
|
61
65
|
metadata: session.metadata.to_json,
|
62
66
|
)
|
63
67
|
|
64
|
-
|
65
|
-
|
68
|
+
request = NatsRequest.encode(nats_request)
|
69
|
+
|
70
|
+
nats_response = NATS.request(frontend_topic, request)
|
71
|
+
|
72
|
+
response = NatsResponse.decode(nats_response).to_h
|
66
73
|
|
67
74
|
response
|
68
75
|
end
|
@@ -93,56 +100,4 @@ module RubyPitaya
|
|
93
100
|
"pitaya/connector/user/#{uid}/push"
|
94
101
|
end
|
95
102
|
end
|
96
|
-
|
97
|
-
class NatsSession < ::Protobuf::Message; end
|
98
|
-
class NatsMessage < ::Protobuf::Message; end
|
99
|
-
class NatsRequest < ::Protobuf::Message; end
|
100
|
-
class NatsResponse < ::Protobuf::Message; end
|
101
|
-
class NatsError < ::Protobuf::Message; end
|
102
|
-
class NatsBindMsg < ::Protobuf::Message; end
|
103
|
-
class NatsPush < ::Protobuf::Message; end
|
104
|
-
|
105
|
-
class NatsSession
|
106
|
-
optional :int32, :id, 1
|
107
|
-
optional :bytes, :uid, 2
|
108
|
-
optional :bytes, :data, 3
|
109
|
-
end
|
110
|
-
|
111
|
-
class NatsMessage
|
112
|
-
optional :int32, :id, 1
|
113
|
-
optional :bytes, :route, 2
|
114
|
-
optional :bytes, :data, 3
|
115
|
-
optional :bytes, :reply, 4
|
116
|
-
optional :int32, :type, 5
|
117
|
-
end
|
118
|
-
|
119
|
-
class NatsRequest
|
120
|
-
optional :int32, :type, 1
|
121
|
-
optional NatsSession, :session, 2
|
122
|
-
optional NatsMessage, :msg, 3
|
123
|
-
optional :bytes, :frontendID, 4
|
124
|
-
optional :bytes, :metadata, 5
|
125
|
-
end
|
126
|
-
|
127
|
-
class NatsError
|
128
|
-
optional :bytes, :code, 1
|
129
|
-
optional :bytes, :message, 2
|
130
|
-
optional :bytes, :metadata, 3
|
131
|
-
end
|
132
|
-
|
133
|
-
class NatsResponse
|
134
|
-
optional :bytes, :data, 1
|
135
|
-
optional NatsError, :error, 2
|
136
|
-
end
|
137
|
-
|
138
|
-
class NatsBindMsg
|
139
|
-
optional :bytes, :uid, 1
|
140
|
-
optional :bytes, :fid, 2
|
141
|
-
end
|
142
|
-
|
143
|
-
class NatsPush
|
144
|
-
optional :bytes, :route, 1
|
145
|
-
optional :bytes, :uid, 2
|
146
|
-
optional :bytes, :data, 3
|
147
|
-
end
|
148
103
|
end
|
@@ -19,7 +19,9 @@ module RubyPitaya
|
|
19
19
|
data: session.data.to_json,
|
20
20
|
)
|
21
21
|
|
22
|
-
|
22
|
+
payload = NatsSession.encode(nats_session)
|
23
|
+
|
24
|
+
response = @nats_connector.push_to_frontend(session, route, payload)
|
23
25
|
|
24
26
|
response
|
25
27
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package RubyPitaya;
|
4
|
+
|
5
|
+
message NatsSession {
|
6
|
+
optional int32 id = 1;
|
7
|
+
optional bytes uid = 2;
|
8
|
+
optional bytes data = 3;
|
9
|
+
}
|
10
|
+
|
11
|
+
message NatsMessage {
|
12
|
+
optional int32 id = 1;
|
13
|
+
optional bytes route = 2;
|
14
|
+
optional bytes data = 3;
|
15
|
+
optional bytes reply = 4;
|
16
|
+
optional int32 type = 5;
|
17
|
+
}
|
18
|
+
|
19
|
+
message NatsRequest {
|
20
|
+
optional int32 type = 1;
|
21
|
+
optional NatsSession session = 2;
|
22
|
+
optional NatsMessage msg = 3;
|
23
|
+
optional bytes frontendID = 4;
|
24
|
+
optional bytes metadata = 5;
|
25
|
+
}
|
26
|
+
|
27
|
+
message NatsError {
|
28
|
+
optional bytes code = 1;
|
29
|
+
optional bytes message = 2;
|
30
|
+
optional bytes metadata = 3;
|
31
|
+
}
|
32
|
+
|
33
|
+
message NatsResponse {
|
34
|
+
optional bytes data = 1;
|
35
|
+
optional NatsError error = 2;
|
36
|
+
}
|
37
|
+
|
38
|
+
message NatsBindMsg {
|
39
|
+
optional bytes uid = 1;
|
40
|
+
optional bytes fid = 2;
|
41
|
+
}
|
42
|
+
|
43
|
+
message NatsPush {
|
44
|
+
optional bytes route = 1;
|
45
|
+
optional bytes uid = 2;
|
46
|
+
optional bytes data = 3;
|
47
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: nats_connector.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("nats_connector.proto", :syntax => :proto3) do
|
8
|
+
add_message "RubyPitaya.NatsSession" do
|
9
|
+
proto3_optional :id, :int32, 1
|
10
|
+
proto3_optional :uid, :bytes, 2
|
11
|
+
proto3_optional :data, :bytes, 3
|
12
|
+
end
|
13
|
+
add_message "RubyPitaya.NatsMessage" do
|
14
|
+
proto3_optional :id, :int32, 1
|
15
|
+
proto3_optional :route, :bytes, 2
|
16
|
+
proto3_optional :data, :bytes, 3
|
17
|
+
proto3_optional :reply, :bytes, 4
|
18
|
+
proto3_optional :type, :int32, 5
|
19
|
+
end
|
20
|
+
add_message "RubyPitaya.NatsRequest" do
|
21
|
+
proto3_optional :type, :int32, 1
|
22
|
+
proto3_optional :session, :message, 2, "RubyPitaya.NatsSession"
|
23
|
+
proto3_optional :msg, :message, 3, "RubyPitaya.NatsMessage"
|
24
|
+
proto3_optional :frontendID, :bytes, 4
|
25
|
+
proto3_optional :metadata, :bytes, 5
|
26
|
+
end
|
27
|
+
add_message "RubyPitaya.NatsError" do
|
28
|
+
proto3_optional :code, :bytes, 1
|
29
|
+
proto3_optional :message, :bytes, 2
|
30
|
+
proto3_optional :metadata, :bytes, 3
|
31
|
+
end
|
32
|
+
add_message "RubyPitaya.NatsResponse" do
|
33
|
+
proto3_optional :data, :bytes, 1
|
34
|
+
proto3_optional :error, :message, 2, "RubyPitaya.NatsError"
|
35
|
+
end
|
36
|
+
add_message "RubyPitaya.NatsBindMsg" do
|
37
|
+
proto3_optional :uid, :bytes, 1
|
38
|
+
proto3_optional :fid, :bytes, 2
|
39
|
+
end
|
40
|
+
add_message "RubyPitaya.NatsPush" do
|
41
|
+
proto3_optional :route, :bytes, 1
|
42
|
+
proto3_optional :uid, :bytes, 2
|
43
|
+
proto3_optional :data, :bytes, 3
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module RubyPitaya
|
49
|
+
NatsSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsSession").msgclass
|
50
|
+
NatsMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsMessage").msgclass
|
51
|
+
NatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsRequest").msgclass
|
52
|
+
NatsError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsError").msgclass
|
53
|
+
NatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsResponse").msgclass
|
54
|
+
NatsBindMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsBindMsg").msgclass
|
55
|
+
NatsPush = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("RubyPitaya.NatsPush").msgclass
|
56
|
+
end
|
@@ -23,7 +23,8 @@ module RubyPitaya
|
|
23
23
|
initialize_redis
|
24
24
|
initialize_mongo
|
25
25
|
|
26
|
-
|
26
|
+
is_cheats_enabled = @@setup.fetch('rubypitaya.server.cheats', false)
|
27
|
+
@@handler_router ||= HandlerRouter.new(is_cheats_enabled)
|
27
28
|
|
28
29
|
|
29
30
|
@@initializer_content = InitializerContent.new(@@log,
|
@@ -2,11 +2,14 @@ require 'active_record'
|
|
2
2
|
|
3
3
|
class <%= class_name %> < ActiveRecord::Migration[6.1]
|
4
4
|
|
5
|
-
enable_extension 'pgcrypto'
|
5
|
+
enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')
|
6
|
+
|
7
|
+
# Migration suported types reference: https://guides.rubyonrails.org/v3.2/migrations.html#supported-types
|
6
8
|
|
7
9
|
def change
|
8
10
|
create_table :[table-name-here-in-plural], id: :uuid do |t|
|
9
11
|
# t.belongs_to :user, type: :uuid, foreing_key: true
|
12
|
+
# t.belongs_to :user, type: :uuid, foreing_key: true, index: { unique: true }
|
10
13
|
t.timestamps null: false
|
11
14
|
end
|
12
15
|
end
|
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:
|
4
|
+
version: 3.0.2
|
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: 2021-
|
11
|
+
date: 2021-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -58,84 +58,84 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.16.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: 2.16.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: redis
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.
|
75
|
+
version: 4.5.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 4.
|
82
|
+
version: 4.5.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: etcdv3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.11.
|
89
|
+
version: 0.11.4
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.11.
|
96
|
+
version: 0.11.4
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: ostruct
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.4.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.4.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: sinatra
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 2.1.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 2.1.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: webrick
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 1.7.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 1.7.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: activerecord
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,19 +151,19 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 6.1.4.1
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: google-protobuf
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 3.18.1
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 3.18.1
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: pry
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,47 +179,47 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.14.1
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: rspec
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - '='
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 3.10.0
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - '='
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 3.10.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
196
|
+
name: listen
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - '='
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 3.
|
201
|
+
version: 3.7.0
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - '='
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 3.
|
208
|
+
version: 3.7.0
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: bundler
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: 2.2.22
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 2.2.22
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: cucumber
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,6 +234,20 @@ dependencies:
|
|
234
234
|
- - '='
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: 7.0.0
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: sinatra-contrib
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - '='
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: 2.1.0
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - '='
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: 2.1.0
|
237
251
|
description: RubyPitaya is an application to create servers using the pitaya protocol.
|
238
252
|
email:
|
239
253
|
- lucianopcbr@gmail.com
|
@@ -328,6 +342,7 @@ files:
|
|
328
342
|
- "./lib/rubypitaya/core/handler_base.rb"
|
329
343
|
- "./lib/rubypitaya/core/handler_router.rb"
|
330
344
|
- "./lib/rubypitaya/core/helpers/setup_helper.rb"
|
345
|
+
- "./lib/rubypitaya/core/http_base.rb"
|
331
346
|
- "./lib/rubypitaya/core/http_routes.rb"
|
332
347
|
- "./lib/rubypitaya/core/initializer_base.rb"
|
333
348
|
- "./lib/rubypitaya/core/initializer_broadcast.rb"
|
@@ -339,6 +354,8 @@ files:
|
|
339
354
|
- "./lib/rubypitaya/core/parameters.rb"
|
340
355
|
- "./lib/rubypitaya/core/path.rb"
|
341
356
|
- "./lib/rubypitaya/core/postman.rb"
|
357
|
+
- "./lib/rubypitaya/core/protos/nats_connector.proto"
|
358
|
+
- "./lib/rubypitaya/core/protos/nats_connector_pb.rb"
|
342
359
|
- "./lib/rubypitaya/core/redis_connector.rb"
|
343
360
|
- "./lib/rubypitaya/core/routes_base.rb"
|
344
361
|
- "./lib/rubypitaya/core/session.rb"
|
@@ -372,7 +389,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
372
389
|
- !ruby/object:Gem::Version
|
373
390
|
version: '0'
|
374
391
|
requirements: []
|
375
|
-
rubygems_version: 3.
|
392
|
+
rubygems_version: 3.2.22
|
376
393
|
signing_key:
|
377
394
|
specification_version: 4
|
378
395
|
summary: Create servers with pitaya
|