rubypitaya 3.16.0 → 3.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubypitaya/app-template/.gitignore +0 -0
  3. data/lib/rubypitaya/app-template/.gitlab-ci.yml +0 -0
  4. data/lib/rubypitaya/app-template/.irbrc +0 -0
  5. data/lib/rubypitaya/app-template/Gemfile +4 -4
  6. data/lib/rubypitaya/app-template/Gemfile.lock +94 -82
  7. data/lib/rubypitaya/app-template/Makefile +0 -0
  8. data/lib/rubypitaya/app-template/Rakefile +0 -0
  9. data/lib/rubypitaya/app-template/app/app_initializer.rb +3 -0
  10. data/lib/rubypitaya/app-template/app/bll/player_bll.rb +0 -0
  11. data/lib/rubypitaya/app-template/app/config/initial_player.json +0 -0
  12. data/lib/rubypitaya/app-template/app/constants/status_codes.rb +0 -0
  13. data/lib/rubypitaya/app-template/app/handlers/error_handler.rb +0 -0
  14. data/lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb +0 -0
  15. data/lib/rubypitaya/app-template/app/handlers/player_handler.rb +0 -0
  16. data/lib/rubypitaya/app-template/app/http/hello_world_http.rb +0 -0
  17. data/lib/rubypitaya/app-template/app/http/views/hello_world.erb +0 -0
  18. data/lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb +0 -0
  19. data/lib/rubypitaya/app-template/app/models/player.rb +0 -0
  20. data/lib/rubypitaya/app-template/app/models/user.rb +0 -0
  21. data/lib/rubypitaya/app-template/app/setup/rubypitaya.yml +0 -0
  22. data/lib/rubypitaya/app-template/config/routes.rb +0 -0
  23. data/lib/rubypitaya/app-template/docker/dev/Dockerfile +4 -7
  24. data/lib/rubypitaya/app-template/docker/prod/Dockerfile +3 -6
  25. data/lib/rubypitaya/app-template/docker/stag/docker-compose.stag.yaml +67 -67
  26. data/lib/rubypitaya/app-template/docker/stag/update_image +5 -5
  27. data/lib/rubypitaya/app-template/docker-compose.yml +0 -0
  28. data/lib/rubypitaya/app-template/features/hello_world.feature +0 -0
  29. data/lib/rubypitaya/app-template/features/player.feature +0 -0
  30. data/lib/rubypitaya/app-template/features/step_definitions/player_steps.rb +0 -0
  31. data/lib/rubypitaya/app-template/features/step_definitions/rubypitaya_steps.rb +0 -0
  32. data/lib/rubypitaya/app-template/features/support/env.rb +0 -0
  33. data/lib/rubypitaya/app-template/helm/Chart.yaml +0 -0
  34. data/lib/rubypitaya/app-template/helm/templates/config-maps/nginx-config.yaml +0 -0
  35. data/lib/rubypitaya/app-template/helm/templates/deployments/connector.yaml +0 -0
  36. data/lib/rubypitaya/app-template/helm/templates/deployments/gameserver-nginx.yaml +0 -0
  37. data/lib/rubypitaya/app-template/helm/templates/deployments/rubypitaya.yaml +0 -0
  38. data/lib/rubypitaya/app-template/helm/templates/pods/gameserver.yaml +0 -0
  39. data/lib/rubypitaya/app-template/helm/templates/role-bindings/rubypitaya.yaml +0 -0
  40. data/lib/rubypitaya/app-template/helm/templates/roles/rubypitaya.yaml +0 -0
  41. data/lib/rubypitaya/app-template/helm/templates/service-accounts/rubypitaya.yaml +0 -0
  42. data/lib/rubypitaya/app-template/helm/templates/services/connector.yaml +0 -0
  43. data/lib/rubypitaya/app-template/helm/templates/services/etcd.yaml +0 -0
  44. data/lib/rubypitaya/app-template/helm/templates/services/gameserver-nginx.yaml +0 -0
  45. data/lib/rubypitaya/app-template/helm/templates/services/gameserver.yaml +0 -0
  46. data/lib/rubypitaya/app-template/helm/templates/services/nats.yaml +0 -0
  47. data/lib/rubypitaya/app-template/helm/templates/services/redis.yaml +0 -0
  48. data/lib/rubypitaya/app-template/helm/templates/services/rubypitaya.yaml +0 -0
  49. data/lib/rubypitaya/app-template/helm/templates/statefulsets/etcd.yaml +0 -0
  50. data/lib/rubypitaya/app-template/helm/templates/statefulsets/nats.yaml +0 -0
  51. data/lib/rubypitaya/app-template/helm/templates/statefulsets/redis.yaml +0 -0
  52. data/lib/rubypitaya/app-template/helm/values.yaml +0 -0
  53. data/lib/rubypitaya/app-template/kubernetes/README.md +0 -0
  54. data/lib/rubypitaya/app-template/kubernetes/deployment-connector.yaml +0 -0
  55. data/lib/rubypitaya/app-template/kubernetes/deployment-rubypitaya.yaml +0 -0
  56. data/lib/rubypitaya/app-template/kubernetes/gameplay/deployment-nginx.yaml +0 -0
  57. data/lib/rubypitaya/app-template/kubernetes/gameplay/gameplay-template.yaml +0 -0
  58. data/lib/rubypitaya/app-template/kubernetes/gameplay/nginx.conf +0 -0
  59. data/lib/rubypitaya/app-template/kubernetes/gameplay/service-nginx.yaml +0 -0
  60. data/lib/rubypitaya/app-template/kubernetes/persistent-volume.yaml +0 -0
  61. data/lib/rubypitaya/app-template/kubernetes/role-rubypitaya.yaml +0 -0
  62. data/lib/rubypitaya/app-template/kubernetes/rolebinding-rubypitaya.yaml +0 -0
  63. data/lib/rubypitaya/app-template/kubernetes/service-connector.yaml +0 -0
  64. data/lib/rubypitaya/app-template/kubernetes/service-etcd.yaml +0 -0
  65. data/lib/rubypitaya/app-template/kubernetes/service-nats.yaml +0 -0
  66. data/lib/rubypitaya/app-template/kubernetes/service-postgres.yaml +0 -0
  67. data/lib/rubypitaya/app-template/kubernetes/service-redis.yaml +0 -0
  68. data/lib/rubypitaya/app-template/kubernetes/service-rubypitaya.yaml +0 -0
  69. data/lib/rubypitaya/app-template/kubernetes/statefulset-etcd.yaml +0 -0
  70. data/lib/rubypitaya/app-template/kubernetes/statefulset-nats.yaml +0 -0
  71. data/lib/rubypitaya/app-template/kubernetes/statefulset-postgres.yaml +0 -0
  72. data/lib/rubypitaya/app-template/kubernetes/statefulset-redis.yaml +0 -0
  73. data/lib/rubypitaya/app-template/plugins.yaml +0 -0
  74. data/lib/rubypitaya/app-template/spec/hello_world_handler_spec.rb +0 -0
  75. data/lib/rubypitaya/app-template/spec/player_handler_spec.rb +0 -0
  76. data/lib/rubypitaya/app-template/spec/redis_service_spec.rb +0 -0
  77. data/lib/rubypitaya/app-template/spec/spec_helper.rb +0 -0
  78. data/lib/rubypitaya/core/app/migrations/0000000001_create_user_migration.rb +0 -0
  79. data/lib/rubypitaya/core/app/models/user.rb +0 -0
  80. data/lib/rubypitaya/core/app/services/redis_service.rb +0 -0
  81. data/lib/rubypitaya/core/application_files_importer.rb +0 -0
  82. data/lib/rubypitaya/core/config.rb +0 -0
  83. data/lib/rubypitaya/core/config_core.rb +0 -0
  84. data/lib/rubypitaya/core/config_hash_extension.rb +0 -0
  85. data/lib/rubypitaya/core/database_config.rb +2 -0
  86. data/lib/rubypitaya/core/database_connector.rb +0 -0
  87. data/lib/rubypitaya/core/etcd_connector.rb +0 -0
  88. data/lib/rubypitaya/core/handler_base.rb +0 -0
  89. data/lib/rubypitaya/core/handler_router.rb +2 -0
  90. data/lib/rubypitaya/core/helpers/setup_helper.rb +0 -0
  91. data/lib/rubypitaya/core/http_base.rb +0 -0
  92. data/lib/rubypitaya/core/http_routes.rb +1 -1
  93. data/lib/rubypitaya/core/initializer_base.rb +0 -0
  94. data/lib/rubypitaya/core/initializer_broadcast.rb +0 -0
  95. data/lib/rubypitaya/core/initializer_content.rb +3 -2
  96. data/lib/rubypitaya/core/instance_holder.rb +0 -0
  97. data/lib/rubypitaya/core/main.rb +4 -3
  98. data/lib/rubypitaya/core/nats_connector.rb +0 -0
  99. data/lib/rubypitaya/core/parameters.rb +0 -0
  100. data/lib/rubypitaya/core/path.rb +0 -0
  101. data/lib/rubypitaya/core/postman.rb +0 -0
  102. data/lib/rubypitaya/core/protos/nats_connector.proto +0 -0
  103. data/lib/rubypitaya/core/protos/nats_connector_pb.rb +0 -0
  104. data/lib/rubypitaya/core/route_error.rb +0 -0
  105. data/lib/rubypitaya/core/routes_base.rb +0 -0
  106. data/lib/rubypitaya/core/service_base.rb +0 -0
  107. data/lib/rubypitaya/core/service_holder.rb +0 -0
  108. data/lib/rubypitaya/core/session.rb +0 -0
  109. data/lib/rubypitaya/core/setup.rb +0 -0
  110. data/lib/rubypitaya/core/spec-helpers/app_spec_helper.rb +2 -1
  111. data/lib/rubypitaya/core/spec-helpers/app_spec_helper_class.rb +0 -0
  112. data/lib/rubypitaya/core/spec-helpers/config_spec_helper.rb +0 -0
  113. data/lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb +0 -0
  114. data/lib/rubypitaya/core/spec-helpers/rubypitaya_spec_helper.rb +1 -1
  115. data/lib/rubypitaya/core/spec-helpers/setup_spec_helper.rb +0 -0
  116. data/lib/rubypitaya/core/status_codes.rb +0 -0
  117. data/lib/rubypitaya/core/templates/template_migration.rb.erb +0 -0
  118. data/lib/rubypitaya/version.rb +1 -1
  119. data/lib/rubypitaya.rb +0 -0
  120. metadata +32 -32
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -13,6 +13,7 @@ module RubyPitaya
13
13
  'encoding' => 'unicode',
