macaw_framework 1.2.3 → 1.2.4
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/CHANGELOG.md +5 -0
- data/Gemfile +4 -9
- data/README.md +3 -1
- data/lib/macaw_framework/version.rb +1 -1
- data/lib/macaw_framework.rb +2 -1
- 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: 17a2ff330e9f546997fcbbcbbc8bc0e08af19c08980056999b60f3307aaf898d
|
4
|
+
data.tar.gz: 2af901040509fcd7feecaa5bc9cc762967f9530cd6277b6fc0d4ac1fe5a3bb20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07127b57e24d02a95a9bc444bc444bb3ce44d9f80c6fc9f08b5155c88a3355bd20ee93ae5831f028596b114a4cb200c31bd5247bff8ba043d65f844c426a6bd7
|
7
|
+
data.tar.gz: 4ca1a0f63ea1feb4de1b712f63b786286b791bc9df255011b4ef7acf5a740076c65821b13311bf5c3741bfde945ba0f83dae8ad0073bb56dab6962295b1dc7b5
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -2,20 +2,15 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
# Specify your gem's dependencies in macaw_framework.gemspec
|
6
5
|
gemspec
|
7
6
|
|
8
|
-
gem "rake", "~> 13.0"
|
9
|
-
|
10
|
-
gem "minitest", "~> 5.0"
|
11
|
-
|
12
|
-
gem "rubocop", "~> 1.21"
|
13
|
-
|
14
|
-
gem "prometheus-client", "~> 4.1"
|
15
|
-
|
16
7
|
gem "openssl"
|
8
|
+
gem "prometheus-client", "~> 4.1"
|
17
9
|
|
18
10
|
group :test do
|
11
|
+
gem "minitest", "~> 5.0"
|
12
|
+
gem "rake", "~> 13.0"
|
13
|
+
gem "rubocop", "~> 1.21"
|
19
14
|
gem "simplecov", "~> 0.21.2"
|
20
15
|
gem "simplecov-json"
|
21
16
|
gem "simplecov_json_formatter", "~> 0.1.2"
|
data/README.md
CHANGED
@@ -111,7 +111,7 @@ end
|
|
111
111
|
|
112
112
|
*Observation: To activate caching, you also have to set its properties in the `application.json` file. If you don't, the caching strategy will not work. See the Configuration section below for more details.*
|
113
113
|
|
114
|
-
### Session management: Handle user sessions
|
114
|
+
### Session management: Handle user sessions with server-side in-memory storage
|
115
115
|
|
116
116
|
```ruby
|
117
117
|
m.get('/login') do |context|
|
@@ -129,6 +129,8 @@ m.get('/dashboard') do |context|
|
|
129
129
|
end
|
130
130
|
```
|
131
131
|
|
132
|
+
**Caution: This feature is vulnerable to IP spoofing and may disrupt sessions on devices sharing the same network (e.g., Wi-Fi).**
|
133
|
+
|
132
134
|
### Configuration: Customize various aspects of the framework through the application.json configuration file, such as rate limiting, SSL support, and Prometheus integration
|
133
135
|
|
134
136
|
```json
|
data/lib/macaw_framework.rb
CHANGED
@@ -198,7 +198,8 @@ module MacawFramework
|
|
198
198
|
def map_new_endpoint(prefix, cache, path, &block)
|
199
199
|
@endpoints_to_cache << "#{prefix}.#{RequestDataFiltering.sanitize_method_name(path)}" if cache
|
200
200
|
path_clean = RequestDataFiltering.extract_path(path)
|
201
|
-
|
201
|
+
slash = path[0] == "/" ? "" : "/"
|
202
|
+
@macaw_log&.info("Defining #{prefix.upcase} endpoint at #{slash}#{path}")
|
202
203
|
define_singleton_method("#{prefix}.#{path_clean}", block || lambda {
|
203
204
|
|context = { headers: {}, body: "", params: {} }|
|
204
205
|
})
|
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.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aria Diniz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prometheus-client
|