rack-mount 0.7.4 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rack/mount/route_set.rb +9 -4
  2. metadata +4 -4
@@ -146,10 +146,15 @@ module Rack::Mount
146
146
  env[Prefix::KEY] = matches[:path_info].to_s
147
147
  end
148
148
 
149
- env[@parameters_key] = params
150
-
151
- result = route.app.call(env)
152
- return result unless result[1][X_CASCADE] == PASS
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: 11
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 7
9
- - 4
10
- version: 0.7.4
8
+ - 8
9
+ - 0
10
+ version: 0.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joshua Peek