it's alive!
This commit is contained in:
parent
e42c47decc
commit
4473c5295a
|
@ -4,7 +4,7 @@ import play.api.libs.concurrent.Execution.Implicits._
|
|||
|
||||
object Cli {
|
||||
|
||||
def apply(env: ApiEnv)(args: Array[String]): Fu[String] = (args.toList match {
|
||||
def apply(env: ApiEnv)(args: List[String]): Fu[String] = (args match {
|
||||
// case "average-elo" :: Nil ⇒ infos.averageElo
|
||||
// case "i18n-js-dump" :: Nil ⇒ i18n.jsDump
|
||||
// case "i18n-fix" :: Nil ⇒ i18n.fileFix
|
||||
|
|
|
@ -38,7 +38,7 @@ object Global extends GlobalSettings {
|
|||
// env.i18n.requestHandler(req) orElse
|
||||
// super.onRouteRequest(req)
|
||||
// }
|
||||
super.onRouteRequest(req)
|
||||
super.onRouteRequest(req) ~ { _ => println(req) }
|
||||
|
||||
// override def onHandlerNotFound(req: RequestHeader): Result =
|
||||
// env.ai.isServer.fold(NotFound, controllers.Lobby handleNotFound req)
|
||||
|
|
|
@ -23,7 +23,7 @@ object Cli extends LilaController {
|
|||
form.bindFromRequest.fold(
|
||||
err ⇒ fuccess(Ok("bad request")), {
|
||||
case (command, password) ⇒ CliAuth(password) {
|
||||
runCommand(command.split(" ")) map { res ⇒ Ok(res) }
|
||||
runCommand(command.split(" ").toList.pp) map { res ⇒ Ok(res) }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ object ApplicationBuild extends Build {
|
|||
lazy val lila = play.Project("lila", "4",
|
||||
settings = buildSettings ++ Seq(
|
||||
libraryDependencies := Seq(
|
||||
scalaz, scalalib, hasher, config, salat, apache, scalaTime,
|
||||
scalaz, scalalib, hasher, config, apache, scalaTime,
|
||||
csv, jgit, actuarius, scalastic, findbugs,
|
||||
reactivemongo),
|
||||
templatesImport ++= Seq(
|
||||
|
@ -25,7 +25,7 @@ object ApplicationBuild extends Build {
|
|||
|
||||
lazy val api = project("api", Seq(common, db, user, security, wiki)).settings(
|
||||
libraryDependencies := provided(
|
||||
hasher, config, salat, apache, csv, jgit,
|
||||
hasher, config, apache, csv, jgit,
|
||||
actuarius, scalastic, findbugs, reactivemongo)
|
||||
)
|
||||
|
||||
|
@ -46,7 +46,7 @@ object ApplicationBuild extends Build {
|
|||
playApi, playTest, reactivemongo, playReactivemongo, hasher, spray.caching)
|
||||
)
|
||||
|
||||
lazy val http = project("http", Seq(common, user)).settings(
|
||||
lazy val http = project("http", Seq(common)).settings(
|
||||
libraryDependencies ++= provided(playApi)
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import scala.concurrent.Future
|
|||
|
||||
import play.api.libs.concurrent.Execution.Implicits._
|
||||
|
||||
final class Fetch(gitUrl: String, pageRepo: PageRepo) {
|
||||
private[wiki] final class Fetch(gitUrl: String, pageRepo: PageRepo) {
|
||||
|
||||
def apply: Funit = getFiles flatMap { files ⇒
|
||||
val pages = files.map(filePage).flatten
|
||||
|
|
|
@ -3,7 +3,7 @@ package lila.wiki
|
|||
import lila.db.{ Repo, DbApi }
|
||||
import lila.db.Implicits._
|
||||
|
||||
final class PageRepo(coll: ReactiveColl) extends Repo[Page](coll, Pages.json) {
|
||||
private[wiki] final class PageRepo(coll: ReactiveColl) extends Repo[Page](coll, Pages.json) {
|
||||
|
||||
def clear: Funit = remove(select.all)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package lila.wiki
|
|||
import lila.common.ConfigSettings
|
||||
import com.typesafe.config.Config
|
||||
|
||||
final class Settings(config: Config) extends ConfigSettings(config) {
|
||||
private[wiki] final class Settings(config: Config) extends ConfigSettings(config) {
|
||||
|
||||
val CollectionPage = getString("collection.page")
|
||||
val GitUrl = getString("git.url")
|
||||
|
|
|
@ -16,6 +16,6 @@ final class WikiEnv(config: Config, db: String ⇒ ReactiveColl) {
|
|||
private lazy val fetcher = new Fetch(gitUrl = GitUrl, pageRepo = pageRepo)
|
||||
|
||||
def cli = new {
|
||||
def fetch = WikiEnv.this.fetcher.apply inject "Fetched wiki from github"
|
||||
def fetch = fetcher.apply inject "Fetched wiki from github"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue