rack-mount 0.7.4 → 0.8.0
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.
- data/lib/rack/mount/route_set.rb +9 -4
- metadata +4 -4
data/lib/rack/mount/route_set.rb
CHANGED
@@ -146,10 +146,15 @@ module Rack::Mount
|
|
146
146
|
env[Prefix::KEY] = matches[:path_info].to_s
|
147
147
|
end
|
148
148
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
149
|
+
begin
|
150
|
+
old_params = env[@parameters_key]
|
151
|
+
env[@parameters_key] = (old_params || {}).merge(params)
|
152
|
+
|
153
|
+
result = route.app.call(env)
|
154
|
+
return result unless result[1][X_CASCADE] == PASS
|
155
|
+
ensure
|
156
|
+
env[@parameters_key] = old_params
|
157
|
+
end
|
153
158
|
end
|
154
159
|
|
155
160
|
request || [404, {'Content-Type' => 'text/html', 'X-Cascade' => 'pass'}, ['Not Found']]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-mount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 0.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Peek
|