macaw_framework 1.1.7 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/lib/macaw_framework/core/thread_server.rb +1 -1
- data/lib/macaw_framework/version.rb +1 -1
- data/lib/macaw_framework.rb +6 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fdecdae940a89142bf0252b2d0b818684f87b50d030c86c1523224aab684b0f
|
4
|
+
data.tar.gz: bf7ff6874613d14f1a97f803ca3bc063269cc2fb5f34d17679fc694ca80ed2f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c4c95350b29411fcfa51bbfaf8929f9046d8927c8d8ebb56b7725f05680a0ec5845c4b9ad2a03aff07ab951289e81035711fe1a76132a534b51876543916d1
|
7
|
+
data.tar.gz: 777150885e128a091f05e9d63548fd715a4fa36cf61f7ed350bf291dc75b22b12f5f69aa7252f4dea2dbee827d6a0c852830a1ea105c45919d5e08b486fc7b71
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
## [Unreleased]
|
2
|
-
|
3
1
|
## [0.1.0] - 2022-12-05
|
4
2
|
|
5
3
|
- Initial release
|
@@ -104,3 +102,12 @@
|
|
104
102
|
## [1.1.7] - 2023-08-12
|
105
103
|
|
106
104
|
- Fixing a bug where the server would not start with the public folder feature enabled on non-Unix systems
|
105
|
+
|
106
|
+
## [1.1.8] - 2023-09-17
|
107
|
+
|
108
|
+
- Optimizing bug report template on GitHub
|
109
|
+
- Optimizing return clause of the get_files_public_folder method
|
110
|
+
|
111
|
+
## [1.2.0] - 2023-09-17
|
112
|
+
|
113
|
+
- Fixing bug where the server would accept new connections during shutdown
|
data/lib/macaw_framework.rb
CHANGED
@@ -198,18 +198,16 @@ module MacawFramework
|
|
198
198
|
@macaw_log&.info("Defining #{prefix.upcase} endpoint at /#{path}")
|
199
199
|
define_singleton_method("#{prefix}.#{path_clean}", block || lambda {
|
200
200
|
|context = { headers: {}, body: "", params: {} }|
|
201
|
-
|
201
|
+
})
|
202
202
|
@routes << "#{prefix}.#{path_clean}"
|
203
203
|
end
|
204
204
|
|
205
205
|
def get_files_public_folder(dir)
|
206
|
-
if dir.nil?
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
file_paths.map { |path| "public/#{path.relative_path_from(folder_path)}" }
|
212
|
-
end
|
206
|
+
return [] if dir.nil?
|
207
|
+
|
208
|
+
folder_path = Pathname.new(File.expand_path("public", dir))
|
209
|
+
file_paths = folder_path.glob("**/*").select(&:file?)
|
210
|
+
file_paths.map { |path| "public/#{path.relative_path_from(folder_path)}" }
|
213
211
|
end
|
214
212
|
|
215
213
|
def create_endpoint_public_files(dir)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macaw_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aria Diniz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prometheus-client
|