Skip to content

Commit

Permalink
Merge pull request #11 from bjgbeelen/cross-compile-2-11
Browse files Browse the repository at this point in the history
Make code compile with Scala 2.11. Fixes #7
  • Loading branch information
danielvdende authored Apr 4, 2018
2 parents 1fb533d + 461ede8 commit 849a6e6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq(
s"[email protected]:${bintrayOrganization.value.get}/${name.value}.git"
)
),
crossScalaVersions in ThisBuild := Seq("2.11.8", "2.12.5"),
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.5"),
scalaVersion in ThisBuild := "2.12.5",
scalacOptions ++= Seq(Opts.compile.deprecation, "-Xlint", "-feature"),
scalacOptions ++= PartialFunction
Expand All @@ -52,7 +52,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq(
publishArtifact in Test := false
) ++ Seq(Compile, Test).flatMap(c => scalacOptions in (c, console) --= unusedWarnings)

val circeVersion = "0.9.2"
val circeVersion = "0.9.3"
lazy val root = (project in file("."))
.settings(commonSettings)
.settings(
Expand All @@ -64,8 +64,8 @@ lazy val root = (project in file("."))
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-java8" % circeVersion,
"com.typesafe.akka" %% "akka-http" % "10.1.0",
"de.heikoseeberger" %% "akka-http-circe" % "1.20.0",
"com.typesafe.akka" %% "akka-http" % "10.1.1",
"de.heikoseeberger" %% "akka-http-circe" % "1.20.1",
"ca.mrvisser" %% "sealerate" % "0.0.5",
"ch.qos.logback" % "logback-classic" % "1.1.11",
"org.scalactic" %% "scalactic" % "3.0.5",
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/ing/wbaa/druid/DruidResponse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.time._
import io.circe._
import io.circe.java8.time._
import scala.collection.immutable.ListMap
import cats.syntax.either._

case class DruidResponse(results: List[DruidResult], queryType: QueryType) {
private def decodeList[T](implicit decoder: Decoder[T]): List[T] = results.map {
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/ing/wbaa/druid/Enum.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package ing.wbaa.druid

import io.circe._
import io.circe.syntax._
import cats.syntax.either._

trait Enum {
override lazy val toString: String = this.getClass.getSimpleName.split("\\$")(0)
Expand Down Expand Up @@ -62,7 +63,7 @@ trait UpperCaseEnumStringEncoder extends EnumStringEncoder { this: Enum =>

trait CamelCaseEnumStringEncoder extends EnumStringEncoder { this: Enum =>
private def decapitalize(input: String) = input.head.toLower + input.tail
def encode() = decapitalize(toString)
def encode() = decapitalize(toString)
}

trait LispCaseEnumStringEncoder extends EnumStringEncoder { this: Enum =>
Expand Down
4 changes: 3 additions & 1 deletion src/main/scala/ing/wbaa/druid/definitions/Aggregation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ case class LongFirstAggregation(name: String, fieldName: String) extends SingleF
case class LongLastAggregation(name: String, fieldName: String) extends SingleFieldAggregation {
val `type` = AggregationType.LongLast
}
case class ThetaSketchAggregation(name: String, fieldName: String, isInputThetaSketch: Boolean = false,
case class ThetaSketchAggregation(name: String,
fieldName: String,
isInputThetaSketch: Boolean = false,
size: Long = 16384)
extends SingleFieldAggregation {
val `type` = AggregationType.ThetaSketch
Expand Down

0 comments on commit 849a6e6

Please sign in to comment.