14
14
  'pool' => setup.fetch('rubypitaya.database.pool', 5),
15
15
  'host' => setup['rubypitaya.database.host'],
16
+ 'port' => setup['rubypitaya.database.port'],
16
17
  'user' => setup['rubypitaya.database.user'],
17
18
  'password' => setup['rubypitaya.database.password'],
18
19
  'database' => setup['rubypitaya.database.name'],
@@ -33,6 +34,7 @@ module RubyPitaya
33
34
  'encoding': config['encoding'],
34
35
  'pool': config['pool'],
35
36
  'host': config['host'],
37
+ 'port': config['port'],
36
38
  'user': config['user'],
37
39
  'password': config['password'],
38
40
  'database': config['database'],
File without changes
File without changes
File without changes
@@ -8,6 +8,8 @@ module RubyPitaya
8
8
 
9
9
  INVALID_ACTION_NAMES = ['initialize', 'set_attributes']
10
10
 
11
+ attr_reader :handlers
12
+
11
13
  def initialize(is_cheats_enabled)
12
14
  @is_cheats_enabled = is_cheats_enabled
13
15
 
File without changes
File without changes
@@ -44,7 +44,7 @@ module RubyPitaya
44
44
  end
45
45
 
46
46
  after do
47
- ActiveRecord::Base.clear_active_connections!
47
+ ActiveRecord::Base.connection_handler.clear_active_connections!
48
48
  end
