rubypitaya 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22d3c8209b6441874334ea9dca6d209ff79ff63e5a5cbb4273125ac94bad12e7
4
- data.tar.gz: 2d50b5319e1c113a92b5e67f76835a9be9706f4c60fc91185bdfa984cc576e25
3
+ metadata.gz: 2cc4718b7cd0df9727cfc2758ee744825bc1a9eeac93e9f34ca42cb3d9b42031
4
+ data.tar.gz: 4cc801f3f64c975ed2be0b8a842d7ff028e7546f175a36f6f5006095ee686d88
5
5
  SHA512:
6
- metadata.gz: 95b1cc17e073849eea4aa13fb9f00f99f016768be5aaaeb00e93571829d036fbc4abc3407b165001858cfae0e23473f3f91ffdb52f8d14f3339599e82209f998
7
- data.tar.gz: 1918c5bbda757ef6566acf6f32c269d6aaa08dae329316651d9ac417f7774fe1d0c1ac2f685d498f1b15e891d4b2f72f4fe15e4a6d8ef6b1975c0d1a323903b3
6
+ metadata.gz: a1dca87bab6d093dcc46a2941134964beacba1ded24898bd7445aec2e0fce1d1081a0404e7ba4ccb05fb5ecbfeb0e1995b964086ce16ad63376d4280f20ff302
7
+ data.tar.gz: '0885d2711fab0a98dbd2dfd0aff6ae6cd0452e5fc705b73cac3aecdc203b8f12bcbaa92c634b92f2fd8193ee813e542fa2f70f97646da1f84585fbad9f9de895'
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '2.0.0'
3
+ gem 'rubypitaya', '2.1.0'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.12.2'
@@ -62,7 +62,7 @@ GEM
62
62
  diff-lcs (>= 1.2.0, < 2.0)
63
63
  rspec-support (~> 3.8.0)
64
64
  rspec-support (3.8.3)
65
- rubypitaya (2.0.0)
65
+ rubypitaya (2.1.0)
66
66
  activerecord (= 6.0.2)
67
67
  etcdv3 (= 0.10.2)
68
68
  eventmachine (= 1.2.7)
@@ -85,7 +85,7 @@ DEPENDENCIES
85
85
  pry (= 0.12.2)
86
86
  rake (= 10.0)
87
87
  rspec (= 3.8.0)
88
- rubypitaya (= 2.0.0)
88
+ rubypitaya (= 2.1.0)
89
89
 
90
90
  BUNDLED WITH
91
91
  1.17.2
@@ -24,8 +24,9 @@ namespace :db do
24
24
  environment_name = ENV.fetch("RUBYPITAYA_ENV") { 'development' }
25
25
  database_config = RubyPitaya::DatabaseConfig.new(environment_name, RubyPitaya::Path::DATABASE_CONFIG_PATH)
26
26
  connection_data = database_config.connection_data
27
- migrations_paths = [RubyPitaya::Path::MIGRATIONS_FOLDER_PATH]
27
+ migrations_paths = [RubyPitaya::Path::Core::MIGRATIONS_FOLDER_PATH]
28
28
  migrations_paths += RubyPitaya::Path::Plugins::MIGRATIONS_FOLDER_PATHS
29
+ migrations_paths += [RubyPitaya::Path::MIGRATIONS_FOLDER_PATH]
29
30
 
30
31
  ActiveRecord::Base.establish_connection(connection_data)
31
32
  ActiveRecord::Migrator.migrations_paths = migrations_paths
@@ -1,4 +1,3 @@
1
- require 'active_record'
2
-
3
- class User < ActiveRecord::Base
4
- end
1
+ User.class_eval do
2
+ # has_one :player
3
+ end
@@ -14,14 +14,14 @@ ActiveSupport::LogSubscriber.colorize_logging = true
14
14
 
15
15
  Gem.find_files('rubypitaya/**/*.rb').each do |path|
