rubypitaya 2.3.1 → 2.4.3

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: 5291558f9dd5aa593ad105ae1569c7e0cbe7f50cd09f0ed3787b6138df16a984
4
- data.tar.gz: 149b44e5cb086bc0e2a065c49f7cd94a030ca46bfe5f81c215c4587f5e97862d
3
+ metadata.gz: 5c37e06c8f040555eff17f296bfe155fe91308c3a60a73355fdd9e25d9c62b35
4
+ data.tar.gz: ac258070d0ae3de61f289a21d99b7cdf2947e54580a929230c512d3b3e807d0f
5
5
  SHA512:
6
- metadata.gz: 9d10ac3a7ec3eab79ef031c2c59c2be72c5641933a341cfe14ec95f3369e5f5d2d60152de0f6cb7272dc413186ed33aea8788669ef3f5fd8bf00f75155624154
7
- data.tar.gz: 699f5d3570899fe31085bd5b902470f1f3d47a4bb42d48034d4627d2258fc01b00e59dde6bd4f8af1a845ffdc840a116bedcbc8165cba17d9c29fda71bee87aa
6
+ metadata.gz: 4a140e5251bded607ec142250651d0a083a77b980af60707e8706fba4d1dab34f0b648f5d9a98f00358889fb9421490d608d2df43bc685b2142d4d0fc7df8a49
7
+ data.tar.gz: 737f8486eb4d345b123eb19dee79ab59eecc652e893bccbfff34fa65de9fce89d81e84736bcf455deb6b19f0cb7c4d0674ae594678906a14c93e00ad8e9f7714
@@ -1,11 +1,10 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '2.3.1'
3
+ gem 'rubypitaya', '2.4.3'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.12.2'
7
7
  gem 'bundler', '1.17.2'
8
- gem 'rake', '10.0'
9
8
  gem 'rspec', '3.8.0'
10
9
  gem 'listen', '3.2.1'
11
- end
10
+ end
@@ -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.6)
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.11.4-x86_64-linux)
22
+ google-protobuf (3.13.0)
23
23
  googleapis-common-protos-types (1.0.5)
24
24
  google-protobuf (~> 3.11)
25
- grpc (1.28.0-x86_64-linux)
26
- google-protobuf (~> 3.11)
25
+ grpc (1.32.0)
26
+ google-protobuf (~> 3.13)
27
27
  googleapis-common-protos-types (~> 1.0)
28
- i18n (1.8.2)
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.0)
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.3.1)
65
+ rubypitaya (2.4.3)
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.7)
76
+ tzinfo (1.2.8)
76
77
  thread_safe (~> 0.1)
77
- zeitwerk (2.3.0)
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.2.2)
88
+ rubypitaya (= 2.4.3)
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
- @app_folder_paths = [Path::Core::APP_FOLDER_PATH, Path::APP_FOLDER_PATH] + Path::Plugins::APP_FOLDER_PATHS
8
+ app_folder_paths = Path::Plugins::APP_FOLDER_PATHS + [Path::Core::APP_FOLDER_PATH, Path::APP_FOLDER_PATH]
9
9
 
10
- @app_folder_paths.each do |app_folder_path|
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
- @app_files_listener = Listen.to(*@app_folder_paths,
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
- @app_files_listener.start
31
+ app_files_listener.start
30
32
  end
31
33
 
32
34
  private
@@ -14,6 +14,7 @@ module RubyPitaya
14
14
  def [](key)
15
15
  result = @config_core_override[key] unless @config_core_override.nil?
16
16
  result = @config_core[key] if result.nil?
17
+ result
17
18
  end
18
19
 
19
20
  def auto_reload
@@ -4,9 +4,9 @@ module RubyPitaya
4
4
 
5
5
  def initialize()
6
6
  @config = {}
7
- @configs_folder_paths = [Path::APP_CONFIG_FOLDER_PATH] + Path::Plugins::APP_CONFIG_FOLDER_PATHS
7
+ configs_folder_paths = Path::Plugins::APP_CONFIG_FOLDER_PATHS + [Path::APP_CONFIG_FOLDER_PATH]
8
8
 
9
- @configs_folder_paths.each do |configs_folder_path|
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
- @configs_folder_paths.each do |configs_folder_path|
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
- config_files_listener.start
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 = [Path::HANDLERS_FOLDER_PATH] + Path::Plugins::HANDLERS_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
 
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '2.3.1'
2
+ VERSION = '2.4.3'
3
3
  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: 2.3.1
4
+ version: 2.4.3
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-02 00:00:00.000000000 Z
11
+ date: 2020-11-11 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: eventmachine
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2.7
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: 1.2.7
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: pry
112
+ name: eventmachine
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.12.2
118
- type: :development
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: 0.12.2
124
+ version: 1.2.7
125
125
  - !ruby/object:Gem::Dependency
126
- name: bundler
126
+ name: pry
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 1.17.2
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: 1.17.2
138
+ version: 0.12.2
139
139
  - !ruby/object:Gem::Dependency
140
- name: rake
140
+ name: bundler
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: '10.0'
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: '10.0'
152
+ version: 1.17.2
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec
155
155
  requirement: !ruby/object:Gem::Requirement