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
2
2
sudo : false
3
3
4
4
scala :
5
- - 2.11.8
6
- - 2.12.1
5
+ - 2.11.11
6
+ - 2.12.3
7
7
8
8
jdk : oraclejdk8
9
9
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ To release version `x.y.z` run:
52
52
53
53
> sbt release -Dproject.version=x.y.z
54
54
55
+ Then go to https://bintray.com/fonseca/maven/circe-config/x.y.z#central and sync
56
+ to Maven central.
57
+
55
58
## License
56
59
57
60
circe-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"))
5
5
licenses += " Apache-2.0" -> url(" http://www.apache.org/licenses/LICENSE-2.0.html" )
6
6
apiURL := Some (url(" https://jonas.github.io/circe-config/api/" ))
7
7
8
- crossScalaVersions := Seq (" 2.11.8 " , " 2.12.1 " )
8
+ crossScalaVersions := Seq (" 2.11.11 " , " 2.12.3 " )
9
9
scalaVersion := crossScalaVersions.value.last
10
10
11
11
enablePlugins(GitPlugin )
@@ -39,11 +39,11 @@ releaseProcess := {
39
39
}
40
40
41
41
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"
46
43
val config = " 1.3.1"
44
+ val discipline = " 0.8"
45
+ val scalaCheck = " 0.13.5"
46
+ val scalaTest = " 3.0.4"
47
47
}
48
48
49
49
libraryDependencies ++= Seq (
@@ -61,7 +61,7 @@ autoAPIMappings := true
61
61
doctestTestFramework := DoctestTestFramework .ScalaTest
62
62
doctestMarkdownEnabled := true
63
63
doctestWithDependencies := false
64
- scalacOptions in (Compile ,doc) := Seq (
64
+ scalacOptions in (Compile , doc) := Seq (
65
65
" -groups" ,
66
66
" -implicits" ,
67
67
" -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 {
18
18
.mapObject(_.filterKeys(_.nonEmpty).withJsons(normalize))
19
19
.mapArray(_.map(normalize))
20
20
.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
+ }
21
28
// Map to the three principal types supported by Typesafe Config: Int, Long or Double
22
29
val json =
23
30
number.toInt.map(Json .fromInt) orElse
24
31
number.toLong.map(Json .fromLong) orElse
25
- Json .fromDouble(number.toDouble) getOrElse
32
+ numberToDouble getOrElse
26
33
Json .fromInt(42 )
27
34
28
35
json.asNumber.get
You can’t perform that action at this time.
0 commit comments