Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove route_info from params (Close #789) #879

Merged
merged 1 commit into from
Jan 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Next Release
* [#871](https://github.com/intridea/grape/pull/871): Fixed Grape::Middleware::Base#response - [@galathius](https://github.com/galathius).
* [#559](https://github.com/intridea/grape/issues/559): Support Rack 1.6.0 to parse requests larger than 128KB - [@myitcv](https://github.com/myitcv).
* [#876](https://github.com/intridea/grape/pull/876): declared(params) now returning Hashie::Mash - [@rodzyn](https://github.com/rodzyn).
* [#879](https://github.com/intridea/grape/pull/879): route_info is not included in params Hash anymore - [@rodzyn](https://github.com/rodzyn).
* Your contribution here.

0.10.1 (12/28/2014)
Expand Down
8 changes: 8 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Upgrading Grape

### Upgrading to >= 0.10.2

#### Added Rack 1.6.0 Support

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.

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

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

#### Removed route_info

Key route_info is excluded from params.

See [#879](https://github.com/intridea/grape/pull/879) for more information.

### Upgrading to >= 0.10.1

#### Changes to `declared(params, include_missing: false)`
Expand Down
1 change: 1 addition & 0 deletions lib/grape/http/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def params
args = env['rack.routing_args'].dup
# preserve version from query string parameters
args.delete(:version)
args.delete(:route_info)
params.deep_merge!(args)
end
params
Expand Down
2 changes: 1 addition & 1 deletion spec/grape/integration/rack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# can't check explicitly version of Rack because of https://github.com/rack/rack/issues/773
pending 'Rack 1.6.0 is required' unless ::Rack.const_defined?(:TempfileReaper) || RUBY_PLATFORM == 'java'

expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array(%w(route_info test))
expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array('test')
ensure
input.close
input.unlink
Expand Down