Skip to content

Commit 70e8c48

Browse files
Merge pull request #72 from dotty-staging/dotty-community-build
Bump Scala 3 to M2
2 parents 8bd4986 + b88ad8b commit 70e8c48

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

build.sc

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import scalalib._
44

55
val dottyVersion = Option(sys.props("dottyVersion"))
66

7-
object requests extends Cross[RequestsModule]((List("2.12.6", "2.13.0", "0.27.0-RC1") ++ dottyVersion): _*)
7+
object requests extends Cross[RequestsModule]((List("2.12.6", "2.13.0", "3.0.0-M2") ++ dottyVersion): _*)
88
class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule with PublishModule {
99
def publishVersion = "0.6.5"
1010
def artifactName = "requests"
@@ -23,8 +23,8 @@ class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule wit
2323
)
2424
object test extends Tests{
2525
def ivyDeps = Agg(
26-
ivy"com.lihaoyi::utest::0.7.4",
27-
ivy"com.lihaoyi::ujson::1.2.0"
26+
ivy"com.lihaoyi::utest::0.7.5",
27+
ivy"com.lihaoyi::ujson::1.2.2"
2828
)
2929
def testFrameworks = Seq("utest.runner.Framework")
3030
}

mill

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This is a wrapper script, that automatically download mill from GitHub release pages
44
# You can give the required mill version with MILL_VERSION env variable
55
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
6-
DEFAULT_MILL_VERSION=0.8.0
6+
DEFAULT_MILL_VERSION=0.8.0-13-105f53
77

88
set -e
99

requests/test/src/requests/RequestTests.scala

+7-7
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ object RequestTests extends TestSuite{
6161
for(chunkedUpload <- Seq(true, false)) {
6262
val res1 = requests.post(
6363
"https://httpbin.org/post",
64-
data = Map("hello" -> "world", "foo" -> "baz"),
64+
data = new RequestBlob.FormEncodedRequestBlob(Map("hello" -> "world", "foo" -> "baz")),
6565
chunkedUpload = chunkedUpload
6666
).text()
6767
assert(read(res1).obj("form") == Obj("foo" -> "baz", "hello" -> "world"))
@@ -71,7 +71,7 @@ object RequestTests extends TestSuite{
7171
for (chunkedUpload <- Seq(true, false)) {
7272
val res1 = requests.put(
7373
"https://httpbin.org/put",
74-
data = Map("hello" -> "world", "foo" -> "baz"),
74+
data = new RequestBlob.FormEncodedRequestBlob(Map("hello" -> "world", "foo" -> "baz")),
7575
chunkedUpload = chunkedUpload
7676
).text()
7777
assert(read(res1).obj("form") == Obj("foo" -> "baz", "hello" -> "world"))
@@ -189,21 +189,21 @@ object RequestTests extends TestSuite{
189189
val res1 = requests.post(
190190
"https://httpbin.org/post",
191191
compress = requests.Compress.None,
192-
data = "Hello World"
192+
data = new RequestBlob.ByteSourceRequestBlob("Hello World")
193193
)
194194
assert(res1.text().contains(""""Hello World""""))
195195

196196
val res2 = requests.post(
197197
"https://httpbin.org/post",
198198
compress = requests.Compress.Gzip,
199-
data = "I am cow"
199+
data = new RequestBlob.ByteSourceRequestBlob("I am cow")
200200
)
201201
assert(res2.text().contains("data:application/octet-stream;base64,H4sIAAAAAAAAAA=="))
202202

203203
val res3 = requests.post(
204204
"https://httpbin.org/post",
205205
compress = requests.Compress.Deflate,
206-
data = "Hear me moo"
206+
data = new RequestBlob.ByteSourceRequestBlob("Hear me moo")
207207
)
208208
assert(res3.text().contains("data:application/octet-stream;base64,eJw="))
209209
res3.text()
@@ -229,7 +229,7 @@ object RequestTests extends TestSuite{
229229
test("passwordProtected"){
230230
val res = requests.get(
231231
url,
232-
cert = (s"$base/badssl.com-client.p12", "badssl.com"),
232+
cert = Cert.implicitP12(s"$base/badssl.com-client.p12", "badssl.com"),
233233
check = false
234234
)
235235
if (res.statusCode == 400)
@@ -240,7 +240,7 @@ object RequestTests extends TestSuite{
240240
test("noPassword"){
241241
val res = requests.get(
242242
"https://client.badssl.com",
243-
cert = s"$base/badssl.com-client-nopass.p12",
243+
cert = Cert.implicitP12(s"$base/badssl.com-client-nopass.p12"),
244244
check = false
245245
)
246246
if (res.statusCode == 400)

0 commit comments

Comments
 (0)