Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 0778c06

Browse files
author
elinger
committed
remove scala 2.11 support, update libs
1 parent 068a585 commit 0778c06

File tree

7 files changed

+31
-28
lines changed

7 files changed

+31
-28
lines changed

build.sbt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ organization := "io.findify"
66

77
scalaVersion in ThisBuild := "2.13.2"
88

9-
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.10","2.13.2")
9+
crossScalaVersions in ThisBuild := Seq("2.12.13","2.13.2")
1010

11-
val akkaVersion = "2.5.31"
11+
val akkaVersion = "2.6.17"
1212

1313
licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))
1414

1515
homepage := Some(url("https://github.com/findify/s3mock"))
1616

1717
libraryDependencies ++= Seq(
1818
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
19-
"com.typesafe.akka" %% "akka-http" % "10.1.12",
19+
"com.typesafe.akka" %% "akka-http" % "10.1.11",
2020
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % "test",
21-
"org.scala-lang.modules" %% "scala-xml" % "1.3.0",
22-
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.6",
21+
"org.scala-lang.modules" %% "scala-xml" % "2.0.1",
22+
"org.scala-lang.modules" %% "scala-collection-compat" % "2.5.0",
2323
"com.github.pathikrit" %% "better-files" % "3.9.1",
24-
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
25-
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.294",
26-
"org.scalatest" %% "scalatest" % "3.0.8" % "test",
27-
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test",
24+
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
25+
"com.amazonaws" % "aws-java-sdk-s3" % "1.12.90",
26+
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
27+
"ch.qos.logback" % "logback-classic" % "1.2.6" % "test",
2828
"org.iq80.leveldb" % "leveldb" % "0.12",
29-
"com.lightbend.akka" %% "akka-stream-alpakka-s3" % "1.1.2" % "test",
30-
"javax.xml.bind" % "jaxb-api" % "2.3.0",
31-
"com.sun.xml.bind" % "jaxb-core" % "2.3.0",
32-
"com.sun.xml.bind" % "jaxb-impl" % "2.3.0"
29+
"com.lightbend.akka" %% "akka-stream-alpakka-s3" % "3.0.3" % "test",
30+
"javax.xml.bind" % "jaxb-api" % "2.3.1",
31+
"com.sun.xml.bind" % "jaxb-core" % "3.0.1",
32+
"com.sun.xml.bind" % "jaxb-impl" % "3.0.1"
3333
)
3434

