Version 1.6.0
Released on 2018-12-21.
Just in time to ring in 2019, Ratpack 1.6.0 is now available! This release adds integration with additional reactive programming libraries and many improvements that allow Ratpack to integrate more seamlessly with external libraries.
The following core dependencies have been upgraded:
- Netty 4.1.22.Final → 4.1.32.Final
- Jackson 2.9.4 → 2.9.8
- ReactiveStreams 1.0.0.final → 1.0.2
- Caffeine 2.4.0 → 2.6.2
- SnakeYAML 1.18 → 1.23
- Handlebars 4.0.6 → 4.0.7
The new ratpack-reactor
module adds support for integrating Ratpack with Project Reactor types.
The new ratpack-rx2
module adds support for integrating Ratpack with version 2 of RxJava. This is a new module to support the new types introduced in RxJava 2.0.
The new ratpack-thymeleaf3
module adds support for integrating Ratpack with version 3 of Thymeleaf templating.
The new ratpack-gson
module adds support for parsing request bodies and rendering responses using Google's Gson library.
The new Promise.flatOp
method allows for mapping a Promise
directly into an `Operation.
The new Promise.mapError
and Promise.flatMapError
which allow for providing a conditional Predicate
for the mapping.
The ability to configure request and response interceptors for Ratpack's HttpClient
through the HttpClientSpec.requestIntercept
, HttpClientSpec.responseIntercept(Action)
, HttpClientSpec.responseIntercept(Operation)
, and HttpClientSpec.errorIntercept
methods.
Create a new HttpClient
instance by by inheriting from another instance using the HttpClient.copyWith
method.
Improvements in Ratpack's integration with Retrofit by allowing the underlying HttpClient
to be specified with the RatpackRetrofit.Builder.httpClient
method. This allows for utilizing Retrofit outside of a Ratpack HTTP request (e.g. from a background service)
Forked executions can now obtain references to their parent executions through the Execution.getParent()
and Execution.maybeParent()
methods.
Applications can now register their own JVM shutdown hook to perform custom behaviors instead of Ratpack's default hook. Applications using a custom hook can disabled the default hook by setting ServerConfigBuilder.registerShutdownHook(false)
The ratpack-dropwizard-metrics
module now supports exporting metrics to Prometheus (DropwizardMetricsConfig.prometheusCollection(true)
) and collecting metrics on ByteBuf
(DropwizardMetricsConfig.byteBufAllocator(Action)
) and HttpClient
(DropwizardMetricsConfig.httpClient(Action)
)
There are also many other new convenience methods, bug fixes and generally cool stuff added in this release. Thanks to all who contributed.
We hope you enjoy Ratpack 1.6.
--
Team Ratpack
Links
Pull Requests (39)
- [979] - Add interceptors for HttpClient (#975) (hyleung)
- [1124] - Support for HTTPClient interceptors. (johnrengelman)
- [1218] - Rx2 import (johnrengelman)
- [1249] - ISSUE-1244: Expose some metrics on HttpClient (jeff-blaisdell)
- [1269] - #1268 let user to configure whether ratpack server should shutdown it… (pawel-kaminski-krk)
- [1271] - Add Prometheus output support to metrics library. (johnrengelman)
- [1278] - Adding read/connect timeouts to retrofit, closes #1277 (drmaas)
- [1285] - Exposing connection pool queue size in HttpClient (jansyk13)
- [1289] - Bugfix race condition in HttpClientConnectionPoolSpec (jansyk13)
- [1301] - Provide easy access to the application registry via a server reference (rpalcolea)
- [1306] - Retrofit HttpClient configuration (johnrengelman)
- [1311] - Model executions as a tree allowing upward traversal (ldaley)
- [1315] - ByContentSpec should accept CharSequence for Types. (johnrengelman)
- [1323] - Upgrade Caffeine to 2.6.1 (jansyk13)
- [1325] - Fixed formatting in lazybones template README file (wololock)
- [1326] - Added additional HTTP status codes (michaelschlies)
- [1338] - Update Common Libs / Pull in Open PRs (beckje01)
- [1339] - Rx2 Module (beckje01)
- [1342] - ISSUE-1312: Provide public API for HTTP Client metric collection (jeff-blaisdell)
- [1344] - Log cause of failure after decoding HTTP request (jansyk13)
- [1346] - Don't allow an empty session ID. (johnrengelman)
- [1351] - Don't log exception when service could not started (nerro)
- [1354] - Fix TypedData.getBytes() sometimes returning Netty's entire buffer (gregopet)
- [1359] - Thymeleaf3 Module (beckje01)
- [1365] - Upgraded gradle-wrapper from 2.9 to 4.5 in lazybones template (wololock)
- [1378] - porting ratpack-reactor from me.drmaas, closes #1308 (beckje01)
- [1380] - Content Negotiation: Add UTF-8 as default charset for text mime types (guylabs)
- [1382] - Add ratpack-gson module (johnrengelman)
- [1383] - Remove depedency to an internal Sun JVM class. (johnrengelman)
- [1386] - Minor changes to support Java 9 (johnrengelman)
- [1388] - Batch covariance (johnrengelman)
- [1393] - Add HikariHealthCheck. (jsalinaspolo)
- [1396] - fixes #1395 since String.charAt raises exception (manumaticx)
- [1399] - convenience methods converting to and from a completable future (drmaas)
- [1402] - Netty to 4.1.30 (beckje01)
- [1408] - TypedData getBytes (beckje01)
- [1409] - Bump Netty 4.1.31 (beckje01)
- [1420] - Allow Commons Lang3 in handlebars (beckje01)
- [1421] - WIP - Add Java 9 manual chapter (michaelschlies)
Resolved Issues (31)
- [975] - Add support for HttpClient request/response interceptors
- [1034] - Upgrade to pac4j v2.0.0
- [1114] - HttpUrlBuilder does not preserve/support fragments
- [1134] - Batch constructors do no support covariant collections
- [1232] - Ratpack Retrofit unable to execute outside of main execution flow
- [1244] - Expose HttpClient Metrics
- [1268] - Shutting down via Runtime.shutdownHook
- [1282] - Provide easy access to the application registry via a server reference
- [1308] - Support bridging between Ratpack's async constructs and Project Reactor's
- [1312] - Promote HttpClientMetrics into public API
- [1316] - Check for null content-type on on Retrofit request
- [1318] - Upgrade to Thymeleaf3
- [1324] - Add remaining http status codes as const statics to Status class
- [1348] - [HttpClient] Closing channel pool is not checking ChannelFuture status
- [1350] - Don't log and throw StartupFailureException (services graph)
- [1364] - Update gradle-wrapper in lazybones template from 2.9 to 4.5
- [1366] - Update shadow plugin in lazybones template from 1.2.4 to 2.04
- [1375] - Enhance RequestFixture with multipart form and file upload capabilities
- [1384] - Fix ratpack-reactor Javadocs
- [1385] - Fix ratpack-thymeleaf3 javadocs
- [1390] - Interaction with CompletableFuture
- [1392] - Hikari Healthcheck
- [1395] - String index out of range: 0
- [1397] - Support latest versions of Retrofit/OkHttp
- [1398] - Expose underlying `Call` from Retrofit calls during errors
- [1413] - Add Doc Section on Java 9+ Compatibility
- [1414] - Pac4j Doc Update
- [1415] - Ratpack-Reactor module not being published
- [1418] - Update to ratpack 1.6.0-rc-1 error
- [1426] - Streaming request body read may hang with native transports
- [1427] - Add support for kqueue transport