rubypitaya 2.6.4 → 2.7.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/app_initializer.rb +34 -31
- data/lib/rubypitaya/app-template/app/bll/player_bll.rb +10 -7
- data/lib/rubypitaya/app-template/app/constants/status_codes.rb +22 -19
- data/lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb +1 -0
- data/lib/rubypitaya/app-template/app/handlers/player_handler.rb +69 -66
- data/lib/rubypitaya/app-template/app/models/player.rb +13 -10
- data/lib/rubypitaya/app-template/config/routes.rb +1 -1
- data/lib/rubypitaya/app-template/db/migration/{0000000002_create_player_migration.rb → 1606736477_create_player_migration.rb} +0 -0
- data/lib/rubypitaya/app-template/docker/prod/Dockerfile +5 -1
- data/lib/rubypitaya/app-template/kubernetes/README.md +22 -2
- data/lib/rubypitaya/app-template/kubernetes/gameplay/deployment-nginx.yaml +130 -0
- data/lib/rubypitaya/app-template/kubernetes/gameplay/gameplay-template.yaml +29 -0
- data/lib/rubypitaya/app-template/kubernetes/gameplay/nginx.conf +13 -0
- data/lib/rubypitaya/app-template/kubernetes/gameplay/service-nginx.yaml +928 -0
- data/lib/rubypitaya/app-template/kubernetes/role-rubypitaya.yaml +31 -0
- data/lib/rubypitaya/app-template/kubernetes/rolebinding-rubypitaya.yaml +13 -0
- data/lib/rubypitaya/app-template/kubernetes/service-etcd.yaml +1 -1
- data/lib/rubypitaya/app-template/kubernetes/service-nats.yaml +1 -1
- data/lib/rubypitaya/app-template/kubernetes/service-postgres.yaml +1 -1
- data/lib/rubypitaya/app-template/kubernetes/service-redis.yaml +1 -1
- data/lib/rubypitaya/version.rb +1 -1
- metadata +9 -4
- data/lib/rubypitaya/app-template/docker/prod/Makefile +0 -67
@@ -0,0 +1,31 @@
|
|
1
|
+
kind: Role
|
2
|
+
apiVersion: apps/v1
|
3
|
+
metadata:
|
4
|
+
namespace: default
|
5
|
+
name: namespace
|
6
|
+
rules:
|
7
|
+
- apiGroups:
|
8
|
+
- ""
|
9
|
+
resources:
|
10
|
+
- services
|
11
|
+
- pods
|
12
|
+
verbs:
|
13
|
+
- get
|
14
|
+
- list
|
15
|
+
- watch
|
16
|
+
- create
|
17
|
+
- update
|
18
|
+
- patch
|
19
|
+
- delete
|
20
|
+
- apiGroups:
|
21
|
+
- apps
|
22
|
+
resources:
|
23
|
+
- deployments
|
24
|
+
verbs:
|
25
|
+
- get
|
26
|
+
- list
|
27
|
+
- watch
|
28
|
+
- create
|
29
|
+
- update
|
30
|
+
- patch
|
31
|
+
- delete
|
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: 2.
|
4
|
+
version: 2.7.0
|
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: 2020-11-
|
11
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -235,16 +235,21 @@ files:
|
|
235
235
|
- "./lib/rubypitaya/app-template/bin/console"
|
236
236
|
- "./lib/rubypitaya/app-template/config/database.yml"
|
237
237
|
- "./lib/rubypitaya/app-template/config/routes.rb"
|
238
|
-
- "./lib/rubypitaya/app-template/db/migration/
|
238
|
+
- "./lib/rubypitaya/app-template/db/migration/1606736477_create_player_migration.rb"
|
239
239
|
- "./lib/rubypitaya/app-template/docker-compose.yml"
|
240
240
|
- "./lib/rubypitaya/app-template/docker/dev/Dockerfile"
|
241
241
|
- "./lib/rubypitaya/app-template/docker/entrypoint.sh"
|
242
242
|
- "./lib/rubypitaya/app-template/docker/prod/Dockerfile"
|
243
|
-
- "./lib/rubypitaya/app-template/docker/prod/Makefile"
|
244
243
|
- "./lib/rubypitaya/app-template/kubernetes/README.md"
|
245
244
|
- "./lib/rubypitaya/app-template/kubernetes/deployment-connector.yaml"
|
246
245
|
- "./lib/rubypitaya/app-template/kubernetes/deployment-rubypitaya.yaml"
|
246
|
+
- "./lib/rubypitaya/app-template/kubernetes/gameplay/deployment-nginx.yaml"
|
247
|
+
- "./lib/rubypitaya/app-template/kubernetes/gameplay/gameplay-template.yaml"
|
248
|
+
- "./lib/rubypitaya/app-template/kubernetes/gameplay/nginx.conf"
|
249
|
+
- "./lib/rubypitaya/app-template/kubernetes/gameplay/service-nginx.yaml"
|
247
250
|
- "./lib/rubypitaya/app-template/kubernetes/persistent-volume.yaml"
|
251
|
+
- "./lib/rubypitaya/app-template/kubernetes/role-rubypitaya.yaml"
|
252
|
+
- "./lib/rubypitaya/app-template/kubernetes/rolebinding-rubypitaya.yaml"
|
248
253
|
- "./lib/rubypitaya/app-template/kubernetes/service-connector.yaml"
|
249
254
|
- "./lib/rubypitaya/app-template/kubernetes/service-etcd.yaml"
|
250
255
|
- "./lib/rubypitaya/app-template/kubernetes/service-nats.yaml"
|
@@ -1,67 +0,0 @@
|
|
1
|
-
## Run ruby pitaya metagame project
|
2
|
-
run:
|
3
|
-
@docker-compose run --service-ports --rm rubypitaya bundle exec rubypitaya
|
4
|
-
|
5
|
-
## Update docker images
|
6
|
-
update:
|
7
|
-
@docker-compose pull
|
8
|
-
|
9
|
-
## Create database
|
10
|
-
db-create:
|
11
|
-
@docker-compose run --service-ports --rm rubypitaya bundle exec rake db:create
|
12
|
-
|
13
|
-
## Run migrations to database
|
14
|
-
db-migrate:
|
15
|
-
@docker-compose run --service-ports --rm rubypitaya bundle exec rake db:migrate
|
16
|
-
|
17
|
-
## Drop database
|
18
|
-
db-drop:
|
19
|
-
@docker-compose run --service-ports --rm rubypitaya bundle exec rake db:drop
|
20
|
-
|
21
|
-
## Reset database
|
22
|
-
db-reset:
|
23
|
-
@docker-compose run --service-ports --rm rubypitaya bundle exec rake db:reset
|
24
|
-
|
25
|
-
.DEFAULT_GOAL := show-help
|
26
|
-
|
27
|
-
.PHONY: show-help
|
28
|
-
show-help:
|
29
|
-
@echo "$$(tput bold)Commands:$$(tput sgr0)"
|
30
|
-
@echo
|
31
|
-
@sed -n -e "/^## / { \
|
32
|
-
h; \
|
33
|
-
s/.*//; \
|
34
|
-
:doc" \
|
35
|
-
-e "H; \
|
36
|
-
n; \
|
37
|
-
s/^## //; \
|
38
|
-
t doc" \
|
39
|
-
-e "s/:.*//; \
|
40
|
-
G; \
|
41
|
-
s/\\n## /---/; \
|
42
|
-
s/\\n/ /g; \
|
43
|
-
p; \
|
44
|
-
}" ${MAKEFILE_LIST} \
|
45
|
-
| LC_ALL='C' sort --ignore-case \
|
46
|
-
| awk -F '---' \
|
47
|
-
-v ncol=$$(tput cols) \
|
48
|
-
-v indent=19 \
|
49
|
-
-v col_on="$$(tput setaf 6)" \
|
50
|
-
-v col_off="$$(tput sgr0)" \
|
51
|
-
'{ \
|
52
|
-
printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
|
53
|
-
n = split($$2, words, " "); \
|
54
|
-
line_length = ncol - indent; \
|
55
|
-
for (i = 1; i <= n; i++) { \
|
56
|
-
line_length -= length(words[i]) + 1; \
|
57
|
-
if (line_length <= 0) { \
|
58
|
-
line_length = ncol - indent - length(words[i]) - 1; \
|
59
|
-
printf "\n%*s ", -indent, " "; \
|
60
|
-
} \
|
61
|
-
printf "%s ", words[i]; \
|
62
|
-
} \
|
63
|
-
printf "\n"; \
|
64
|
-
}'
|
65
|
-
|
66
|
-
|
67
|
-
|