Skip to content
Permalink
Browse files

Upgrade versions (#123)

* Bump version numbers

* Upgrade log4j

* Downgrade Scala to 2.12.3
  • Loading branch information...
A. Alonso Dominguez
A. Alonso Dominguez committed Nov 1, 2017
1 parent 387f876 commit 6d05a9107ca87cff367e06787d8eb5b4420c07f3
@@ -158,11 +158,11 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

def isLogin(username: String, password: String) =
hasMethod(HttpMethod.Post) and
hasUrl(uris.login) and
hasEmptyBody and
hasAuth(username, password) and
not(matcher = hasPassport(TestPassport)) and
hasTimeout(TestTimeout)
hasUrl(uris.login) and
hasEmptyBody and
hasAuth(username, password) and
not(matcher = hasPassport(TestPassport)) and
hasTimeout(TestTimeout)

"authenticate" should "return the user's passport when result code is 200" in {
val expectedPassport = generatePassport()
@@ -194,7 +194,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Refresh token requests

val isRefreshPassport = hasMethod(HttpMethod.Post) and
val isRefreshPassport =
hasMethod(HttpMethod.Post) and
hasUrl(uris.refreshPass) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -230,7 +231,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Logout requests

val isLogout = hasMethod(HttpMethod.Post) and
val isLogout =
hasMethod(HttpMethod.Post) and
hasUrl(uris.logout) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -254,7 +256,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Get Cluster State

val isGetClusterState = hasMethod(HttpMethod.Get) and
val isGetClusterState =
hasMethod(HttpMethod.Get) and
hasUrl(uris.cluster) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -273,7 +276,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Register Job

val isRegisterJob = hasMethod(HttpMethod.Put) and
val isRegisterJob =
hasMethod(HttpMethod.Put) and
hasUrl(uris.jobs) and
hasPassport(TestPassport) and
hasBody(TestJobSpec) and
@@ -305,7 +309,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Fetch Jobs

val isFetchJobs = hasMethod(HttpMethod.Get) and
val isFetchJobs =
hasMethod(HttpMethod.Get) and
hasUrl(uris.jobs) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -325,7 +330,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Fetch Job

val isFetchJob = hasMethod(HttpMethod.Get) and
val isFetchJob =
hasMethod(HttpMethod.Get) and
hasUrl(uris.fetchJob) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -365,7 +371,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Enable Job

val isEnableJob = hasMethod(HttpMethod.Post) and
val isEnableJob =
hasMethod(HttpMethod.Post) and
hasUrl(uris.enableJob) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -399,7 +406,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Disable Job

val isDisableJob = hasMethod(HttpMethod.Post) and
val isDisableJob =
hasMethod(HttpMethod.Post) and
hasUrl(uris.disableJob) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -433,7 +441,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Get execution plans

val isGetExecutionPlans = hasMethod(HttpMethod.Get) and
val isGetExecutionPlans =
hasMethod(HttpMethod.Get) and
hasUrl(uris.executionPlans) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -453,7 +462,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Get execution plan

val isGetExecutionPlan = hasMethod(HttpMethod.Get) and
val isGetExecutionPlan =
hasMethod(HttpMethod.Get) and
hasUrl(uris.executionPlan) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -493,7 +503,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Schedule job

def isScheduleJob(value: ScheduleJob) = hasMethod(HttpMethod.Put) and
def isScheduleJob(value: ScheduleJob) =
hasMethod(HttpMethod.Put) and
hasUrl(uris.executionPlans) and
hasPassport(TestPassport) and
hasBody(value) and
@@ -502,13 +513,17 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

"scheduleJob" should "return the started notification" in {
val payload = ScheduleJob(TestJobId)

def result(jobId: JobId) = ExecutionPlanStarted(jobId, TestPlanId, currentDateTime)
val expectedResult = result(TestJobId)

inProtocol[HttpProtocol] ensuringRequest isScheduleJob(payload) replyWith { req =>
val result = req.entity.as[ScheduleJob].
flatMap(cmd => DataBuffer(ExecutionPlanStarted(cmd.jobId, TestPlanId, currentDateTime)))
HttpSuccess(result)
val stubResult = req.entity.as[ScheduleJob].
flatMap(cmd => DataBuffer(result(cmd.jobId)))
HttpSuccess(stubResult)
} usingClient { client =>
client.scheduleJob(payload).map { returned =>
returned shouldBe ExecutionPlanStarted(TestJobId, TestPlanId, currentDateTime).asRight[JobNotFound]
returned shouldBe expectedResult.asRight[JobNotFound]
}
}
}
@@ -528,7 +543,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Cancel execution plan

val isCancelExecutionPlan = hasMethod(HttpMethod.Delete) and
val isCancelExecutionPlan =
hasMethod(HttpMethod.Delete) and
hasUrl(uris.executionPlan) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -568,7 +584,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Get executions

val isGetExecutions = hasMethod(HttpMethod.Get) and
val isGetExecutions =
hasMethod(HttpMethod.Get) and
hasUrl(uris.executions) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -588,7 +605,8 @@ class HttpProtocolSpec extends AsyncFlatSpec with HttpRequestMatchers with StubC

// -- Get execution

val isGetExecution = hasMethod(HttpMethod.Get) and
val isGetExecution =
hasMethod(HttpMethod.Get) and
hasUrl(uris.execution) and
hasPassport(TestPassport) and
hasEmptyBody and
@@ -62,7 +62,8 @@ trait HttpRequestMatchers extends Matchers {
}
}

val isJsonRequest: Matcher[HttpRequest] = hasHeader("Content-Type", "application/json")
val isJsonRequest: Matcher[HttpRequest] =
hasHeader("Content-Type", "application/json")

def hasAuth(username: String, password: String): Matcher[HttpRequest] = {
val Right(creds) = DataBuffer.fromString(s"$username:$password").toBase64
@@ -31,10 +31,10 @@ package object json extends TimeJson with Cron4s {
type JsonEncoder[A] = Encoder[A, String]
type JsonDecoder[A] = Decoder[String, A]

implicit def JsonEncoderInstance[A: CirceEncoder]: Encoder[A, String] =
implicit def JsonEncoderInstance[A: CirceEncoder]: JsonEncoder[A] =
(a: A) => Attempt(a.asJson.noSpaces)

implicit def JsonDecoderInstance[A: CirceDecoder]: Decoder[String, A] =
implicit def JsonDecoderInstance[A: CirceDecoder]: JsonDecoder[A] =
(input: String) => parse(input).flatMap(_.as[A])

implicit def JsonCodecInstance[A: CirceDecoder: CirceEncoder]: JsonCodec[A] = new JsonCodec[A] {
@@ -10,7 +10,7 @@ object Dependencies {
// Logging -------

val slogging = "0.6.0"
val log4j = "2.8.2"
val log4j = "2.9.1"
val slf4j = "1.7.25"

// Testing --------
@@ -33,12 +33,12 @@ object Dependencies {
val main = "10.0.10"

// http extensions
val json = "1.18.0"
val json = "1.18.1"
val sse = "3.0.0"
}

// persistence plugins
val cassandra = "0.56"
val cassandra = "0.58"
val inmemory = "2.5.1.1"
}

@@ -51,7 +51,7 @@ object Dependencies {

// ScalaJS -------

val scalaJsReact = "1.1.0"
val scalaJsReact = "1.1.1"
val scalaJsDom = "0.9.3"
val scalaJsJQuery = "0.9.2"
val scalaJSScripts = "1.1.1"
@@ -60,7 +60,7 @@ object Dependencies {
// Other utils ---

val arm = "2.0"
val betterfiles = "3.1.0"
val betterfiles = "3.2.0"
val diode = "1.1.2"
val cats = "1.0.0-MF"
val catsEffect = "0.4"
@@ -74,7 +74,7 @@ object Dependencies {
val pureconfig = "0.8.0"
val refined = "0.8.4"
val scalaCss = "0.5.3"
val scalafmt = "1.2.0"
val scalafmt = "1.3.0"
val scalaTime = "2.0.0-M12"
val scopt = "3.7.0"
val xml = "1.0.6"
@@ -31,7 +31,7 @@ object QuckooApp extends AutoPlugin {
sigarLoaderOptions := Seq(s"-javaagent:${sigarLoader.value.getAbsolutePath}"),
sigarLoaderOptions in Test := sigarLoaderOptions.value :+ s"-Dkamon.sigar.folder=${baseDirectory.value / "target" / "native"}",
baseDirectory in reStart := baseDirectory.value / "target",
aspectjVersion in Aspectj := "1.8.11",
aspectjVersion in Aspectj := "1.8.12",
aspectjSourceLevel in Aspectj := "-1.8",
javaOptions in reStart ++= (aspectjWeaverOptions in Aspectj).value ++ (sigarLoaderOptions in Test).value,
javaOptions in Test ++= (sigarLoaderOptions in Test).value,
@@ -1 +1 @@
sbt.version=1.0.2
sbt.version=1.0.3
@@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.12")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.14")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.1")

// Web plugins
@@ -16,7 +16,7 @@ addSbtPlugin("org.scala-native" % "sbt-crossproject" % "0.2.2")
addSbtPlugin("org.scala-native" % "sbt-scalajs-crossproject" % "0.2.2")
addSbtPlugin("com.vmunier" % "sbt-web-scalajs" % "1.0.6")
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.11")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.12")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.13")

// Server side plugins
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.0")

0 comments on commit 6d05a91

Please sign in to comment.
You can’t perform that action at this time.