Skip to content

Commit 5300847

Browse files
committed
Prepare for v2.3.1
1 parent 6542feb commit 5300847

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

CHANGELOG.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
11
# Hanami::Router
22

3-
Rack compatible HTTP router for Ruby
3+
Rack compatible HTTP router for Ruby.
4+
5+
## [Unreleased]
6+
7+
### Added
8+
9+
### Changed
10+
11+
### Deprecated
12+
13+
### Removed
14+
15+
### Fixed
16+
17+
### Security
18+
19+
[Unreleased]: http://github.com/hanami/hanami-router/compare/v2.3.1...main
20+
21+
## [2.3.1] - 2025-12-17
22+
23+
### Changed
24+
25+
- Require Rack version 2.2.16 or higher, which is the earliest version of Rack 2.x that will run on Ruby 4.0 as well as our currently supported Ruby versions (3.2, 3.3, 3.4). (@cllns in 2b15582)
26+
27+
### Fixed
28+
29+
- Set correct Rack `"SCRIPT_NAME"` value for mounts under dynamic prefixes. (@timriley in #294).
30+
31+
For example, given a mount under `scope '/stations/:station_id'`, the "SCRIPT_NAME" will be e.g. `"/stations/42"` rather than `"/stations/:station_id"`.
32+
- For a mount with a prefix, allow the Rack `"PATH_INFO"` value to remain an empty string when a request is made for that exact prefix only. (@timriley in #295)
33+
34+
Given the following:
35+
36+
```ruby
37+
mount ->(env) { [200, {}, [env["PATH_INFO"]] }, at: "/settings"
38+
```
39+
40+
When a request is made to `"/settings"`, the `"SCRIPT_NAME"` will be `"/settings"` and `"PATH_INFO"` will be `""`. This ensures that the Rack environment can be used to reconstruct the same path as used for the original request.
41+
42+
To ensure a mounted router instance can still route to its root, treat `""` the same as `"/"` for the purposes of matching routes.
43+
44+
[2.3.1]: http://github.com/hanami/hanami-router/compare/v2.3.0...v2.3.1
445

546
## v2.3.0 - 2025-11-12
647

lib/hanami/router/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class Router
88
#
99
# @since 0.1.0
1010
# @api public
11-
VERSION = "2.3.0"
11+
VERSION = "2.3.1"
1212
end
1313
end

0 commit comments

Comments
 (0)