rack-app 6.3.3 → 6.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/VERSION +1 -1
- data/lib/rack/app/singleton_methods/route_handling.rb +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 532dcb901ab87ca1055099a748cf104042364462
|
4
|
+
data.tar.gz: bf8980919f0a559277ea054ada3b31a2519c2e9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8864a85609a129bd85b3018b16898e9a3554dd22919fc2c9bfe104fdabb64138f765c52c325403519435eb7fdf1cf4a6e8f5aa6d8fb6e906701f765f0d1ceb9f
|
7
|
+
data.tar.gz: bbed29c8bdf2875b2f658d0bb7c549878c585fca15238763dfc9cc9300adf79ff44a7e127760aacfb9edd290447acaafd449cc2448d95e12c771d138cb72dd06
|
data/.rubocop.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.4.0
|
@@ -31,7 +31,7 @@ module Rack::App::SingletonMethods::RouteHandling
|
|
31
31
|
:request_method => request_method,
|
32
32
|
:route => route_registration_properties.dup,
|
33
33
|
:endpoint_specific_middlewares => next_endpoint_middlewares.dup,
|
34
|
-
:request_path => ::Rack::App::Utils.join(
|
34
|
+
:request_path => ::Rack::App::Utils.join(namespace, request_path)
|
35
35
|
})
|
36
36
|
)
|
37
37
|
|
@@ -41,13 +41,12 @@ module Rack::App::SingletonMethods::RouteHandling
|
|
41
41
|
|
42
42
|
end
|
43
43
|
|
44
|
-
def namespace(
|
45
|
-
return unless block_given?
|
44
|
+
def namespace(*namespace_paths)
|
46
45
|
@namespaces ||= []
|
47
|
-
@namespaces.push(
|
48
|
-
yield
|
49
|
-
ensure
|
46
|
+
@namespaces.push(namespace_paths)
|
47
|
+
yield if block_given?
|
50
48
|
@namespaces.pop
|
49
|
+
::Rack::App::Utils.join(@namespaces.flatten)
|
51
50
|
end
|
52
51
|
|
53
52
|
end
|