Skip to content

Commit

Permalink
Update depdencies (finagle#1265)
Browse files Browse the repository at this point in the history
* Update depdencies

Updated finagle, cats, cats-effect, argonaut, fs2, refined,
scalatest and discipline

* Disable scalastyle

* Update more depdencies

* newline

* Update test/src/main/scala/io/finch/test/ServiceSuite.scala

Co-authored-by: Tuomas Lappeteläinen <[email protected]>

Co-authored-by: Tuomas Lappeteläinen <[email protected]>
  • Loading branch information
Doikor and kingslef authored Sep 25, 2020
1 parent a99efb5 commit 674b940
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ local.*

.bloop
.metals
.vscode
project/metals.sbt
project/project
24 changes: 11 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ import microsites.ExtraMdFileConfig

lazy val buildSettings = Seq(
organization := "com.github.finagle",
scalaVersion := "2.12.7",
crossScalaVersions := Seq("2.12.7", "2.13.1")
scalaVersion := "2.12.12",
crossScalaVersions := Seq("2.12.12", "2.13.3")
)

lazy val twitterVersion = "20.7.0"
lazy val twitterVersion = "20.9.0"
lazy val circeVersion = "0.13.0"
lazy val circeIterateeVersion = "0.13.0-M2"
lazy val circeFs2Version = "0.13.0"
lazy val shapelessVersion = "2.3.3"
lazy val catsVersion = "2.1.1"
lazy val argonautVersion = "6.2.4"
lazy val catsVersion = "2.2.0"
lazy val argonautVersion = "6.3.1"
lazy val iterateeVersion = "0.19.0"
lazy val refinedVersion = "0.9.15"
lazy val catsEffectVersion = "2.1.4"
lazy val fs2Version = "2.4.2"
lazy val refinedVersion = "0.9.16"
lazy val catsEffectVersion = "2.2.0"
lazy val fs2Version = "2.4.4"

def compilerOptions(scalaVersion: String) = Seq(
"-deprecation",
Expand Down Expand Up @@ -46,10 +46,10 @@ lazy val scala213CompilerOptions = Seq(
)

val testDependencies = Seq(
"org.scalacheck" %% "scalacheck" % "1.14.2",
"org.scalatest" %% "scalatest" % "3.1.2",
"org.scalacheck" %% "scalacheck" % "1.14.3",
"org.scalatest" %% "scalatest" % "3.2.2",
"org.typelevel" %% "cats-laws" % catsVersion,
"org.typelevel" %% "discipline-scalatest" % "1.0.0"
"org.typelevel" %% "discipline-scalatest" % "2.0.1"
)

val baseSettings = Seq(
Expand Down Expand Up @@ -395,8 +395,6 @@ lazy val benchmarks = project

val validateCommands = List(
"clean",
"scalastyle",
"test:scalastyle",
"compile",
"test:compile",
"coverage",
Expand Down
1 change: 0 additions & 1 deletion core/src/main/scala/io/finch/Error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.finch

import cats.{Eq, Show}
import cats.data.NonEmptyList
import cats.instances.string._
import cats.syntax.eq._
import io.finch.items.RequestItem
import scala.compat.Platform.EOL
Expand Down
5 changes: 3 additions & 2 deletions core/src/test/scala/io/finch/FinchSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import com.twitter.finagle.http._
import com.twitter.io.Buf
import com.twitter.util._
import org.scalacheck.{Arbitrary, Cogen, Gen}
import org.scalatest.{FlatSpec, Matchers}
import org.scalatestplus.scalacheck.Checkers
import org.typelevel.discipline.Laws
import scala.reflect.ClassTag
import shapeless.Witness
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

trait FinchSpec extends FlatSpec
trait FinchSpec extends AnyFlatSpec
with Matchers
with Checkers
with AllInstances
Expand Down
5 changes: 3 additions & 2 deletions core/src/test/scala/io/finch/ServerSentEventSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import java.nio.charset.{Charset, StandardCharsets}
import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.Gen.Choose
import org.scalacheck.Prop.propBoolean
import org.scalatest.{FlatSpec, Matchers}
import org.scalatestplus.scalacheck.Checkers
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class ServerSentEventSpec extends FlatSpec with Matchers with Checkers {
class ServerSentEventSpec extends AnyFlatSpec with Matchers with Checkers {

behavior of "ServerSentEvent"

Expand Down
5 changes: 3 additions & 2 deletions core/src/test/scala/io/finch/internal/TooFastStringSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package io.finch.internal
import com.twitter.util.Try
import org.scalacheck.Gen
import org.scalacheck.Prop.forAll
import org.scalatest.{FlatSpec, Matchers}
import org.scalatestplus.scalacheck.Checkers
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class TooFastStringSpec extends FlatSpec with Matchers with Checkers {
class TooFastStringSpec extends AnyFlatSpec with Matchers with Checkers {

"TooFastString" should "parse boolean correctly" in {
check { b: Boolean =>
Expand Down
1 change: 0 additions & 1 deletion examples/src/main/scala/io/finch/div/Main.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.finch.div

import cats.effect.IO
import cats.instances.int._
import com.twitter.finagle.Http
import com.twitter.util.Await
import io.finch._
Expand Down
1 change: 0 additions & 1 deletion examples/src/main/scala/io/finch/iteratee/Main.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.finch.iteratee

import cats.effect.{ExitCode, IO, IOApp, Resource}
import cats.implicits._
import com.twitter.finagle.{Http, ListeningServer}
import com.twitter.util.Future
import io.circe.generic.auto._
Expand Down
5 changes: 3 additions & 2 deletions examples/src/test/scala/io/finch/div/DivSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package io.finch.div

import com.twitter.finagle.http.Status
import io.finch.Input
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class DivSpec extends FlatSpec with Matchers {
class DivSpec extends AnyFlatSpec with Matchers {
behavior of "the div endpoint"

import Main.div
Expand Down
5 changes: 3 additions & 2 deletions examples/src/test/scala/io/finch/todo/TodoSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import io.finch._
import io.finch.circe._
import io.finch.internal.DummyExecutionContext
import org.scalacheck.{Arbitrary, Gen}
import org.scalatest.{FlatSpec, Matchers}
import org.scalatestplus.scalacheck.Checkers
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class TodoSpec extends FlatSpec with Matchers with Checkers {
class TodoSpec extends AnyFlatSpec with Matchers with Checkers {

behavior of "Todo App"

Expand Down
5 changes: 3 additions & 2 deletions json-test/src/main/scala/io/finch/test/AbstractJsonSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import io.circe.Decoder
import io.finch.{Decode, DecodeStream, Encode}
import io.finch.test.data._
import org.scalacheck.{Arbitrary, Gen}
import org.scalatest.{FlatSpec, Matchers}
import org.scalatestplus.scalacheck.Checkers
import org.typelevel.discipline.Laws
import scala.util.Try
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

abstract class AbstractJsonSpec extends FlatSpec with Matchers with Checkers with AllInstances {
abstract class AbstractJsonSpec extends AnyFlatSpec with Matchers with Checkers with AllInstances {

implicit val comonadEither: Comonad[Try] = new Comonad[Try] {
def extract[A](x: Try[A]): A = x.get //never do it in production, kids
Expand Down
7 changes: 3 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ resolvers ++= Seq(

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.4")
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.2.1")

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package io.finch.test
import com.twitter.finagle.{Http, ListeningServer, Service}
import com.twitter.finagle.http.{Request, Response}
import com.twitter.util.Await
import org.scalatest.{fixture, Outcome}
import org.scalatest.{FixtureTestSuite, Outcome}

/**
* Extends [[ServiceSuite]] to support integration testing for services.
*/
trait ServiceIntegrationSuite extends ServiceSuite { self: fixture.TestSuite =>
trait ServiceIntegrationSuite extends ServiceSuite { self: FixtureTestSuite =>

/**
* Override in implementing classes if a different port is desired for
Expand Down
6 changes: 3 additions & 3 deletions test/src/main/scala/io/finch/test/ServiceSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package io.finch.test
import com.twitter.finagle.Service
import com.twitter.finagle.http.{Request, Response}
import com.twitter.util.{Await, Duration}
import org.scalatest.{fixture, Outcome}
import org.scalatest.{FixtureTestSuite, Outcome}

/**
* A convenience class that is designed to make it easier to test HTTP services
* both directly and in integration tests that are served locally. Implementing
* classes must extend [[org.scalatest.fixture.Suite]] through [[org.scalatest.fixture.FlatSpec]]
* classes must extend [[org.scalatest.FixtureTestSuite]] through [[org.scalatest.flatspec.FixtureAnyFlatSpec]]
* for example.
*/
trait ServiceSuite { self: fixture.TestSuite =>
trait ServiceSuite { self: FixtureTestSuite =>

/**
* Create an instance of the service to be tested.
Expand Down

0 comments on commit 674b940

Please sign in to comment.