Version 1.2.0
Released on 2016-02-16.
After taking some time off after the 1.0 and subsequent 1.1 releases, we are back with 1.2. There's a lot of new stuff.
It is now possible to disable the execution timing feature of the Dropwizard Metrics support.
The version of Spring Boot used by default by the Spring Boot integration has been updated to 1.3.0, along with documentation refinements and improvements from the Spring Boot team.
A new utility has been added for simple pub/sub with promises, named Promised
.
A bug that prevented Groovy script entry points being able to be reloaded in some scenarios was fixed.
The PublicAddress
type has changed to no longer require a Context
. The existing methods that did require a context have been deprecated. It is now also possible to obtain an implementation that infers the public address based on the request.
Handling of 100-Continue
requests has been improved. If a request contains Expect: 100-Continue
, a 100 Continue
response is issued automatically when the request body is actually read. Ratpack will not implicitly issue a 417 Expectation Failed
response to reject the request. It will simply send the response that is specified in the handling code as per normal.
The underlying Redis client used by the RedisSessionModule
has been upgraded to the latest.
A brand new “imposition” mechanism has been added that facilitates augmenting applications under test, from outside of the application, at test time. This enables the often requested feature of being able to augment Guice bindings at test time, via the BindingsImposition
. This is a very powerful feature that makes Ratpack applications even easier to test.
The Pac4j integration has been updated to build on Pac4j 1.8, and use some new features. Principally, there is now a handler for authorizing as well as authenticating.
It is now also possible to read the incoming request body as a stream, via the Request.getBodyStream()
method. This method exposes the bytes of the request body as a Reactive Streams Publisher
. One of the key features of the Reactive Streams protocol is that it allows back pressure on the stream. In this scenario, this means that the consumer can control the rate at which the body is read into memory which avoids exhaustion. This facilitates full asynchronous streaming with flow control. Subsequent versions of Ratpack will include utilities for writing such streams to common destinations such as blocking OutputStream
s.
There are many other documentation improvements and squashed bugs in this release, with many coming via contribution. Thanks to everyone who contributed to this release.
You can expect minor releases roughly every two months into the future.
We hope you enjoy Ratpack 1.2.0.
Upgrading from 1.1.x
Pac4j changes
The Pac4j integration has been updated to build on Pac4j 1.8 where it was previously 1.7. There are some breaking changes to pac4j across this version change. There have also been some binary incompatible changes made to the RatpackPac4j
class in order to accommodate, but the changes are source compatible.
Changes to MainClassApplicationUnderTest.createOverrides()
This method has been removed, which is a breaking change to subclasses. The user registry override mechanism that this method facilitated has been superseded by the new, more general, impositions mechanism.
If you were previously using this method, you should override the new addImpositions() method instead, and use a UserRegistryImposition
.
Note that it is now possible to impose into the Guice registry directly, via BindingsImposition
.
Links
Pull Requests (26)
- [905] - Update doc after pac4j 1.8 upgrade (leleuj)
- [903] - Handle Pac4j direct authentication (robfletcher)
- [900] - #899 Block in Pac4jAuthenticator when getting user credentials (danveloper)
- [895] - Request body streaming. (ldaley)
- [891] - Implemented toString primarily to improve test error messages. (set321go)
- [890] - Supports authorizations using pac4j (leleuj)
- [888] - Add support for unhealthy healthcheck result with custom message and … (phillbarber)
- [885] - Fix for issue-884 (marcpa00)
- [882] - Create a file system for root of JAR if app is running from archive (dsyer)
- [880] - Upgrade to pac4j v1.8 (leleuj)
- [876] - Copy response buffer in BlockingHttpClient onto heap instead of leaking the non-heap one (erdi)
- [874] - Ensure ByteBufs used in WebSocket support are released. (erdi)
- [868] - Full ssl properties (merscwog)
- [867] - fixed issue with #pac4j authenticator and boundTo on path binding (guspower)
- [863] - Upgrade to lettuce 4.0.2.Final (beckje01)
- [861] - Update to Netty 4.1.0.Beta8 (beckje01)
- [859] - Feature overrides (ldaley)
- [858] - Adds a general and extensible mechanism for externally imposed “overrides” (ldaley)
- [857] - Closes #828 - Provide method to override Guice bindings/modules. (johnrengelman)
- [853] - Fix documentation for Asset Pipeline (rahulsom)
- [851] - Closes #850. ReloadHandler should handle all message types. (johnrengelman)
- [844] - Add Spring Boot starter to build (dsyer)
- [831] - Expand the handler chains TODO in the manual (danthegoodman)
- [830] - Specify the default port in the manual (danthegoodman)
- [827] - Add TestHttpClient.request API (johnrengelman)
- [823] - bumping version to 2.6.1 of asset-pipeline and removing assets prefix… (davydotcom)
Resolved Issues (29)
- [909] - Concurrency issue with Context.getRequest().getBody() since ratpack 1.1.0
- [899] - Allow Pac4J Authenticator and ProfileCreator to perform IO by executing them on a blocking thread
- [897] - Pac4J methods should use correlated type for user profile where possible
- [896] - Support web services authentication (pac4j direct clients)
- [894] - Request Body Streaming API
- [889] - Supports authorizations using pac4j
- [887] - HealthCheck should allow a custom message when built from a throwable
- [886] - Markup templates do not have visibility of application classes when run during Gradle continuous build
- [884] - Typo and wording in guide, chapter groovy
- [881] - Terminating the session does not assign a new ID if the session is used it the same request post termination
- [877] - Loading and reloading of groovy scripts backing the app leaks non-heap memory.
- [875] - DefaultTestHttpClient is leaking non-heap memory
- [873] - WebSocketEngine is leaking non-heap memory
- [870] - Response to `Expect: 100-Continue` request should not be issued until the request body is read.
- [865] - TypedData.writeTo and TypedData.getInputStream Javadoc should mention “blocking”
- [864] - SSLContextDeserializer only supports keystore properties
- [856] - Improve handling of 100-Continue requests
- [854] - Update lettuce dep in 'ratpack-session-redis' module to 4.0.Final
- [852] - Requests hang when client sends Expect: 100-Continuation header
- [850] - Request hang when running in development mode with concurrent requests
- [848] - Crash ratpack if using default configuration from start.spring.io. How to use resource from jar?
- [841] - Allow custom OPTIONS request handling strategies
- [828] - Provide method for AUT's to augment/override Guice bindings
- [826] - TestHttpClient should provide method for executing a pre-configured request
- [819] - Upgrade to pac4j v1.8
- [756] - Add option to disable default metric paths in ratpack-codahale-metrics
- [743] - MainClassApplicationUnderTest should allow adding extra config
- [515] - Use a smarter buffering strategy for Streams.streamMap
- [513] - Create a smarter publisher bufferer