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
A bug that prevented Groovy script entry points being able to be reloaded in some scenarios was fixed.
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.
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
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
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
Note that it is now possible to impose into the Guice registry directly, via
Pull Requests (26)
-  - bumping version to 2.6.1 of asset-pipeline and removing assets prefix… (davydotcom)
-  - Add TestHttpClient.request API (johnrengelman)
-  - Specify the default port in the manual (danthegoodman)
-  - Expand the handler chains TODO in the manual (danthegoodman)
-  - Add Spring Boot starter to build (dsyer)
-  - Closes #850. ReloadHandler should handle all message types. (johnrengelman)
-  - Fix documentation for Asset Pipeline (rahulsom)
-  - Closes #828 - Provide method to override Guice bindings/modules. (johnrengelman)
-  - Adds a general and extensible mechanism for externally imposed “overrides” (ldaley)
-  - Feature overrides (ldaley)
-  - Update to Netty 4.1.0.Beta8 (beckje01)
-  - Upgrade to lettuce 4.0.2.Final (beckje01)
-  - fixed issue with #pac4j authenticator and boundTo on path binding (guspower)
-  - Full ssl properties (merscwog)
-  - Ensure ByteBufs used in WebSocket support are released. (erdi)
-  - Copy response buffer in BlockingHttpClient onto heap instead of leaking the non-heap one (erdi)
-  - Upgrade to pac4j v1.8 (leleuj)
-  - Create a file system for root of JAR if app is running from archive (dsyer)
-  - Fix for issue-884 (marcpa00)
-  - Add support for unhealthy healthcheck result with custom message and … (phillbarber)
-  - Supports authorizations using pac4j (leleuj)
-  - Implemented toString primarily to improve test error messages. (set321go)
-  - Request body streaming. (ldaley)
-  - #899 Block in Pac4jAuthenticator when getting user credentials (danveloper)
-  - Handle Pac4j direct authentication (robfletcher)
-  - Update doc after pac4j 1.8 upgrade (leleuj)
Resolved Issues (29)
-  - Create a smarter publisher bufferer
-  - Use a smarter buffering strategy for Streams.streamMap
-  - MainClassApplicationUnderTest should allow adding extra config
-  - Add option to disable default metric paths in ratpack-codahale-metrics
-  - Upgrade to pac4j v1.8
-  - TestHttpClient should provide method for executing a pre-configured request
-  - Provide method for AUT's to augment/override Guice bindings
-  - Allow custom OPTIONS request handling strategies
-  - Crash ratpack if using default configuration from start.spring.io. How to use resource from jar?
-  - Request hang when running in development mode with concurrent requests
-  - Requests hang when client sends Expect: 100-Continuation header
-  - Update lettuce dep in 'ratpack-session-redis' module to 4.0.Final
-  - Improve handling of 100-Continue requests
-  - SSLContextDeserializer only supports keystore properties
-  - TypedData.writeTo and TypedData.getInputStream Javadoc should mention “blocking”
-  - Response to `Expect: 100-Continue` request should not be issued until the request body is read.
-  - WebSocketEngine is leaking non-heap memory
-  - DefaultTestHttpClient is leaking non-heap memory
-  - Loading and reloading of groovy scripts backing the app leaks non-heap memory.
-  - Terminating the session does not assign a new ID if the session is used it the same request post termination
-  - Typo and wording in guide, chapter groovy
-  - Markup templates do not have visibility of application classes when run during Gradle continuous build
-  - HealthCheck should allow a custom message when built from a throwable
-  - Supports authorizations using pac4j
-  - Request Body Streaming API
-  - Support web services authentication (pac4j direct clients)
-  - Pac4J methods should use correlated type for user profile where possible
-  - Allow Pac4J Authenticator and ProfileCreator to perform IO by executing them on a blocking thread
-  - Concurrency issue with Context.getRequest().getBody() since ratpack 1.1.0