Skip to content

Commit

Permalink
rename and fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Duplessis committed Aug 1, 2020
1 parent ea5d513 commit cedb336
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
10 changes: 5 additions & 5 deletions app/controllers/Appeal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class Appeal(env: Env, reportC: => Report) extends LilaController(env) {
def home =
Auth { implicit ctx => me =>
env.appeal.api.mine(me) map { appeal =>
Ok(html.appeal2.home(appeal, env.appeal.forms.text))
Ok(html.appeal.home(appeal, env.appeal.forms.text))
}
}

Expand All @@ -23,7 +23,7 @@ final class Appeal(env: Env, reportC: => Report) extends LilaController(env) {
.fold(
err =>
env.appeal.api.mine(me) map { appeal =>
BadRequest(html.appeal2.home(appeal, err))
BadRequest(html.appeal.home(appeal, err))
},
text => env.appeal.api.post(text, me) inject Redirect(routes.Appeal.home()).flashSuccess
)
Expand All @@ -34,15 +34,15 @@ final class Appeal(env: Env, reportC: => Report) extends LilaController(env) {
env.appeal.api.queue zip env.report.api.inquiries.allBySuspect zip reportC.getCounts flatMap {
case ((appeals, inquiries), counts ~ streamers ~ nbAppeals) =>
(env.user.lightUserApi preloadMany appeals.map(_.id)) inject
Ok(html.appeal2.queue(appeals, inquiries, counts, streamers, nbAppeals))
Ok(html.appeal.queue(appeals, inquiries, counts, streamers, nbAppeals))
}
}

def show(username: String) =
Secure(_.Appeals) { implicit ctx => me =>
asMod(username) { (appeal, suspect) =>
env.report.api.inquiries.ofSuspectId(suspect.user.id) map { inquiry =>
Ok(html.appeal2.show(appeal, suspect, inquiry, env.appeal.forms.text))
Ok(html.appeal.show(appeal, suspect, inquiry, env.appeal.forms.text))
}
}
}
Expand All @@ -56,7 +56,7 @@ final class Appeal(env: Env, reportC: => Report) extends LilaController(env) {
.fold(
err =>
env.report.api.inquiries.ofSuspectId(suspect.user.id) map { inquiry =>
BadRequest(html.appeal2.show(appeal, suspect, inquiry, err))
BadRequest(html.appeal.show(appeal, suspect, inquiry, err))
},
text =>
for {
Expand Down
2 changes: 1 addition & 1 deletion app/views/appeal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import lila.user.User
import play.api.data.Form
import play.api.i18n.Lang

object appeal2 {
object appeal {

def home(appeal: Option[Appeal], textForm: Form[_])(implicit ctx: Context) =
layout("Appeal") {
Expand Down
6 changes: 2 additions & 4 deletions modules/memo/src/test/SyncacheTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MySpec()
with Matchers
with BeforeAndAfterAll {

override def afterAll: Unit = {
override def afterAll(): Unit = {
TestKit.shutdownActorSystem(system)
}

Expand All @@ -35,9 +35,7 @@ class MySpec()
},
default = s => s"default $s",
strategy = Syncache.AlwaysWait(1 second),
expireAfter = Syncache.ExpireAfterWrite(10 seconds),
logger = lila.log("syncache"),
resultTimeout = 5 seconds
expireAfter = Syncache.ExpireAfterWrite(10 seconds)
)
val threads = 20
val keys = 50
Expand Down
9 changes: 6 additions & 3 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import play.sbt.PlayImport._
import sbt._, Keys._
import bloop.integrations.sbt.BloopKeys.bloopGenerate

object BuildSettings {

Expand All @@ -21,7 +22,9 @@ object BuildSettings {
sources in (Compile, doc) := Seq.empty,
publishArtifact in (Compile, packageDoc) := false,
// disable publishing the main sources jar
publishArtifact in (Compile, packageSrc) := false
publishArtifact in (Compile, packageSrc) := false,
// No bloop project for tests
bloopGenerate in Test := None
)

def defaultLibs: Seq[ModuleID] =
Expand Down Expand Up @@ -83,10 +86,10 @@ object BuildSettings {
// "-Wnumeric-widen",
"-Wunused:imports",
"-Wunused:locals",
"-Wunused:patvars",
"-Wunused:patvars"
// "-Wunused:privates", // unfortunately doesn't work with macros
// "-Wunused:implicits",
"-Wunused:params"
// "-Wunused:params"
// "-Wvalue-discard",
)

Expand Down

0 comments on commit cedb336

Please sign in to comment.