rubypitaya 2.3.2 → 2.4.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 -9
- data/lib/rubypitaya/app-template/Gemfile.lock +2 -2
- 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 +19 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '093a7c67062ae87c5335220458fd7c8c1a1b97591a8f6ef87121c07aa544eb4d'
|
|
4
|
+
data.tar.gz: c0ab2dcd4a08ecda141a8d6ddfa646bb2e01dfb8648ddf78ac64a167a3f4593b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af597a9e1481be99c5a93c42ffc3e12629d486acbd931b46e1c2c037f7f8806e1191e28e7669835622bb98d2940e5a00a889a51391bbc3502fff7ed7dacace9f
|
|
7
|
+
data.tar.gz: e3be1ef084dce3f1bd9cc77a4c4cab1b51f3d682329e7edbda3736487d3ebbf20d253336767eb97f62a11a191d3add2ba30d85a11669b5c28b9ef25cf2cbf91e
|
|
@@ -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.
|
|
65
|
+
rubypitaya (2.4.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.
|
|
88
|
+
rubypitaya (= 2.4.0)
|
|
89
89
|
|
|
90
90
|
BUNDLED WITH
|
|
91
91
|
1.17.2
|
|
@@ -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.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-
|
|
11
|
+
date: 2020-11-10 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
|
|
@@ -108,6 +108,20 @@ dependencies:
|
|
|
108
108
|
- - '='
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: 6.0.2
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: eventmachine
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - '='
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 1.2.7
|
|
118
|
+
type: :runtime
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - '='
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 1.2.7
|
|
111
125
|
- !ruby/object:Gem::Dependency
|
|
112
126
|
name: pry
|
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|