Skip to content

Commit

Permalink
Bumped version of sample dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gakuzzzz committed Feb 23, 2015
1 parent 04cff40 commit 46d2daf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
12 changes: 7 additions & 5 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ object ApplicationBuild extends Build {
.settings(baseSettings: _*)
.settings(
libraryDependencies += play.Play.autoImport.jdbc,
libraryDependencies += "org.mindrot" % "jbcrypt" % "0.3m",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc" % "2.2.0",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc-test" % "2.2.0" % "test",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc-play-plugin" % "2.3.0",
libraryDependencies += "com.github.tototoshi" %% "play-flyway" % "1.1.0",
libraryDependencies += "org.mindrot" % "jbcrypt" % "0.3m",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc" % "2.2.3",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc-config" % "2.2.3",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc-syntax-support-macro" % "2.2.3",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc-test" % "2.2.3" % "test",
libraryDependencies += "org.scalikejdbc" %% "scalikejdbc-play-plugin" % "2.3.5",
libraryDependencies += "com.github.tototoshi" %% "play-flyway" % "1.2.1",
TwirlKeys.templateImports in Compile += "jp.t2v.lab.play2.auth.sample._",
publish := { },
publishArtifact := false,
Expand Down
13 changes: 3 additions & 10 deletions sample/app/jp/t2v/lab/play2/auth/sample/Account.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@ case class Account(id: Int, email: String, password: String, name: String, role:

object Account extends SQLSyntaxSupport[Account] {

val a = syntax("a")

def apply(a: SyntaxProvider[Account])(rs: WrappedResultSet): Account = apply(a.resultName)(rs)
def apply(a: ResultName[Account])(rs: WrappedResultSet): Account = new Account(
id = rs.int(a.id),
email = rs.string(a.email),
password = rs.string(a.password),
name = rs.string(a.name),
role = Role.valueOf(rs.string(a.role))
)
private val a = syntax("a")

def apply(a: SyntaxProvider[Account])(rs: WrappedResultSet): Account = autoConstruct(rs, a)

private val auto = AutoSession

Expand Down
4 changes: 4 additions & 0 deletions sample/app/jp/t2v/lab/play2/auth/sample/Role.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package jp.t2v.lab.play2.auth.sample

import scalikejdbc.TypeBinder

sealed trait Role

object Role {
Expand All @@ -13,4 +15,6 @@ object Role {
case _ => throw new IllegalArgumentException()
}

implicit val typeBinder: TypeBinder[Role] = TypeBinder.string.map(valueOf)

}

0 comments on commit 46d2daf

Please sign in to comment.