Skip to content

Commit

Permalink
Merge pull request #22 from guardian/add-play-2.9-support
Browse files Browse the repository at this point in the history
Add support for play 2.9.x
  • Loading branch information
mchv authored Nov 8, 2023
2 parents 2576ca4 + b23707c commit b44b0c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ licenses := Seq("Apache v2" -> url("http://www.apache.org/licenses/LICENSE-2.0.h

scalaVersion := "2.13.12"

crossScalaVersions := Seq("2.13.12", "2.12.18")
crossScalaVersions := Seq("2.13.12", "3.3.1")

scalacOptions ++= Seq("-feature", "-deprecation")

Expand Down Expand Up @@ -54,21 +54,20 @@ releaseProcess := Seq(
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
releaseStepCommand("sonatypeReleaseAll")
)

resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

val Brotli4jVersion = "1.12.0"

val PlayVersion = "2.8.20"
val PlayVersion = "2.9.0"
val AkkaVersion = "2.6.21"

libraryDependencies ++= Seq(
"com.aayushatharva.brotli4j" % "brotli4j" % Brotli4jVersion,
"com.typesafe.play" %% "play" % PlayVersion % Provided,
"com.typesafe.play" %% "filters-helpers" % PlayVersion % Test,
"com.typesafe.play" %% "filters-helpers" % "2.9.0-M6" % Test,
"com.typesafe.play" %% "play-specs2" % PlayVersion % Test,
"com.typesafe.akka" %% "akka-stream" % AkkaVersion % Provided,
"com.typesafe.akka" %% "akka-stream-testkit" % AkkaVersion % Test,
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.6
sbt.version=1.9.7
4 changes: 2 additions & 2 deletions src/test/scala/play.filters.brotli/BrotliFilterSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ object BrotliFilterSpec extends PlaySpecification with DataTables {
"preserve original Vary header values" in withApplication(Ok("hello").withHeaders(VARY -> "original")) { implicit app =>
val result = makeBrotliRequest(app)
checkCompressed(result)
header(VARY, result) must beSome.which(header => header contains "original,")
header(VARY, result) must beSome[String].which(header => header.contains("original,"))
}

"preserve original Vary header values and not duplicate case-insensitive ACCEPT-ENCODING" in withApplication(Ok("hello").withHeaders(VARY -> "original,ACCEPT-encoding")) { implicit app =>
val result = makeBrotliRequest(app)
checkCompressed(result)
header(VARY, result) must beSome.which(header => header.split(",").filter(_.toLowerCase(java.util.Locale.ENGLISH) == ACCEPT_ENCODING.toLowerCase(java.util.Locale.ENGLISH)).size == 1)
header(VARY, result) must beSome[String].which(header => header.split(",").filter(_.toLowerCase(java.util.Locale.ENGLISH) == ACCEPT_ENCODING.toLowerCase(java.util.Locale.ENGLISH)).size == 1)
}
}

Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "0.12-SNAPSHOT"
ThisBuild / version := "0.12"

0 comments on commit b44b0c8

Please sign in to comment.