summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-08-18 10:16:27 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-08-18 10:16:27 +0800
commit4b0cfdf0eeca46cfccbf9fe42af42f383932c427 (patch)
treeeafc563d53cc6d840d88a9848a88fa67f03cbb9e /example
parentf8bb6f693b8450f8e049396fd0e7d032ac7acb23 (diff)
downloadcask-4b0cfdf0eeca46cfccbf9fe42af42f383932c427.tar.gz
cask-4b0cfdf0eeca46cfccbf9fe42af42f383932c427.tar.bz2
cask-4b0cfdf0eeca46cfccbf9fe42af42f383932c427.zip
0.1.10.1.1
Diffstat (limited to 'example')
-rw-r--r--example/compress/build.sc2
-rw-r--r--example/compress2/build.sc2
-rw-r--r--example/compress3/build.sc2
-rw-r--r--example/cookies/build.sc2
-rw-r--r--example/decorated/app/src/Decorated.scala4
-rw-r--r--example/decorated/build.sc2
-rw-r--r--example/decorated2/app/src/Decorated2.scala4
-rw-r--r--example/decorated2/build.sc2
-rw-r--r--example/endpoints/app/src/Endpoints.scala2
-rw-r--r--example/endpoints/build.sc2
-rw-r--r--example/formJsonPost/build.sc2
-rw-r--r--example/httpMethods/build.sc2
-rw-r--r--example/minimalApplication/build.sc2
-rw-r--r--example/minimalApplication2/build.sc2
-rw-r--r--example/redirectAbort/build.sc2
-rw-r--r--example/scalatags/build.sc2
-rw-r--r--example/staticFiles/build.sc2
-rw-r--r--example/todo/app/src/TodoServer.scala2
-rw-r--r--example/todo/build.sc2
-rw-r--r--example/todoApi/build.sc2
-rw-r--r--example/todoDb/app/src/TodoMvcDb.scala2
-rw-r--r--example/todoDb/build.sc2
-rw-r--r--example/variableRoutes/app/src/VariableRoutes.scala4
-rw-r--r--example/variableRoutes/build.sc2
-rw-r--r--example/websockets/build.sc2
25 files changed, 28 insertions, 28 deletions
diff --git a/example/compress/build.sc b/example/compress/build.sc
index 2166763..a08b2c6 100644
--- a/example/compress/build.sc
+++ b/example/compress/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/compress2/build.sc b/example/compress2/build.sc
index 2166763..a08b2c6 100644
--- a/example/compress2/build.sc
+++ b/example/compress2/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/compress3/build.sc b/example/compress3/build.sc
index 2166763..a08b2c6 100644
--- a/example/compress3/build.sc
+++ b/example/compress3/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/cookies/build.sc b/example/cookies/build.sc
index 2166763..a08b2c6 100644
--- a/example/cookies/build.sc
+++ b/example/cookies/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/decorated/app/src/Decorated.scala b/example/decorated/app/src/Decorated.scala
index 77f9133..f037c6a 100644
--- a/example/decorated/app/src/Decorated.scala
+++ b/example/decorated/app/src/Decorated.scala
@@ -4,12 +4,12 @@ object Decorated extends cask.MainRoutes{
override def toString = "[haoyi]"
}
class loggedIn extends cask.Decorator {
- def wrapFunction(ctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(ctx: cask.Request, delegate: Delegate): Returned = {
delegate(Map("user" -> new User()))
}
}
class withExtra extends cask.Decorator {
- def wrapFunction(ctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(ctx: cask.Request, delegate: Delegate): Returned = {
delegate(Map("extra" -> 31337))
}
}
diff --git a/example/decorated/build.sc b/example/decorated/build.sc
index 2166763..a08b2c6 100644
--- a/example/decorated/build.sc
+++ b/example/decorated/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/decorated2/app/src/Decorated2.scala b/example/decorated2/app/src/Decorated2.scala
index 014965e..20526b7 100644
--- a/example/decorated2/app/src/Decorated2.scala
+++ b/example/decorated2/app/src/Decorated2.scala
@@ -4,12 +4,12 @@ object Decorated2 extends cask.MainRoutes{
override def toString = "[haoyi]"
}
class loggedIn extends cask.Decorator {
- def wrapFunction(ctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(ctx: cask.Request, delegate: Delegate): Returned = {
delegate(Map("user" -> new User()))
}
}
class withExtra extends cask.Decorator {
- def wrapFunction(ctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(ctx: cask.Request, delegate: Delegate): Returned = {
delegate(Map("extra" -> 31337))
}
}
diff --git a/example/decorated2/build.sc b/example/decorated2/build.sc
index 2166763..a08b2c6 100644
--- a/example/decorated2/build.sc
+++ b/example/decorated2/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/endpoints/app/src/Endpoints.scala b/example/endpoints/app/src/Endpoints.scala
index 5450029..b478c80 100644
--- a/example/endpoints/app/src/Endpoints.scala
+++ b/example/endpoints/app/src/Endpoints.scala
@@ -2,7 +2,7 @@ package app
class custom(val path: String, val methods: Seq[String]) extends cask.Endpoint{
type Output = Int
- def wrapFunction(ctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(ctx: cask.Request, delegate: Delegate): Returned = {
delegate(Map()).map{num =>
cask.Response("Echo " + num, statusCode = num)
}
diff --git a/example/endpoints/build.sc b/example/endpoints/build.sc
index 2166763..a08b2c6 100644
--- a/example/endpoints/build.sc
+++ b/example/endpoints/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/formJsonPost/build.sc b/example/formJsonPost/build.sc
index 2166763..a08b2c6 100644
--- a/example/formJsonPost/build.sc
+++ b/example/formJsonPost/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/httpMethods/build.sc b/example/httpMethods/build.sc
index 2166763..a08b2c6 100644
--- a/example/httpMethods/build.sc
+++ b/example/httpMethods/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/minimalApplication/build.sc b/example/minimalApplication/build.sc
index 2166763..a08b2c6 100644
--- a/example/minimalApplication/build.sc
+++ b/example/minimalApplication/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/minimalApplication2/build.sc b/example/minimalApplication2/build.sc
index 2166763..a08b2c6 100644
--- a/example/minimalApplication2/build.sc
+++ b/example/minimalApplication2/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/redirectAbort/build.sc b/example/redirectAbort/build.sc
index 2166763..a08b2c6 100644
--- a/example/redirectAbort/build.sc
+++ b/example/redirectAbort/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/scalatags/build.sc b/example/scalatags/build.sc
index d517c6b..86141e0 100644
--- a/example/scalatags/build.sc
+++ b/example/scalatags/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
ivy"com.lihaoyi::scalatags:0.6.7",
)
diff --git a/example/staticFiles/build.sc b/example/staticFiles/build.sc
index 00a7ee3..54d1fb5 100644
--- a/example/staticFiles/build.sc
+++ b/example/staticFiles/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
def forkWorkingDir = build.millSourcePath
diff --git a/example/todo/app/src/TodoServer.scala b/example/todo/app/src/TodoServer.scala
index 1a768d1..4adb55c 100644
--- a/example/todo/app/src/TodoServer.scala
+++ b/example/todo/app/src/TodoServer.scala
@@ -17,7 +17,7 @@ object TodoServer extends cask.MainRoutes{
class transactional extends cask.Decorator{
class TransactionFailed(val value: Router.Result.Error) extends Exception
- def wrapFunction(pctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(pctx: cask.Request, delegate: Delegate): Returned = {
try ctx.transaction(
delegate(Map()) match{
case Router.Result.Success(t) => Router.Result.Success(t)
diff --git a/example/todo/build.sc b/example/todo/build.sc
index ca0716a..0f01a14 100644
--- a/example/todo/build.sc
+++ b/example/todo/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
ivy"org.xerial:sqlite-jdbc:3.18.0",
ivy"io.getquill::quill-jdbc:2.5.4",
ivy"com.lihaoyi::scalatags:0.6.7",
diff --git a/example/todoApi/build.sc b/example/todoApi/build.sc
index 2166763..a08b2c6 100644
--- a/example/todoApi/build.sc
+++ b/example/todoApi/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/todoDb/app/src/TodoMvcDb.scala b/example/todoDb/app/src/TodoMvcDb.scala
index c566b60..7ce3c50 100644
--- a/example/todoDb/app/src/TodoMvcDb.scala
+++ b/example/todoDb/app/src/TodoMvcDb.scala
@@ -16,7 +16,7 @@ object TodoMvcDb extends cask.MainRoutes{
class transactional extends cask.Decorator{
class TransactionFailed(val value: Router.Result.Error) extends Exception
- def wrapFunction(pctx: cask.ParamContext, delegate: Delegate): Returned = {
+ def wrapFunction(pctx: cask.Request, delegate: Delegate): Returned = {
try ctx.transaction(
delegate(Map()) match{
case Router.Result.Success(t) => Router.Result.Success(t)
diff --git a/example/todoDb/build.sc b/example/todoDb/build.sc
index 046e2e1..5bfc599 100644
--- a/example/todoDb/build.sc
+++ b/example/todoDb/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
ivy"org.xerial:sqlite-jdbc:3.18.0",
ivy"io.getquill::quill-jdbc:2.5.4"
)
diff --git a/example/variableRoutes/app/src/VariableRoutes.scala b/example/variableRoutes/app/src/VariableRoutes.scala
index 760ab15..a1c8a4f 100644
--- a/example/variableRoutes/app/src/VariableRoutes.scala
+++ b/example/variableRoutes/app/src/VariableRoutes.scala
@@ -11,8 +11,8 @@ object VariableRoutes extends cask.MainRoutes{
}
@cask.get("/path", subpath = true)
- def showSubpath(subPath: cask.Subpath) = {
- s"Subpath ${subPath.value}"
+ def showSubpath(request: cask.Request) = {
+ s"Subpath ${request.remainingPathSegments}"
}
initialize()
diff --git a/example/variableRoutes/build.sc b/example/variableRoutes/build.sc
index 2166763..a08b2c6 100644
--- a/example/variableRoutes/build.sc
+++ b/example/variableRoutes/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{
diff --git a/example/websockets/build.sc b/example/websockets/build.sc
index 96991eb..aa9fa17 100644
--- a/example/websockets/build.sc
+++ b/example/websockets/build.sc
@@ -4,7 +4,7 @@ import mill._, scalalib._
trait AppModule extends ScalaModule{
def scalaVersion = "2.12.6"
def ivyDeps = Agg(
- ivy"com.lihaoyi::cask:0.1.0",
+ ivy"com.lihaoyi::cask:0.1.1",
)
object test extends Tests{