rubypitaya 2.3.2 → 2.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubypitaya/app-template/Gemfile +2 -3
- data/lib/rubypitaya/app-template/Gemfile.lock +11 -11
- data/lib/rubypitaya/app-template/Rakefile +4 -0
- data/lib/rubypitaya/core/application_files_importer.rb +6 -4
- data/lib/rubypitaya/core/config_core.rb +12 -8
- data/lib/rubypitaya/core/handler_router.rb +1 -1
- data/lib/rubypitaya/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb195bab202604c6eccf3bf77c6a61a63accd532c0cb2a5717b65f88d5a2f820
|
4
|
+
data.tar.gz: 61f32399ad655d8896ce4e88d4143dfe5bcf3b11272fa61729226503bd670881
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be967053676552234531e322b6bd5e1202e3d2c8425c83f7476bc03371797193f23c644ff8d883eae5c380da208b96003b23d5fdc7bccb4edadd85659917cd3c
|
7
|
+
data.tar.gz: 308c1ba083efd8c8c576c5f597ccd13cc195cb77960166eeadf3aeff2a3e3ef314b84135483327e4c737a168fe026f0fedd176411b74cb3d9e4c2a2e62b92a36
|
@@ -13,26 +13,26 @@ GEM
|
|
13
13
|
tzinfo (~> 1.1)
|
14
14
|
zeitwerk (~> 2.2)
|
15
15
|
coderay (1.1.2)
|
16
|
-
concurrent-ruby (1.1.
|
16
|
+
concurrent-ruby (1.1.7)
|
17
17
|
diff-lcs (1.3)
|
18
18
|
etcdv3 (0.10.2)
|
19
19
|
grpc (~> 1.17)
|
20
20
|
eventmachine (1.2.7)
|
21
21
|
ffi (1.12.2)
|
22
|
-
google-protobuf (3.
|
22
|
+
google-protobuf (3.13.0)
|
23
23
|
googleapis-common-protos-types (1.0.5)
|
24
24
|
google-protobuf (~> 3.11)
|
25
|
-
grpc (1.
|
26
|
-
google-protobuf (~> 3.
|
25
|
+
grpc (1.32.0)
|
26
|
+
google-protobuf (~> 3.13)
|
27
27
|
googleapis-common-protos-types (~> 1.0)
|
28
|
-
i18n (1.8.
|
28
|
+
i18n (1.8.5)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
30
|
listen (3.2.1)
|
31
31
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
32
32
|
rb-inotify (~> 0.9, >= 0.9.10)
|
33
33
|
method_source (0.9.2)
|
34
34
|
middleware (0.1.0)
|
35
|
-
minitest (5.14.
|
35
|
+
minitest (5.14.2)
|
36
36
|
nats (0.11.0)
|
37
37
|
eventmachine (~> 1.2, >= 1.2)
|
38
38
|
pg (0.21.0)
|
@@ -62,19 +62,20 @@ 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.
|
65
|
+
rubypitaya (2.4.4)
|
66
66
|
activerecord (= 6.0.2)
|
67
67
|
etcdv3 (= 0.10.2)
|
68
68
|
eventmachine (= 1.2.7)
|
69
69
|
nats (= 0.11.0)
|
70
70
|
pg (= 0.21.0)
|
71
71
|
protobuf (= 3.10.0)
|
72
|
+
rake (= 10.0)
|
72
73
|
redis (= 4.1.3)
|
73
74
|
thor (1.0.1)
|
74
75
|
thread_safe (0.3.6)
|
75
|
-
tzinfo (1.2.
|
76
|
+
tzinfo (1.2.8)
|
76
77
|
thread_safe (~> 0.1)
|
77
|
-
zeitwerk (2.
|
78
|
+
zeitwerk (2.4.1)
|
78
79
|
|
79
80
|
PLATFORMS
|
80
81
|
ruby
|
@@ -83,9 +84,8 @@ DEPENDENCIES
|
|
83
84
|
bundler (= 1.17.2)
|
84
85
|
listen (= 3.2.1)
|
85
86
|
pry (= 0.12.2)
|
86
|
-
rake (= 10.0)
|
87
87
|
rspec (= 3.8.0)
|
88
|
-
rubypitaya (= 2.
|
88
|
+
rubypitaya (= 2.4.4)
|
89
89
|
|
90
90
|
BUNDLED WITH
|
91
91
|
1.17.2
|
@@ -40,6 +40,9 @@ namespace :db do
|
|
40
40
|
environment_name = ENV.fetch("RUBYPITAYA_ENV") { 'development' }
|
41
41
|
database_config = RubyPitaya::DatabaseConfig.new(environment_name, RubyPitaya::Path::DATABASE_CONFIG_PATH)
|
42
42
|
connection_data = database_config.connection_data
|
43
|
+
migrations_paths = [RubyPitaya::Path::Core::MIGRATIONS_FOLDER_PATH]
|
44
|
+
migrations_paths += RubyPitaya::Path::Plugins::MIGRATIONS_FOLDER_PATHS
|
45
|
+
migrations_paths += [RubyPitaya::Path::MIGRATIONS_FOLDER_PATH]
|
43
46
|
|
44
47
|
step = ENV["STEP"] ? ENV["STEP"].to_i : 1
|
45
48
|
|
@@ -51,6 +54,7 @@ namespace :db do
|
|
51
54
|
end
|
52
55
|
|
53
56
|
ActiveRecord::Base.establish_connection(connection_data)
|
57
|
+
ActiveRecord::Migrator.migrations_paths = migrations_paths
|
54
58
|
ActiveRecord::Base.connection.migration_context.rollback(step)
|
55
59
|
ActiveRecord::Base.connection.close
|
56
60
|
|
@@ -5,9 +5,9 @@ module RubyPitaya
|
|
5
5
|
class ApplicationFilesImporter
|
6
6
|
|
7
7
|
def import
|
8
|
-
|
8
|
+
app_folder_paths = Path::Plugins::APP_FOLDER_PATHS + [Path::Core::APP_FOLDER_PATH, Path::APP_FOLDER_PATH]
|
9
9
|
|
10
|
-
|
10
|
+
app_folder_paths.each do |app_folder_path|
|
11
11
|
app_files_path = "#{app_folder_path}/**/*.rb"
|
12
12
|
|
13
13
|
Gem.find_files(app_files_path).each { |path| require path }
|
@@ -17,7 +17,9 @@ module RubyPitaya
|
|
17
17
|
def auto_reload
|
18
18
|
require 'listen'
|
19
19
|
|
20
|
-
|
20
|
+
app_folder_paths = [Path::Core::APP_FOLDER_PATH, Path::APP_FOLDER_PATH]
|
21
|
+
|
22
|
+
app_files_listener = Listen.to(*app_folder_paths,
|
21
23
|
only: /\.rb$/,
|
22
24
|
force_polling: true,
|
23
25
|
latency: 0.25,
|
@@ -26,7 +28,7 @@ module RubyPitaya
|
|
26
28
|
reload_modified_files(modified)
|
27
29
|
end
|
28
30
|
|
29
|
-
|
31
|
+
app_files_listener.start
|
30
32
|
end
|
31
33
|
|
32
34
|
private
|
@@ -4,9 +4,9 @@ module RubyPitaya
|
|
4
4
|
|
5
5
|
def initialize()
|
6
6
|
@config = {}
|
7
|
-
|
7
|
+
configs_folder_paths = Path::Plugins::APP_CONFIG_FOLDER_PATHS + [Path::APP_CONFIG_FOLDER_PATH]
|
8
8
|
|
9
|
-
|
9
|
+
configs_folder_paths.each do |configs_folder_path|
|
10
10
|
path_to_all_files = File.join(configs_folder_path, '**/*.json')
|
11
11
|
config_files = Dir.glob(path_to_all_files)
|
12
12
|
|
@@ -24,14 +24,18 @@ module RubyPitaya
|
|
24
24
|
def auto_reload
|
25
25
|
require 'listen'
|
26
26
|
|
27
|
-
|
28
|
-
config_files_listener = Listen.to(configs_folder_path, only: /\.json$/) do |modified, added, removed|
|
29
|
-
import_added_files(configs_folder_path, added)
|
30
|
-
reload_modified_files(configs_folder_path, modified)
|
31
|
-
end
|
27
|
+
configs_folder_path = Path::APP_CONFIG_FOLDER_PATH
|
32
28
|
|
33
|
-
|
29
|
+
config_files_listener = Listen.to(configs_folder_path,
|
30
|
+
only: /\.json$/,
|
31
|
+
force_polling: true,
|
32
|
+
latency: 0.25,
|
33
|
+
wait_for_delay: 0.1) do |modified, added, removed|
|
34
|
+
import_added_files(configs_folder_path, added)
|
35
|
+
reload_modified_files(configs_folder_path, modified)
|
34
36
|
end
|
37
|
+
|
38
|
+
config_files_listener.start
|
35
39
|
end
|
36
40
|
|
37
41
|
private
|
@@ -6,7 +6,7 @@ module RubyPitaya
|
|
6
6
|
|
7
7
|
def initialize()
|
8
8
|
routes_path = Path::ROUTES_FILE_PATH
|
9
|
-
handler_folder_paths =
|
9
|
+
handler_folder_paths = Path::Plugins::HANDLERS_FOLDER_PATHS + [Path::HANDLERS_FOLDER_PATH]
|
10
10
|
|
11
11
|
import_routes_file(routes_path)
|
12
12
|
|
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.4.4
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.21.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '10.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:
|
40
|
+
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nats
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,47 +109,47 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 6.0.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: eventmachine
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
-
type: :
|
117
|
+
version: 1.2.7
|
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:
|
124
|
+
version: 1.2.7
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: pry
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 0.12.2
|
132
132
|
type: :development
|
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:
|
138
|
+
version: 0.12.2
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: bundler
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 1.17.2
|
146
146
|
type: :development
|
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:
|
152
|
+
version: 1.17.2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|