Skip to content

Commit 3eea554

Browse files
committed
Merge pull request #879 from rodzyn/route_info
Remove route_info from params (Close #789)
2 parents e9de222 + 630ac87 commit 3eea554

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Next Release
44
* [#871](https://github.com/intridea/grape/pull/871): Fixed Grape::Middleware::Base#response - [@galathius](https://github.com/galathius).
55
* [#559](https://github.com/intridea/grape/issues/559): Support Rack 1.6.0 to parse requests larger than 128KB - [@myitcv](https://github.com/myitcv).
66
* [#876](https://github.com/intridea/grape/pull/876): declared(params) now returning Hashie::Mash - [@rodzyn](https://github.com/rodzyn).
7+
* [#879](https://github.com/intridea/grape/pull/879): route_info is not included in params Hash anymore - [@rodzyn](https://github.com/rodzyn).
78
* Your contribution here.
89

910
0.10.1 (12/28/2014)

UPGRADING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Upgrading Grape
33

44
### Upgrading to >= 0.10.2
55

6+
#### Added Rack 1.6.0 Support
7+
68
Grape now supports, but doesn't require Rack 1.6.0. If you encounter an issue with parsing requests larger than 128KB, explictly require Rack 1.6.0 in your Gemfile.
79

810
```ruby
@@ -11,6 +13,12 @@ gem 'rack', '~> 1.6.0'
1113

1214
See [#559](https://github.com/intridea/grape/issues/559) for more information.
1315

16+
#### Removed route_info
17+
18+
Key route_info is excluded from params.
19+
20+
See [#879](https://github.com/intridea/grape/pull/879) for more information.
21+
1422
### Upgrading to >= 0.10.1
1523

1624
#### Changes to `declared(params, include_missing: false)`

lib/grape/http/request.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def params
77
args = env['rack.routing_args'].dup
88
# preserve version from query string parameters
99
args.delete(:version)
10+
args.delete(:route_info)
1011
params.deep_merge!(args)
1112
end
1213
params

spec/grape/integration/rack_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# can't check explicitly version of Rack because of https://github.com/rack/rack/issues/773
2424
pending 'Rack 1.6.0 is required' unless ::Rack.const_defined?(:TempfileReaper) || RUBY_PLATFORM == 'java'
2525

26-
expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array(%w(route_info test))
26+
expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array('test')
2727
ensure
2828
input.close
2929
input.unlink

0 commit comments

Comments
 (0)