From fc00be8707d14351327282790656722f424a5a0c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2020 17:00:02 +0100 Subject: [PATCH] Bump scala-library from 2.13.0 to 2.13.2 (#439) * Bump scala-library from 2.13.0 to 2.13.2 Bumps [scala-library](https://github.com/scala/scala) from 2.13.0 to 2.13.2. - [Release notes](https://github.com/scala/scala/releases) - [Commits](https://github.com/scala/scala/compare/v2.13.0...v2.13.2) Signed-off-by: dependabot-preview[bot] * Update scala syntax from 2.13.0 to 2.13.2 (#443) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Paul Campbell --- parent/pom.xml | 2 +- .../net/kemitix/thorp/storage/aws/CopierTest.scala | 6 +++--- .../net/kemitix/thorp/storage/aws/DeleterTest.scala | 6 +++--- .../net/kemitix/thorp/storage/aws/ListerTest.scala | 10 +++++----- .../net/kemitix/thorp/storage/aws/UploaderTest.scala | 6 +++--- .../scala/net/kemitix/thorp/uishell/ProgressUI.scala | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index 2334663..86532fa 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -19,7 +19,7 @@ 4.4.0 2.17 2.7.0 - 2.13.0 + 2.13.2 diff --git a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/CopierTest.scala b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/CopierTest.scala index 5f6a628..c99b228 100644 --- a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/CopierTest.scala +++ b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/CopierTest.scala @@ -24,7 +24,7 @@ class CopierTest extends FreeSpec { val event = StorageEvent.CopyEvent(sourceKey, targetKey) val expected = Right(event) new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.copyObject _) + (() => fixture.amazonS3Client.copyObject) .when() .returns(_ => Task.succeed(Some(new CopyObjectResult))) private val result = @@ -36,7 +36,7 @@ class CopierTest extends FreeSpec { "when source hash does not match" - { "skip the file with an error" in { new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.copyObject _) + (() => fixture.amazonS3Client.copyObject) .when() .returns(_ => Task.succeed(None)) private val result = @@ -59,7 +59,7 @@ class CopierTest extends FreeSpec { "skip the file with an error" in { new AmazonS3ClientTestFixture { private val expectedMessage = "The specified key does not exist" - (fixture.amazonS3Client.copyObject _) + (() => fixture.amazonS3Client.copyObject) .when() .returns(_ => Task.fail(new AmazonS3Exception(expectedMessage))) private val result = diff --git a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/DeleterTest.scala b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/DeleterTest.scala index 7b3d25c..edb312a 100644 --- a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/DeleterTest.scala +++ b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/DeleterTest.scala @@ -23,7 +23,7 @@ class DeleterTest extends FreeSpec { "when no errors" in { val expected = Right(DeleteEvent(remoteKey)) new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.deleteObject _) + (() => fixture.amazonS3Client.deleteObject) .when() .returns(_ => UIO.succeed(())) private val result = invoke(fixture.amazonS3Client)(bucket, remoteKey) @@ -36,7 +36,7 @@ class DeleterTest extends FreeSpec { Right( ErrorEvent(ActionSummary.Delete(remoteKey.key), remoteKey, exception)) new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.deleteObject _) + (() => fixture.amazonS3Client.deleteObject) .when() .returns(_ => Task.fail(exception)) private val result = invoke(fixture.amazonS3Client)(bucket, remoteKey) @@ -49,7 +49,7 @@ class DeleterTest extends FreeSpec { Right( ErrorEvent(ActionSummary.Delete(remoteKey.key), remoteKey, exception)) new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.deleteObject _) + (() => fixture.amazonS3Client.deleteObject) .when() .returns(_ => Task.fail(exception)) private val result = invoke(fixture.amazonS3Client)(bucket, remoteKey) diff --git a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/ListerTest.scala b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/ListerTest.scala index 58790fd..50bd8bc 100644 --- a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/ListerTest.scala +++ b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/ListerTest.scala @@ -28,7 +28,7 @@ class ListerTest extends FreeSpec { val expectedHashMap = Map(MD5Hash(etag) -> RemoteKey(key)) val expectedKeyMap = Map(RemoteKey(key) -> MD5Hash(etag)) new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.listObjectsV2 _) + (() => fixture.amazonS3Client.listObjectsV2) .when() .returns(_ => { UIO.succeed(objectResults(nowDate, key, etag, truncated = false)) @@ -57,13 +57,13 @@ class ListerTest extends FreeSpec { ) new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.listObjectsV2 _) + (() => fixture.amazonS3Client.listObjectsV2) .when() .returns(_ => UIO(objectResults(nowDate, key1, etag1, truncated = true))) .noMoreThanOnce() - (fixture.amazonS3Client.listObjectsV2 _) + (() => fixture.amazonS3Client.listObjectsV2) .when() .returns(_ => UIO(objectResults(nowDate, key2, etag2, truncated = false))) @@ -97,7 +97,7 @@ class ListerTest extends FreeSpec { "when Amazon Service Exception" in { val exception = new AmazonS3Exception("message") new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.listObjectsV2 _) + (() => fixture.amazonS3Client.listObjectsV2) .when() .returns(_ => Task.fail(exception)) private val result = invoke(fixture.amazonS3Client)(bucket, prefix) @@ -107,7 +107,7 @@ class ListerTest extends FreeSpec { "when Amazon SDK Client Exception" in { val exception = new SdkClientException("message") new AmazonS3ClientTestFixture { - (fixture.amazonS3Client.listObjectsV2 _) + (() => fixture.amazonS3Client.listObjectsV2) .when() .returns(_ => Task.fail(exception)) private val result = invoke(fixture.amazonS3Client)(bucket, prefix) diff --git a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/UploaderTest.scala b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/UploaderTest.scala index 71fe84e..3387397 100644 --- a/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/UploaderTest.scala +++ b/storage-aws/src/test/scala/net/kemitix/thorp/storage/aws/UploaderTest.scala @@ -45,7 +45,7 @@ class UploaderTest extends FreeSpec with MockFactory { Task(uploadResult) } new AmazonS3ClientTestFixture { - (fixture.amazonS3TransferManager.upload _) + (() => fixture.amazonS3TransferManager.upload) .when() .returns(_ => UIO.succeed(inProgress)) private val result = @@ -67,7 +67,7 @@ class UploaderTest extends FreeSpec with MockFactory { Task.fail(exception) } new AmazonS3ClientTestFixture { - (fixture.amazonS3TransferManager.upload _) + (() => fixture.amazonS3TransferManager.upload) .when() .returns(_ => UIO.succeed(inProgress)) private val result = @@ -89,7 +89,7 @@ class UploaderTest extends FreeSpec with MockFactory { Task.fail(exception) } new AmazonS3ClientTestFixture { - (fixture.amazonS3TransferManager.upload _) + (() => fixture.amazonS3TransferManager.upload) .when() .returns(_ => UIO.succeed(inProgress)) private val result = diff --git a/uishell/src/main/scala/net/kemitix/thorp/uishell/ProgressUI.scala b/uishell/src/main/scala/net/kemitix/thorp/uishell/ProgressUI.scala index e8de94c..103fb18 100644 --- a/uishell/src/main/scala/net/kemitix/thorp/uishell/ProgressUI.scala +++ b/uishell/src/main/scala/net/kemitix/thorp/uishell/ProgressUI.scala @@ -55,8 +55,8 @@ object ProgressUI { s"${GREEN}Uploading:$RESET ${remoteKey.key}$eraseLineForward" val line2body = s"($percent%) $transferred of $fileLength " val bar = - progressBar(state.transferred, - state.fileLength, + progressBar(state.transferred.toDouble, + state.fileLength.toDouble, Terminal.width - line2body.length) val line2 = s"$GREEN$line2body$RESET$bar$eraseLineForward" Console.putStrLn(line1) *>