tina4ruby 3.13.49 → 3.13.50
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/lib/tina4/router.rb +10 -0
- data/lib/tina4/version.rb +1 -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: 8e5481c75ff116f52ef9981a60239741d14ebb21949d167e64760f6f618db2d0
|
|
4
|
+
data.tar.gz: 1eef903d1d00d45d21beef778ca31ffc5400208bd0ebebf0271cbe660e2b86d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afabfb4f602eab2b0e8f6d0be151f2f1bfb131f6c928d2627010b896b105fc6260f0d4647c42d07c5752a267c84222df2b080b8e7ac8c43b8406e8528832037c
|
|
7
|
+
data.tar.gz: 1249983018db2293240fe6d66d2938197a8e00febdb0dd818bd490c077ac49e794ea5f70bf8601db5863db452306458fb95a4c6064e588d71e7e5b04719b56b0
|
data/lib/tina4/router.rb
CHANGED
|
@@ -84,6 +84,13 @@ module Tina4
|
|
|
84
84
|
params = {}
|
|
85
85
|
@param_names.each_with_index do |param_def, i|
|
|
86
86
|
raw_value = match[i + 1]
|
|
87
|
+
# Rack delivers PATH_INFO (and therefore these captures) as
|
|
88
|
+
# ASCII-8BIT. Relabel as UTF-8 so an untyped param binds to SQL as
|
|
89
|
+
# TEXT, not a BLOB: SQLite gives a BLOB no numeric affinity, so a
|
|
90
|
+
# `{id}` bound as ASCII-8BIT never matches an INTEGER column
|
|
91
|
+
# (GET /users/{id} 404s a real row). No transcode — URL path bytes
|
|
92
|
+
# are already UTF-8. Parity: Python/PHP/Node path params are text.
|
|
93
|
+
raw_value = raw_value.dup.force_encoding(Encoding::UTF_8) if raw_value.is_a?(::String)
|
|
87
94
|
params[param_def[:name]] = cast_param(raw_value, param_def[:type])
|
|
88
95
|
end
|
|
89
96
|
params
|
|
@@ -252,6 +259,9 @@ module Tina4
|
|
|
252
259
|
params = {}
|
|
253
260
|
@param_names.each_with_index do |param_def, i|
|
|
254
261
|
raw_value = match[i + 1]
|
|
262
|
+
# Same ASCII-8BIT -> UTF-8 relabel as the HTTP Route matcher above,
|
|
263
|
+
# so a WS path param binds to SQL as TEXT (not a BLOB).
|
|
264
|
+
raw_value = raw_value.dup.force_encoding(Encoding::UTF_8) if raw_value.is_a?(::String)
|
|
255
265
|
params[param_def[:name]] = raw_value
|
|
256
266
|
end
|
|
257
267
|
params
|
data/lib/tina4/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tina4ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.13.
|
|
4
|
+
version: 3.13.50
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tina4 Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|