Permalink
Browse files

Fix #46.

  • Loading branch information...
daviddenton committed Mar 13, 2018
1 parent cc2f705 commit 08ac02b8c018e8e78bcb8548ce02304bf9217599
@@ -7,6 +7,9 @@ The main API is stable, but expect some amount of breaking changes around major
- Add strict `Accept` header checking for `RouteSpec`s based on `producing()` settings. Option for non-strictness.
- Add integrated self-hosted Swagger UI/ReDoc UI module
## 14.21.2
- Fix #46 - ETags should be wrapped in quotes.
## 14.21.1
- Upgrade Finagle to new version
@@ -44,7 +44,7 @@ To activate the extension library features (JSON, templates etc), additional dep
Add the following lines to ```build.sbt``` - the lib is hosted in Maven Central and JCenter:
```scala
resolvers += "JCenter" at "https://jcenter.bintray.com"
libraryDependencies += "io.fintrospect" %% "fintrospect-core" % "14.21.1"
libraryDependencies += "io.fintrospect" %% "fintrospect-core" % "14.21.2"
```
## See the code
@@ -1,7 +1,7 @@
lazy val baseSettings = Seq(
name := "fintrospect",
organization := "io.fintrospect",
version := "14.21.1",
version := "14.21.2",
scalaVersion := "2.12.3",
crossScalaVersions := Seq("2.12.3", "2.11.8"),
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
@@ -100,7 +100,7 @@ object Caching {
rsp => {
if (predicate(rsp)) {
val hashedBody = getInstance("MD5").digest(extract(rsp.content)).map("%02x".format(_)).mkString
rsp.headerMap(ETAG) = hashedBody
rsp.headerMap(ETAG) = s""""$hashedBody""""
}
rsp
}
@@ -98,7 +98,7 @@ class CachingTest extends FunSpec with Matchers {
it("adds when predicate succeeds") {
val response = Response()
response.contentString = "bob"
result(Caching.Response.AddETag[Request](_ => true)(Request(), Service.mk { req => Future(response) })).headerMap("ETag") shouldBe "9f9d51bc70ef21ca5c14f307980a29d8"
result(Caching.Response.AddETag[Request](_ => true)(Request(), Service.mk { req => Future(response) })).headerMap("ETag") shouldBe """"9f9d51bc70ef21ca5c14f307980a29d8""""
}
it("does not add when predicate fails") {
@@ -1,8 +1,8 @@
{
"globals": {
"fintrospect": {
"old": "14.21.0",
"new": "14.21.1"
"old": "14.21.1",
"new": "14.21.2"
}
}
}
@@ -14,19 +14,19 @@
<tr>
<td><a href="http://argonaut.io/">Argonaut</a></td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-argonaut" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-argonaut" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Argonaut">Argonaut</a></td>
</tr>
<tr>
<td><a href="https://github.com/travisbrown/circe">Circe</a></td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-circe" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-circe" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Circe">Circe</a></td>
</tr>
<tr>
<td><a href="https://github.com/google/gson">GSON</a></td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-gson" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-gson" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Gson">Gson</a></td>
</tr>
<tr>
@@ -38,22 +38,22 @@
<tr>
<td><a href="https://github.com/FasterXML/jackson">Jackson</a> </td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-jackson" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-jackson" % "14.21.2"</td>
<td>
<a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Jackson">Jackson</a>
</tr>
<tr>
<td><a href="http://json4s.org/">Json4S Native</a></td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-json4s" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-json4s" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Json4s">Json4s</a>
<br/>
<a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Json4sDoubleMode">Json4sDoubleMode</a></td>
</tr>
<tr>
<td><a href="http://json4s.org/">Json4S Jackson</a> </td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-json4s" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-json4s" % "14.21.2"</td>
<td>
<a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Json4sJackson">Json4sJackson</a>
<br/>
@@ -62,7 +62,7 @@
<tr>
<td><a href="http://msgpack.org">MsgPack</a></td>
<td>application/msgpack</td>
<td>"io.fintrospect" %% "fintrospect-msgpack" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-msgpack" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.MsgPack">MsgPack</a></td>
</tr>
<tr>
@@ -74,13 +74,13 @@
<tr>
<td><a href="https://www.playframework.com">Play</a></td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-play" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-play" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Play">Play</a></td>
</tr>
<tr>
<td><a href="https://github.com/spray/spray-json">Spray</a></td>
<td>application/json</td>
<td>"io.fintrospect" %% "fintrospect-spray" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-spray" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.formats.Spray">Spray</a></td>
</tr>
<tr>
@@ -9,5 +9,5 @@ To activate some optional features, additional dependencies may be required - th
Add the following lines to ```build.sbt``` - the lib is hosted in Maven Central and JCenter:
```scala
resolvers += "JCenter" at "https://jcenter.bintray.com"
libraryDependencies += "io.fintrospect" %% "fintrospect-core" % "14.21.1"
libraryDependencies += "io.fintrospect" %% "fintrospect-core" % "14.21.2"
```
@@ -8,13 +8,13 @@
<tr>
<td><a href="http://handlebarsjs.com">Handlebars</a></td>
<td>.hbs</td>
<td>"io.fintrospect" %% "fintrospect-handlebars" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-handlebars" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.templating.HandlebarsTemplates">HandlebarsTemplates</a></td>
</tr>
<tr>
<td><a href="http://mustache.github.io/">Mustache</a></td>
<td>.mustache</td>
<td>"io.fintrospect" %% "fintrospect-mustache" % "14.21.1"</td>
<td>"io.fintrospect" %% "fintrospect-mustache" % "14.21.2"</td>
<td><a data-toggle="tooltip" href="#" title="io.fintrospect.templating.MustacheTemplates">MustacheTemplates</a></td>
</tr>
</table>

0 comments on commit 08ac02b

Please sign in to comment.