lennarb 0.4.1 → 0.4.2
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 +25 -0
- data/lib/lennarb/response.rb +1 -1
- data/lib/lennarb/version.rb +1 -1
- data/lib/lennarb.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8f83fbde3862f89138c06960e7e10d92febf1b2568ec1ac7d5f414e56eb7861
|
4
|
+
data.tar.gz: 2ae1191814fc395c684f7d3b52a3d16d41cdb722d61ebd1c18937ab7e2eeff00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bf21b6aeaaafc3b1c1f795ae356883ad6c4581506527f6b92b2a10b823770e6d5a8249dc7ebacc0776e0d5a8b4d10a818dcb05ac22ec5cb48e84c7f027d9925
|
7
|
+
data.tar.gz: 96a9067abdf1f6062da9cac71fd79df3a7da8d01a19d662419c9f7d9498438b57299074a5ac2ac86b44271f263e0a52c69d8f48e69c7843177191a653d68e508
|
data/changelog.md
CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.4.1] - 2024-08-02
|
9
|
+
|
10
|
+
### Change
|
11
|
+
|
12
|
+
- Change behavior of `Lennarb::ApplicationBase` class to be the base class of the `Lennarb` class. Now, the `Lennarb` class is a subclass of `Lennarb::ApplicationBase` class.
|
13
|
+
|
14
|
+
That permits to create a new application with the `Lennarb::ApplicationBase` class and use http methods to create the routes. Ex.
|
15
|
+
|
16
|
+
```rb
|
17
|
+
# app.rb
|
18
|
+
|
19
|
+
require 'lennarb'
|
20
|
+
|
21
|
+
class MyApp < Lennarb::ApplicationBase
|
22
|
+
get '/hello' do |req, res|
|
23
|
+
res.html('Hello World')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
### Removed
|
29
|
+
|
30
|
+
- Remove `Lennarb::Application` module from the project. Now, the `Lennarb` class is the main class of the project.
|
31
|
+
|
32
|
+
|
8
33
|
## [0.4.0] - 2024-07-02
|
9
34
|
|
10
35
|
### Added
|
data/lib/lennarb/response.rb
CHANGED
data/lib/lennarb/version.rb
CHANGED
data/lib/lennarb.rb
CHANGED
@@ -76,10 +76,12 @@ class Lennarb
|
|
76
76
|
# @returns [void]
|
77
77
|
#
|
78
78
|
def get(path, &block) = add_route(path, :GET, block)
|
79
|
-
def post(path, &block) = add_route(path, :POST, block)
|
80
79
|
def put(path, &block) = add_route(path, :PUT, block)
|
80
|
+
def post(path, &block) = add_route(path, :POST, block)
|
81
|
+
def head(path, &block) = add_route(path, :HEAD, block)
|
81
82
|
def patch(path, &block) = add_route(path, :PATCH, block)
|
82
83
|
def delete(path, &block) = add_route(path, :DELETE, block)
|
84
|
+
def options(path, &block) = add_route(path, :OPTIONS, block)
|
83
85
|
|
84
86
|
private
|
85
87
|
|