16
16
  require path unless path.end_with?('spec.rb') ||
17
- path.include?('db/migrate') ||
17
+ path.include?('db/migration') ||
18
18
  path.include?('app-template')
19
19
  end
20
20
 
21
21
  app_files_path = File.join(RubyPitaya::Path::APP_FOLDER_PATH, '**/*.rb')
22
22
  Dir[app_files_path].each do |path|
23
23
  require path unless path.end_with?('spec.rb') ||
24
- path.include?('db/migrate')
24
+ path.include?('db/migration')
25
25
  end
26
26
 
27
27
  require 'irb'
@@ -0,0 +1,4 @@
1
+ require 'active_record'
2
+
3
+ class User < ActiveRecord::Base
4
+ end
@@ -5,7 +5,7 @@ module RubyPitaya
5
5
  class ApplicationFilesImporter
6
6
 
7
7
  def import
8
- @app_folder_paths = [Path::APP_FOLDER_PATH] + Path::Plugins::APP_FOLDER_PATHS
8
+ @app_folder_paths = [Path::Core::APP_FOLDER_PATH, Path::APP_FOLDER_PATH] + Path::Plugins::APP_FOLDER_PATHS
9
9
 
10
10
  @app_folder_paths.each do |app_folder_path|
11
11
  app_files_path = "#{app_folder_path}/**/*.rb"
@@ -12,6 +12,10 @@ module RubyPitaya
12
12
 
13
13
  ROUTES_FILE_PATH = File.join(Dir.pwd, 'config/routes.rb')
14
14
 
15
+ class Core
16
+ APP_FOLDER_PATH = File.join(__dir__, 'app/')
17
+ MIGRATIONS_FOLDER_PATH = File.join(__dir__, 'db/migration/')
18
+ end
15
19
 
16
20
  class Plugins
17
21
  APP_FOLDER_PATHS = Dir.glob(File.join(Dir.pwd, 'plugins/*/app/'))
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypitaya
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luciano Prestes Cavalcanti
@@ -204,8 +204,7 @@ files:
204
204
  - "./lib/rubypitaya/app-template/bin/console"
205
205
  - "./lib/rubypitaya/app-template/config/database.yml"
206
206
  - "./lib/rubypitaya/app-template/config/routes.rb"
207
- - "./lib/rubypitaya/app-template/db/migration/001_create_user_migration.rb"
208
- - "./lib/rubypitaya/app-template/db/migration/002_create_player_migration.rb"
207
+ - "./lib/rubypitaya/app-template/db/migration/0000000002_create_player_migration.rb"
209
208
  - "./lib/rubypitaya/app-template/docker-compose.yml"
210
209
  - "./lib/rubypitaya/app-template/docker/dev/Dockerfile"
211
210
  - "./lib/rubypitaya/app-template/docker/entrypoint.sh"
@@ -225,10 +224,12 @@ files:
225
224
  - "./lib/rubypitaya/app-template/kubernetes/statefulset-nats.yaml"
226
225
  - "./lib/rubypitaya/app-template/kubernetes/statefulset-postgres.yaml"
227
226
  - "./lib/rubypitaya/app-template/kubernetes/statefulset-redis.yaml"
227
+ - "./lib/rubypitaya/core/app/models/user.rb"
228
228
  - "./lib/rubypitaya/core/application_files_importer.rb"
229
229
  - "./lib/rubypitaya/core/config.rb"
230
230
  - "./lib/rubypitaya/core/database_config.rb"
231
231
  - "./lib/rubypitaya/core/database_connector.rb"
232
+ - "./lib/rubypitaya/core/db/migration/0000000001_create_user_migration.rb"
232
233
  - "./lib/rubypitaya/core/etcd_connector.rb"
233
234
  - "./lib/rubypitaya/core/handler_base.rb"
234
235
  - "./lib/rubypitaya/core/handler_router.rb"