macaw_framework 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 491bca651168a6934d2271ea54b4d123d986b2cf467d47f8da6ec512988d71e5
4
- data.tar.gz: 16607cefef4714fcf6062d540b5dba60985e6276f4569ad20fe65f1eef199ff3
3
+ metadata.gz: 4412336c2166038213ab4a58c54ff6e801a48ed280d60798fdfa7ff71582e2ab
4
+ data.tar.gz: 1dc49b04d5726e533e6ce1041c646e8d1d7279e75efdcb3caefba32d7e6705b5
5
5
  SHA512:
6
- metadata.gz: b93f8683ec3b67450ed8321000822db8fc8b049eace487711df574d8f1e20943aaf5f5366640be0a01ef461919e66a4510ab876b4f408f3c42fc92efb1d12a41
7
- data.tar.gz: '02087194f65d038a66c4e4618c4142c2bdc569111c278ad14a19dc658daa4f25e2017f3b5d4349fdcdc41f762234dc1a3835593df137c8c35452c0780f0665a8'
6
+ metadata.gz: a28fe409f25f0a74656e4484aefd409d5542829635008409858f9809db21407ad71ced5d0919b44c064094ff5835a500b802370da13d20d0159de4297db6ba03
7
+ data.tar.gz: 83b5e962993694d211d4ae91d925326fb3a9330708048ab23adc4c2a175e2f2864e4f79c575c21170bb06366c8001b29c8f4a98a26a87caf52852d4180148f47
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,8 @@
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MacawFramework
4
- VERSION = "1.1.7"
4
+ VERSION = "1.1.8"
5
5
  end
@@ -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
- else
209
- folder_path = Pathname.new(File.expand_path("public", dir))
210
- file_paths = folder_path.glob("**/*").select(&:file?)
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.1.7
4
+ version: 1.1.8
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-08-12 00:00:00.000000000 Z
11
+ date: 2023-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prometheus-client