49
49
 
50
50
  private
File without changes
File without changes
@@ -2,13 +2,14 @@ module RubyPitaya
2
2
 
3
3
  class InitializerContent
4
4
 
5
- attr_reader :log, :services, :setup, :config
5
+ attr_reader :log, :services, :setup, :config, :handlers
6
6
 
7
- def initialize(log, services, setup, config)
7
+ def initialize(log, services, setup, config, handlers)
8
8
  @log = log
9
9
  @services = services
10
10
  @setup = setup
11
11
  @config = config
12
+ @handlers = handlers
12
13
  end
13
14
  end
14
15
  end
File without changes
@@ -72,15 +72,16 @@ module RubyPitaya
72
72
 
73
73
  @services = ServiceHolder.new
74
74
 
75
+ @handler_router = HandlerRouter.new(@is_cheats_enabled)
76
+
75
77
  @initializer_content = InitializerContent.new(@log,
76
78
  @services,
77
79
  @setup,
78
- @config)
80
+ @config,
81
+ @handler_router.handlers)
79
82
  @initializer_broadcast = InitializerBroadcast.new
80
83
  @initializer_broadcast.run(@initializer_content)
81
84
 
82
- @handler_router = HandlerRouter.new(@is_cheats_enabled)
83
-
84
85
  connect_services
