Skip to content

Commit

Permalink
Upgrade to play 2.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kévin Julien committed Feb 21, 2020
1 parent 5dc1f7e commit d508794
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Compatible with scala 2.11 and scala 2.12, with play-json and circe.
|--------------------|---------------------------|
| 2.6.2 | 0.1 |
| 2.6.7 | 0.3 |
| 2.7.4 | 1.A |
| 2.7.4 | 1.1 |
| 2.8.1 | 1.2 |

### Add Dependency

Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ lazy val `metrics-circe` = (project in file("modules/metrics-circe"))
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion % Compile))
.settings(libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0" % Test)
.settings(libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.1" % Test)
.dependsOn(`metrics-core`)
.aggregate(`metrics-core`)

val playJsonVersion = "2.7.4"
val playJsonVersion = "2.8.1"
lazy val `metrics-playjson` = (project in file("modules/metrics-playjson"))
.settings(GlobalSettings)
.settings(libraryDependencies += "com.typesafe.play" %% "play-json" % playJsonVersion % Compile)
.settings(libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0" % Test)
.settings(libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.1" % Test)
.settings(libraryDependencies += "org.joda" % "joda-convert" % "2.2.1" % Compile)
.dependsOn(`metrics-core`)
.aggregate(`metrics-core`)
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ trait PlayJsonMetricsEncoder {
)
}

implicit def gaugeEncoder: Writes[Gauge[_]] = Writes { gauge =>
def gaugeEncoder(gauge: Gauge[_]): JsValue = {
gauge.getValue match {
case x: Int => JsNumber(x)
case x: Long => JsNumber(x)
Expand All @@ -80,7 +80,7 @@ trait PlayJsonMetricsEncoder {
case m: Meter => Json.obj(key -> m)
case t: Timer => Json.obj(key -> t)
case c: Counter => Json.obj(key -> c)
case g: Gauge[_] => Json.obj(key -> g)
case g: Gauge[_] => Json.obj(key -> gaugeEncoder(g))
case _ => Json.obj()
}

Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "1.1"
version in ThisBuild := "1.2"

0 comments on commit d508794

Please sign in to comment.