From 45492f1c44cbfa04a785a50555ba78476774ff7c Mon Sep 17 00:00:00 2001 From: Christopher Davenport Date: Mon, 10 Feb 2020 21:26:36 -0800 Subject: [PATCH] Upgrades --- .gitignore | 3 ++- build.sbt | 8 ++++---- .../cormorant/fs2/StreamingParserSpec.scala | 2 +- .../cormorant/fs2/StreamingPrinterSpec.scala | 2 +- .../io/chrisdavenport/cormorant/http4s/package.scala | 8 ++++---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0866720e..1a30ec7d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ target/ # Ignore [ce]tags files tags .metals -.bloop \ No newline at end of file +.bloop +project/metals.sbt \ No newline at end of file diff --git a/build.sbt b/build.sbt index 38b9df6f..7dcc3238 100644 --- a/build.sbt +++ b/build.sbt @@ -22,13 +22,13 @@ lazy val cormorant = project.in(file(".")) .aggregate(core, generic, parser, refined, fs2, http4s) -val catsV = "2.0.0" +val catsV = "2.1.0" val catsEffectV = "2.1.1" -val catsEffectTestV = "0.3.0" +val catsEffectTestV = "0.4.0" val shapelessV = "2.3.3" -val http4sV = "0.21.0-M6" +val http4sV = "0.21.0" val catsScalacheckV = "0.2.0" -val specs2V = "4.8.2" +val specs2V = "4.8.3" lazy val core = project.in(file("modules/core")) .settings(commonSettings) diff --git a/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingParserSpec.scala b/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingParserSpec.scala index ff29a027..3ec70c27 100644 --- a/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingParserSpec.scala +++ b/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingParserSpec.scala @@ -3,7 +3,7 @@ package fs2 import cats.data.NonEmptyList import cats.effect._ -import cats.effect.specs2.CatsIO +import cats.effect.testing.specs2.CatsIO import _root_.fs2.Stream import io.chrisdavenport.cormorant._ // import io.chrisdavenport.cormorant.implicits._ diff --git a/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingPrinterSpec.scala b/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingPrinterSpec.scala index 88c2047e..9b3ed389 100644 --- a/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingPrinterSpec.scala +++ b/modules/fs2/src/test/scala/io/chrisdavenport/cormorant/fs2/StreamingPrinterSpec.scala @@ -3,7 +3,7 @@ package fs2 import cats.data.NonEmptyList import cats.effect._ -import cats.effect.specs2.CatsIO +import cats.effect.testing.specs2.CatsIO import _root_.fs2.Stream import io.chrisdavenport.cormorant._ import io.chrisdavenport.cormorant.implicits._ diff --git a/modules/http4s/src/main/scala/io/chrisdavenport/cormorant/http4s/package.scala b/modules/http4s/src/main/scala/io/chrisdavenport/cormorant/http4s/package.scala index caaaf9e0..33b8a8f8 100644 --- a/modules/http4s/src/main/scala/io/chrisdavenport/cormorant/http4s/package.scala +++ b/modules/http4s/src/main/scala/io/chrisdavenport/cormorant/http4s/package.scala @@ -72,7 +72,7 @@ package object http4s { implicit def completeEntityDecoder[F[_]: Sync]: EntityDecoder[F, CSV.Complete] = new EntityDecoder[F, CSV.Complete] { def consumes: Set[MediaRange] = Set(MediaType.text.csv) - def decode(msg: Message[F], strict: Boolean): DecodeResult[F, CSV.Complete] = + def decode(msg: Media[F], strict: Boolean): DecodeResult[F, CSV.Complete] = cats.data.EitherT { msg.body .through(text.utf8Decode) @@ -90,7 +90,7 @@ package object http4s { implicit def rowsEntityDecoder[F[_]: Sync]: EntityDecoder[F, CSV.Rows] = new EntityDecoder[F, CSV.Rows] { def consumes: Set[MediaRange] = Set(MediaType.text.csv) - def decode(msg: Message[F], strict: Boolean): DecodeResult[F, CSV.Rows] = cats.data.EitherT { + def decode(msg: Media[F], strict: Boolean): DecodeResult[F, CSV.Rows] = cats.data.EitherT { msg.body .through(text.utf8Decode) .compile @@ -107,7 +107,7 @@ package object http4s { def streamingLabelledReadDecoder[F[_]: Sync, A: LabelledRead]: EntityDecoder[F, Stream[F, A]] = new EntityDecoder[F, Stream[F, A]] { def consumes: Set[MediaRange] = Set(MediaType.text.csv) - def decode(msg: Message[F], strict: Boolean): DecodeResult[F, Stream[F, A]] = + def decode(msg: Media[F], strict: Boolean): DecodeResult[F, Stream[F, A]] = msg.body .through(text.utf8Decode) .through(readLabelled[F, A]) @@ -117,7 +117,7 @@ package object http4s { def streamingReadDecoder[F[_]: Sync, A: Read]: EntityDecoder[F, Stream[F, A]] = new EntityDecoder[F, Stream[F, A]] { def consumes: Set[MediaRange] = Set(MediaType.text.csv) - def decode(msg: Message[F], strict: Boolean): DecodeResult[F, Stream[F, A]] = + def decode(msg: Media[F], strict: Boolean): DecodeResult[F, Stream[F, A]] = msg.body .through(text.utf8Decode) .through(readRows[F, A])