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 OutputStreams.

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.

Pull Requests (26)

Resolved Issues (29)