File tree 6 files changed +29
-31
lines changed
main/scala/fr/janalyse/cem
test/scala/fr/janalyse/cem
6 files changed +29
-31
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,22 @@ scmInfo := Some(
11
11
)
12
12
)
13
13
14
- scalaVersion := " 3.3.1"
14
+ scalaVersion := " 3.4.2"
15
+
16
+ scalacOptions += " -Ykind-projector:underscores"
15
17
16
18
mainClass := Some (" fr.janalyse.cem.Main" )
17
19
18
20
lazy val versions = new {
19
- val sttp = " 3.9.1 "
20
- val zio = " 2.0.21 "
21
+ val sttp = " 3.9.7 "
22
+ val zio = " 2.1.3 "
21
23
val zionio = " 2.0.2"
22
24
val zioproc = " 0.7.2"
23
- val zioconfig = " 4.0.0 "
24
- val ziologging = " 2.1.16 "
25
- val ziolmdb = " 1.7.1 "
25
+ val zioconfig = " 4.0.2 "
26
+ val ziologging = " 2.3.0 "
27
+ val ziolmdb = " 1.8.0 "
26
28
val naturalsort = " 1.0.4"
27
- val jgit = " 6.8.0.202311291450-r"
28
- // val logback = "1.4.7"
29
- val log4j2 = " 2.20.0"
29
+ val jgit = " 6.10.0.202406032230-r"
30
30
}
31
31
32
32
libraryDependencies ++= Seq (
@@ -50,8 +50,6 @@ libraryDependencies ++= Seq(
50
50
" org.eclipse.jgit" % " org.eclipse.jgit" % versions.jgit
51
51
)
52
52
53
- // excludeDependencies += "org.scala-lang.modules" % "scala-collection-compat_2.13"
54
-
55
53
testFrameworks += new TestFramework (" zio.test.sbt.ZTestFramework" )
56
54
57
55
enablePlugins(SbtTwirl )
Original file line number Diff line number Diff line change 1
1
# suppress inspection "UnusedProperty" for whole file
2
- sbt.version =1.9.8
2
+ sbt.version =1.10.0
Original file line number Diff line number Diff line change 1
- addSbtPlugin(" com.github.sbt" % " sbt-release" % " 1.1 .0" )
1
+ addSbtPlugin(" com.github.sbt" % " sbt-release" % " 1.4 .0" )
2
2
addSbtPlugin(" com.github.sbt" % " sbt-pgp" % " 2.2.1" )
3
- addSbtPlugin(" org.xerial.sbt" % " sbt-sonatype" % " 3.9.21 " )
3
+ addSbtPlugin(" org.xerial.sbt" % " sbt-sonatype" % " 3.10.0 " )
4
4
addSbtPlugin(" com.timushev.sbt" % " sbt-updates" % " 0.6.3" )
5
- addSbtPlugin(" com.github.sbt" % " sbt-native-packager" % " 1.9.16 " )
6
- addSbtPlugin(" ch.epfl.scala" % " sbt-scalafix" % " 0.11 .1" )
7
- addSbtPlugin(" com.typesafe.play" % " sbt-twirl" % " 1.6.4 " )
5
+ addSbtPlugin(" com.github.sbt" % " sbt-native-packager" % " 1.10.0 " )
6
+ addSbtPlugin(" ch.epfl.scala" % " sbt-scalafix" % " 0.12 .1" )
7
+ addSbtPlugin(" com.typesafe.play" % " sbt-twirl" % " 1.6.6 " )
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import zio.*
4
4
import zio .config .*
5
5
import zio .config .typesafe .*
6
6
import zio .config .magnolia .*
7
-
8
- import zio .logging .{LogFormat , removeDefaultLoggers , consoleLogger }
7
+ import zio .logging .{ConsoleLoggerConfig , LogFormat , consoleLogger }
9
8
import zio .logging .slf4j .bridge .Slf4jBridge
10
9
import sttp .client3 .asynchttpclient .zio .AsyncHttpClientZioBackend
10
+ import zio .Runtime .removeDefaultLoggers
11
11
import zio .lmdb .{LMDB , LMDBConfig }
12
12
13
13
object Main extends ZIOAppDefault {
@@ -37,10 +37,7 @@ object Main extends ZIOAppDefault {
37
37
38
38
val configLayer = ZLayer .fromZIO(configProviderLogic.map(provider => Runtime .setConfigProvider(provider))).flatten
39
39
40
- override val bootstrap =
41
- // removeDefaultLoggers ++ SLF4J.slf4j(format = LogFormat.colored) ++ ZLayer.fromZIO(configProviderLogic.map(provider => Runtime.setConfigProvider(provider))).flatten
42
- configLayer ++ (removeDefaultLoggers >>> configLayer >>> consoleLogger(configPath = " logger" ) >>> Slf4jBridge .initialize)
43
-
40
+ override val bootstrap = configLayer ++ ( removeDefaultLoggers >>> configLayer >>> consoleLogger() >>> Slf4jBridge .initialize)
44
41
45
42
val httpClientLayer = AsyncHttpClientZioBackend .layer()
46
43
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ object RemoteGithubOperations {
170
170
Obj (
171
171
" description" -> Str (description),
172
172
" public" -> Bool (publicBool),
173
- " files" -> Obj (files : _ * )
173
+ " files" -> Obj (files* )
174
174
)
175
175
}
176
176
@@ -221,7 +221,7 @@ object RemoteGithubOperations {
221
221
222
222
Obj (
223
223
" description" -> Str (description),
224
- " files" -> Obj (files : _ * )
224
+ " files" -> Obj (files* )
225
225
)
226
226
}
227
227
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ import fr.janalyse.cem.model.WhatToDo.*
24
24
import fr .janalyse .cem .tools .DescriptionTools .*
25
25
import org .junit .runner .RunWith
26
26
import sttp .client3 .asynchttpclient .zio .AsyncHttpClientZioBackend
27
+ import sttp .capabilities .zio .ZioStreams
28
+ import sttp .capabilities .WebSockets
29
+ import sttp .client3 .testing .SttpBackendStub
27
30
import zio .nio .file .Path
28
31
import zio .lmdb .LMDB
29
32
@@ -85,13 +88,13 @@ class RemoteGithubOperationsSpec extends ZIOSpecDefault {
85
88
results <- githubRemoteExamplesChangesApply(config, todos)
86
89
} yield results
87
90
88
- val stubbedLayer = ZLayer .succeed(
89
- AsyncHttpClientZioBackend .stub
90
- .whenRequestMatches(_.uri.toString() == " https://api.github.com/gists/6e40f8239fa6828ab45a064b8131fdfc " )
91
- .thenRespond( """ {"id":"aa-bb", "html_url":"https://truc/aa-bb"} """ )
92
- )
91
+ val stub : SttpBackendStub [ Task , Any ] = AsyncHttpClientZioBackend .stub
92
+ .whenRequestMatches(_.uri.toString() == " https://api.github.com/gists/6e40f8239fa6828ab45a064b8131fdfc " )
93
+ .thenRespond( """ {"id":"aa-bb", "html_url":" https://truc/aa-bb"} "" " )
94
+
95
+ val stubLayer = ZLayer .succeed(stub )
93
96
94
- logic.provide(stubbedLayer ).map(result => assertTrue(true ))
97
+ logic.provide(stubLayer ).map(result => assertTrue(true ))
95
98
}
96
99
97
100
// ----------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments