upgrade to scalalib 1.37 to improve random strings
This commit is contained in:
parent
9cce28473f
commit
3d12e15e04
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue