Skip to content

Commit 816843a

Browse files
committed
mongo scala driver 4.3
1 parent b6e923e commit 816843a

File tree

6 files changed

+27
-32
lines changed

6 files changed

+27
-32
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
## Versions
55

6+
#### 2.2.5
7+
* mongo-scala-driver [4.3.2](https://mongodb.github.io/mongo-java-driver/4.3/driver-scala/)
8+
69
### 2.2.4
710
* mongo-scala-driver [4.2.3](https://mongodb.github.io/mongo-java-driver/4.2/driver-scala/)
811
* BUGFIX GridFS Upload / Problem with different buffer sizes since 4.2.0

build.sbt

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name := "simple-mongo"
55

66
organization := "com.sfxcode.nosql"
77

8-
crossScalaVersions := Seq("2.13.5", "2.12.12")
8+
crossScalaVersions := Seq("2.13.6", "2.12.12")
99

1010
scalaVersion := crossScalaVersions.value.head
1111

@@ -47,19 +47,25 @@ resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repos
4747

4848
// Test
4949

50-
libraryDependencies += "org.specs2" %% "specs2-core" % "4.11.0" % Test
50+
libraryDependencies += "org.specs2" %% "specs2-core" % "4.12.12" % Test
5151

52-
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3" % Test
52+
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.6" % Test
5353

54-
libraryDependencies += "joda-time" % "joda-time" % "2.10.10" % Test
54+
libraryDependencies += "joda-time" % "joda-time" % "2.10.11" % Test
5555

56-
libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.11" % Test
56+
val circeVersion = "0.14.1"
5757

58-
libraryDependencies += "org.mongodb.scala" %% "mongo-scala-driver" % "4.2.3"
58+
libraryDependencies ++= Seq(
59+
"io.circe" %% "circe-core",
60+
"io.circe" %% "circe-generic",
61+
"io.circe" %% "circe-parser"
62+
).map(_ % circeVersion % Test)
63+
64+
libraryDependencies += "org.mongodb.scala" %% "mongo-scala-driver" % "4.3.2"
5965

6066
libraryDependencies += "org.xerial.snappy" % "snappy-java" % "1.1.8.4" % Provided
6167

62-
libraryDependencies += "com.github.luben" % "zstd-jni" % "1.4.9-5" % Provided
68+
libraryDependencies += "com.github.luben" % "zstd-jni" % "1.5.0-4" % Provided
6369

6470
val MongoJavaServerVersion = "1.38.0"
6571

@@ -71,9 +77,9 @@ libraryDependencies += "com.github.pathikrit" %% "better-files" % "3.9.1"
7177

7278
libraryDependencies += "com.typesafe" % "config" % "1.4.1"
7379

74-
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.3"
80+
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.4"
7581

76-
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.3"
82+
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.5.0"
7783

7884
buildInfoPackage := "com.sfxcode.nosql.mongo"
7985

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.1
1+
sbt.version=1.5.5

project/plugins.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
22

3-
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
3+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
44

5-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.0")
5+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.0")
66

77
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
88

99
// updates, release
1010

11-
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3")
11+
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.0")
1212

1313
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
1414

src/test/scala/com/sfxcode/nosql/mongo/dao/BookDAOSpec.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import com.sfxcode.nosql.mongo._
99
import com.sfxcode.nosql.mongo.database.DatabaseProvider
1010
import com.sfxcode.nosql.mongo.test.TestDatabase.BookDAO
1111
import org.mongodb.scala.bson.conversions.Bson
12-
import org.mongodb.scala.model.Aggregates._
12+
import org.mongodb.scala.model.Aggregates.group
13+
import org.mongodb.scala.model.Aggregates.filter
14+
import org.mongodb.scala.model.Aggregates.project
1315
import org.mongodb.scala.model.Filters.and
1416
import org.mongodb.scala.model.Projections
1517
import org.specs2.mutable.Specification
@@ -18,7 +20,7 @@ import org.mongodb.scala.model.Updates._
1820

1921
class BookDAOSpec extends Specification with BeforeAll {
2022
val DateFormat = new SimpleDateFormat("yyyy-MM-dd")
21-
val From = DateFormat.parse("2000-01-01")
23+
val From: Date = DateFormat.parse("2000-01-01")
2224

2325
override def beforeAll(): Unit = {
2426
BookDAO.drop().result()

src/test/scala/com/sfxcode/nosql/mongo/database/DocumentExtensionsSpec.scala

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import com.sfxcode.nosql.mongo._
44
import com.sfxcode.nosql.mongo.dao.PersonSpecification
55
import com.sfxcode.nosql.mongo.model.Person
66
import com.sfxcode.nosql.mongo.test.TestDatabase.PersonDAO
7-
import org.json4s.DefaultFormats
8-
import org.json4s.native.Serialization.read
7+
98
import org.mongodb.scala.Document
109

1110
class DocumentExtensionsSpec extends PersonSpecification {
@@ -24,21 +23,6 @@ class DocumentExtensionsSpec extends PersonSpecification {
2423
tags.head mustEqual "occaecat"
2524
}
2625

27-
"be converted to plain json " in {
28-
val document: Document = PersonDAO.Raw.find(Map("id" -> 11)).result()
29-
30-
val s = document.asPlainJson
31-
implicit val formats = DefaultFormats
32-
val person: Person = read[Person](s)
33-
person.id mustEqual 11
34-
35-
val tags = person.tags
36-
tags must haveSize(7)
37-
38-
tags.head mustEqual "occaecat"
39-
40-
}
41-
4226
}
4327

4428
}

0 commit comments

Comments
 (0)