routing-filter 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,6 @@ Rack::Mount::CodeGeneration.class_eval do
|
|
58
58
|
def recognize_with_filtering(request, &block)
|
59
59
|
path, route, matches, params = request.env['PATH_INFO'], nil, nil, nil
|
60
60
|
filters.run(:around_recognize, path, {}) do
|
61
|
-
path.replace('/') if path.empty?
|
62
61
|
route, matches, params = recognize_without_filtering(request)
|
63
62
|
params || {}
|
64
63
|
end
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
module RoutingFilter
|
23
23
|
class Uuid < Filter
|
24
|
-
UUID_SEGMENT = %r(^/?([a-z\d]{8}\-[a-z\d]{4}\-[a-z\d]{4}\-[a-z\d]{4}\-[a-z\d]{12})
|
24
|
+
UUID_SEGMENT = %r(^/?([a-z\d]{8}\-[a-z\d]{4}\-[a-z\d]{4}\-[a-z\d]{4}\-[a-z\d]{12})(/)?)
|
25
25
|
|
26
26
|
def around_recognize(path, env, &block)
|
27
27
|
uuid = extract_segment!(UUID_SEGMENT, path)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: routing-filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sven Fuchs
|