mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-27 04:53:13 -05:00
commit
d706d91ee1
@ -1,8 +1,5 @@
|
|||||||
rules=[
|
rules=[
|
||||||
ExplicitResultTypes,
|
|
||||||
RemoveUnused,
|
|
||||||
DisableSyntax,
|
DisableSyntax,
|
||||||
LeakingImplicitClassVal,
|
LeakingImplicitClassVal,
|
||||||
NoValInForComprehension,
|
NoValInForComprehension,
|
||||||
ProcedureSyntax
|
|
||||||
]
|
]
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version="3.3.1"
|
version="3.3.1"
|
||||||
maxColumn = 120
|
maxColumn = 120
|
||||||
runner.dialect = scala213source3
|
runner.dialect = scala3
|
||||||
|
11
build.sbt
11
build.sbt
@ -2,25 +2,24 @@ lazy val root = (project in file(".")).settings(
|
|||||||
inThisBuild(
|
inThisBuild(
|
||||||
List(
|
List(
|
||||||
organization := "com.example",
|
organization := "com.example",
|
||||||
scalaVersion := "2.13.7",
|
scalaVersion := "3.1.0",
|
||||||
version := "0.1.0-SNAPSHOT",
|
version := "0.1.0-SNAPSHOT",
|
||||||
semanticdbEnabled := true,
|
semanticdbEnabled := true,
|
||||||
semanticdbVersion := scalafixSemanticdb.revision,
|
semanticdbVersion := scalafixSemanticdb.revision,
|
||||||
scalafixScalaBinaryVersion := "2.13"
|
|
||||||
|
// This is apparently not supported on Scala 3 currently
|
||||||
|
// scalafixScalaBinaryVersion := "3.1"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
name := "LibreCaptcha",
|
name := "LibreCaptcha",
|
||||||
libraryDependencies += "com.sksamuel.scrimage" % "scrimage-core" % "4.0.24",
|
libraryDependencies += "com.sksamuel.scrimage" % "scrimage-core" % "4.0.24",
|
||||||
libraryDependencies += "com.sksamuel.scrimage" % "scrimage-filters" % "4.0.24",
|
libraryDependencies += "com.sksamuel.scrimage" % "scrimage-filters" % "4.0.24",
|
||||||
libraryDependencies += "org.json4s" % "json4s-jackson_2.13" % "4.0.3"
|
libraryDependencies += "org.json4s" %% "json4s-jackson" % "4.0.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
Compile / unmanagedResourceDirectories += { baseDirectory.value / "lib" }
|
Compile / unmanagedResourceDirectories += { baseDirectory.value / "lib" }
|
||||||
scalacOptions ++= List(
|
scalacOptions ++= List(
|
||||||
"-Yrangepos",
|
|
||||||
"-Ywarn-unused",
|
|
||||||
"-deprecation",
|
"-deprecation",
|
||||||
"-Xsource:3"
|
|
||||||
)
|
)
|
||||||
javacOptions += "-g:none"
|
javacOptions += "-g:none"
|
||||||
compileOrder := CompileOrder.JavaThenScala
|
compileOrder := CompileOrder.JavaThenScala
|
||||||
|
@ -4,6 +4,9 @@ import scala.io.Source.fromFile
|
|||||||
import org.json4s.{DefaultFormats, JValue, JObject, JField, JString}
|
import org.json4s.{DefaultFormats, JValue, JObject, JField, JString}
|
||||||
import org.json4s.jackson.JsonMethods.{parse, render, pretty}
|
import org.json4s.jackson.JsonMethods.{parse, render, pretty}
|
||||||
import org.json4s.JsonDSL._
|
import org.json4s.JsonDSL._
|
||||||
|
import org.json4s.StringInput
|
||||||
|
import org.json4s.jvalue2monadic
|
||||||
|
import org.json4s.jvalue2extractable
|
||||||
import java.io.{FileNotFoundException, File, PrintWriter}
|
import java.io.{FileNotFoundException, File, PrintWriter}
|
||||||
import java.{util => ju}
|
import java.{util => ju}
|
||||||
import lc.misc.HelperFunctions
|
import lc.misc.HelperFunctions
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package lc.server
|
package lc.server
|
||||||
|
|
||||||
import org.json4s.jackson.JsonMethods.parse
|
import org.json4s.jackson.JsonMethods.parse
|
||||||
|
import org.json4s.jvalue2extractable
|
||||||
import lc.core.Captcha
|
import lc.core.Captcha
|
||||||
import lc.core.ErrorMessageEnum
|
import lc.core.ErrorMessageEnum
|
||||||
import lc.core.{Answer, ByteConvert, Error, Id, Parameters}
|
import lc.core.{Answer, ByteConvert, Error, Id, Parameters}
|
||||||
|
@ -4,7 +4,7 @@ python3 -m venv testEnv
|
|||||||
source ./testEnv/bin/activate
|
source ./testEnv/bin/activate
|
||||||
pip install locust
|
pip install locust
|
||||||
mkdir -p data/
|
mkdir -p data/
|
||||||
java -jar target/scala-2.13/LibreCaptcha.jar &
|
java -jar target/scala-3.1.0/LibreCaptcha.jar &
|
||||||
JAVA_PID=$!
|
JAVA_PID=$!
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ echo Run functional test
|
|||||||
cp data/config.json data/config.json.bak
|
cp data/config.json data/config.json.bak
|
||||||
cp tests/debug-config.json data/config.json
|
cp tests/debug-config.json data/config.json
|
||||||
|
|
||||||
java -jar target/scala-2.13/LibreCaptcha.jar &
|
java -jar target/scala-3.1.0/LibreCaptcha.jar &
|
||||||
JAVA_PID=$!
|
JAVA_PID=$!
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user