upgrade to scalalib 1.37 to improve random strings

This commit is contained in:
Thibault Duplessis 2012-06-21 15:53:05 +02:00
parent 9cce28473f
commit 3d12e15e04
11 changed files with 13 additions and 13 deletions

View file

@ -29,7 +29,7 @@ object Post {
userId: Option[String],
text: String,
number: Int): Post = Post(
id = OrnicarRandom nextAsciiString idSize,
id = OrnicarRandom nextString idSize,
topicId = topicId,
author = author,
userId = userId,

View file

@ -27,7 +27,7 @@ object Topic {
categId: String,
slug: String,
name: String): Topic = Topic(
id = OrnicarRandom nextAsciiString idSize,
id = OrnicarRandom nextString idSize,
categId = categId,
slug = slug,
name = name,

View file

@ -5,7 +5,7 @@ import ornicar.scalalib.OrnicarRandom
object IdGenerator {
def game = OrnicarRandom nextAsciiString DbGame.gameIdSize
def game = OrnicarRandom nextString DbGame.gameIdSize
def player = OrnicarRandom nextAsciiString DbGame.playerIdSize
def player = OrnicarRandom nextString DbGame.playerIdSize
}

View file

@ -47,7 +47,7 @@ object Contributors {
"mk" -> List("Давид и Стефан Тимовски"),
"id" -> List("Night1301"),
"ja" -> List("ネイサン アイブス"),
"bg" -> List("Anonymous"),
"bg" -> List("Anonymous", "Пламен Димов."),
"th" -> List("มาโนชญ์ สมศักดิ์"),
"fa" -> List("saeid monajiane"),
"he" -> List("Anonymous", " Tornado"),

View file

@ -81,8 +81,8 @@ object Hook {
}
private def generateId =
OrnicarRandom nextAsciiString idSize
OrnicarRandom nextString idSize
private def generateOwnerId =
OrnicarRandom nextAsciiString (ownerIdSize - idSize)
OrnicarRandom nextString (ownerIdSize - idSize)
}

View file

@ -23,7 +23,7 @@ object Post {
def apply(
text: String,
isByCreator: Boolean): Post = Post(
id = OrnicarRandom nextAsciiString idSize,
id = OrnicarRandom nextString idSize,
text = text,
isByCreator = isByCreator,
isRead = false,

View file

@ -55,7 +55,7 @@ object Thread {
text: String,
creator: User,
invited: User): Thread = Thread(
id = OrnicarRandom nextAsciiString idSize,
id = OrnicarRandom nextString idSize,
name = name,
createdAt = DateTime.now,
updatedAt = DateTime.now,

View file

@ -35,7 +35,7 @@ trait AuthImpl {
Redirect(routes.Lobby.home) withCookies LilaCookie.session("access_uri", req.uri)
def saveAuthentication(username: String)(implicit req: RequestHeader): String =
(OrnicarRandom nextAsciiString 12) ~ { sessionId
(OrnicarRandom nextString 12) ~ { sessionId
env.security.store.save(sessionId, username, req)
}

View file

@ -43,7 +43,7 @@ final class Firewall(
def infectCookie(implicit req: RequestHeader) = Action {
log("Infect cookie " + formatReq(req))
val cookie = LilaCookie.cookie(blockCookieName, OrnicarRandom nextAsciiString 32)
val cookie = LilaCookie.cookie(blockCookieName, OrnicarRandom nextString 32)
Redirect(routes.Lobby.home()) withCookies cookie
}

View file

@ -91,7 +91,7 @@ class UserRepo(
userOption exists.fold(
io(none),
io {
val salt = OrnicarRandom nextAsciiString 32
val salt = OrnicarRandom nextString 32
val obj = DBObject(
"_id" -> normalize(username),
"username" -> username,

View file

@ -18,7 +18,7 @@ trait Dependencies {
val specs2 = "org.specs2" %% "specs2" % "1.11"
val casbah = "com.mongodb.casbah" %% "casbah" % "2.1.5-1"
val salat = "com.novus" %% "salat-core" % "0.0.8-SNAPSHOT"
val scalalib = "com.github.ornicar" %% "scalalib" % "1.36"
val scalalib = "com.github.ornicar" %% "scalalib" % "1.37"
val config = "com.typesafe" % "config" % "0.4.0"
val json = "com.codahale" %% "jerkson" % "0.5.0"
val guava = "com.google.guava" % "guava" % "12.0"