Skip to content

Commit 06f439e

Browse files
authored
Merge pull request #3 from jonas/circe-0.8.0
Circe 0.8.0
2 parents d3f4c26 + d0bccf7 commit 06f439e

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ language: scala
22
sudo: false
33

44
scala:
5-
- 2.11.8
6-
- 2.12.1
5+
- 2.11.11
6+
- 2.12.3
77

88
jdk: oraclejdk8
99

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ To release version `x.y.z` run:
5252

5353
> sbt release -Dproject.version=x.y.z
5454

55+
Then go to https://bintray.com/fonseca/maven/circe-config/x.y.z#central and sync
56+
to Maven central.
57+
5558
## License
5659

5760
circe-config is licensed under the **[Apache License, Version 2.0][apache]** (the

build.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ homepage := Some(url("https://github.com/jonas/circe-config"))
55
licenses += "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html")
66
apiURL := Some(url("https://jonas.github.io/circe-config/api/"))
77

8-
crossScalaVersions := Seq("2.11.8", "2.12.1")
8+
crossScalaVersions := Seq("2.11.11", "2.12.3")
99
scalaVersion := crossScalaVersions.value.last
1010

1111
enablePlugins(GitPlugin)
@@ -39,11 +39,11 @@ releaseProcess := {
3939
}
4040

4141
val Versions = new {
42-
val circe = "0.7.0"
43-
val discipline = "0.7.2"
44-
val scalaCheck = "0.13.4"
45-
val scalaTest = "3.0.1"
42+
val circe = "0.8.0"
4643
val config = "1.3.1"
44+
val discipline = "0.8"
45+
val scalaCheck = "0.13.5"
46+
val scalaTest = "3.0.4"
4747
}
4848

4949
libraryDependencies ++= Seq(
@@ -61,7 +61,7 @@ autoAPIMappings := true
6161
doctestTestFramework := DoctestTestFramework.ScalaTest
6262
doctestMarkdownEnabled := true
6363
doctestWithDependencies := false
64-
scalacOptions in (Compile,doc) := Seq(
64+
scalacOptions in (Compile, doc) := Seq(
6565
"-groups",
6666
"-implicits",
6767
"-doc-source-url", scmInfo.value.get.browseUrl + "/tree/master€{FILE_PATH}.scala",

src/test/scala/io.github.jonas.circe.config/CirceConfigLaws.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@ class CirceConfigLaws extends FlatSpec {
1818
.mapObject(_.filterKeys(_.nonEmpty).withJsons(normalize))
1919
.mapArray(_.map(normalize))
2020
.mapNumber(number => {
21+
def numberToDouble = {
22+
val double = number.toDouble
23+
if (double.isWhole)
24+
Some(Json.fromLong(double.toLong))
25+
else
26+
Json.fromDouble(double)
27+
}
2128
// Map to the three principal types supported by Typesafe Config: Int, Long or Double
2229
val json =
2330
number.toInt.map(Json.fromInt) orElse
2431
number.toLong.map(Json.fromLong) orElse
25-
Json.fromDouble(number.toDouble) getOrElse
32+
numberToDouble getOrElse
2633
Json.fromInt(42)
2734

2835
json.asNumber.get

0 commit comments

Comments
 (0)