File tree Expand file tree Collapse file tree 4 files changed +19
-9
lines changed
src/test/scala/io.github.jonas.circe.config Expand file tree Collapse file tree 4 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ language: scala
22sudo : false
33
44scala :
5- - 2.11.8
6- - 2.12.1
5+ - 2.11.11
6+ - 2.12.3
77
88jdk : oraclejdk8
99
Original file line number Diff line number Diff 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
5760circe-config is licensed under the ** [ Apache License, Version 2.0] [ apache ] ** (the
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ homepage := Some(url("https://github.com/jonas/circe-config"))
55licenses += " Apache-2.0" -> url(" http://www.apache.org/licenses/LICENSE-2.0.html" )
66apiURL := 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 " )
99scalaVersion := crossScalaVersions.value.last
1010
1111enablePlugins(GitPlugin )
@@ -39,11 +39,11 @@ releaseProcess := {
3939}
4040
4141val 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
4949libraryDependencies ++= Seq (
@@ -61,7 +61,7 @@ autoAPIMappings := true
6161doctestTestFramework := DoctestTestFramework .ScalaTest
6262doctestMarkdownEnabled := true
6363doctestWithDependencies := 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" ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments