Skip to content

Commit

Permalink
Merge pull request #200 from polystat/checker
Browse files Browse the repository at this point in the history
Removed eo compilation
  • Loading branch information
dours authored Apr 4, 2022
2 parents dd1a627 + 950ddaa commit 5cc7c2f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 153 deletions.
105 changes: 25 additions & 80 deletions checker/src/main/scala/org/polystat/py2eo/checker/Check.scala
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
package org.polystat.py2eo.checker

import org.polystat.py2eo.checker.CompilingResult.CompilingResult
import org.polystat.py2eo.checker.Mutate.Mutation
import org.polystat.py2eo.checker.Mutate.Mutation.Mutation
import org.polystat.py2eo.transpiler.Transpile
import org.yaml.snakeyaml.Yaml

import java.nio.file.Files
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
import java.util.concurrent.TimeUnit
import scala.language.postfixOps
import scala.reflect.io.{Directory, File, Path}
import scala.reflect.io.{File, Path}
import scala.sys.error
import scala.sys.process.Process

object Check {

// TODO: get these files as resources
private val resourcesPath = Directory.Current.get / "checker/src/test/resources/org/polystat/py2eo/checker"
private val runEOPath = resourcesPath / "runEO"

/**
* Apply analysis to every yaml test in the input directory
*
Expand All @@ -40,106 +32,59 @@ object Check {

def diffName(test: Path, mutation: Mutation): String = s"${test.stripExtension}-$mutation-diff.txt"

def expected(mutation: Mutation): CompilingResult = mutation match {
case Mutation.nameMutation => CompilingResult.transpiled
case Mutation.literalMutation => CompilingResult.compiled
case Mutation.operatorMutation => CompilingResult.transpiled
case Mutation.reverseBoolMutation => CompilingResult.transpiled
case Mutation.breakToContinue => CompilingResult.transpiled
case Mutation.breakSyntax => CompilingResult.failed
case Mutation.literalToIdentifier => CompilingResult.transpiled
case Mutation.removeBrackets => CompilingResult.transpiled
case Mutation.addExcessParam => CompilingResult.transpiled
case Mutation.swapParam => CompilingResult.transpiled
}

private def check(inputPath: Path, outputPath: Path, mutations: Iterable[Mutation]): Iterator[TestResult] = {
if (inputPath isDirectory) {
inputPath.toDirectory.list flatMap (item => check(item, outputPath, mutations))
} else if (inputPath.extension == "yaml") {
Iterator(check(inputPath toFile, outputPath, mutations))
} else if (inputPath hasExtension "yaml") {
Iterator(check(inputPath.toFile, outputPath, mutations))
} else {
Iterator empty
}
}

private def check(test: File, outputPath: Path, mutations: Iterable[Mutation]): TestResult = {
Transpile(test.stripExtension, parseYaml(test)) match {
case None => TestResult(test.stripExtension, Left(CompilingResult.failed))
val module = test.stripExtension
println(s"checking $module")
Transpile(module, parseYaml(test)) match {
case None => TestResult(module, None)
case Some(transpiled) =>
val file = File(outputPath / test.changeExtension("eo").name)
file writeAll transpiled

val originalResult = if (!compile(file)) {
CompilingResult.transpiled
} else {
run(file)
}

if (originalResult == CompilingResult.passed) {
val resultList = for {mutation <- mutations} yield (mutation, check(test, outputPath, mutation))
TestResult(test.stripExtension, Right(resultList.toMap[Mutation, CompilingResult]))
} else {
TestResult(test.stripExtension, Left(originalResult))
}
val resultList = mutations map (mutation => (mutation, check(test, outputPath, mutation)))
TestResult(module, Some(resultList.toMap[Mutation, CompilingResult]))
}
}

private def check(test: File, outputPath: Path, mutation: Mutation): CompilingResult = {
val original = parseYaml(test)
val mutant = Mutate(original, mutation, 1)
println(s"checking ${test.stripExtension} with $mutation")

if (mutant equals original) {
CompilingResult.invalid
} else {
Transpile(test.stripExtension, mutant) match {
val module = test.stripExtension
Transpile(module, mutant) match {
case None => CompilingResult.failed
case Some(transpiled) =>
val originalFile = File(outputPath / test.changeExtension("eo").name)
val mutatedFile = File(outputPath / s"${test.stripExtension}-$mutation")
val diffFile = File(outputPath / diffName(test, mutation))
mutatedFile.writeAll(transpiled)

val diff = Process(s"diff $originalFile $mutatedFile", outputPath.jfile).lazyLines_!
diffFile.writeAll(diff.mkString("\n"))

// TODO: actually need to get rid of old eo-files in that directory
if (!compile(mutatedFile)) CompilingResult.transpiled else run(mutatedFile)
val mutant = File(outputPath / s"$module-$mutation").addExtension("eo")
mutant writeAll transpiled

val original = File(outputPath / test.changeExtension("eo").name)
val diff = Process(s"diff $original $mutant", outputPath.jfile).lazyLines_!

if (diff isEmpty) {
CompilingResult.nodiff
} else {
val diffFile = File(outputPath / diffName(test, mutation))
diffFile writeAll diff.mkString("\n")
CompilingResult.passed
}
}
}
}

private def compile(file: File): Boolean = {
val result = Files.copy(file.jfile.toPath, File(runEOPath / file.name).jfile.toPath, REPLACE_EXISTING)
val ret = Process("mvn clean test", runEOPath.jfile).! == 0

Files delete result

ret
}

private def run(file: File): CompilingResult = {
val test = Files.copy(file.jfile.toPath, File(runEOPath / "Test.eo").jfile.toPath, REPLACE_EXISTING)

// Dunno why but it doesn't work without this line
val dir = new java.io.File(runEOPath.jfile.getPath)

val process = new ProcessBuilder("mvn clean test").directory(dir).start
val ret = process.waitFor(40, TimeUnit.SECONDS)

Files delete test

if (ret) {
if (process.exitValue == 0) {
CompilingResult.passed
} else {
CompilingResult.compiled
}
} else {
CompilingResult.timeout
}
}

private def parseYaml(file: File): String = {
val input = file slurp
val map = new Yaml load[java.util.Map[String, String]] input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ object CompilingResult extends Enumeration {
type CompilingResult = Value
val invalid: Value = Value("n/a")
val failed: Value = Value("failed")
val transpiled: Value = Value("transpiled")
val compiled: Value = Value("compiled")
val nodiff: Value = Value("no diff")
val passed: Value = Value("passed")
val timeout: Value = Value("timeout")
}

case class TestResult(name: String, results: Either[CompilingResult, Map[Mutation, CompilingResult]])
case class TestResult(name: String, results: Option[Map[Mutation, CompilingResult]])
29 changes: 13 additions & 16 deletions checker/src/main/scala/org/polystat/py2eo/checker/Write.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.polystat.py2eo.checker

import org.polystat.py2eo.checker.Check.{diffName, expected}
import org.polystat.py2eo.checker.CompilingResult.CompilingResult
import org.polystat.py2eo.checker.Mutate.Mutation.Mutation

Expand Down Expand Up @@ -41,33 +40,31 @@ object Write {
private def row(test: TestResult, mutations: Iterable[Mutation]): String = {
lazy val name = test.name
test.results match {
case Left(stage) =>
lazy val colspan = mutations.size
lazy val str = s"<td colspan=\"$colspan\" class=\"data\">Original test $stage</td>"
case None =>
lazy val colspan = mutations size
lazy val str = s"<td colspan=\"$colspan\" class=\"data\">Original test couldn't be transpiled</td>"
s"<tr>\n<th class=\"left\">$name</th>\n$str</tr>\n"

case Right(results) =>
case Some(results) =>
lazy val cells = mutations.toList map (mutation => cell(mutation, name, results(mutation)))
s"<tr>\n<th class=\"left\">$name</th>\n${cells mkString}</tr>\n"
}
}

/** Returns table cell with test result */
private def cell(mutation: Mutation, name: String, stage: CompilingResult): String = {
lazy val link = diffName(name, mutation)

lazy val kind = if (stage == CompilingResult.invalid) {
"data"
} else if (stage == expected(mutation)) {
"expected data"
} else {
"unexpected data"
lazy val kind = stage match {
case CompilingResult.invalid => "data"
case CompilingResult.failed => "unexpected data"
case CompilingResult.nodiff => "unexpected data"
case CompilingResult.passed => "expected data"
}

lazy val data = if (Set(CompilingResult.invalid, CompilingResult.failed) contains stage) {
stage toString
} else {
lazy val data = if (stage equals CompilingResult.passed) {
lazy val link = Check.diffName(name, mutation)
s"<a href=\"$link\">$stage</a>"
} else {
stage
}

s"<td class=\"$kind\">$data</td>\n"
Expand Down

This file was deleted.

1 comment on commit 5cc7c2f

@0pdd
Copy link
Member

@0pdd 0pdd commented on 5cc7c2f Apr 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20220303-12-17lwdzx/polystat/py2eo && pdd -v -f /tmp/20220404-15544-17f6odi [1]: + set -e + set -o pipefail + cd /tmp/0pdd20220303-12-17lwdzx/polystat/py2eo + pdd -v -f /tmp/20220404-15544-17f6odi My version is 0.20.6 Ruby version is 2.6.0 at...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20220303-12-17lwdzx/polystat/py2eo && pdd -v -f /tmp/20220404-15544-17f6odi [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20220303-12-17lwdzx/polystat/py2eo
+ pdd -v -f /tmp/20220404-15544-17f6odi

My version is 0.20.6
Ruby version is 2.6.0 at x86_64-linux
Reading /tmp/0pdd20220303-12-17lwdzx/polystat/py2eo
522 file(s) found, 1103 excluded
Reading runEO/pom.xml...
Reading .gitignore...
Reading README.md...
Reading transpiler/pom.xml...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/PrintLinearizedMutableEOWithCage.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/Main.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/Transpile.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/FindBadConstructs.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/SimplePass.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/SimpleAnalysis.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/ClosureWithCage.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/PrintEO.scala...
Reading transpiler/src/main/scala/org/polystat/py2eo/transpiler/Common.scala...
Reading transpiler/src/main/java/org/polystat/py2eo/transpiler/dummy.java...
Reading transpiler/src/main/python/inheritance.py...
Reading transpiler/src/main/python/C3.py...
Reading transpiler/src/main/python/closureRuntime.py...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/eo/map-tests.eo...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_abstract_numbers.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_userstring.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_symtable.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_class.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_imghdr.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_uuid.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_cmd.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_index.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_smtpd.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_dict_version.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_rlcompleter.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_random.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_fileio.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_urllib2net.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_funcattrs.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_quopri.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_types.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_bool.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_codecencodings_cn.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_flufl.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_univnewlines.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_pyexpat.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_colorsys.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_compile.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_coroutines.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_linecache.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_gc.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_site.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_platform.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_property.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_functools.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_int_literal.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_audioop.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_asyncgen.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_pulldom.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_modulefinder.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_typechecks.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_unpack.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_pkgutil.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_fstring.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_with.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_userlist.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_threading_local.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_context.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_webbrowser.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_asyncore.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/README.md...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_metaclass.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_csv.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_thread.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_codecmaps_jp.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_struct.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_http_cookies.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_fractions.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_pwd.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_syslog.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_codecencodings_iso2022.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_pickletools.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_genericpath.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_asynchat.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_xdrlib.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_locale.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_codeop.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_mailbox.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_timeout.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_bufio.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_httpservers.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_dict.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_decorators.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_grp.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_imaplib.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_bigmem.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_posix.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_sndhdr.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_aifc.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_wave.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_re.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_httplib.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_codecencodings_hk.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_keywordonlyarg.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_poll.yaml...
Reading transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_smtplib.yaml...
ERROR: transpiler/src/test/resources/org/polystat/py2eo/transpiler/testParserPrinter/test_smtplib.yaml; puzzle at line #1122; TODO must have a leading space to become a puzzle, as this page explains: https://github.com/yegor256/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/yegor256/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/yegor256/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:66:in `rescue in block in xml'
/app/objects/git_repo.rb:63:in `block in xml'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/app/objects/git_repo.rb:62:in `xml'
/app/objects/puzzles.rb:36:in `deploy'
/app/objects/job.rb:38:in `proceed'
/app/objects/job_starred.rb:33:in `proceed'
/app/objects/job_recorded.rb:32:in `proceed'
/app/objects/job_emailed.rb:35:in `proceed'
/app/objects/job_commiterrors.rb:36:in `proceed'
/app/objects/job_detached.rb:48:in `exclusive'
/app/objects/job_detached.rb:36:in `block in proceed'
/app/objects/job_detached.rb:36:in `fork'
/app/objects/job_detached.rb:36:in `proceed'
/app/0pdd.rb:366:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1675:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1675:in `block in compile!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1013:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1032:in `route_eval'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1013:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1061:in `block in process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1059:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1059:in `process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1011:in `block in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1008:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1008:in `route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1129:in `block in dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1124:in `dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:939:in `block in call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:939:in `call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:929:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:253:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:246:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:216:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1991:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1542:in `block in call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1769:in `synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1542:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'

Please sign in to comment.