85
86
 
86
87
  run_http
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -27,7 +27,8 @@ module RubyPitaya
27
27
  @@initializer_content = InitializerContent.new(@@log,
28
28
  @@services,
29
29
  @@setup,
30
- @@config)
30
+ @@config,
31
+ @@handler_router.handlers)
31
32
  @@initializer_broadcast = InitializerBroadcast.new
32
33
  @@initializer_broadcast.run(@@initializer_content)
33
34
 
@@ -22,6 +22,6 @@ RSpec.configure do |config|
22
22
  end
23
23
 
24
24
  config.after(:each) do
25
- ActiveRecord::Base.clear_active_connections!
25
+ ActiveRecord::Base.connection_handler.clear_active_connections!
26
26
  end
27
27
  end
File without changes
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '3.16.0'
2
+ VERSION = '3.17.0'
3
3
  end
data/lib/rubypitaya.rb CHANGED
File without changes
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.16.0
4
+ version: 3.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luciano Prestes Cavalcanti
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-28 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -16,140 +16,140 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.5
19
+ version: 1.5.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.4.5
26
+ version: 1.5.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 13.0.6
33
+ version: 13.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 13.0.6
40
+ version: 13.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: redis
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 5.0.5
47
+ version: 5.0.8
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 5.0.5
54
+ version: 5.0.8
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: etcdv3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.11.5
61
+ version: 0.11.6
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: 0.11.5
68
+ version: 0.11.6
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ostruct
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.5.5
75
+ version: 0.6.0
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: 0.5.5
82
+ version: 0.6.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sinatra
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 3.0.5
89
+ version: 3.2.0
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: 3.0.5
96
+ version: 3.2.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: webrick
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 1.7.0
103
+ version: 1.8.1
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: 1.7.0
110
+ version: 1.8.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: nats-pure
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 2.2.1
117
+ version: 2.4.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: 2.2.1
124
+ version: 2.4.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: activerecord
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 7.0.4
131
+ version: 7.1.2
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: 7.0.4
138
+ version: 7.1.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: google-protobuf
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 3.21.12
145
+ version: 3.25.2
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 3.21.12
152
+ version: 3.25.2
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: pry
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -198,42 +198,42 @@ dependencies:
198
198
  requirements:
199
199
  - - '='
200
200
  - !ruby/object:Gem::Version
201
- version: 2.3.26
201
+ version: 2.4.10
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: 2.3.26
208
+ version: 2.4.10
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: cucumber
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 8.0.0
215
+ version: 9.1.1
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: 8.0.0
222
+ version: 9.1.1
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: sinatra-contrib
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - '='
228
228
  - !ruby/object:Gem::Version
229
- version: 3.0.5
229
+ version: 3.2.0
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - '='
235
235
  - !ruby/object:Gem::Version
236
- version: 3.0.5
236
+ version: 3.2.0
237
237
  description: RubyPitaya is an application to create servers using the pitaya protocol.
238
238
  email:
239
239
  - lucianopcbr@gmail.com
@@ -372,7 +372,7 @@ homepage: https://gitlab.com/LucianoPC/ruby-pitaya
372
372
  licenses:
373
373
  - MIT
374
374
  metadata: {}
375
- post_install_message:
375
+ post_install_message:
376
376
  rdoc_options: []
377
377
  require_paths:
378
378
  - lib
@@ -387,8 +387,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
387
387
  - !ruby/object:Gem::Version
388
388
  version: '0'
389
389
  requirements: []
390
- rubygems_version: 3.3.26
391
- signing_key:
390
+ rubygems_version: 3.4.10
391
+ signing_key:
392
392
  specification_version: 4
393
393
  summary: Create servers with pitaya
394
394
  test_files: []