name := "apibuilder-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.11"

version := "0.1.2"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.3",
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

name := "apibuilder-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.11"

version := "0.1.3"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.3",
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.3


import com.github.retronym.SbtOneJar._
import sbt.Credentials

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.84"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "io.flow" %% "lib-util" % "0.0.10",
      "io.flow" %% "apibuilder-validation" % "0.2.1",
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/"

credentials += Credentials(
  "Artifactory Realm",
  "flow.jfrog.io",
  System.getenv("ARTIFACTORY_USERNAME"),
  System.getenv("ARTIFACTORY_PASSWORD")
)

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._
import sbt.Credentials

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.86"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "io.flow" %% "lib-util" % "0.0.10",
      "io.flow" %% "apibuilder-validation" % "0.2.1",
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/"

credentials += Credentials(
  "Artifactory Realm",
  "flow.jfrog.io",
  System.getenv("ARTIFACTORY_USERNAME"),
  System.getenv("ARTIFACTORY_PASSWORD")
)

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.86


object Test {
  def contains(s: String, i: Int) = true
  def test1 = {
    val f = contains("", (_: Int))
    val ff = contains("", ((_: Int)))
    f.apply(0)
    //     sandbox/eta.scala:4: error: type mismatch:
    //  found   : Int => Int
    //  required: Int
    //     val f = contains("", (_: Int))
    //                          ^
    // sandbox/eta.scala:5: error: apply is not a member of Boolean(f)
    //     f.apply(0)
    //      ^
  }

  def test2 = {
    val f = "".contains("", (_: Int)) // dotc:
    f.apply(0)
    // sandbox/eta.scala:18: error: apply is not a member of Boolean(f)
    //     f.apply(0)
    //       ^
  }
}

object Test {
  def contains(s: String, i: Int) = true
  def test1 = {
    val f = contains("", (_: Int))
    val ff = contains("", ((_: Int)))
    val g: Int => Boolean = contains("", (_))
    val gg: Int => Boolean = contains("", ((_)))
    f.apply(0)
    //     sandbox/eta.scala:4: error: type mismatch:
    //  found   : Int => Int
    //  required: Int
    //     val f = contains("", (_: Int))
    //                          ^
    // sandbox/eta.scala:5: error: apply is not a member of Boolean(f)
    //     f.apply(0)
    //      ^
  }

  def test2 = {
    val f = "".contains("", (_: Int)) // dotc:
    f.apply(0)
    // sandbox/eta.scala:18: error: apply is not a member of Boolean(f)
    //     f.apply(0)
    //       ^
  }
}

Add tests for wildcards without types

Add tests for wildcards without types

As suggested by review.


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.46"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.3",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.47"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.3",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.47


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion := "2.13.3"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.2.3" % Test,
      compilerPlugin("com.github.ghik" %% "silencer-plugin" % "1.7.1" cross CrossVersion.full),
      "com.github.ghik" %% "silencer-lib" % "1.7.1" % Provided cross CrossVersion.full,
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

// silence all warnings on autogenerated files
flowGeneratedFiles ++= Seq(
  "src/main/scala/io/flow/generated/.*".r,
)

// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"

version := "0.2.61"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion := "2.13.3"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.2.3" % Test,
      compilerPlugin("com.github.ghik" %% "silencer-plugin" % "1.7.1" cross CrossVersion.full),
      "com.github.ghik" %% "silencer-lib" % "1.7.1" % Provided cross CrossVersion.full,
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

// silence all warnings on autogenerated files
flowGeneratedFiles ++= Seq(
  "src/main/scala/io/flow/generated/.*".r,
)

// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"

version := "0.2.62"

autocommit: Update configuration to record version 0.2.62


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.3"

