Skip to content

Commit 24295fd

Browse files
committed
Adds paragraph to upgrading explaining how to rollback behaviour
1 parent 330a6b9 commit 24295fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

UPGRADING.md

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

44
### Upgrading to >= 1.1.1
55

6+
### Changes in the Grape::API class
7+
8+
In an effort to make APIs re-mountable, The class `Grape::API` no longer refers to an API instance,
9+
rather, what used to be `Grape::API` is now `Grape::API::Instance` and `Grape::API` was replaced
10+
with a class that can contain several instances of `Grape::API`.
11+
12+
This changes were done in such a way that no code-changes should be required.
13+
However, if experiencing problems, or relying on private methods and internal behaviour too deeply, it is possible to restore the prior behaviour by replacing the references from `Grape::API` to `Grape::API::Instance`.
14+
615
#### Changes in rescue_from returned object
716

817
Grape will now check the object returned from `rescue_from` and ensure that it is a `Rack::Response`. That makes sure response is valid and avoids exposing service information. Change any code that invoked `Rack::Response.new(...).finish` in a custom `rescue_from` block to `Rack::Response.new(...)` to comply with the validation.

0 commit comments

Comments
 (0)