Skip to content

Commit

Permalink
Merge pull request #137 from mdsol/tech/nojira/UpdateScalaCats
Browse files Browse the repository at this point in the history
tech/nojira/update cats lib
  • Loading branch information
pbist-mdsol authored Sep 28, 2021
2 parents 89ab20c + bf3491a commit 32928e5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
Upgraded scala cats lib, and fixed resulting breakages. Also updated sbt plugins.

## [7.0.0] - 2021-08-19
### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package com.mdsol.mauth

import cats.effect.IO
import sttp.client3.{Request, Response, SttpBackend}
import cats.effect.{ContextShift, IO}

import scala.concurrent.Future

class SttpAkkaMAuthRequestSender(
signer: MAuthSttpSigner,
sttpBackend: SttpBackend[Future, Any],
contextShift: ContextShift[IO]
sttpBackend: SttpBackend[Future, Any]
) extends SttpMAuthRequestSender[IO] {
override def send[T](request: Request[T, Any]): IO[Response[T]] =
IO.fromFuture(
IO(
sttpBackend.send(signer.signSttpRequest(request))
)
)(contextShift)
)
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
package com.mdsol.mauth

import java.net.URI
import java.security.Security
import java.util.UUID
import akka.actor.ActorSystem
import cats.effect.IO
import com.github.tomakehurst.wiremock.WireMockServer
import com.github.tomakehurst.wiremock.client.WireMock._
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll}
import org.scalatest.wordspec.AsyncWordSpec
import com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig
import com.mdsol.mauth.util.EpochTimeProvider
import sttp.client3.{basicRequest, SttpBackend}
import sttp.model.{MediaType, Uri}
import sttp.client3.akkahttp.AkkaHttpBackend

import scala.jdk.CollectionConverters._
import org.scalatest.Inside._
import org.scalatest.matchers.should.Matchers._
import com.github.tomakehurst.wiremock.verification.LoggedRequest
import com.mdsol.mauth.test.utils.TestFixtures
import com.mdsol.mauth.test.utils.TestFixtures._
import com.mdsol.mauth.util.EpochTimeProvider
import com.mdsol.mauth.util.MAuthKeysHelper.getPrivateKeyFromString
import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.scalatest.Inside._
import org.scalatest.matchers.should.Matchers._
import org.scalatest.wordspec.AsyncWordSpec
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll}
import sttp.capabilities.WebSockets
import sttp.capabilities.akka.AkkaStreams
import sttp.client3.akkahttp.AkkaHttpBackend
import sttp.client3.{basicRequest, SttpBackend}
import sttp.model.{MediaType, Uri}

import scala.concurrent.{ExecutionContext, Future}
import java.net.URI
import java.security.Security
import java.util.UUID
import scala.concurrent.Future
import scala.jdk.CollectionConverters._
import cats.effect.unsafe.implicits.global

class SttpAkkaMAuthRequestSenderSpec extends AsyncWordSpec with BeforeAndAfter with BeforeAndAfterAll {

Expand Down Expand Up @@ -84,7 +83,7 @@ class SttpAkkaMAuthRequestSenderSpec extends AsyncWordSpec with BeforeAndAfter w
)
}

lazy val requestSender = new SttpAkkaMAuthRequestSender(v1v2Signer, sttpBackend, IO.contextShift(ExecutionContext.global))
lazy val requestSender = new SttpAkkaMAuthRequestSender(v1v2Signer, sttpBackend)

before {
wiremockServer.stubFor(
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object Dependencies extends DependencyUtils {
val typeSafeConfig: ModuleID = "com.typesafe" % "config" % "1.4.1"
val scalaCache: ModuleID = "com.github.cb372" %% "scalacache-guava" % "0.28.0"
val scalaLogging: ModuleID = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.3"
val catsEffect: ModuleID = "org.typelevel" %% "cats-effect" % "2.4.1"
val catsEffect: ModuleID = "org.typelevel" %% "cats-effect" % "3.2.9"
val sttp: ModuleID = "com.softwaremill.sttp.client3" %% "core" % Version.sttp
val sttpAkkaHttpBackend: ModuleID = "com.softwaremill.sttp.client3" %% "akka-http-backend" % Version.sttp
val scalaLibCompat: ModuleID = "org.scala-lang.modules" %% "scala-collection-compat" % "2.4.3"
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("com.mdsol" % "sbt-smartrelease" % "0.3.3")
addSbtPlugin("com.mdsol" % "sbt-smartrelease" % "0.3.4")
addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.15.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
Expand Down

0 comments on commit 32928e5

Please sign in to comment.