crossScalaVersions := Seq("2.12.3", "2.11.11", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.4" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.38"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.3"

crossScalaVersions := Seq("2.12.3", "2.11.11", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.4" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.39"

autocommit: Update configuration to record version 0.1.39


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.4"

crossScalaVersions := Seq("2.12.4", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.50"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.4"

crossScalaVersions := Seq("2.12.4", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.51"

autocommit: Update configuration to record version 0.1.51


import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.12"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.5" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.13"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.5" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

Increment version from 0.0.12 => 0.0.13

Increment version from 0.0.12 => 0.0.13


package hello

import scala.tasty.Reflection
import scala.tasty.inspector.TastyInspector

object Main extends App {

  val inspector = new TastyInspector {
    protected def processCompilationUnit(reflect: Reflection)(root: reflect.Tree): Unit = {
      import reflect._
      val tastyStr = root.show
      println(tastyStr)
    }
  }

  inspector.inspect("", List("lib.Foo"))

}

package hello

import scala.tasty.Reflection
import scala.tasty.inspector.TastyInspector

object Main extends App {

  val inspector = new TastyInspector {
    protected def processCompilationUnit(reflect: Reflection)(root: reflect.Tree): Unit = {
      import reflect.{given, _}
      val tastyStr = root.show
      println(tastyStr)
    }
  }

  inspector.inspect("", List("lib.Foo"))

}

Fix nightly build for TASTy Inspector

Fix nightly build for TASTy Inspector


package com.example.http4s
package blaze

import cats.effect._
import cats.implicits._

object BlazeHttp2Example extends IOApp {
  override def run(args: List[String]): IO[ExitCode] =
    BlazeSslExampleApp
      .builder[IO]
      .enableHttp2(true)
      .serve
      .compile
      .drain
      .as(ExitCode.Success)
}

package com.example.http4s
package blaze

import cats.effect._
import cats.implicits._

object BlazeHttp2Example extends IOApp {
  override def run(args: List[String]): IO[ExitCode] =
    BlazeSslExampleApp
      .builder[IO]
      .enableHttp2(true)
      .serve
      .compile
      .lastOrError
}

Update Example to not ignore App ExitCode


package nbmtools

import java.io.IOException
import java.io.InputStream
import java.net.URI
import scala.io.BufferedSource

case class External(crc: Option[Long], urls: List[URI]) {
    def openStream() = {
        def tryUrls(urls: List[URI]): InputStream = {
            urls match {
                case Nil =>
                    throw new IOException("cannot open any URL: " + urls.toString)
                case (url::urls) =>
                    try {
                        url.toURL.openStream
                    } catch {
                        case e: IOException => tryUrls(urls)
                    }
            }
        }
        tryUrls(urls)
    }
}

object concatWithColon {
    def apply(prefix: String, s: String): String = prefix + ":" + s
    def unapply(s: String): Option[(String, String)] = {
        val colonPos = s.indexOf(':')
        if (colonPos < 0) None
        else Some((s.substring(0, colonPos), s.substring(colonPos + 1)))
    }
}

object External {
    def from(is: InputStream): External = {
        val lines = new BufferedSource(is).getLines
        lines.foldRight(External(None, Nil)) {
            case (concatWithColon("CRC", crc), External(None, urls)) =>
                External(Some(crc.toLong), urls)
            case (concatWithColon("CRC", crc), External(Some(_), urls)) =>
                sys.error("duplicate CRC in external file")
            case (concatWithColon("URL", url), External(crc, urls)) =>
                External(crc, (new URI(url)::urls))
            case (_, external) => external
        }
    }
}

package nbmtools

import java.io.IOException
import java.io.InputStream
import java.net.URI
import scala.io.BufferedSource

case class External(crc: Option[Long], urls: List[URI]) {
    def openStream() = {
        def tryUrls(urls: List[URI]): InputStream = {
            urls match {
                case Nil =>
                    throw new IOException("cannot open any URL: " + this.toString)
                case (url::urls) =>
                    try {
                        url.toURL.openStream
                    } catch {
                        case e: IOException => tryUrls(urls)
                    }
            }
        }
        tryUrls(urls)
    }
}

object concatWithColon {
    def apply(prefix: String, s: String): String = prefix + ":" + s
    def unapply(s: String): Option[(String, String)] = {
        val colonPos = s.indexOf(':')
        if (colonPos < 0) None
        else Some((s.substring(0, colonPos), s.substring(colonPos + 1)))
    }
}

object External {
    def from(is: InputStream): External = {
        val lines = new BufferedSource(is).getLines
        lines.foldRight(External(None, Nil)) {
            case (concatWithColon("CRC", crc), External(None, urls)) =>
                External(Some(crc.toLong), urls)
            case (concatWithColon("CRC", crc), External(Some(_), urls)) =>
                sys.error("duplicate CRC in external file")
            case (concatWithColon("URL", url), External(crc, urls)) =>
                External(crc, (new URI(url)::urls))
            case (_, external) => external
        }
    }
}

Improve error message: print all URLs

Improve error message: print all URLs


package shapeless.contrib.scalaz

import org.specs2.scalaz.Spec

import scalaz._
import scalaz.scalacheck.ScalazArbitrary._

import shapeless._

class SequenceTest extends Spec {

  import scalaz.std.option._
  import scalaz.std.string._
  import scalaz.syntax.apply._

  "sequencing Option" ! prop { (x: Option[Int], y: Option[String], z: Option[Float]) =>
    sequence(x :: y :: z :: HNil) must_== ((x |@| y |@| z) { _ :: _ :: _ :: HNil })
  }

  "sequencing Validation" ! prop { (x: Validation[String, Int], y: Validation[String, String], z: Validation[String, Float]) =>
    sequence(x :: y :: z :: HNil) must_== ((x |@| y |@| z) { _ :: _ :: _ :: HNil })
  }

}

// vim: expandtab:ts=2:sw=2

package shapeless.contrib.scalaz

import org.specs2.scalaz.Spec

import scalaz._
import scalaz.scalacheck.ScalazArbitrary._

import shapeless._

class SequenceTest extends Spec {

  import scalaz.std.option._
  import scalaz.std.string._
  import scalaz.syntax.apply._

  "sequencing Option" ! prop { (x: Option[Int], y: Option[String], z: Option[Float]) =>
    sequence(x :: y :: z :: HNil) must_== ((x |@| y |@| z) { _ :: _ :: _ :: HNil })
  }

  "sequencing Validation" ! prop { (x: ValidationNel[String, Int], y: ValidationNel[String, String], z: ValidationNel[String, Float]) =>
    sequence(x :: y :: z :: HNil) must_== ((x |@| y |@| z) { _ :: _ :: _ :: HNil })
  }

  "sequencing Kleisli" ! prop { (x: Kleisli[Option, Int, String], y: Kleisli[Option, Int, Boolean], z: Kleisli[Option, Int, String], i: Int) =>
    sequence(x :: y :: z :: HNil).apply(i) must_== (((x |@| y |@| z) { _ :: _ :: _ :: HNil }).apply(i))
  }

  type ErrorsOr[+A] = ValidationNel[String, A]

  "sequencing Kleisli of ValidationNel" ! prop { (x: Kleisli[ErrorsOr, Int, String], y: Kleisli[ErrorsOr, Int, Boolean], z: Kleisli[ErrorsOr, Int, String], i: Int) =>
    sequence(x :: y :: z :: HNil).apply(i) must_== (((x |@| y |@| z) { _ :: _ :: _ :: HNil }).apply(i))
  }

}

// vim: expandtab:ts=2:sw=2

Add tests for sequencing HLists of Kleislis


package lila
package game

import memo.Builder

final class Cached(
    gameRepo: GameRepo,
    nbTtl: Int) {

  import Cached._

  private val nbCache = Builder.cache[Key, Int](nbTtl, {
    case NbGames ⇒ gameRepo.count(_.all).unsafePerformIO
    case NbMates ⇒ gameRepo.count(_.mate).unsafePerformIO
  })

  def nbGames: Int = nbCache get NbGames

  def nbMates: Int = nbCache get NbMates
}

object Cached {

  sealed trait Key

  case object NbGames extends Key
  case object NbMates extends Key
}

package lila
package game

import akka.actor._
import akka.pattern.ask
import akka.util.duration._
import akka.util.Timeout
import akka.dispatch.{ Future, Await }
import akka.pattern.ask
import akka.util.duration._
import akka.util.Timeout

import play.api.Play.current
import play.api.libs.concurrent._

import memo.Builder

final class Cached(
    gameRepo: GameRepo,
    nbTtl: Int) {

  import Cached._

  val atMost = 5 seconds
  implicit val timeout = Timeout(atMost)

  def nbGames: Int = get(NbGames)

  def nbMates: Int = get(NbMates)

  private def get(key: Key): Int =
    Await.result(actor ? key mapTo manifest[Int], atMost)

  private val actor = Akka.system.actorOf(Props(new Actor {

    private val cache = Builder.cache[Key, Int](nbTtl, {
      case NbGames ⇒ gameRepo.count(_.all).unsafePerformIO
      case NbMates ⇒ gameRepo.count(_.mate).unsafePerformIO
    })

    def receive = {
      case key: Key ⇒ sender ! (cache get key)
    }
  }))
}

object Cached {

  sealed trait Key

  case object NbGames extends Key
  case object NbMates extends Key
}

Use an actor to prevent cache refresh concurrency


package com.softwaremill.bootzooka.test

import com.softwaremill.bootzooka.dao.sql.SqlDatabase
import org.scalatest._

import scala.slick.jdbc.StaticQuery

trait FlatSpecWithSql extends FlatSpec with BeforeAndAfterAll with Matchers {

  private val connectionString = "jdbc:h2:mem:bootzooka_test" + this.getClass.getSimpleName + ";DB_CLOSE_DELAY=-1"

  val sqlDatabase = SqlDatabase.createEmbedded(connectionString)

  override protected def beforeAll() {
    super.beforeAll()
    createAll()
  }

  def clearData() {
    dropAll()
    createAll()
  }

  override protected def afterAll() {
    super.afterAll()
    dropAll()
    sqlDatabase.close()
  }

  private def dropAll() {
    sqlDatabase.db.withSession { implicit session =>
      StaticQuery.updateNA("DROP ALL OBJECTS").execute
    }
  }

  private def createAll() {
    sqlDatabase.updateSchema()
  }
}

package com.softwaremill.bootzooka.test

import com.softwaremill.bootzooka.dao.sql.SqlDatabase
import org.scalatest._
import org.scalatest.concurrent.ScalaFutures

import scala.slick.jdbc.StaticQuery

trait FlatSpecWithSql extends FlatSpec with BeforeAndAfterAll with Matchers with ScalaFutures {

  private val connectionString = "jdbc:h2:mem:bootzooka_test" + this.getClass.getSimpleName + ";DB_CLOSE_DELAY=-1"

  val sqlDatabase = SqlDatabase.createEmbedded(connectionString)

  override protected def beforeAll() {
    super.beforeAll()
    createAll()
  }

  def clearData() {
    dropAll()
    createAll()
  }

  override protected def afterAll() {
    super.afterAll()
    dropAll()
    sqlDatabase.close()
  }

  private def dropAll() {
    import sqlDatabase.driver.api._
    sqlDatabase.db.run(sqlu"DROP ALL OBJECTS").futureValue
  }

  private def createAll() {
    sqlDatabase.updateSchema()
  }
}

Use new Slick API for database test utils


package craft

import java.io.File
import akka.actor.{ Actor, Props }

import org.apache.commons.io.FileUtils

class StorageActor(directory: File) extends Actor {
  import StorageActor._

  private def chunkFile(c: ChunkPosition) = new File(directory, s"${c.p}x${c.q}x${c.k}.chunk")

  def receive = {
    case Load(chunk) =>
      val f = chunkFile(chunk)
      val blocks = if(f.exists) {
        Some(FileUtils.readFileToByteArray(f))
      } else {
        None
      }
      sender ! Loaded(chunk, blocks)
    case Store(chunk, blocks) =>
      val f = chunkFile(chunk)
      FileUtils.writeByteArrayToFile(f, blocks)
  }

}

object StorageActor {
  case class Load(chunk: ChunkPosition)
  case class Loaded(chunk: ChunkPosition, blocks: Option[Array[Byte]])
  case class Store(chunk: ChunkPosition, blocks: Array[Byte])

  def props(directory: File) =
    Props(classOf[StorageActor], directory)
}

package craft

import java.io.File
import akka.actor.{ Actor, Props }

import org.apache.commons.io.FileUtils

class StorageActor(directory: File) extends Actor {
  import StorageActor._

  private def chunkFile(c: ChunkPosition) = new File(directory, s"${c.p}/${c.q}/${c.k}.chunk")

  def receive = {
    case Load(chunk) =>
      val f = chunkFile(chunk)
      val blocks = if(f.exists) {
        Some(FileUtils.readFileToByteArray(f))
      } else {
        None
      }
      sender ! Loaded(chunk, blocks)
    case Store(chunk, blocks) =>
      val f = chunkFile(chunk)
      FileUtils.writeByteArrayToFile(f, blocks)
  }

}

object StorageActor {
  case class Load(chunk: ChunkPosition)
  case class Loaded(chunk: ChunkPosition, blocks: Option[Array[Byte]])
  case class Store(chunk: ChunkPosition, blocks: Array[Byte])

  def props(directory: File) =
    Props(classOf[StorageActor], directory)
}

Store chunks in directory structure

Store chunks in directory structure


package models.film

import play.api.libs.json.Json

object FilmDbKey {
  def apply(id: String) = s"film::$id"
}

case class Film(isbn: String, name: String, release: Int)

object Film {
  implicit val defaultReads = Json.reads[Film]
  implicit val defaultWrites = Json.writes[Film]
}

package models.film

import play.api.libs.json.Json

object FilmDbKey {
  def apply(id: String) = s"film::$id"
}

case class Film(isbn: String, name: String, release: Int)

object Film {
  implicit val defaultFormat = Json.format[Film]
}

Replace Reads and Writes with Format

Replace Reads and Writes with Format


addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")

addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")

Update sbt-scalajs, scalajs-compiler, ... to 1.10.1


val scalaJSVersion = sys.env.getOrElse("SCALAJS_VERSION", "1.5.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")

addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")

val scalaJSVersion = sys.env.getOrElse("SCALAJS_VERSION", "1.5.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")

addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")

Update sbt-scalajs, scalajs-compiler, ... to 1.5.1


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.13"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.10",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.1" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.14"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.10",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.1" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.14


name := "apibuilder-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.7"

crossScalaVersions := Seq("2.12.7", "2.11.12")

version := "0.2.3"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.10",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

name := "apibuilder-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.7"

crossScalaVersions := Seq("2.12.7", "2.11.12")

version := "0.2.4"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.10",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.2.4


name := "couchbase-crud-scala-starter"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  cache,
  "org.reactivecouchbase" %% "reactivecouchbase-play" % "0.3"
)

resolvers += "ReactiveCouchbase" at "https://raw.github.com/ReactiveCouchbase/repository/master/snapshots"

name := "couchbase-crud-scala-starter"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  cache,
  "org.reactivecouchbase" %% "reactivecouchbase-play" % "0.4-SNAPSHOT"
)

resolvers += "ReactiveCouchbase" at "https://raw.github.com/ReactiveCouchbase/repository/master/snapshots"

Update to 0.4 SNAPSHOT and use couchbase.akka


name := "Mongo Async Driver"

organization := "org.asyncmongo"

version := "0.1-SNAPSHOT"

resolvers += "Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/"

resolvers += "Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/"

resolvers += Resolver.file("local repository", file("/Users/sgo/.ivy2/local"))(Resolver.ivyStylePatterns)

libraryDependencies ++= Seq(
	"io.netty" % "netty" % "3.3.1.Final",
	"de.undercouch" % "bson4jackson" % "1.2.0",
	"com.typesafe.akka" % "akka-actor" % "2.0",
	"play" %% "play" % "2.1-SNAPSHOT",
	"ch.qos.logback" % "logback-core" % "1.0.0",
    "ch.qos.logback" % "logback-classic" % "1.0.0"
)

scalacOptions ++= Seq("-unchecked", "-deprecation", "-Ydependent-method-types")

unmanagedSourceDirectories in Compile <+= baseDirectory( _ / "src" / "samples" / "scala" )

publishTo <<= version { (version: String) =>
  val localPublishRepo = "/Volumes/Data/code/repository"
  if(version.trim.endsWith("SNAPSHOT"))
    Some(Resolver.file("snapshots", new File(localPublishRepo + "/snapshots")))
  else Some(Resolver.file("releases", new File(localPublishRepo + "/releases")))
}

publishMavenStyle := true

sources in (Compile, doc) ~= (_ filter (!_.getAbsolutePath.contains("src/samples")))

Fix API documentation SBT task (samples are ignored)


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.74"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.75"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.75


name := "lib-apidoc-json-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.5"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.6",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

name := "lib-apidoc-json-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.6"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.6",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.6


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.89"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.90"

autocommit: Update configuration to record version 0.1.90


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.81"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.5",
      "com.ning" % "async-http-client" % "1.9.39",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.82"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.5",
      "com.ning" % "async-http-client" % "1.9.39",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.82


package utils.actors
import java.io.File
import java.util.UUID
import javax.inject.Inject

import akka.actor._
import com.sksamuel.scrimage.Image
import models.daos.ImageDAO
import utils.azure.BlobStorage
import utils.images.ImageHelper

import scala.concurrent._

class TagImageActor @Inject() (
  blobStorage: BlobStorage, imageDAO: ImageDAO, imageHelper: ImageHelper) extends Actor {
  import TagImageActor._
  import play.api.libs.concurrent.Execution.Implicits.defaultContext

  override def receive = {
    case TagImage(file, user, filename) =>
      val sen = sender
      try {
        val image = Image.fromFile(file)
        for {
          (height, width) <- Future.successful((image.height, image.width))
          thumbnail <- imageHelper.createThumbnail(image)
          convertedImage <- imageHelper.convertImageToJpeg(image)
          (url, date) <- blobStorage.upload(convertedImage.file, "image/jpeg")
          (thumbnailUrl, _) <- blobStorage.upload(thumbnail.file, "image/jpeg")
          image <- imageDAO.create(url, Some(thumbnailUrl), date, user, height, width, filename)
        } yield sen ! Right(image)
      } catch {
        case e: Exception => {
          sen ! Left(e)
        }
      }
  }
}

object TagImageActor {
  def props = Props[TagImageActor]
  case class TagImage(file: File, user: UUID, filename: String)
}

package utils.actors
import java.io.File
import java.util.UUID
import javax.inject.Inject

import akka.actor._
import com.sksamuel.scrimage.Image
import models.daos.ImageDAO
import utils.azure.BlobStorage
import utils.images.ImageHelper

import scala.concurrent._

class TagImageActor @Inject() (
  blobStorage: BlobStorage, imageDAO: ImageDAO, imageHelper: ImageHelper) extends Actor {
  import TagImageActor._
  import play.api.libs.concurrent.Execution.Implicits.defaultContext

  override def receive = {
    case TagImage(file, user, filename) =>
      val sen = sender
      try {
        val image = Image.fromFile(file)
        (for {
          (height, width) <- Future.successful((image.height, image.width))
          thumbnail <- imageHelper.createThumbnail(image)
          convertedImage <- imageHelper.convertImageToJpeg(image)
          (url, date) <- blobStorage.upload(convertedImage.file, "image/jpeg")
          (thumbnailUrl, _) <- blobStorage.upload(thumbnail.file, "image/jpeg")
          image <- imageDAO.create(url, Some(thumbnailUrl), date, user, height, width, filename)
        } yield image).map {
          image => sen ! Right(image)
        }.onFailure {
          case t => sen ! Left(t)
        }
      } catch {
        case e: Exception => {
          sen ! Left(e)
        }
      }
  }
}

object TagImageActor {
  def props = Props[TagImageActor]
  case class TagImage(file: File, user: UUID, filename: String)
}

Make TagimageActor better for error recovery


package org.http4s.websocket

import fs2._
import org.http4s.websocket.WebsocketBits.WebSocketFrame

private[http4s] final case class Websocket[F[_]](
    @deprecatedName('read, "0.18-M6") send: Stream[F, WebSocketFrame],
    @deprecatedName('write, "0.18-M6") receive: Sink[F, WebSocketFrame]
) {
  def read: Stream[F, WebSocketFrame] = send
  def write: Sink[F, WebSocketFrame] = receive
}

package org.http4s.websocket

import fs2._
import org.http4s.websocket.WebsocketBits.WebSocketFrame

private[http4s] final case class Websocket[F[_]](
    @deprecatedName('read, "0.18.0-M7") send: Stream[F, WebSocketFrame],
    @deprecatedName('write, "0.18.0-M7") receive: Sink[F, WebSocketFrame]
) {
  def read: Stream[F, WebSocketFrame] = send
  def write: Sink[F, WebSocketFrame] = receive
}

Fix to correct deprecation version

Fix to correct deprecation version


package uk.gov.dvla.vehicles.presentation.common.controllers

import com.google.inject.Inject
import play.api.data.Form
import play.api.mvc.{Action, Controller}
import uk.gov.dvla.vehicles.presentation.common.models
import uk.gov.dvla.vehicles.presentation.common.services.DateService
import uk.gov.dvla.vehicles.presentation.common.views
import uk.gov.dvla.vehicles.presentation.common.clientsidesession.ClientSideSessionFactory
import uk.gov.dvla.vehicles.presentation.common.clientsidesession.CookieImplicits.RichForm

class DateOfSaleController @Inject()(implicit clientSideSessionFactory: ClientSideSessionFactory,
                                    dateService: DateService)
  extends Controller {

  private[controllers] val form = Form(models.DateOfSaleModel.Form.detailMapping)

  def present = Action { implicit request =>
    Ok(views.html.valtechDateOfSaleView(form.fill()))
  }

  def submit = Action {
    implicit request => {
      form.bindFromRequest.fold(
        invalidForm => BadRequest(views.html.valtechDateOfSaleView(invalidForm)),
        validForm => {
          val msg = s"Success - you have correctly declared your intent to proceed"
          Ok(views.html.success(msg))
        }
      )
    }
  }
}

package uk.gov.dvla.vehicles.presentation.common.controllers

import com.google.inject.Inject
import play.api.data.Form
import play.api.mvc.{Action, Controller}
import uk.gov.dvla.vehicles.presentation.common.models
import uk.gov.dvla.vehicles.presentation.common.views
import uk.gov.dvla.vehicles.presentation.common.clientsidesession.ClientSideSessionFactory
import uk.gov.dvla.vehicles.presentation.common.clientsidesession.CookieImplicits.RichForm

class DateOfSaleController @Inject()(implicit clientSideSessionFactory: ClientSideSessionFactory)
  extends Controller {

  private[controllers] val form = Form(models.DateOfSaleModel.Form.detailMapping)

  def present = Action { implicit request =>
    Ok(views.html.valtechDateOfSaleView(form.fill()))
  }

  def submit = Action {
    implicit request => {
      form.bindFromRequest.fold(
        invalidForm => BadRequest(views.html.valtechDateOfSaleView(invalidForm)),
        validForm => {
          val msg = s"Success - you have correctly declared your intent to proceed"
          Ok(views.html.success(msg))
        }
      )
    }
  }
}

Revert "US2099: Added missing dateService implicit."

This reverts commit 319fa54b1a1bebf61c115b0709681532c87f9981.


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.95"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.96"

autocommit: Update configuration to record version 0.1.96


import com.github.retronym.SbtOneJar._
import sbt.Credentials

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.7"

version := "0.2.6"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "io.flow" %% "lib-util" % "0.1.2",
      "io.flow" %% "apibuilder-validation" % "0.3.6",
      "com.typesafe.play" %% "play-json" % "2.6.10",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/"

credentials += Credentials(
  "Artifactory Realm",
  "flow.jfrog.io",
  System.getenv("ARTIFACTORY_USERNAME"),
  System.getenv("ARTIFACTORY_PASSWORD")
)

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._
import sbt.Credentials

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.7"

version := "0.2.7"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "io.flow" %% "lib-util" % "0.1.2",
      "io.flow" %% "apibuilder-validation" % "0.3.6",
      "com.typesafe.play" %% "play-json" % "2.6.10",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/"

credentials += Credentials(
  "Artifactory Realm",
  "flow.jfrog.io",
  System.getenv("ARTIFACTORY_USERNAME"),
  System.getenv("ARTIFACTORY_PASSWORD")
)

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.2.7


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion := "2.13.1"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.2.0" % Test,
      compilerPlugin("com.github.ghik" %% "silencer-plugin" % "1.6.0" cross CrossVersion.full),
      "com.github.ghik" %% "silencer-lib" % "1.6.0" % Provided cross CrossVersion.full,
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

// silence all warnings on autogenerated files
flowGeneratedFiles ++= Seq(
  "src/main/scala/io/flow/generated/.*".r,
)

// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"

version := "0.2.49"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion := "2.13.1"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.2.0" % Test,
      compilerPlugin("com.github.ghik" %% "silencer-plugin" % "1.6.0" cross CrossVersion.full),
      "com.github.ghik" %% "silencer-lib" % "1.6.0" % Provided cross CrossVersion.full,
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

// silence all warnings on autogenerated files
flowGeneratedFiles ++= Seq(
  "src/main/scala/io/flow/generated/.*".r,
)

// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"

version := "0.2.50"

autocommit: Update configuration to record version 0.2.50


organization := "yle"

name := "newrelic-servlet-filter"

version := "1.0.0"

scalaVersion := "2.10.4"

libraryDependencies ++= Seq(
  "com.newrelic.agent.java" % "newrelic-api"      % "3.7.1" % "compile",
  "javax.servlet"           % "javax.servlet-api" % "3.1.0" % "compile,provided",
  "org.scalatra"            %% "scalatra"         % "2.2.1" % "compile,provided"
)

organization := "yle"

name := "newrelic-servlet-filter"

version := "1.0.0"

scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
  "com.newrelic.agent.java" % "newrelic-api"      % "3.20.0" % "compile",
  "javax.servlet"           % "javax.servlet-api" % "3.1.0" % "compile,provided",
  "org.scalatra"            %% "scalatra"         % "2.3.1" % "compile,provided"
)

Make scala 2.11 compatible version

Make scala 2.11 compatible version


import sbt._
import Keys._
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._

object Dependencies {
  lazy val jaxbApi = "javax.xml.bind" % "jaxb-api" % "2.3.1" % "test"

  lazy val jodaTime = Seq(
    "joda-time" % "joda-time" % "2.11.2",
    "org.joda" % "joda-convert" % "2.2.2"
  )
  lazy val jackson = Seq(
    "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.4"
  )
  lazy val scalaz_core = Def.setting(
    "org.scalaz" %%% "scalaz-core" % "7.3.6"
  )
  lazy val paranamer = "com.thoughtworks.paranamer" % "paranamer" % "2.8"
  lazy val scalatest = Def.setting(
    Seq("org.scalatest" %%% "scalatest-wordspec" % "3.2.13" % "test")
  )
  lazy val scalatestScalacheck = Def.setting(
    Seq("org.scalatestplus" %%% "scalacheck-1-16" % "3.2.13.0" % "test")
  )

  lazy val scalaXml = Def.setting {
    "org.scala-lang.modules" %%% "scala-xml" % "2.1.0"
  }
}

import sbt._
import Keys._
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._

object Dependencies {
  lazy val jaxbApi = "javax.xml.bind" % "jaxb-api" % "2.3.1" % "test"

  lazy val jodaTime = Seq(
    "joda-time" % "joda-time" % "2.11.2",
    "org.joda" % "joda-convert" % "2.2.2"
  )
  lazy val jackson = Seq(
    "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.4"
  )
  lazy val scalaz_core = Def.setting(
    "org.scalaz" %%% "scalaz-core" % "7.3.6"
  )
  lazy val paranamer = "com.thoughtworks.paranamer" % "paranamer" % "2.8"
  lazy val scalatest = Def.setting(
    Seq("org.scalatest" %%% "scalatest-wordspec" % "3.2.14" % "test")
  )
  lazy val scalatestScalacheck = Def.setting(
    Seq("org.scalatestplus" %%% "scalacheck-1-16" % "3.2.13.0" % "test")
  )

  lazy val scalaXml = Def.setting {
    "org.scala-lang.modules" %%% "scala-xml" % "2.1.0"
  }
}

Update scalatest-wordspec to 3.2.14 in master


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.45"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.2",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.46"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.2",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.46


package api

import akka.actor.{ ActorRef, ActorSystem }
import akka.pattern.ask
import akka.util.Timeout
import feature.Feature
import geojson.FeatureJsonProtocol.FeatureFormat
import model.{ TotalHits, Hits, AddressSearchResult }
import scala.concurrent.duration._
import spray.routing.{ Directives, Route }
import scala.concurrent.ExecutionContext.Implicits.global
import spray.json._

trait GeocodeApi extends Directives {

  implicit val timeout = Timeout(10 seconds)

  def geocodeRoute(addressSearch: ActorRef)(implicit system: ActorSystem): Route = {
    path("") {
      getFromResource("web/index.html")
    } ~ {
      getFromResourceDirectory("web")
    } ~
      path("test") {
        get {
          complete {
            "OK"
          }
        }
      } ~
      path("address" / "point" / "suggest") {
        import core.AddressSearch._
        parameter('queryString.as[String]) { term =>
          get {
            complete {
              (addressSearch ? Query("address", "point", term)).collect {
                case s: String => s
                case _ => "Failure"
              }
            }
          }
        }
      }

  }

}

package api

import akka.actor.{ ActorRef, ActorSystem }
import akka.pattern.ask
import akka.util.Timeout
import feature.Feature
import geojson.FeatureJsonProtocol.FeatureFormat
import model.{ TotalHits, Hits, AddressSearchResult }
import scala.concurrent.duration._
import spray.routing.{ Directives, Route }
import scala.concurrent.ExecutionContext.Implicits.global
import spray.json._
import spray.http.MediaTypes._

trait GeocodeApi extends Directives {

  implicit val timeout = Timeout(10 seconds)

  def geocodeRoute(addressSearch: ActorRef)(implicit system: ActorSystem): Route = {
    path("") {
      getFromResource("web/index.html")
    } ~ {
      getFromResourceDirectory("web")
    } ~
      path("test") {
        get {
          complete {
            "OK"
          }
        }
      } ~
      path("address" / "point") {
        post {
          complete {
            "Batch Geocoding"
          }
        }
      } ~
      path("address" / "point" / "suggest") {
        import core.AddressSearch._
        parameter('queryString.as[String]) { term =>
          get {
            respondWithMediaType(`application/json`) {
              compressResponseIfRequested() {
                complete {
                  (addressSearch ? Query("address", "point", term)).collect {
                    case s: String => s
                    case _ => "Failure"
                  }
                }
              }
            }
          }
        }
      }

  }

}

Add json return and compression

Add json return and compression


import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.23"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.6" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.24"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.6" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

Increment version from 0.0.23 => 0.0.24

Increment version from 0.0.23 => 0.0.24


androidBuildAar

autoScalaLibrary := false

githubProject := "floatinglabellayout"

javacOptions ++=
    "-source" :: "1.7" ::
    "-target" :: "1.7" ::
    Nil

libraryDependencies ++=
    "com.android.support" % "design" % "23.1.1" ::
    Nil

minSdkVersion := "7"

name := "FloatingLabelLayout"

normalizedName := "floating-label-layout"

organization := "io.taig.android"

platformTarget := "android-23"

publishArtifact in ( Compile, packageDoc ) := false

scalaVersion := "2.11.7"

scalacOptions ++=
    "-deprecation" ::
    "-feature" ::
    Nil

targetSdkVersion := "23"

typedResources := false

version := "1.1.1"

androidBuildAar

autoScalaLibrary := false

githubProject := "floatinglabellayout"

javacOptions ++=
    "-source" :: "1.7" ::
    "-target" :: "1.7" ::
    Nil

libraryDependencies ++=
    "com.android.support" % "design" % "23.2.0" ::
    Nil

minSdkVersion := "7"

name := "FloatingLabelLayout"

normalizedName := "floating-label-layout"

organization := "io.taig.android"

platformTarget := "android-23"

publishArtifact in ( Compile, packageDoc ) := false

scalaVersion := "2.11.7"

scalacOptions ++=
    "-deprecation" ::
    "-feature" ::
    Nil

targetSdkVersion := "23"

typedResources := false

version := "1.1.1"

Upgrade to android support 23.2.0

Upgrade to android support 23.2.0


name := "sphere-sunrise"

organization := "io.sphere"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava).configs(IntegrationTest)

scalaVersion := "2.10.4"

javacOptions ++= Seq("-source", "1.7", "-target", "1.7")

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies ++= Seq(
  "io.sphere.jvmsdk" %% "play-sdk" % "1.0.0-SNAPSHOT"
)

name := "sphere-sunrise"

organization := "io.sphere"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava).configs(IntegrationTest)

scalaVersion := "2.10.4"

javacOptions ++= Seq("-source", "1.7", "-target", "1.7")

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies ++= Seq(
  "io.sphere.jvmsdk" %% "play-sdk" % "1.0.0-20140606-SNAPSHOT"
)

Use named snapshot of SDK.

Use named snapshot of SDK.


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.81"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.82"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.82


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.53"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.4",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.54"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.4",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.54


name := "planning"

organization := "fr.laas.fape"

version := "0.2-SNAPSHOT"

libraryDependencies ++= Seq(
  "com.martiansoftware" % "jsap" % "2.1",
  "junit" % "junit" % "4.12" % "test",
  "fr.laas.fape" %% "graphs" % "0.8-SNAPSHOT",
  "fr.laas.fape" %% "anml-parser" % "0.8-SNAPSHOT",
  "fr.laas.fape" %% "constraints" % "0.8-SNAPSHOT",
  "fr.laas.fape" %% "svg-plot"    % "0.1-SNAPSHOT",
  "de.sciss" % "prefuse-core" % "1.0.0"
)

javaOptions in run ++= Seq("-Xmx3000m", "-ea")

fork in run := true

pomExtra :=
<build>
  <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
</build>

com.github.retronym.SbtOneJar.oneJarSettings

exportJars := true

mainClass in oneJar := Some("fape.Planning")

name := "planning"

organization := "fr.laas.fape"

version := "0.2-SNAPSHOT"

resolvers += "FAPE Nightly" at "http://www.laas.fr/~abitmonn/maven/"

libraryDependencies ++= Seq(
  "com.martiansoftware" % "jsap" % "2.1",
  "junit" % "junit" % "4.12" % "test",
  "fr.laas.fape" %% "graphs" % "0.8-SNAPSHOT",
  "fr.laas.fape" %% "anml-parser" % "0.8-SNAPSHOT",
  "fr.laas.fape" %% "constraints" % "0.8-SNAPSHOT",
  "fr.laas.fape" %% "svg-plot"    % "0.1-SNAPSHOT",
  "de.sciss" % "prefuse-core" % "1.0.0"
)

javaOptions in run ++= Seq("-Xmx3000m", "-ea")

fork in run := true

pomExtra :=
<build>
  <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
</build>

com.github.retronym.SbtOneJar.oneJarSettings

exportJars := true

mainClass in oneJar := Some("fape.Planning")

Add the FAPE nightly repository as a resolver for dependencies


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.24"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.12",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.1" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.25"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.12",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.1" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.25


name := "sbt-typelevel"

ThisBuild / organization := "org.typelevel"
ThisBuild / organizationName := "Typelevel"

ThisBuild / scalaVersion := "2.12.15"

lazy val root = project.in(file("."))

lazy val noPublish = project
  .in(file("no-publish"))
  .enablePlugins(SbtPlugin, NoPublishPlugin)
  .settings(
    name := "sbt-typlevel-no-publish"
  )

name := "sbt-typelevel"

ThisBuild / organization := "org.typelevel"
ThisBuild / organizationName := "Typelevel"

ThisBuild / scalaVersion := "2.12.15"

lazy val root = project.in(file(".")).enablePlugins(NoPublishPlugin)

lazy val noPublish = project
  .in(file("no-publish"))
  .enablePlugins(SbtPlugin)
  .settings(
    name := "sbt-typlevel-no-publish"
  )

Use no-publish on root actually :)

Use no-publish on root actually :)


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.29"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.1",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.30"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.1",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.30


sbtPlugin := true

organization := "io.teamscala.sbt"

name := "sbt-babel"

description := "An SBT plugin to perform Babel compilation."

scalaVersion := "2.10.5"

resolvers += Resolver.typesafeRepo("releases")

libraryDependencies ++= Seq(
  "com.typesafe" % "jstranspiler" % "1.0.0"
)

addSbtPlugin("com.typesafe.sbt" %% "sbt-js-engine" % "1.1.3")

licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))

