diff --git a/cats-effect/src/test/scala/github4s/cats/effect/jvm/CatsEffectJVMSpec.scala b/cats-effect/src/test/scala/github4s/cats/effect/jvm/CatsEffectJVMSpec.scala index 2c06507e0..e698dd84a 100644 --- a/cats-effect/src/test/scala/github4s/cats/effect/jvm/CatsEffectJVMSpec.scala +++ b/cats-effect/src/test/scala/github4s/cats/effect/jvm/CatsEffectJVMSpec.scala @@ -20,10 +20,11 @@ import cats.effect.IO import github4s.Github import github4s.Github._ import github4s.cats.effect.jvm.Implicits._ -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.matchers.should.Matchers +import org.scalatest.flatspec.AnyFlatSpec import scalaj.http.HttpResponse -class CatsEffectJVMSpec extends FlatSpec with Matchers { +class CatsEffectJVMSpec extends AnyFlatSpec with Matchers { val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN") val headerUserAgent = Map("user-agent" -> "github4s") val validUsername = "rafaparadela" diff --git a/github4s/src/main/scala/github4s/api/package.scala b/github4s/src/main/scala/github4s/api/package.scala index 0b5360153..35ba20e7b 100644 --- a/github4s/src/main/scala/github4s/api/package.scala +++ b/github4s/src/main/scala/github4s/api/package.scala @@ -21,6 +21,6 @@ import io.circe.{Json, Printer} package object api { def dropNullPrint(json: Json): String = - Printer.noSpaces.copy(dropNullValues = true).pretty(json) + Printer.noSpaces.copy(dropNullValues = true).print(json) } diff --git a/github4s/src/test/scala/github4s/unit/ApiSpec.scala b/github4s/src/test/scala/github4s/unit/ApiSpec.scala index 02216d47a..0c00089db 100644 --- a/github4s/src/test/scala/github4s/unit/ApiSpec.scala +++ b/github4s/src/test/scala/github4s/unit/ApiSpec.scala @@ -19,15 +19,16 @@ package github4s.unit import github4s.api._ import github4s.free.domain.{EditGistFile, GistFile, Pagination} import github4s.utils.{DummyGithubUrls, MockGithubApiServer, TestUtilsJVM} -import org.scalatest._ import cats.implicits._ import scalaj.http._ import cats.Id import github4s.jvm.ImplicitsJVM import github4s.utils.Integration +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers class ApiSpec - extends FlatSpec + extends AnyFlatSpec with Matchers with TestUtilsJVM with MockGithubApiServer diff --git a/github4s/src/test/scala/github4s/unit/DecodersSpec.scala b/github4s/src/test/scala/github4s/unit/DecodersSpec.scala index 5d4b3028b..8369613e4 100644 --- a/github4s/src/test/scala/github4s/unit/DecodersSpec.scala +++ b/github4s/src/test/scala/github4s/unit/DecodersSpec.scala @@ -17,15 +17,15 @@ package github4s.unit import cats.data.NonEmptyList -import cats.syntax.either._ import github4s.Decoders._ import github4s.free.domain._ import github4s.utils.FakeResponses import io.circe.generic.auto._ import io.circe.parser._ -import org.scalatest._ +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers -class DecodersSpec extends FlatSpec with Matchers with FakeResponses { +class DecodersSpec extends AnyFlatSpec with Matchers with FakeResponses { "Commit decoder" should "return a list of commits when the JSON is valid" in { decode[List[Commit]](listCommitsValidResponse).isRight shouldBe true diff --git a/github4s/src/test/scala/github4s/unit/EncodersSpec.scala b/github4s/src/test/scala/github4s/unit/EncodersSpec.scala index 4ac626ea0..2d6b9c0af 100644 --- a/github4s/src/test/scala/github4s/unit/EncodersSpec.scala +++ b/github4s/src/test/scala/github4s/unit/EncodersSpec.scala @@ -21,9 +21,10 @@ import github4s.free.domain._ import github4s.utils.TestData import io.circe.parser._ import io.circe.syntax._ -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.matchers.should.Matchers +import org.scalatest.flatspec.AnyFlatSpec -class EncodersSpec extends FlatSpec with Matchers with TestData { +class EncodersSpec extends AnyFlatSpec with Matchers with TestData { "TreeData encoder" should "encode the TreeDataSha" in { val treeData: TreeData = TreeDataSha(validFilePath, validMode, validBlobType, validCommitSha) diff --git a/github4s/src/test/scala/github4s/utils/BaseIntegrationSpec.scala b/github4s/src/test/scala/github4s/utils/BaseIntegrationSpec.scala index 36dfaf87d..05ced15be 100644 --- a/github4s/src/test/scala/github4s/utils/BaseIntegrationSpec.scala +++ b/github4s/src/test/scala/github4s/utils/BaseIntegrationSpec.scala @@ -16,11 +16,12 @@ package github4s.utils -import cats.syntax.either._ import github4s.GithubResponses.{GHResponse, GHResult} -import github4s.free.interpreters.{Capture, Interpreters} import github4s.HttpRequestBuilderExtension -import org.scalatest.{Assertion, AsyncFlatSpec, Ignore, Inspectors, Matchers, Tag} +import github4s.free.interpreters.{Capture, Interpreters} +import org.scalatest.{Assertion, Ignore, Inspectors, Tag} +import org.scalatest.flatspec.AsyncFlatSpec +import org.scalatest.matchers.should.Matchers import scala.concurrent.{ExecutionContext, Future} diff --git a/github4s/src/test/scala/github4s/utils/BaseSpec.scala b/github4s/src/test/scala/github4s/utils/BaseSpec.scala index f145c7d4e..cae96b52b 100644 --- a/github4s/src/test/scala/github4s/utils/BaseSpec.scala +++ b/github4s/src/test/scala/github4s/utils/BaseSpec.scala @@ -27,9 +27,10 @@ import io.circe.Decoder import io.circe.parser.parse import org.scalamock.matchers.MockParameter import org.scalamock.scalatest.MockFactory -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.matchers.should.Matchers +import org.scalatest.flatspec.AnyFlatSpec -trait BaseSpec extends FlatSpec with Matchers with TestData with IdInstances with MockFactory { +trait BaseSpec extends AnyFlatSpec with Matchers with TestData with IdInstances with MockFactory { case class JsonMockParameter(json: String) extends MockParameter[String](json) { override def equals(argument: Any): Boolean = parse(json) == parse(argument.toString) diff --git a/github4s/src/test/scala/github4s/utils/MockServerService.scala b/github4s/src/test/scala/github4s/utils/MockServerService.scala index e86c90177..94d27e2d9 100644 --- a/github4s/src/test/scala/github4s/utils/MockServerService.scala +++ b/github4s/src/test/scala/github4s/utils/MockServerService.scala @@ -18,9 +18,10 @@ package github4s.utils import org.mockserver.configuration.ConfigurationProperties import org.mockserver.integration.ClientAndServer._ -import org.scalatest.{BeforeAndAfterAll, FlatSpec} +import org.scalatest.BeforeAndAfterAll +import org.scalatest.flatspec.AnyFlatSpec -trait MockServerService extends FlatSpec with BeforeAndAfterAll { +trait MockServerService extends AnyFlatSpec with BeforeAndAfterAll { val mockServerPort = 9999 diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala index c4fdfb175..98267c1a8 100644 --- a/project/ProjectPlugin.scala +++ b/project/ProjectPlugin.scala @@ -1,9 +1,8 @@ -import com.typesafe.sbt.site.jekyll.JekyllPlugin.autoImport._ +import com.typesafe.sbt.site.SitePlugin.autoImport._ import microsites._ import microsites.MicrositesPlugin.autoImport._ import sbt.Keys._ import sbt._ -import sbtorgpolicies.model._ import sbtorgpolicies.OrgPoliciesKeys.orgBadgeListSetting import sbtorgpolicies.OrgPoliciesPlugin import sbtorgpolicies.OrgPoliciesPlugin.autoImport._ @@ -25,14 +24,14 @@ object ProjectPlugin extends AutoPlugin { val base64: String = "0.2.9" val cats: String = "2.0.0" val catsEffect: String = "2.0.0" - val circe: String = "0.11.2" - val circeJackson: String = "0.11.1" + val circe: String = "0.12.3" + val circeJackson: String = "0.12.1" val paradise: String = "2.1.1" val simulacrum: String = "0.19.0" val scala212: String = "2.12.10" val scalaj: String = "2.4.2" val scalamock: String = "4.4.0" - val scalaTest: String = "3.0.8" + val scalaTest: String = "3.1.0" } lazy val micrositeSettings = Seq( @@ -52,7 +51,7 @@ object ProjectPlugin extends AutoPlugin { Map("title" -> "Changelog", "section" -> "changelog", "position" -> "2") ) ), - includeFilter in Jekyll := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md", + includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md", scalacOptions in Tut ~= (_ filterNot Set("-Ywarn-unused-import", "-Xlint").contains) )