Skip to content

Commit 2765de3

Browse files
authored
Merge pull request #484 from zarthross/Update-Scala
Update Scala versions
2 parents dea0acb + 91ba5d6 commit 2765de3

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

Diff for: .github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
java: [1.8, 1.11, 1.14]
15-
scala: [2.12.11, 2.13.2]
15+
scala: [2.12.12, 2.13.4]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up JDK ${{ matrix.java }}

Diff for: .github/workflows/mima.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
java: [1.14]
15-
scala: [2.12.11, 2.13.2]
15+
scala: [2.12.12, 2.13.4]
1616
steps:
1717
- uses: actions/checkout@v2
1818
with:

Diff for: .github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
java: [1.14]
17-
scala: [2.12.11, 2.13.2]
17+
scala: [2.12.12, 2.13.4]
1818
steps:
1919
- uses: actions/checkout@v2
2020
with:

Diff for: core/src/main/scala/org/http4s/rho/bits/QueryParser.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ trait QueryParsers[F[_]] extends FailureResponseOps[F] {
6666
}
6767
}
6868

69-
/** Extract an element from the `Query` using a [[StringParser]] */
69+
/** Extract an element from the `Query` using a [[org.http4s.rho.bits.StringParser]] */
7070
implicit def standardCollector[A](implicit F: Monad[F], p: StringParser[F, A]) = new QueryParser[F, A] {
7171
override def collect(name: String, params: Params, default: Option[A]): ResultResponse[F, A] = {
7272
params.get(name) match {
73-
case Some(Seq(value, _*)) => p.parse(value)
73+
case Some(values) if values.nonEmpty => p.parse(values.head)
7474

75-
case Some(Seq()) => default match {
75+
case Some(_) => default match {
7676
case Some(defaultValue) => SuccessResponse(defaultValue)
7777
case None => badRequest(s"Value of query parameter '$name' missing")
7878
}

Diff for: core/src/main/scala/org/http4s/rho/package.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ trait RhoDsl[F[_]]
3232
* val hello = Root / "hello"
3333
* }}}
3434
*/
35-
def root(): TypedPath[F, HNil] = TypedPath(PathEmpty)
35+
def root: TypedPath[F, HNil] = TypedPath(PathEmpty)
3636

3737
def * : CaptureTail.type = CaptureTail
3838
}

Diff for: core/src/test/scala/org/http4s/rho/CodecRouterSpec.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import scala.collection.compat.immutable.ArraySeq
1010
class CodecRouterSpec extends Specification {
1111

1212
def bodyAndStatus(resp: Response[IO]): (String, Status) = {
13-
val rbody = new String(resp.body.compile.toVector.unsafeRunSync.foldLeft(Array[Byte]())(_ :+ _))
13+
val rbody = new String(resp.body.compile.toVector.unsafeRunSync().foldLeft(Array[Byte]())(_ :+ _))
1414
(rbody, resp.status)
1515
}
1616

Diff for: core/src/test/scala/org/http4s/rho/RequestRunner.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ trait RequestRunner {
2424

2525
object RequestRunner {
2626
def getBody(b: EntityBody[IO]): String = {
27-
new String(b.compile.toVector.unsafeRunSync.foldLeft(Array[Byte]())(_ :+ _))
27+
new String(b.compile.toVector.unsafeRunSync().foldLeft(Array[Byte]())(_ :+ _))
2828
}
2929
}
3030

Diff for: hal/src/test/scala/org/http4s/rho/hal/HalDocBuilderSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,18 @@ object ResourceObjectBuilderSpec extends Specification {
9696
.link("ea:customer", LinkObject("/customers/7809"))
9797
.content(Map("total" -> 30.00,
9898
"currency" -> "USD",
99-
"status" -> "shipped")).build,
99+
"status" -> "shipped")).build(),
100100
new ResourceObjectBuilder[Map[String, Any], Nothing]()
101101
.link("self", LinkObject("/orders/124"))
102102
.link("ea:basket", LinkObject("/baskets/97213"))
103103
.link("ea:customer", LinkObject("/customers/12369"))
104104
.content(Map("total" -> 20.00,
105105
"currency" -> "USD",
106-
"status" -> "processing")).build)
106+
"status" -> "processing")).build())
107107
.content(Map(
108108
"currentlyProcessing" -> 14,
109109
"shippedToday" -> 20))
110-
.build
110+
.build()
111111

112112
"build a ResourceObject" in {
113113
documentBuilder must be equalTo document

Diff for: project/Dependencies.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ object Dependencies {
55
lazy val http4sVersion = "0.21.14"
66
lazy val specs2Version = "4.10.5"
77

8-
val scala_213 = "2.13.2"
9-
val scala_212 = "2.12.11"
8+
val scala_213 = "2.13.4"
9+
val scala_212 = "2.12.12"
1010

1111
lazy val http4sServer = "org.http4s" %% "http4s-server" % http4sVersion
1212
lazy val http4sDSL = "org.http4s" %% "http4s-dsl" % http4sVersion

0 commit comments

Comments
 (0)