sbtPlugin := true

organization := "io.teamscala.sbt"

name := "sbt-babel"

description := "An SBT plugin to perform Babel compilation."

scalaVersion := "2.10.5"

resolvers += Resolver.typesafeRepo("releases")

libraryDependencies ++= Seq(
  "com.typesafe" % "jstranspiler" % "1.0.1"
)

addSbtPlugin("com.typesafe.sbt" %% "sbt-js-engine" % "1.1.3")

licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))

Update to latest jstranspiler 1.0.1

Update to latest jstranspiler 1.0.1


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.7"

crossScalaVersions := Seq("2.12.7")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.2.7"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.7"

crossScalaVersions := Seq("2.12.7")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.2.8"

autocommit: Update configuration to record version 0.2.8


name := "js-libs"

version := "2.4-0.4"

organization := "net.liftmodules"

scalaVersion := "2.9.1"

crossScalaVersions := Seq("2.8.1", "2.9.0-1", "2.9.1")

resolvers += "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"

libraryDependencies ++= {
  val liftVersion = "2.4"
  Seq("net.liftweb" %% "lift-webkit" % liftVersion % "compile->default")
}

// Customize any further dependencies as desired
libraryDependencies ++= Seq(
  "javax.servlet" % "servlet-api" % "2.5" % "provided->default",
  "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default" // Logging
)

 // To publish to the Cloudbees repos:

