rubypitaya 2.6.4 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubypitaya/app-template/Gemfile +1 -1
  3. data/lib/rubypitaya/app-template/Gemfile.lock +2 -2
  4. data/lib/rubypitaya/app-template/app/app_initializer.rb +34 -31
  5. data/lib/rubypitaya/app-template/app/bll/player_bll.rb +10 -7
  6. data/lib/rubypitaya/app-template/app/constants/status_codes.rb +22 -19
  7. data/lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb +1 -0
  8. data/lib/rubypitaya/app-template/app/handlers/player_handler.rb +69 -66
  9. data/lib/rubypitaya/app-template/app/models/player.rb +13 -10
  10. data/lib/rubypitaya/app-template/config/routes.rb +1 -1
  11. data/lib/rubypitaya/app-template/db/migration/{0000000002_create_player_migration.rb → 1606736477_create_player_migration.rb} +0 -0
  12. data/lib/rubypitaya/app-template/docker/prod/Dockerfile +5 -1
  13. data/lib/rubypitaya/app-template/kubernetes/README.md +22 -2
  14. data/lib/rubypitaya/app-template/kubernetes/gameplay/deployment-nginx.yaml +130 -0
  15. data/lib/rubypitaya/app-template/kubernetes/gameplay/gameplay-template.yaml +29 -0
  16. data/lib/rubypitaya/app-template/kubernetes/gameplay/nginx.conf +13 -0
  17. data/lib/rubypitaya/app-template/kubernetes/gameplay/service-nginx.yaml +928 -0
  18. data/lib/rubypitaya/app-template/kubernetes/role-rubypitaya.yaml +31 -0
  19. data/lib/rubypitaya/app-template/kubernetes/rolebinding-rubypitaya.yaml +13 -0
  20. data/lib/rubypitaya/app-template/kubernetes/service-etcd.yaml +1 -1
  21. data/lib/rubypitaya/app-template/kubernetes/service-nats.yaml +1 -1
  22. data/lib/rubypitaya/app-template/kubernetes/service-postgres.yaml +1 -1
  23. data/lib/rubypitaya/app-template/kubernetes/service-redis.yaml +1 -1
  24. data/lib/rubypitaya/version.rb +1 -1
  25. metadata +9 -4
  26. 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
@@ -0,0 +1,13 @@
1
+ kind: RoleBinding
2
+ apiVersion: apps/v1
3
+ metadata:
4
+ name: rubypitaya
5
+ namespace: default
6
+ subjects:
7
+ - kind: ServiceAccount
8
+ name: rubypitaya
9
+ namespace: default
10
+ roleRef:
11
+ apiGroup: apps
12
+ kind: Role
13
+ name: rubypitaya
@@ -14,4 +14,4 @@ spec:
14
14
  port: 2380
15
15
  targetPort: 2380
16
16
  name: etcd-2380
17
- type: LoadBalancer
17
+ type: ClusterIP
@@ -9,4 +9,4 @@ spec:
9
9
  - protocol: TCP
10
10
  port: 4222
11
11
  targetPort: 4222
12
- type: LoadBalancer
12
+ type: ClusterIP
@@ -9,4 +9,4 @@ spec:
9
9
  - protocol: TCP
10
10
  port: 5432
11
11
  targetPort: 5432
12
- type: LoadBalancer
12
+ type: ClusterIP
@@ -10,4 +10,4 @@ spec:
10
10
  port: 6379
11
11
  targetPort: 6379
12
12
  name: redis
13
- type: LoadBalancer
13
+ type: ClusterIP
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '2.6.4'
2
+ VERSION = '2.7.0'
3
3
  end
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.6.4
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-28 00:00:00.000000000 Z
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/0000000002_create_player_migration.rb"
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
-