3535
libraryDependencies ++= {

src/test/scala/io/findify/s3mock/ChunkBufferTest.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package io.findify.s3mock
22

33
import akka.util.ByteString
4-
import org.scalatest.{FlatSpec, Matchers}
4+
import org.scalatest.flatspec.AnyFlatSpec
5+
import org.scalatest.matchers.should.Matchers
56

67
/**
78
* Created by shutty on 8/11/16.
89
*/
9-
class ChunkBufferTest extends FlatSpec with Matchers {
10+
class ChunkBufferTest extends AnyFlatSpec with Matchers {
1011
"chunk buffer" should "detect header" in {
1112
val cb = new ChunkBuffer()
1213
cb.addChunk(ByteString("3;chunk-signature=1234567890123456789012345678901234567890123456789012345678901234\r\nfoo\r\n"))

src/test/scala/io/findify/s3mock/GetPutObjectTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ class GetPutObjectTest extends S3MockTest {
111111

112112
it should "work with = in path" in {
113113
s3.createBucket("urlencoded")
114-
s3.listBuckets().exists(_.getName == "urlencoded") shouldBe true
114+
s3.listBuckets().asScala.exists(_.getName == "urlencoded") shouldBe true
115115
s3.putObject("urlencoded", "path/with=123/foo", "bar=")
116116
s3.putObject("urlencoded", "path/withoutequals/foo", "bar")
117-
val result = s3.listObjects("urlencoded").getObjectSummaries.toList.map(_.getKey)
117+
val result = s3.listObjects("urlencoded").getObjectSummaries.asScala.toList.map(_.getKey)
118118
result shouldBe List("path/with=123/foo", "path/withoutequals/foo")
119119
getContent(s3.getObject("urlencoded", "path/with=123/foo")) shouldBe "bar="
120120
getContent(s3.getObject("urlencoded", "path/withoutequals/foo")) shouldBe "bar"

src/test/scala/io/findify/s3mock/MapMetadataStoreTest.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import java.util
44

55
import com.amazonaws.services.s3.model.ObjectMetadata
66
import io.findify.s3mock.provider.metadata.{InMemoryMetadataStore, MapMetadataStore, MetadataStore}
7-
import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers}
7+
import org.scalatest.BeforeAndAfterAll
8+
import org.scalatest.flatspec.AnyFlatSpec
9+
import org.scalatest.matchers.should.Matchers
810
/**
911
* Created by shutty on 3/13/17.
1012
*/
11-
class MapMetadataStoreTest extends FlatSpec with Matchers with BeforeAndAfterAll {
13+
class MapMetadataStoreTest extends AnyFlatSpec with Matchers with BeforeAndAfterAll {
1214

1315
for (metadataStore <- List((new MapMetadataStore("/tmp/s3"), "MapMetadataStore"),
1416
(new InMemoryMetadataStore, "InMemoryMetadataStore"))) {

src/test/scala/io/findify/s3mock/S3ChunkedProtocolTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
package io.findify.s3mock
22

33
import akka.actor.ActorSystem
4-
import akka.stream.ActorMaterializer
54
import akka.stream.scaladsl.{Sink, Source}
65
import akka.util.ByteString
7-
import org.scalatest.{FlatSpec, Matchers}
86
import scala.concurrent.duration._
97
import scala.concurrent.Await
108

9+
import org.scalatest.flatspec.AnyFlatSpec
10+
import org.scalatest.matchers.should.Matchers
11+
1112
/**
1213
* Created by shutty on 8/11/16.
1314
*/
14-
class S3ChunkedProtocolTest extends FlatSpec with Matchers {
15+
class S3ChunkedProtocolTest extends AnyFlatSpec with Matchers {
1516
implicit val system = ActorSystem.create("test")
16-
implicit val mat = ActorMaterializer()
1717

1818
"s3 chunk protocol" should "work with simple ins" in {
1919
val in = "3;chunk-signature=1234567890123456789012345678901234567890123456789012345678901234\r\nfoo\r\n3;chunk-signature=1234567890123456789012345678901234567890123456789012345678901234\r\nbar\r\n".grouped(10).map(ByteString(_)).toList

src/test/scala/io/findify/s3mock/S3MockTest.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.findify.s3mock
22

33
import akka.actor.ActorSystem
4-
import akka.stream.alpakka.s3.S3Settings
54
import akka.stream.alpakka.s3.scaladsl.S3
65
import akka.stream.{ActorMaterializer, Materializer}
76
import better.files.File
@@ -12,18 +11,20 @@ import com.amazonaws.services.s3.model.S3Object
1211
import com.amazonaws.services.s3.transfer.{TransferManager, TransferManagerBuilder}
1312
import com.typesafe.config.{Config, ConfigFactory}
1413
import io.findify.s3mock.provider.{FileProvider, InMemoryProvider}
15-
1614
import scala.collection.JavaConverters._
17-
import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers}
1815

16+
import org.scalatest.BeforeAndAfterAll
1917
import scala.concurrent.Await
2018
import scala.concurrent.duration.Duration
2119
import scala.io.Source
2220

21+
import org.scalatest.flatspec.AnyFlatSpec
22+
import org.scalatest.matchers.should.Matchers
23+
2324
/**
2425
* Created by shutty on 8/9/16.
2526
*/
26-
trait S3MockTest extends FlatSpec with Matchers with BeforeAndAfterAll {
27+
trait S3MockTest extends AnyFlatSpec with Matchers with BeforeAndAfterAll {
2728
private val workDir = File.newTemporaryDirectory().pathAsString
2829
private val fileBasedPort = 8001
2930
private val fileSystemConfig = configFor("localhost", fileBasedPort)

src/test/scala/io/findify/s3mock/alpakka/ListBucketTest.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.findify.s3mock.alpakka
22

33
import akka.stream.scaladsl.Sink
4-
import akka.util.ByteString
54
import io.findify.s3mock.S3MockTest
65
import scala.concurrent.duration._
76
import scala.concurrent.Await

0 commit comments

Comments
 (0)