publishTo := Some("liftmodules repository" at "https://repository-liftmodules.forge.cloudbees.com/release/")

credentials += Credentials( file("/private/liftmodules/cloudbees.credentials") )

name := "js-libs"

version := "2.5-SNAPSHOT-0.4"

organization := "net.liftmodules"

scalaVersion := "2.9.2"

resolvers += "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"

resolvers += "snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

libraryDependencies ++= {
  val liftVersion = "2.5-SNAPSHOT"
  Seq("net.liftweb" %% "lift-webkit" % liftVersion % "compile->default")
}

// Customize any further dependencies as desired
libraryDependencies ++= Seq(
  "javax.servlet" % "servlet-api" % "2.5" % "provided->default",
  "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default" // Logging
)

 // To publish to the Cloudbees repos:

publishTo := Some("liftmodules repository" at "https://repository-liftmodules.forge.cloudbees.com/release/")

credentials += Credentials( file("/private/liftmodules/cloudbees.credentials") )

Update to 2.5 SNAPSHOT and 2.9.2

Update to 2.5 SNAPSHOT and 2.9.2

dropped support for previous versions of scala.


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion := "2.13.3"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.2.2" % Test,
      compilerPlugin("com.github.ghik" %% "silencer-plugin" % "1.7.0" cross CrossVersion.full),
      "com.github.ghik" %% "silencer-lib" % "1.7.0" % Provided cross CrossVersion.full,
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

