Permalink
Browse files

Update dependencies

  • Loading branch information...
1 parent 694498b commit 0dd7b68960e4184d33b9851b5d8af9233965f168 @casualjim casualjim committed Dec 23, 2012
Showing with 16 additions and 16 deletions.
  1. +10 −10 notes/2.2.0.markdown
  2. +6 −6 project/build.scala
View
20 notes/2.2.0.markdown
@@ -54,17 +54,17 @@
class RegisterForm extends JacksonCommand { // you have to pick the json library of choice
- val login: Field[String] = asString("login").required.notBlank.minLength(6).validForFormat("\\w+".r)
+ val login: Field[String] = bind[String]("login").required.notBlank.minLength(6).validForFormat("\\w+".r)
- val name: Field[String] = asString("name")
+ val name: Field[String] = bind[String]("name")
- val email: Field[String] = asString("email").required.notBlank.validEmail
+ val email: Field[String] = bind[String]("email").required.notBlank.validEmail
- val homepage: Field[String] = asString("homepage").validUrl
+ val homepage: Field[String] = bind[String]("homepage").validUrl
- val passwordConfirmation: FieldBinding = asString("passwordConfirmation").required.notBlank
+ val passwordConfirmation: FieldBinding = bind[String]("passwordConfirmation").required.notBlank
- val password: FieldBinding = asString("password").required.notBlank.validConfirmation("passwordConfirmation", passwordConfirmation.value)
+ val password: FieldBinding = bind[String]("password").required.notBlank.validConfirmation("passwordConfirmation", passwordConfirmation.value)
}
* Renames databinding to commands. this resolves the confusion created by the name databinding.
@@ -122,20 +122,20 @@
class MyCommand extends JsonCommand {
protected implicit val jsonFormats: Formats = DefaultFormats
- val name: Field[String] = asString("name").notBlank
+ val name: Field[String] = bind[String]("name").notBlank
val age: Field[Int] = "age"
val token: Field[String] = (
- asString("API-TOKEN").notBlank
+ bind[String]("API-TOKEN").notBlank
sourcedFrom ValueSource.Header
description "The API token for this request"
notes "Invalid data kills cute innocent kittens"
allowableValues "123")
- val skip: Field[Int] = asInt("skip").sourcedFrom(ValueSource.Query).description("The offset for this collection index")
+ val skip: Field[Int] = bind[Int]("skip").sourcedFrom(ValueSource.Query).description("The offset for this collection index")
- val limit: Field[Int] = asType[Int]("limit").sourcedFrom(ValueSource.Query).withDefaultValue(20).description("the max number of items to return")
+ val limit: Field[Int] = bind[Int]("limit").sourcedFrom(ValueSource.Query).withDefaultValue(20).description("the max number of items to return")
}
View
12 project/build.scala
@@ -258,7 +258,7 @@ object ScalatraBuild extends Build {
object Dependencies {
- val atmosphere = "org.atmosphere" % "atmosphere-runtime" % "1.0.6"
+ val atmosphere = "org.atmosphere" % "atmosphere-runtime" % "1.0.7"
val base64 = "net.iharder" % "base64" % "2.3.8"
@@ -282,7 +282,7 @@ object ScalatraBuild extends Build {
val jettyServlet = jettyDep("jetty-servlet")
val jettyWebapp = jettyDep("jetty-webapp")
- val junit = "junit" % "junit" % "4.10"
+ val junit = "junit" % "junit" % "4.11"
val json4sExt = "org.json4s" %% "json4s-ext" % "3.0.0"
val json4sNative = "org.json4s" %% "json4s-native" % "3.0.0"
@@ -295,7 +295,7 @@ object ScalatraBuild extends Build {
val mockitoAll = "org.mockito" % "mockito-all" % "1.9.0"
- val scalate = "org.fusesource.scalate" % "scalate-core" % "1.5.3"
+ val scalate = "org.fusesource.scalate" % "scalate-core_2.9" % "1.6.0"
val scalatest = "org.scalatest" %% "scalatest" % "1.8"
@@ -305,7 +305,7 @@ object ScalatraBuild extends Build {
val specs = "org.scala-tools.testing" %% "specs" % "1.6.9"
- val specs2 = "org.specs2" %% "specs2" % "1.12.2"
+ val specs2 = "org.specs2" %% "specs2" % "1.12.3"
val servletApi = "org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" artifacts (Artifact("javax.servlet", "jar", "jar"))
@@ -315,7 +315,7 @@ object ScalatraBuild extends Build {
val slf4jSimple = "org.slf4j" % "slf4j-simple" % "1.7.2"
- val logback = "ch.qos.logback" % "logback-classic" % "1.0.7"
+ val logback = "ch.qos.logback" % "logback-classic" % "1.0.9"
val scalaz = "org.scalaz" %% "scalaz-core" % "6.0.4"
@@ -325,7 +325,7 @@ object ScalatraBuild extends Build {
val scalaj_collection = "org.scalaj" %% "scalaj-collection" % "1.2"
- def swagger(name: String) = "com.wordnik" % "swagger-%s_2.9.1".format(name) % "1.1.0"
+ def swagger(name: String) = "com.wordnik" % "swagger-%s_2.9.1".format(name) % "1.2.0"
}
object Resolvers {

0 comments on commit 0dd7b68

Please sign in to comment.