Permalink
Browse files

Updated dependencies and minor code cleanup

  • Loading branch information...
darkfrog26 committed Aug 17, 2018
1 parent 9f973d6 commit c42ca55b60679aac07df4791dc893ef095349187
@@ -19,7 +19,7 @@ trait YouIApplication extends ErrorSupport with CacheImplementation {
*
* Defaults to true.
*/
protected def logJavaScriptErrors: Boolean = Profig("logJavaScriptErrors").as[Option[Boolean]].getOrElse(true)
protected def logJavaScriptErrors: Boolean = Profig("logJavaScriptErrors").opt[Boolean].getOrElse(true)
protected val logPath: String = "/client/log"
View
@@ -26,7 +26,7 @@ developers in ThisBuild := List(
Developer(id="darkfrog", name="Matt Hicks", email="matt@matthicks.com", url=url("http://matthicks.com"))
)
val profigVersion = "2.3.0"
val profigVersion = "2.3.1"
val scribeVersion = "2.5.3"
val powerScalaVersion = "2.0.5"
val reactifyVersion = "3.0.2"
@@ -42,8 +42,8 @@ val scalaJSDOM = "0.9.6"
val okHttpVersion = "3.11.0"
val circeVersion = "0.9.3"
val uaDetectorVersion = "2014.10"
val undertowVersion = "2.0.10.Final"
val closureCompilerVersion = "v20180716"
val undertowVersion = "2.0.13.Final"
val closureCompilerVersion = "v20180805"
val jSoupVersion = "1.11.3"
val scalaXMLVersion = "1.1.0"
val scalacticVersion = "3.0.5"
@@ -51,8 +51,6 @@ object Macros {
def create[C <: Communication](context: blackbox.Context)(connection: context.Expr[Connection])(implicit c: context.WeakTypeTag[C]): context.Expr[C] = {
import context.universe._
implicit val futureTypeTag: context.universe.TypeTag[Future[_]] = typeTag[Future[_]]
val typeName = c.tpe.toString match {
case s => s.substring(s.lastIndexOf('.') + 1)
}
@@ -65,7 +63,7 @@ object Macros {
val declaredMethods = c.tpe.decls.toSet
val methods = c.tpe.members.toList.sortBy(_.fullName).collect {
case symbol if symbol.isMethod & symbol.typeSignature.resultType <:< context.typeOf[Future[_]] => {
case symbol if symbol.isMethod & symbol.typeSignature.resultType <:< typeOf[Future[Any]] => {
val endPoint = s"$baseTypeName.${symbol.name}"
val m = symbol.asMethod
val declared = declaredMethods.contains(m)
@@ -33,7 +33,7 @@ object TemplateMacros {
val pathKey = appName match {
case Expr(Literal(Constant(value: String))) => s"$value.template.path"
}
val templatePath = Profig(pathKey).as[Option[String]]
val templatePath = Profig(pathKey).opt[String]
val file = templatePath match {
case Some(basePath) => new File(basePath, pathValue)
case None => new File(pathValue)
@@ -74,7 +74,7 @@ object TemplateMacros {
val pathKey = appName match {
case Expr(Literal(Constant(value: String))) => s"$value.template.path"
}
val templatePath = Profig(pathKey).as[Option[String]]
val templatePath = Profig(pathKey).opt[String]
val file = templatePath match {
case Some(basePath) => new File(basePath, pathValue)
case None => new File(pathValue)
View
@@ -1 +1 @@
sbt.version=1.1.6
sbt.version=1.2.1
@@ -29,7 +29,7 @@ trait Server extends HttpHandler with ErrorSupport {
val errorHandler: Var[ErrorHandler] = Var(DefaultErrorHandler)
protected lazy val implementation: ServerImplementation = {
Server.config("implementation").as[Option[String]] match {
Server.config("implementation").opt[String] match {
case Some(className) => {
scribe.info(s"Using server implementation: $className...")
import scala.reflect.runtime._
@@ -28,8 +28,8 @@ import scala.collection.JavaConverters._
// TODO: determine problems in HTTP2 so it can be enabled by default going forward
// TODO: determine problems in WebSocket compression so it can be enabled by default going forward
class UndertowServerImplementation(val server: Server) extends ServerImplementation with UndertowHttpHandler {
val enableHTTP2: Boolean = Server.config("enableHTTP2").as[Option[Boolean]].getOrElse(false)
val webSocketCompression: Boolean = Server.config("webSocketCompression").as[Option[Boolean]].getOrElse(false)
val enableHTTP2: Boolean = Server.config("enableHTTP2").opt[Boolean].getOrElse(false)
val webSocketCompression: Boolean = Server.config("webSocketCompression").opt[Boolean].getOrElse(false)
private var instance: Option[Undertow] = None

0 comments on commit c42ca55

Please sign in to comment.