// silence all warnings on autogenerated files
flowGeneratedFiles ++= Seq(
  "src/main/scala/io/flow/generated/.*".r,
)

// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"

version := "0.2.55"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion := "2.13.3"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.2.2" % Test,
      compilerPlugin("com.github.ghik" %% "silencer-plugin" % "1.7.0" cross CrossVersion.full),
      "com.github.ghik" %% "silencer-lib" % "1.7.0" % Provided cross CrossVersion.full,
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

// silence all warnings on autogenerated files
flowGeneratedFiles ++= Seq(
  "src/main/scala/io/flow/generated/.*".r,
)

// Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"

version := "0.2.56"

autocommit: Update configuration to record version 0.2.56


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.74"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.75"

autocommit: Update configuration to record version 0.1.75


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.80"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.81"

autocommit: Update configuration to record version 0.1.81


import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

crossScalaVersions := Seq("2.11.8")

version := "0.3.0"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      filters,
      "com.jason-goodwin" %% "authentikat-jwt" % "0.4.3",
      "org.scalatestplus" %% "play" % "1.4.0" % "test"
    ),
    resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
    resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
    resolvers += "Artifactory" at "https://flow.artifactoryonline.com/flow/libs-release/",
    credentials += Credentials(
      "Artifactory Realm",
      "flow.artifactoryonline.com",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

crossScalaVersions := Seq("2.11.8")

version := "0.3.1"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      filters,
      "com.jason-goodwin" %% "authentikat-jwt" % "0.4.3",
      "org.scalatestplus" %% "play" % "1.4.0" % "test"
    ),
    resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
    resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
    resolvers += "Artifactory" at "https://flow.artifactoryonline.com/flow/libs-release/",
    credentials += Credentials(
      "Artifactory Realm",
      "flow.artifactoryonline.com",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.3.1


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.49"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.2",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.1.50"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.2",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.50


lazy val root = (project in file(".")).
  settings(
    name := "hello",
    libraryDependencies += "org.scala-lang" % "scala-swing" % "2.10+",
    libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.5+" % "test",
    scalacOptions += "-feature",
    scalacOptions += "-language:implicitConversions",
    scalacOptions += "-language:postfixOps"
  )

lazy val root = (project in file(".")).
  settings(
    name := "hello",
    libraryDependencies += "org.scala-lang" % "scala-swing" % "2.10+",
    libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.5+" % "test",
    scalacOptions += "-feature",
    scalacOptions += "-language:implicitConversions",
    scalacOptions += "-language:postfixOps",
    mainClass in (Compile, run) := Some("com.App")
  )

Build defaults to running launch.scala's App


import leon.lang._
import leon.annotation._
import leon._

object Operators {

  def foo(a: Int): Int = {
    require(a > 0)

    {
      val b = a
      assert(b > 0, "Hey now")
      b + bar(1)
    } ensuring { _ < 2 }

  } ensuring {
    _ > a
  }

  def bar(a: Int): Int = {
    require(a > 0)

    {
      val b = a
      assert(b > 0, "Hey now")
      b + 2
    } ensuring { _ > 2 }

  } ensuring {
    _ > a
  }
}

import leon.lang._
import leon.annotation._
import leon._

object Operators {

  def foo(a: Int): Int = {
    require(a > 0)
    val b = a
    assert(b > 0, "Hey now")
    b + bar(1)
  } ensuring { res =>
    res > a && res < 2
  }

  def bar(a: Int): Int = {
    require(a > 0)
    val b = a
    assert(b > 0, "Hey now")
    b + 2
  } ensuring { res =>
    res > a && res > 2
  }
}

Rename Passes to Gives, and further integration


package info.spielproject.spiel
package focus

import android.view.accessibility._

case class RichAccessibilityNode(node:AccessibilityNodeInfo) {

  def root = {
    def iterate(v:AccessibilityNodeInfo):AccessibilityNodeInfo = v.getParent match {
      case null => v
      case v2 => iterate(v2)
    }
    iterate(node)
  }

  def parent = node.getParent

  def children =
    (for(i <- 0 to node.getChildCount-1) yield(node.getChild(i))).toList.filterNot(_ == null)

  def siblings = node.parent.children

  def descendants:List[AccessibilityNodeInfo] = children.map { c =>
    List(c)++c.descendants
  }.flatten

}

package info.spielproject.spiel
package focus

import android.view.accessibility._

case class RichAccessibilityNode(node:AccessibilityNodeInfo) {

  def root = {
    def iterate(v:AccessibilityNodeInfo):AccessibilityNodeInfo = v.getParent match {
      case null => v
      case v2 => iterate(v2)
    }
    iterate(node)
  }

  def parent = node.getParent

  def children =
    (for(i <- 0 to node.getChildCount-1) yield(node.getChild(i))).toList.filterNot(_ == null)

  def siblings = parent.children

  def descendants:List[AccessibilityNodeInfo] = children.map { c =>
    List(c)++c.descendants
  }.flatten

}

Remove an unnecessary node reference.

Remove an unnecessary node reference.

--HG--
extra : convert_revision : 2916b7a1721b1c93ab08b02dbce6d296f2982c93


/*
 * Copyright 2005-2009 LAMP/EPFL
 */
// $Id$

package scala.tools.eclipse.util

import scala.tools.nsc.Settings

object IDESettings {
  def shownSettings(s : Settings) : List[Settings.Setting]= {
    import s._
    List(
      deprecation, debuginfo, XO, target, unchecked,
      checkInit, noassertions, elideLevel, Xexperimental, future, XlogImplicits, nouescape, XnoVarargsConversion, pluginsDir,
      Xcloselim, Xdce, Xdetach, inline, Xlinearizer, Ynogenericsig, noimports, nopredefs, selfInAnnots, Xsqueeze, specialize, Ytailrec,
      Xwarninit, Xchecknull, Xwarndeadcode, YwarnShadow, YwarnCatches, Xwarnings)
  }
}

/*
 * Copyright 2005-2009 LAMP/EPFL
 */
// $Id$

package scala.tools.eclipse.util

import scala.tools.nsc.Settings

object IDESettings {
  def shownSettings(s : Settings) : List[Settings.Setting]= {
    import s._
    List(
      deprecation, debuginfo, XO, target, unchecked,
      checkInit, noassertions, Xexperimental, future, XlogImplicits, nouescape, XnoVarargsConversion, pluginsDir,
      Xcloselim, Xdce, Xdetach, inline, Xlinearizer, Ynogenericsig, noimports, nopredefs, selfInAnnots, Xsqueeze, specialize, Ytailrec,
      Xwarninit, Xchecknull, Xwarndeadcode, YwarnShadow, YwarnCatches, Xwarnings)
  }
}

Drop elideLevel for the time being.

Drop elideLevel for the time being.

git-svn-id: d518d5b67c3faf3e6f0db4ab9fe5fb399964ea1a@19279 5e8d7ff9-d8ef-0310-90f0-a4852d11357a


package me.tfeng.play.plugins

object Versions {

  val project = "0.4.0"

  val sbtPlugins = "0.4.0"

  val scala = "2.10.4"

  val avro = "1.7.7"

  val junit = "4.11"

  val kafka = "0.8.2.1"

  val mockito = "1.10.19"

  val mongoDb = "3.0.1"

  val spring = "4.0.9.RELEASE"

  val springSecurity = "3.2.6.RELEASE"

  val springSecurityOauth = "2.0.7.RELEASE"

  val dustjs = "2.6.1"

  val httpComponents = "4.4.1"

  val webjarsLocator = "0.23"

  val zookeeper = "3.4.6"
}

package me.tfeng.play.plugins

object Versions {

  val project = "0.4.1-SNAPSHOT"

  val sbtPlugins = "0.4.0"

  val scala = "2.10.4"

  val avro = "1.7.7"

  val junit = "4.11"

  val kafka = "0.8.2.1"

  val mockito = "1.10.19"

  val mongoDb = "3.0.1"

  val spring = "4.1.6.RELEASE"

  val springSecurity = "4.0.1.RELEASE"

  val springSecurityOauth = "2.0.7.RELEASE"

  val dustjs = "2.6.1"

  val httpComponents = "4.4.1"

  val webjarsLocator = "0.23"

  val zookeeper = "3.4.6"
}

Upgrade spring and spring-security to latest version.


/* --------------------------------------------------------
        Cloud4Things command-line Application Tool

    * The C4T command-line application tool allows to desc
    cribe and configure an scenario for a EPC application
    based on Fosstrak. The command-line allow to perform
    the following operations:

    - Configure the Filter & Collection server endpoints.
    - Configure the reader that are in the smart-place.
    - Configure the event-cycles that are associated with
      each reader.
   ------------------------------------------------------- */
import scala.io.Source

object Cloud4ThingsCLI {

  // Filtering & Collection endpoints
  var ALEServiceURL : String;
  var ALELRServiceURL : String;

  val listOptions = List("1 - Set ALELRService endpoint", "2 - Set ALEService endpoint",
                        "3 - Define Reader", "4 - Define Event-Cycle", "5 - Help")

  def printOptions() {
    listOptions.foreach(println)
    print("Cloud4ThingsCLI:> ")
  }

  def setALELRServiceURL(url: String) { this.ALELRServiceURL = url }

  def setALEServiceURL(url: String) { this.ALEServiceURL = url  }

  def defineReader(name: String) : Boolean = {
    true
  }

  def defineEventCycle(name: String) : Boolean = {
    true
  }

  def subscribeEventCycle(name: String, url: String) : Boolean = {
    true
  }

  def main(args: Array[String]): Unit = {
    printOptions()
    for (line <- stdin.getLines)
      printOptions()
  }
}

/* --------------------------------------------------------
        Cloud4Things command-line Application Tool

    * The C4T command-line application tool allows to desc
    cribe and configure an scenario for a EPC application
    based on Fosstrak. The command-line allow to perform
    the following operations:

    - Configure the Filter & Collection server endpoints.
    - Configure the reader that are in the smart-place.
    - Configure the event-cycles that are associated with
      each reader.
   ------------------------------------------------------- */
import scala.io.Source

object Cloud4ThingsCLI {

  // Filtering & Collection endpoints variables
  var ALEServiceURL : String = _
  var ALELRServiceURL : String = _

  val listOptions = List("1 - Set ALELRService endpoint", "2 - Set ALEService endpoint",
                        "3 - Define Reader", "4 - Define Event-Cycle", "5 - Help")

  def printOptions() {
    listOptions.foreach(println)
    print("Cloud4ThingsCLI:> ")
  }

  def setALELRServiceURL(url: String) { this.ALELRServiceURL = url }

  def setALEServiceURL(url: String) { this.ALEServiceURL = url }

  def defineReader(name: String) : Boolean = {
    true
  }

  def defineEventCycle(name: String) : Boolean = {
    true
  }

  def subscribeEventCycle(name: String, url: String) : Boolean = {
    true
  }

  def main(args: Array[String]): Unit = {
    printOptions()
    for (line <- Source.stdin.getLines)
      printOptions()
  }
}

Fix an error on command-line tool

Fix an error on command-line tool


package io.continuum.bokeh
package sampledata
package iris

object Flowers extends SampleData {
    def load(): FlowersData = {
        val List(petal_length, petal_width, sepal_length, sepal_width, species) = loadRows("iris.csv").transpose
        FlowersData(petal_length.map(_.toDouble),
                    petal_width.map(_.toDouble),
                    sepal_length.map(_.toDouble),
                    sepal_width.map(_.toDouble),
                    species)
    }
}

case class FlowersData(
    petal_length: List[Double],
    petal_width: List[Double],
    sepal_length: List[Double],
    sepal_width: List[Double],
    species: List[String])

package io.continuum.bokeh
package sampledata
package iris

object Flowers extends SampleData {
    def load(): FlowersData = {
        val List(sepal_length, sepal_width, petal_length, petal_width, species) = loadRows("iris.csv").transpose
        FlowersData(petal_length.map(_.toDouble),
                    petal_width.map(_.toDouble),
                    sepal_length.map(_.toDouble),
                    sepal_width.map(_.toDouble),
                    species)
    }
}

case class FlowersData(
    petal_length: List[Double],
    petal_width: List[Double],
    sepal_length: List[Double],
    sepal_width: List[Double],
    species: List[String])

Fix column order in Flowers sample dataset


object Versions {
  val scalaJsDom = "1.0.0"
  val scalaJsReact = "1.7.4"
}

object Versions {
  val scalaJsDom = "1.0.0"
  val scalaJsReact = "1.7.5"
}

Update scalajs-react:core, ... to 1.7.5

Update scalajs-react:core, ... to 1.7.5


package doodle
package image

package object syntax extends ImageSyntax with TraverseImageSyntax {
  object image extends ImageSyntax
  object traverse extends TraverseImageSyntax
}

package doodle
package image

package object syntax extends ImageSyntax with TraverseImageSyntax {
  object image extends ImageSyntax
  object traverse extends TraverseImageSyntax

  /**
   * The core object defines syntax for doodle.core, which is a convenient way
   * to avoid pulling in Algebra syntax that may conflict with Image.
   */
  object core
      extends doodle.syntax.AngleSyntax
      with doodle.syntax.NormalizedSyntax
      with doodle.syntax.UnsignedByteSyntax
}

Add syntax to make it easier to use Image

You can just import `doodle.image.syntax.core_` to get syntax for `Angle` and
so on without getting syntax for the algebras. Some of the algebra syntax could
cause confusing conflicts with methods on `Image`.


name := "play2-graylog2"

organization := "org.graylog2"

version := "1.2"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

libraryDependencies ++= Seq(
)

// Settings for publishing to Maven Central, see http://www.scala-sbt.org/0.13/docs/Using-Sonatype.html
publishMavenStyle := true

publishTo := {
  val nexus = "https://oss.sonatype.org/"
  if (isSnapshot.value)
    Some("snapshots" at nexus + "content/repositories/snapshots")
  else
    Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

licenses := Seq("Apache 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))

homepage := Some(url("https://github.com/Graylog2/play2-graylog2"))

pomExtra := (
  <scm>
    <url>https://github.com/Graylog2/play2-graylog2</url>
    <connection>scm:git:https://github.com/Graylog2/play2-graylog2.git</connection>
    <developerConnection>scm:git:git@github.com:Graylog2/play2-graylog2.git</developerConnection>
  </scm>
    <developers>
      <developer>
        <id>kroepke</id>
        <name>Kay Roepke</name>
      </developer>
    </developers>)

name := "play2-graylog2"

organization := "org.graylog2"

version := "1.2"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

javacOptions ++= Seq("-source", "1.7", "-target", "1.7")

libraryDependencies ++= Seq(
)

// Settings for publishing to Maven Central, see http://www.scala-sbt.org/0.13/docs/Using-Sonatype.html
publishMavenStyle := true

publishTo := {
  val nexus = "https://oss.sonatype.org/"
  if (isSnapshot.value)
    Some("snapshots" at nexus + "content/repositories/snapshots")
  else
    Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

licenses := Seq("Apache 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))

homepage := Some(url("https://github.com/Graylog2/play2-graylog2"))

pomExtra := (
  <scm>
    <url>https://github.com/Graylog2/play2-graylog2</url>
    <connection>scm:git:https://github.com/Graylog2/play2-graylog2.git</connection>
    <developerConnection>scm:git:git@github.com:Graylog2/play2-graylog2.git</developerConnection>
  </scm>
    <developers>
      <developer>
        <id>kroepke</id>
        <name>Kay Roepke</name>
      </developer>
    </developers>)

Make sure that compilation target is Java 7


import sbt._
import sbt.Keys._

object GardensBuild extends samskivert.MavenBuild {

  override val globalSettings = Seq(
    crossPaths    := false,
    scalacOptions ++= Seq("-unchecked", "-deprecation"),
    javacOptions  ++= Seq("-Xlint", "-Xlint:-serial", "-source", "1.6", "-target", "1.6"),
    javaOptions   ++= Seq("-ea"),
    fork in Compile := true,
    autoScalaLibrary in Compile := false, // no scala-library dependency (except for tests)
    libraryDependencies ++= Seq(
      "com.novocode" % "junit-interface" % "0.8" % "test->default" // make junit work
    )
  )

  override def moduleSettings (name :String, pom :pomutil.POM) = name match {
    case "toybox" => Seq(
      // a bunch of unfixable (without abandoning 1.6) AWT generics warnings
      javacOptions ++= Seq("-Xlint:-rawtypes", "-Xlint:-unchecked")
    )
    case "server" => Seq(
      resolvers += "ooo-maven" at "http://ooo-maven.googlecode.com/hg/repository",
      autoScalaLibrary := true // we want scala-library back
    )
    case _ => Nil
  }

  override def profiles = Seq("server")
}

import sbt._
import sbt.Keys._

object GardensBuild extends samskivert.MavenBuild {

  override val globalSettings = Seq(
    crossPaths    := false,
    scalacOptions ++= Seq("-unchecked", "-deprecation"),
    javacOptions  ++= Seq("-Xlint", "-Xlint:-serial", "-source", "1.6", "-target", "1.6"),
    javaOptions   ++= Seq("-ea"),
    fork in Compile := true,
    autoScalaLibrary in Compile := false, // no scala-library dependency (except for tests)
    libraryDependencies ++= Seq(
      "com.novocode" % "junit-interface" % "0.8" % "test->default" // make junit work
    )
  )

  override def moduleSettings (name :String, pom :pomutil.POM) = name match {
    case "toybox" => Seq(
      // a bunch of unfixable (without abandoning 1.6) AWT generics warnings
      javacOptions ++= Seq("-Xlint:-rawtypes", "-Xlint:-unchecked")
    )
    case "server" => Seq(
      resolvers += "ooo-maven" at "http://ooo-maven.googlecode.com/hg/repository",
      autoScalaLibrary := true, // we want scala-library back
      // we run the test server with its normal compile depends, so add hsqldb there;
      // in maven its run as a "test" and the POM thus lists hsqldb as a test depend
      libraryDependencies ++= Seq(
        "org.hsqldb" % "hsqldb" % "2.2.4"
      )
    )
    case _ => Nil
  }

  override def profiles = Seq("server")
}

Add HSQL to compile depends for running server via SBT.