Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Dependency updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchallen committed Apr 29, 2022
1 parent c6c7402 commit 9870f55
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {

api("com.github.cs125-illinois.jeed:core:2022.4.1")
api("com.github.cs125-illinois:jenisol:2022.4.1")
api("io.kotest:kotest-runner-junit5:4.6.3")
api("io.kotest:kotest-runner-junit5:5.2.3")
api("com.google.truth:truth:1.1.3")
api("com.github.cs125-illinois:libcs1:2022.4.0")
}
Expand Down
2 changes: 1 addition & 1 deletion plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.2")
implementation("com.github.slugify:slugify:2.5")

testImplementation("io.kotest:kotest-runner-junit5:4.6.3")
testImplementation("io.kotest:kotest-runner-junit5:5.2.3")
}
tasks.compileKotlin {
dependsOn(tasks.generateGrammarSource)
Expand Down
17 changes: 7 additions & 10 deletions plugin/src/main/kotlin/GenerateMetatests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ fun List<Question>.generateTest(
}
.sortedBy { it.name }
.joinToString(separator = "\n") {
"""| "${it.name} (${it.metadata.packageName}) should validate" {
| validator.validate("${it.name}", verbose = false, force = ${
"""| "${it.name} (${it.metadata.packageName}) should validate" {
| validator.validate("${it.name}", verbose = false, force = ${
if (onlyFocused) {
"true"
} else {
"false"
}
})
| }
| }
""".trimMargin()
}.let {
it.ifBlank {
Expand All @@ -153,7 +153,6 @@ import edu.illinois.cs.cs125.jeed.core.warm
import edu.illinois.cs.cs125.questioner.lib.Validator
import io.kotest.core.spec.Spec
import io.kotest.core.spec.style.StringSpec
import io.kotest.core.test.Description
import kotlinx.coroutines.runBlocking
import java.nio.file.Path
Expand All @@ -171,18 +170,16 @@ private val validator = Validator(
)"""
} else {""}}
@Suppress("MaxLineLength", "LargeClass")
class $klass : StringSpec() {${if (!isBlank) {
"""
override fun beforeSpec(spec: Spec) {
class $klass : StringSpec({
${if (!isBlank) {
"""beforeSpec {
runBlocking {
warm(failLint = false, quiet = true, useDocker = false)
}
}"""
} else {""}}
init {
$testBlock
}
}
})
/* ktlint-enable max-line-length */
// AUTOGENERATED
Expand Down
5 changes: 3 additions & 2 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.10")
implementation(project(":lib"))

implementation("io.ktor:ktor-server-netty:1.6.8")
implementation("io.ktor:ktor-server-netty:2.0.1")
implementation("io.ktor:ktor-server-content-negotiation:2.0.1")
implementation("com.squareup.moshi:moshi-kotlin:1.13.0")
implementation("com.github.cs125-illinois:ktor-moshi:2021.12.0")
implementation("com.github.cs125-illinois:ktor-moshi:2022.4.0")
implementation("com.github.slugify:slugify:2.5")
implementation("org.mongodb:mongodb-driver:3.12.11")

Expand Down
18 changes: 9 additions & 9 deletions server/src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ import edu.illinois.cs.cs125.questioner.lib.Question
import edu.illinois.cs.cs125.questioner.lib.TestResults
import edu.illinois.cs.cs125.questioner.lib.moshi.Adapters
import edu.illinois.cs.cs125.questioner.lib.test
import io.ktor.application.Application
import io.ktor.application.call
import io.ktor.application.install
import io.ktor.features.ContentNegotiation
import io.ktor.http.HttpStatusCode
import io.ktor.request.receive
import io.ktor.response.respond
import io.ktor.routing.get
import io.ktor.routing.post
import io.ktor.routing.routing
import io.ktor.server.application.Application
import io.ktor.server.application.call
import io.ktor.server.application.install
import io.ktor.server.engine.embeddedServer
import io.ktor.server.netty.Netty
import io.ktor.server.plugins.contentnegotiation.ContentNegotiation
import io.ktor.server.request.receive
import io.ktor.server.response.respond
import io.ktor.server.routing.get
import io.ktor.server.routing.post
import io.ktor.server.routing.routing
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.asCoroutineDispatcher
Expand Down

0 comments on commit 9870f55

Please sign in to comment.