From e0b726ea739b6d5448766fb01d14046fce21be08 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 12 Aug 2022 18:03:25 +0100 Subject: [PATCH 1/4] sbt 1.7.1 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 7a7e80d6..d738b858 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.5.5 +sbt.version = 1.7.1 From a6bbbac9536871eb8f42b20fa8ecf0bee7d20532 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 12 Aug 2022 18:04:03 +0100 Subject: [PATCH 2/4] Upgrade plugins: tpolcat, scalafix, scalafmt --- project/plugins.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index b17fff8e..65c8734d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -20,7 +20,7 @@ addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.30") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") From 9cfb19a8a7c25f51f3cdbecc2e5c436e8be1d761 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 12 Aug 2022 18:04:18 +0100 Subject: [PATCH 3/4] Upgrade to the latest Scala versions --- build.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index d18171f8..9548fbe5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ -lazy val scalaVersion212: String = "2.12.14" -lazy val scalaVersion213: String = "2.13.6" -lazy val scalaVersion3: String = "3.0.1" +lazy val scalaVersion212: String = "2.12.16" +lazy val scalaVersion213: String = "2.13.8" +lazy val scalaVersion3: String = "3.1.3" lazy val supportedScalaVersions = List(scalaVersion212, scalaVersion213) ThisBuild / scalaVersion := scalaVersion212 From 791bb59394c944ab4c85323ee97b51d39c105bbe Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 12 Aug 2022 18:12:28 +0100 Subject: [PATCH 4/4] Examples upgraded --- example/consumer/.scalafmt.conf | 3 +- example/consumer/build.sbt | 2 +- example/consumer/project/build.properties | 2 +- example/deliver.sh | 2 +- example/provider/.scalafmt.conf | 3 +- example/provider/build.sbt | 2 +- ...ala-pact-consumer_scala-pact-provider.json | 46 +++++++++---------- example/provider/project/build.properties | 2 +- .../.scalafmt.conf | 3 +- .../provider_pact-for-verification/build.sbt | 2 +- .../project/build.properties | 2 +- example/provider_tests/.scalafmt.conf | 3 +- example/provider_tests/build.sbt | 2 +- ...ala-pact-consumer_scala-pact-provider.json | 46 +++++++++---------- .../provider_tests/project/build.properties | 2 +- 15 files changed, 63 insertions(+), 59 deletions(-) diff --git a/example/consumer/.scalafmt.conf b/example/consumer/.scalafmt.conf index 8bc236e0..ba167173 100644 --- a/example/consumer/.scalafmt.conf +++ b/example/consumer/.scalafmt.conf @@ -1,4 +1,5 @@ +version = 2.7.5 style = defaultWithAlign maxColumn = 120 rewrite.rules = [RedundantBraces,RedundantParens,PreferCurlyFors] -danglingParentheses = true \ No newline at end of file +danglingParentheses = true diff --git a/example/consumer/build.sbt b/example/consumer/build.sbt index ec69c911..e18b083d 100644 --- a/example/consumer/build.sbt +++ b/example/consumer/build.sbt @@ -6,7 +6,7 @@ name := "consumer" organization := "com.example" -scalaVersion := "2.13.6" +scalaVersion := "2.13.8" enablePlugins(ScalaPactPlugin) diff --git a/example/consumer/project/build.properties b/example/consumer/project/build.properties index 7a7e80d6..d738b858 100644 --- a/example/consumer/project/build.properties +++ b/example/consumer/project/build.properties @@ -1 +1 @@ -sbt.version = 1.5.5 +sbt.version = 1.7.1 diff --git a/example/deliver.sh b/example/deliver.sh index f2a2971e..f887d518 100644 --- a/example/deliver.sh +++ b/example/deliver.sh @@ -8,7 +8,7 @@ PACT_FILE="consumer/target/pacts/$PACT_NAME" if [ ! -f $PACT_FILE ] then echo "Expected pact file did not exist: $PACT_FILE" - echo "Have you run 'sbt pact-test' in the consumer project?" + echo "Have you run 'sbt pactTest' in the consumer project?" exit 1 fi diff --git a/example/provider/.scalafmt.conf b/example/provider/.scalafmt.conf index 8bc236e0..ba167173 100644 --- a/example/provider/.scalafmt.conf +++ b/example/provider/.scalafmt.conf @@ -1,4 +1,5 @@ +version = 2.7.5 style = defaultWithAlign maxColumn = 120 rewrite.rules = [RedundantBraces,RedundantParens,PreferCurlyFors] -danglingParentheses = true \ No newline at end of file +danglingParentheses = true diff --git a/example/provider/build.sbt b/example/provider/build.sbt index 091c0758..fca47cfc 100644 --- a/example/provider/build.sbt +++ b/example/provider/build.sbt @@ -4,7 +4,7 @@ name := "provider" version := "0.0.1" -scalaVersion := "2.13.6" +scalaVersion := "2.13.8" libraryDependencies ++= Seq( "org.http4s" %% "http4s-blaze-server" % "0.23.4", diff --git a/example/provider/delivered_pacts/scala-pact-consumer_scala-pact-provider.json b/example/provider/delivered_pacts/scala-pact-consumer_scala-pact-provider.json index c3db4a4f..167d1a46 100644 --- a/example/provider/delivered_pacts/scala-pact-consumer_scala-pact-provider.json +++ b/example/provider/delivered_pacts/scala-pact-consumer_scala-pact-provider.json @@ -6,6 +6,28 @@ "name" : "scala-pact-consumer" }, "interactions" : [ + { + "providerState" : "Results: Bob, Fred, Harry", + "description" : "Fetching results", + "request" : { + "method" : "GET", + "path" : "/results" + }, + "response" : { + "status" : 200, + "headers" : { + "Pact" : "modifiedRequest" + }, + "body" : { + "count" : 3, + "results" : [ + "Bob", + "Fred", + "Harry" + ] + } + } + }, { "description" : "Fetching least secure auth token ever", "request" : { @@ -91,28 +113,6 @@ } } } - }, - { - "providerState" : "Results: Bob, Fred, Harry", - "description" : "Fetching results", - "request" : { - "method" : "GET", - "path" : "/results" - }, - "response" : { - "status" : 200, - "headers" : { - "Pact" : "modifiedRequest" - }, - "body" : { - "count" : 3, - "results" : [ - "Bob", - "Fred", - "Harry" - ] - } - } } ], "metadata" : { @@ -120,7 +120,7 @@ "version" : "2.0.0" }, "scala-pact" : { - "version" : "4.2.0" + "version" : "4.4.1-SNAPSHOT" } } } \ No newline at end of file diff --git a/example/provider/project/build.properties b/example/provider/project/build.properties index 7a7e80d6..d738b858 100644 --- a/example/provider/project/build.properties +++ b/example/provider/project/build.properties @@ -1 +1 @@ -sbt.version = 1.5.5 +sbt.version = 1.7.1 diff --git a/example/provider_pact-for-verification/.scalafmt.conf b/example/provider_pact-for-verification/.scalafmt.conf index 8bc236e0..ba167173 100644 --- a/example/provider_pact-for-verification/.scalafmt.conf +++ b/example/provider_pact-for-verification/.scalafmt.conf @@ -1,4 +1,5 @@ +version = 2.7.5 style = defaultWithAlign maxColumn = 120 rewrite.rules = [RedundantBraces,RedundantParens,PreferCurlyFors] -danglingParentheses = true \ No newline at end of file +danglingParentheses = true diff --git a/example/provider_pact-for-verification/build.sbt b/example/provider_pact-for-verification/build.sbt index 9bb23c2e..1104d24a 100644 --- a/example/provider_pact-for-verification/build.sbt +++ b/example/provider_pact-for-verification/build.sbt @@ -4,7 +4,7 @@ organization := "com.example" name := "provider_pacts-for-verification" -scalaVersion := "2.13.6" +scalaVersion := "2.13.8" enablePlugins(ScalaPactPlugin) diff --git a/example/provider_pact-for-verification/project/build.properties b/example/provider_pact-for-verification/project/build.properties index 7a7e80d6..d738b858 100644 --- a/example/provider_pact-for-verification/project/build.properties +++ b/example/provider_pact-for-verification/project/build.properties @@ -1 +1 @@ -sbt.version = 1.5.5 +sbt.version = 1.7.1 diff --git a/example/provider_tests/.scalafmt.conf b/example/provider_tests/.scalafmt.conf index 8bc236e0..ba167173 100644 --- a/example/provider_tests/.scalafmt.conf +++ b/example/provider_tests/.scalafmt.conf @@ -1,4 +1,5 @@ +version = 2.7.5 style = defaultWithAlign maxColumn = 120 rewrite.rules = [RedundantBraces,RedundantParens,PreferCurlyFors] -danglingParentheses = true \ No newline at end of file +danglingParentheses = true diff --git a/example/provider_tests/build.sbt b/example/provider_tests/build.sbt index e4884625..56021f3d 100644 --- a/example/provider_tests/build.sbt +++ b/example/provider_tests/build.sbt @@ -4,7 +4,7 @@ organization := "com.example" name := "provider_tests" -scalaVersion := "2.13.6" +scalaVersion := "2.13.8" lazy val pactVersionFile: SettingKey[File] = settingKey[File]("location of scala-pact version for examples") pactVersionFile := baseDirectory.value.getParentFile.getParentFile / "version.sbt" diff --git a/example/provider_tests/delivered_pacts/scala-pact-consumer_scala-pact-provider.json b/example/provider_tests/delivered_pacts/scala-pact-consumer_scala-pact-provider.json index c3db4a4f..167d1a46 100644 --- a/example/provider_tests/delivered_pacts/scala-pact-consumer_scala-pact-provider.json +++ b/example/provider_tests/delivered_pacts/scala-pact-consumer_scala-pact-provider.json @@ -6,6 +6,28 @@ "name" : "scala-pact-consumer" }, "interactions" : [ + { + "providerState" : "Results: Bob, Fred, Harry", + "description" : "Fetching results", + "request" : { + "method" : "GET", + "path" : "/results" + }, + "response" : { + "status" : 200, + "headers" : { + "Pact" : "modifiedRequest" + }, + "body" : { + "count" : 3, + "results" : [ + "Bob", + "Fred", + "Harry" + ] + } + } + }, { "description" : "Fetching least secure auth token ever", "request" : { @@ -91,28 +113,6 @@ } } } - }, - { - "providerState" : "Results: Bob, Fred, Harry", - "description" : "Fetching results", - "request" : { - "method" : "GET", - "path" : "/results" - }, - "response" : { - "status" : 200, - "headers" : { - "Pact" : "modifiedRequest" - }, - "body" : { - "count" : 3, - "results" : [ - "Bob", - "Fred", - "Harry" - ] - } - } } ], "metadata" : { @@ -120,7 +120,7 @@ "version" : "2.0.0" }, "scala-pact" : { - "version" : "4.2.0" + "version" : "4.4.1-SNAPSHOT" } } } \ No newline at end of file diff --git a/example/provider_tests/project/build.properties b/example/provider_tests/project/build.properties index 218101f1..d738b858 100644 --- a/example/provider_tests/project/build.properties +++ b/example/provider_tests/project/build.properties @@ -1 +1 @@ -sbt.version = 1.3.2 +sbt.version = 1.7.1