Skip to content

Commit

Permalink
Merge pull request #6 from jpbnetley/feature/libsUpdate
Browse files Browse the repository at this point in the history
library updates
  • Loading branch information
jpbnetley authored Jan 12, 2020
2 parents 261422c + aef1ba8 commit 174188d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ name := "Mongo-csv-importer"

version := "0.1"

scalacOptions += "-Ypartial-unification"

libraryDependencies ++= Seq(
"org.mongodb.scala" %% "mongo-scala-driver" % "2.6.0",
"org.mongodb.scala" %% "mongo-scala-driver" % "2.8.0",
"io.monix" %% "monix" % "3.1.0",
"org.typelevel" %% "cats-core" % "2.0.0-M1"
"org.typelevel" %% "cats-core" % "2.1.0"
)

scalaVersion := "2.12.8"
scalaVersion := "2.13.1"
6 changes: 3 additions & 3 deletions src/main/scala/Util/Database/Database.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.mongodb.{MongoClientSettings, MongoCredential, ServerAddress}
import monix.eval.Task
import org.mongodb.scala.{MongoClient, MongoDatabase}

import scala.collection.JavaConverters._
import scala.jdk.CollectionConverters._

case object Database {

Expand Down Expand Up @@ -31,7 +31,7 @@ case object Database {
*/
private def mongoSettingsBuilder(address: String, port: Int): MongoClientSettings.Builder = {
MongoClientSettings.builder()
.applyToClusterSettings(b => b.hosts(List(new ServerAddress(address, port)).asJava)build())
.applyToClusterSettings(b => b.hosts(List(new ServerAddress(address, port)).asJava).build())
}

/** Extracts the env variables and returns the mongo settings
Expand Down Expand Up @@ -62,7 +62,7 @@ case object Database {
*
* @return
*/
def getDatabase(): Task[MongoDatabase] = Task {
def getDatabase: Task[MongoDatabase] = Task {
database
}

Expand Down

0 comments on commit 174188d

Please sign in to comment.