rackr 0.0.43 → 0.0.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rackr/router/route.rb +2 -2
- data/lib/rackr/router.rb +3 -1
- data/lib/rackr.rb +2 -0
- 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: b44fd42881233909b8fc9239a9d235c53644bc12bc40c34cf94baf66d73d2f9d
|
4
|
+
data.tar.gz: 7be5769d84a9cb8e7163da17c694481a1412ff9a26d9063fc4894fa647cb291d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5e78dcd9c0650ccf13d53ba4c3975c128b0f3b1143d0765fd2788a390f9daed89824ab6a70a892a6d9388ec00a44ff577407e75d1b517d505f664037148dab
|
7
|
+
data.tar.gz: 5371f8525a097bd4cc86b6ffcd0be75baf999a13488412eb66c13a8e7e599b65f4b633fb0df04ce2a863c1f787e9ce4b11eaa618b8e3d83e6256fca826b91e61
|
data/lib/rackr/router/route.rb
CHANGED
@@ -26,7 +26,7 @@ class Rackr
|
|
26
26
|
def match?(env)
|
27
27
|
return match_with_params?(env) if @has_params
|
28
28
|
|
29
|
-
env['
|
29
|
+
env['PATH_INFO'] == @path
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
@@ -36,7 +36,7 @@ class Rackr
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def match_with_params?(env)
|
39
|
-
splitted_request_path = env['
|
39
|
+
splitted_request_path = env['PATH_INFO'].split('/')
|
40
40
|
|
41
41
|
return false if @splitted_path.size != splitted_request_path.size
|
42
42
|
|
data/lib/rackr/router.rb
CHANGED
@@ -62,6 +62,8 @@ class Rackr
|
|
62
62
|
end
|
63
63
|
|
64
64
|
endpoint_result
|
65
|
+
rescue Rackr::NotFound
|
66
|
+
render_not_found(request_builder.call)
|
65
67
|
rescue Exception => e
|
66
68
|
@error.call(request_builder.call, e)
|
67
69
|
end
|
@@ -186,7 +188,7 @@ class Rackr
|
|
186
188
|
def match_route(env, last_tail = nil, found_branches = [])
|
187
189
|
routes =
|
188
190
|
if last_tail.nil?
|
189
|
-
last_tail = env['
|
191
|
+
last_tail = env['PATH_INFO'].split('/').drop(1)
|
190
192
|
|
191
193
|
@routes[env['REQUEST_METHOD']]
|
192
194
|
else
|
data/lib/rackr.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rackr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique F. Teixeira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubi
|