rack-app 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/app/endpoint.rb +0 -8
- data/lib/rack/app/router/dynamic.rb +1 -0
- 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: e81d69d4232df5dc2cf8b2b5461bf89055502b23
|
4
|
+
data.tar.gz: 7260522a23cd1cb462df33b6056c77494e4669c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7a7924188fd13e34a082a4d3d4f315e7badb23a7a14ee9395a94feede3da32138bb25db02bb1d577268362f73551139db315b564af2c98bbf9ac665c6422ba0
|
7
|
+
data.tar.gz: 7b2043952a7a021e15a8b7907b90b402f4b33a25b84c9c7cdd4a9a150f23f1548e05b61eb70a87647517606ec9c0c8dacfb04f802d009e6459ce6bcce3233c2c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.1
|
data/lib/rack/app/endpoint.rb
CHANGED
@@ -13,8 +13,6 @@ class Rack::App::Endpoint
|
|
13
13
|
|
14
14
|
@middleware = (properties[:middleware] || Rack::Builder.new).dup
|
15
15
|
@middleware.run(lambda { |env| self.execute(env) })
|
16
|
-
|
17
|
-
@path_params_matcher = {}
|
18
16
|
@endpoint_method_name = register_method_to_app_class(properties[:user_defined_logic])
|
19
17
|
|
20
18
|
@app = @middleware.to_app
|
@@ -40,16 +38,10 @@ class Rack::App::Endpoint
|
|
40
38
|
request_handler.request = rack_request
|
41
39
|
request_handler.response = rack_response
|
42
40
|
|
43
|
-
rack_request.env[::Rack::App::Constants::PATH_PARAMS_MATCHER]= @path_params_matcher.dup
|
44
41
|
return @error_handler.execute_with_error_handling_for(request_handler, @endpoint_method_name)
|
45
42
|
|
46
43
|
end
|
47
44
|
|
48
|
-
def register_path_params_matcher(params_matcher)
|
49
|
-
@path_params_matcher.clear
|
50
|
-
@path_params_matcher.merge!(params_matcher)
|
51
|
-
end
|
52
|
-
|
53
45
|
protected
|
54
46
|
|
55
47
|
def set_response_body(response, result)
|
@@ -145,6 +145,7 @@ class Rack::App::Router::Dynamic < Rack::App::Router::Base
|
|
145
145
|
|
146
146
|
def format_env(context, env)
|
147
147
|
mount_path = context[:options][:mount_path] rescue ''
|
148
|
+
env[::Rack::App::Constants::PATH_PARAMS_MATCHER]= context[:options][:path_params].dup
|
148
149
|
env[::Rack::PATH_INFO].sub!(mount_path, '')
|
149
150
|
end
|
150
151
|
|