diff --git a/build.sbt b/build.sbt index 2afd87f..df6e4a6 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.13.10" +ThisBuild / scalaVersion := "2.13.11" lazy val publishSettings = Seq( Test / publishArtifact := false, diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 9513e0b..783b57a 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,30 +8,30 @@ object Dependencies { testFrameworks += new TestFramework("munit.Framework"), libraryDependencies ++= Seq( "org.scalameta" %% "munit" % "0.7.29", - "org.mockito" % "mockito-core" % "5.3.0", + "org.mockito" % "mockito-core" % "5.4.0", "org.gnieh" %% "diffson-circe" % "4.4.0" ).map(_ % Test) ) val Slack = Seq( - libraryDependencies += "com.slack.api" % "slack-app-backend" % "1.29.2" + libraryDependencies += "com.slack.api" % "slack-app-backend" % "1.30.0" ) val Refined = Seq( - libraryDependencies += "eu.timepit" %% "refined" % "0.10.3" + libraryDependencies += "eu.timepit" %% "refined" % "0.11.0" ) val Logging = Seq( libraryDependencies ++= Seq( - "org.typelevel" %% "log4cats-slf4j" % "2.5.0", - "ch.qos.logback" % "logback-classic" % "1.4.6" % Test, - "ch.qos.logback" % "logback-core" % "1.4.6" % Test, + "org.typelevel" %% "log4cats-slf4j" % "2.6.0", + "ch.qos.logback" % "logback-classic" % "1.4.8" % Test, + "ch.qos.logback" % "logback-core" % "1.4.8" % Test, "org.slf4j" % "jcl-over-slf4j" % "2.0.7" % Test, "org.slf4j" % "jul-to-slf4j" % "2.0.7" % Test ) ) - val Http4sVersion = "0.23.18" + val Http4sVersion = "0.23.23" val Http4s = Seq( libraryDependencies ++= Seq( "org.http4s" %% "http4s-dsl" % Http4sVersion, diff --git a/project/build.properties b/project/build.properties index 46e43a9..52413ab 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.2 +sbt.version=1.9.3 diff --git a/project/plugins.sbt b/project/plugins.sbt index 5a39ad2..b67fd2d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.7") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") diff --git a/src/main/scala/io/laserdisc/slack4s/slack/internal/SlackAPIClient.scala b/src/main/scala/io/laserdisc/slack4s/slack/internal/SlackAPIClient.scala index 8d8b135..952edf9 100644 --- a/src/main/scala/io/laserdisc/slack4s/slack/internal/SlackAPIClient.scala +++ b/src/main/scala/io/laserdisc/slack4s/slack/internal/SlackAPIClient.scala @@ -3,6 +3,7 @@ package io.laserdisc.slack4s.slack.internal import cats.effect.{Async, Ref, Resource} import cats.implicits._ import com.slack.api.methods.request.chat.ChatPostMessageRequest +import fs2.io.net.Network import org.http4s.client.Client import org.http4s.ember.client.EmberClientBuilder import org.http4s.{Method, Request, Uri} @@ -10,7 +11,7 @@ import org.typelevel.log4cats.slf4j.Slf4jLogger object SlackAPIClient { - def resource[F[_]: Async]: Resource[F, SlackAPIClientImpl[F]] = + def resource[F[_]: Async: Network]: Resource[F, SlackAPIClientImpl[F]] = for { httpClient <- EmberClientBuilder.default[F].build client = SlackAPIClientImpl(httpClient) diff --git a/src/main/scala/io/laserdisc/slack4s/slashcmd/SlashCommandBotBuilder.scala b/src/main/scala/io/laserdisc/slack4s/slashcmd/SlashCommandBotBuilder.scala index 72bf00d..54a8c8a 100644 --- a/src/main/scala/io/laserdisc/slack4s/slashcmd/SlashCommandBotBuilder.scala +++ b/src/main/scala/io/laserdisc/slack4s/slashcmd/SlashCommandBotBuilder.scala @@ -4,6 +4,7 @@ import cats.effect._ import cats.implicits._ import com.comcast.ip4s.{IpAddress, IpLiteralSyntax, Port} import eu.timepit.refined.auto._ +import fs2.io.net.Network import io.laserdisc.slack4s.slack.internal.SlackAPIClient import io.laserdisc.slack4s.slashcmd.SlashCommandBotBuilder.Defaults import io.laserdisc.slack4s.slashcmd.internal.SignatureValidator._ @@ -23,11 +24,11 @@ object SlashCommandBotBuilder { val EndpointRoot: EndpointRoot = "/" } - def apply[F[_]: Async](signingSecret: SigningSecret): SlashCommandBotBuilder[F] = + def apply[F[_]: Async: Network](signingSecret: SigningSecret): SlashCommandBotBuilder[F] = new SlashCommandBotBuilder[F](signingSecret = signingSecret) } -class SlashCommandBotBuilder[F[_]: Async] private[slashcmd] ( +class SlashCommandBotBuilder[F[_]: Async: Network] private[slashcmd] ( signingSecret: SigningSecret, bindPort: Port = Defaults.BindPort, bindAddress: IpAddress = Defaults.BindAddress,