Merge branch 'master' into analyse

* master:
  improve UI builds
  compile dev UI
  fix embedded tv size
  fix scalaz deprecation warnings and errors
  upgrade scala, play, and scalaz
  upgrade chess submodule, providing game divider
  remove debug
  upgrade pdfexporter
  ru "русский язык" translation #10169. Author: MK2014.
  fix duplicate reports

Conflicts:
	bin/compile-client
This commit is contained in:
Thibault Duplessis 2014-11-08 09:23:44 +01:00
commit a981ba7e74
12 changed files with 43 additions and 18 deletions

View file

@ -14,7 +14,7 @@
</head>
<body
class="is2d highlight @bg @theme merida"
style="width: 226px; height: 266px; overflow: hidden;"
style="width: 224px; height: 264px; overflow: hidden;"
data-stream-url="@routes.Tv.streamOut">
<div id="featured_game" title="lichess.org TV">
@gameFenNoCtx(g, g.firstPlayer.color, tv = true, blank = true)

13
bin/build-deps.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
cd /tmp
git clone git@github.com:ornicar/scalalib.git
cd scalalib
sbt publish-local
cd ..
git clone https://github.com/ornicar/maxmind-geoip2-scala --branch customBuild
cd maxmind-geoip2-scala
sbt publish-local
cd ..

View file

@ -183,7 +183,7 @@ fromPosition=С позиции
continueFromHere=Продолжить с данного места
importGame=Импорт игры
nbImportedGames=%s Импортированные игры
thisIsAChessCaptcha=Это шахматная капча.
thisIsAChessCaptcha=Это шахматная CAPTCHA.
clickOnTheBoardToMakeYourMove=Кликните по доске, чтобы сделать ход и доказать, что вы человек.
notACheckmate=Это не мат
colorPlaysCheckmateInOne=%s начинают; мат в один ход
@ -258,7 +258,7 @@ leaderboardThisMonth=Лидеры в этом месяце
activeToday=Активные сегодня
activeThisWeek=Активные на этой неделе
activePlayers=Активные игроки
bewareTheGameIsRatedButHasNoClock=Внимание, эта рейтинговая игра без ограничения по времени!
bewareTheGameIsRatedButHasNoClock=Внимание, это рейтинговая игра без ограничения по времени!
training=Задачи
yourPuzzleRatingX=Ваш рейтинг в решении задач: %s
findTheBestMoveForWhite=Найдите лучший ход за белых.

@ -1 +1 @@
Subproject commit 7ba246f9d45b204772b1e1151a7dab3b9cdeeefc
Subproject commit ed716486de5178d9693b1aad2d708441e38faf4d

View file

@ -3,11 +3,11 @@ package lila
import scala.concurrent.Future
import ornicar.scalalib
import scalaz.{ Monad, Monoid, OptionT }
import scalaz.{ Monad, Monoid, OptionT, ~> }
trait PackageObject extends Steroids with WithFuture {
def !![A](msg: String): Valid[A] = msg.failNel[A]
def !![A](msg: String): Valid[A] = msg.failureNel[A]
def nowMillis: Long = System.currentTimeMillis
def nowTenths: Long = nowMillis / 100
@ -23,6 +23,11 @@ trait PackageObject extends Steroids with WithFuture {
implicit final def runOptionT[F[+_], A](ot: OptionT[F, A]): F[Option[A]] = ot.run
// from scalaz. We don't want to import all OptionTFunctions, because of the classh with `some`
def optionT[M[_]] = new (({type λ[α] = M[Option[α]]})#λ ~> ({type λ[α] = OptionT[M, α]})#λ) {
def apply[A](a: M[Option[A]]) = new OptionT[M, A](a)
}
implicit final class LilaPimpedString(s: String) {
def describes[A](v: => A): A = { loginfo(s); v }

View file

@ -17,7 +17,6 @@ trait Steroids
with scalaz.std.OptionInstances
with scalaz.std.OptionFunctions
with scalaz.syntax.std.ToOptionIdOps
with scalaz.OptionTFunctions
with scalaz.std.ListInstances
with scalaz.std.ListFunctions

View file

@ -21,12 +21,19 @@ private[report] final class ReportApi(evaluator: ActorSelection) {
text = setup.text,
createdBy = by)
!isAlreadySlain(report, user) ?? {
reportTube.coll.update(
if (by.id == UserRepo.lichessId) reportTube.coll.update(
selectRecent(user, reason),
reportTube.toMongo(report).get,
upsert = true) map { res =>
if (report.isCheat && !res.updatedExisting) evaluator ! user
reportTube.toMongo(report).get - "_id"
) map { res =>
if (!res.updatedExisting) {
if (report.isCheat) evaluator ! user
$insert(report)
}
}
else {
if (report.isCheat) evaluator ! user
$insert(report)
}
}
}

View file

@ -80,7 +80,8 @@ trait UserRepo {
}
}
def lichess = byId("lichess")
val lichessId = "lichess"
def lichess = byId(lichessId)
private type PerfLenses = List[(String, Perfs => Perf)]

View file

@ -10,7 +10,7 @@ object ApplicationBuild extends Build {
import Dependencies._
lazy val root = Project("lila", file(".")) enablePlugins PlayScala settings (
scalaVersion := "2.11.2",
scalaVersion := "2.11.4",
resolvers ++= Dependencies.Resolvers.commons,
scalacOptions := compilerOptions,
incOptions := incOptions.value.withNameHashing(true),

View file

@ -33,8 +33,8 @@ object Dependencies {
t2v, jgitMaven, sprayRepo, sprayNightlies, snowplow)
}
val scalaz = "org.scalaz" %% "scalaz-core" % "7.0.6"
val scalalib = "com.github.ornicar" %% "scalalib" % "5.0"
val scalaz = "org.scalaz" %% "scalaz-core" % "7.1.0"
val scalalib = "com.github.ornicar" %% "scalalib" % "5.1"
val config = "com.typesafe" % "config" % "1.2.1"
val apache = "org.apache.commons" % "commons-lang3" % "3.3.2"
val scalaTime = "com.github.nscala-time" %% "nscala-time" % "1.4.0"
@ -51,7 +51,7 @@ object Dependencies {
val prismic = "io.prismic" %% "scala-kit" % "1.2.4"
object play {
val version = "2.3.5"
val version = "2.3.6"
val api = "com.typesafe.play" %% "play" % version
val test = "com.typesafe.play" %% "play-test" % version
}

View file

@ -1,6 +1,6 @@
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.5")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.6")
// addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.6")

@ -1 +1 @@
Subproject commit ff6cb1d241e0831b52a8967cb98179dadeeb2987
Subproject commit 375a7f4666c0f849db95a8046e7183740203983a