rubypitaya 3.0.2 → 3.2.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 +19 -19
- data/lib/rubypitaya/app-template/plugins.yaml +2 -0
- data/lib/rubypitaya/core/main.rb +1 -1
- data/lib/rubypitaya/core/path.rb +3 -3
- data/lib/rubypitaya/core/status_codes.rb +1 -0
- data/lib/rubypitaya/version.rb +1 -1
- data/lib/rubypitaya.rb +12 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0b62fcd06831748d46b05daae25f7479581c91a2a73373e3f82e126f4816a40
|
|
4
|
+
data.tar.gz: 7c404228078049c61ba61a949e1558d272e5a3d714dcde5fccf93432bb7871eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57e031decdb144dfc7a3cb4100927c2afba93f3a8e3024d84cd12adf94d45d829e3af7fcb48091d913916c4c406e8b7fc6daf55441db909a3e88ec05d28915af
|
|
7
|
+
data.tar.gz: 90486658dd8d93bd43bea371b4b5320a6acdf4b271cc31b87816b3b7440d1c334fded706f471fff318431cffefa620ab6ccd2b85573c55300ae58939cc5362e6
|
|
@@ -33,8 +33,8 @@ GEM
|
|
|
33
33
|
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
|
34
34
|
cucumber-messages (~> 17.0, >= 17.0.1)
|
|
35
35
|
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
|
36
|
-
cucumber-create-meta (6.0.
|
|
37
|
-
cucumber-messages (~> 17.
|
|
36
|
+
cucumber-create-meta (6.0.4)
|
|
37
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
|
38
38
|
sys-uname (~> 1.2, >= 1.2.2)
|
|
39
39
|
cucumber-cucumber-expressions (12.1.3)
|
|
40
40
|
cucumber-gherkin (20.0.1)
|
|
@@ -52,23 +52,23 @@ GEM
|
|
|
52
52
|
grpc (~> 1.17)
|
|
53
53
|
eventmachine (1.2.7)
|
|
54
54
|
ffi (1.15.4)
|
|
55
|
-
google-protobuf (3.18.
|
|
56
|
-
googleapis-common-protos-types (1.
|
|
55
|
+
google-protobuf (3.18.1-x86_64-linux)
|
|
56
|
+
googleapis-common-protos-types (1.3.0)
|
|
57
57
|
google-protobuf (~> 3.14)
|
|
58
|
-
grpc (1.
|
|
59
|
-
google-protobuf (~> 3.
|
|
58
|
+
grpc (1.41.1-x86_64-linux)
|
|
59
|
+
google-protobuf (~> 3.17)
|
|
60
60
|
googleapis-common-protos-types (~> 1.0)
|
|
61
|
-
i18n (1.8.
|
|
61
|
+
i18n (1.8.11)
|
|
62
62
|
concurrent-ruby (~> 1.0)
|
|
63
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
|
-
mime-types (3.
|
|
67
|
+
mime-types (3.4.1)
|
|
68
68
|
mime-types-data (~> 3.2015)
|
|
69
|
-
mime-types-data (3.2021.
|
|
69
|
+
mime-types-data (3.2021.1115)
|
|
70
70
|
minitest (5.14.4)
|
|
71
|
-
mongo (2.
|
|
71
|
+
mongo (2.16.0)
|
|
72
72
|
bson (>= 4.8.2, < 5.0.0)
|
|
73
73
|
multi_json (1.15.0)
|
|
74
74
|
multi_test (0.1.2)
|
|
@@ -88,7 +88,7 @@ GEM
|
|
|
88
88
|
rb-fsevent (0.11.0)
|
|
89
89
|
rb-inotify (0.10.1)
|
|
90
90
|
ffi (~> 1.0)
|
|
91
|
-
redis (4.
|
|
91
|
+
redis (4.5.1)
|
|
92
92
|
rspec (3.10.0)
|
|
93
93
|
rspec-core (~> 3.10.0)
|
|
94
94
|
rspec-expectations (~> 3.10.0)
|
|
@@ -101,20 +101,19 @@ GEM
|
|
|
101
101
|
rspec-mocks (3.10.2)
|
|
102
102
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
103
103
|
rspec-support (~> 3.10.0)
|
|
104
|
-
rspec-support (3.10.
|
|
104
|
+
rspec-support (3.10.3)
|
|
105
105
|
ruby2_keywords (0.0.5)
|
|
106
|
-
rubypitaya (3.0
|
|
106
|
+
rubypitaya (3.2.0)
|
|
107
107
|
activerecord (= 6.1.4.1)
|
|
108
108
|
etcdv3 (= 0.11.4)
|
|
109
|
-
google-protobuf (= 3.18.
|
|
110
|
-
mongo (= 2.
|
|
109
|
+
google-protobuf (= 3.18.1)
|
|
110
|
+
mongo (= 2.16.0)
|
|
111
111
|
nats (= 0.11.0)
|
|
112
112
|
ostruct (= 0.4.0)
|
|
113
113
|
pg (= 1.2.3)
|
|
114
114
|
rake (= 13.0.6)
|
|
115
|
-
redis (= 4.
|
|
115
|
+
redis (= 4.5.1)
|
|
116
116
|
sinatra (= 2.1.0)
|
|
117
|
-
sinatra-contrib (= 2.1.0)
|
|
118
117
|
webrick (= 1.7.0)
|
|
119
118
|
sinatra (2.1.0)
|
|
120
119
|
mustermann (~> 1.0)
|
|
@@ -133,7 +132,7 @@ GEM
|
|
|
133
132
|
tzinfo (2.0.4)
|
|
134
133
|
concurrent-ruby (~> 1.0)
|
|
135
134
|
webrick (1.7.0)
|
|
136
|
-
zeitwerk (2.
|
|
135
|
+
zeitwerk (2.5.1)
|
|
137
136
|
|
|
138
137
|
PLATFORMS
|
|
139
138
|
x86_64-linux
|
|
@@ -144,7 +143,8 @@ DEPENDENCIES
|
|
|
144
143
|
listen (= 3.7.0)
|
|
145
144
|
pry (= 0.14.1)
|
|
146
145
|
rspec (= 3.10.0)
|
|
147
|
-
rubypitaya (= 3.0
|
|
146
|
+
rubypitaya (= 3.2.0)
|
|
147
|
+
sinatra-contrib (= 2.1.0)
|
|
148
148
|
|
|
149
149
|
BUNDLED WITH
|
|
150
150
|
2.2.22
|
data/lib/rubypitaya/core/main.rb
CHANGED
|
@@ -109,7 +109,7 @@ module RubyPitaya
|
|
|
109
109
|
HttpRoutes.set :setup, @setup
|
|
110
110
|
HttpRoutes.set :config, @config
|
|
111
111
|
HttpRoutes.set :objects, @objects
|
|
112
|
-
HttpRoutes.set :views, [Path::
|
|
112
|
+
HttpRoutes.set :views, [Path::HTTP_VIEWS_FOLDER_PATH] + Path::Plugins::HTTP_VIEWS_FOLDER_PATHS
|
|
113
113
|
|
|
114
114
|
HttpRoutes.auto_reload if @is_development_environment
|
|
115
115
|
|
data/lib/rubypitaya/core/path.rb
CHANGED
|
@@ -10,10 +10,10 @@ module RubyPitaya
|
|
|
10
10
|
APP_SETUP_FOLDER_PATH = File.join(Dir.pwd, 'app/setup/')
|
|
11
11
|
MIGRATIONS_FOLDER_PATH = File.join(Dir.pwd, 'app/migrations/')
|
|
12
12
|
PLUGINS_FOLDER_PATH = File.join(Dir.pwd, 'plugins/')
|
|
13
|
+
HTTP_VIEWS_FOLDER_PATH = File.join(Dir.pwd, 'app/http/views/')
|
|
13
14
|
|
|
14
15
|
ROUTES_FILE_PATH = File.join(Dir.pwd, 'config/routes.rb')
|
|
15
|
-
|
|
16
|
-
HTTP_VIEWS_PATH = File.join(Dir.pwd, 'app/http/views')
|
|
16
|
+
PLUGIN_CONFIG_FILE_PATH = File.join(Dir.pwd, 'plugins.yaml')
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class Core
|
|
@@ -27,7 +27,7 @@ module RubyPitaya
|
|
|
27
27
|
APP_CONFIG_FOLDER_PATHS = Dir.glob(File.join(Dir.pwd, 'plugins/*/app/config/'))
|
|
28
28
|
APP_SETUP_FOLDER_PATHS = Dir.glob(File.join(Dir.pwd, 'plugins/*/app/setup/'))
|
|
29
29
|
MIGRATIONS_FOLDER_PATHS = Dir.glob(File.join(Dir.pwd, 'plugins/*/app/migrations/'))
|
|
30
|
-
|
|
30
|
+
HTTP_VIEWS_FOLDER_PATHS = Dir.glob(File.join(Dir.pwd, 'plugins/*/app/http/views/'))
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
data/lib/rubypitaya/version.rb
CHANGED
data/lib/rubypitaya.rb
CHANGED
|
@@ -45,12 +45,14 @@ module RubyPitaya
|
|
|
45
45
|
plugin_folder_path = File.join(Path::PLUGINS_FOLDER_PATH, plugin_name)
|
|
46
46
|
plugin_git_path = File.join(plugin_folder_path, '.git/')
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
commit_hash = ''
|
|
49
|
+
branch_command = ''
|
|
49
50
|
branch_command = "--branch #{branch_name}" unless branch_name.blank?
|
|
50
51
|
|
|
51
52
|
FileUtils.rm_rf(plugin_folder_path) if File.exists?(plugin_folder_path)
|
|
52
53
|
puts "git -C #{Path::PLUGINS_FOLDER_PATH} clone --depth 1 #{branch_command} #{plugin_git_url}"
|
|
53
54
|
`git -C #{Path::PLUGINS_FOLDER_PATH} clone --depth 1 #{branch_command} #{plugin_git_url}`
|
|
55
|
+
commit_hash = `git rev-parse --short HEAD`.strip
|
|
54
56
|
FileUtils.rm_rf(plugin_git_path)
|
|
55
57
|
|
|
56
58
|
Dir.entries(plugin_folder_path).each do |entry|
|
|
@@ -71,6 +73,15 @@ module RubyPitaya
|
|
|
71
73
|
File.rename(migration_file, new_file)
|
|
72
74
|
end
|
|
73
75
|
|
|
76
|
+
plugins_config = YAML.load(File.open(Path::PLUGIN_CONFIG_FILE_PATH, &:read))
|
|
77
|
+
plugins_config['plugins'][plugin_name] = {
|
|
78
|
+
'git' => plugin_git_url,
|
|
79
|
+
'branch' => branch_name || '',
|
|
80
|
+
'commit' => commit_hash,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
File.open(Path::PLUGIN_CONFIG_FILE_PATH, 'w') { |f| f.write(plugins_config.to_yaml) }
|
|
84
|
+
|
|
74
85
|
plugin_name
|
|
75
86
|
end
|
|
76
87
|
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: 3.0
|
|
4
|
+
version: 3.2.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: 2021-11-
|
|
11
|
+
date: 2021-11-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pg
|
|
@@ -328,6 +328,7 @@ files:
|
|
|
328
328
|
- "./lib/rubypitaya/app-template/kubernetes/statefulset-nats.yaml"
|
|
329
329
|
- "./lib/rubypitaya/app-template/kubernetes/statefulset-postgres.yaml"
|
|
330
330
|
- "./lib/rubypitaya/app-template/kubernetes/statefulset-redis.yaml"
|
|
331
|
+
- "./lib/rubypitaya/app-template/plugins.yaml"
|
|
331
332
|
- "./lib/rubypitaya/app-template/spec/hello_world_handler_spec.rb"
|
|
332
333
|
- "./lib/rubypitaya/app-template/spec/player_handler_spec.rb"
|
|
333
334
|
- "./lib/rubypitaya/app-template/spec/spec_helper.rb"
|