diff --git a/README.md b/README.md index fcbb723..d5c24da 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,11 @@ For more information see man systemd.time ``` +or + + + + ## Limitations This library has some limitations when parsing calendar events @@ -164,16 +169,16 @@ import java.time._ ce.asString // res4: String = "*-*-* 00/2:00:00" val now = LocalDateTime.now -// now: LocalDateTime = 2022-03-11T21:47:18.418490 +// now: LocalDateTime = 2023-08-03T11:30:20.371144744 ce.nextElapse(now) -// res5: Option[LocalDateTime] = Some(value = 2022-03-11T22:00) +// res5: Option[LocalDateTime] = Some(value = 2023-08-03T12:00) ce.nextElapses(now, 5) // res6: List[LocalDateTime] = List( -// 2022-03-11T22:00, -// 2022-03-12T00:00, -// 2022-03-12T02:00, -// 2022-03-12T04:00, -// 2022-03-12T06:00 +// 2023-08-03T12:00, +// 2023-08-03T14:00, +// 2023-08-03T16:00, +// 2023-08-03T18:00, +// 2023-08-03T20:00 // ) ``` @@ -210,19 +215,19 @@ val everyTwoSeconds = CalEvent.unsafe("*-*-* *:*:0/2") // zone = None // ) val scheduler = Scheduler.systemDefault[IO] -// scheduler: Scheduler[IO] = com.github.eikek.calev.fs2.Scheduler$$anon$1@60877629 +// scheduler: Scheduler[IO] = com.github.eikek.calev.fs2.Scheduler$$anon$1@331b0bfd val printTime = Stream.eval(IO(println(LocalTime.now))) // printTime: Stream[IO, Unit] = Stream(..) val task = scheduler.awakeEvery(everyTwoSeconds) >> printTime -// task: Stream[IO[x], Unit] = Stream(..) +// task: Stream[[x]IO[x], Unit] = Stream(..) import cats.effect.unsafe.implicits._ task.take(3).compile.drain.unsafeRunSync() -// 21:47:20.018387 -// 21:47:22.001942 -// 21:47:24.002348 +// 11:30:22.007430655 +// 11:30:24.000809249 +// 11:30:26.001204345 ``` @@ -257,7 +262,7 @@ val insert = sql"INSERT INTO mytable (event) VALUES (${r.event})".update.run // insert: ConnectionIO[Int] = Suspend( // a = Uncancelable( -// body = cats.effect.kernel.MonadCancel$$Lambda$2138/0x0000000800c18040@48d44acf +// body = cats.effect.kernel.MonadCancel$$Lambda$2205/0x000000080185f8a0@7f6c85c4 // ) // ) @@ -265,7 +270,7 @@ val select = sql"SELECT event FROM mytable WHERE id = 1".query[Record].unique // select: ConnectionIO[Record] = Suspend( // a = Uncancelable( -// body = cats.effect.kernel.MonadCancel$$Lambda$2138/0x0000000800c18040@49f2994f +// body = cats.effect.kernel.MonadCancel$$Lambda$2205/0x000000080185f8a0@319c77de // ) // ) ``` @@ -355,7 +360,7 @@ val jackson = JsonMapper .builder() .addModule(new CalevModule()) .build() -// jackson: JsonMapper = com.fasterxml.jackson.databind.json.JsonMapper@2a654f27 +// jackson: JsonMapper = com.fasterxml.jackson.databind.json.JsonMapper@12dcfa6a val myEvent = CalEvent.unsafe("Mon *-*-* 05:00/10:00") // myEvent: CalEvent = CalEvent( @@ -477,7 +482,7 @@ calevScheduler().scheduleOnceWithCalendarEvent(calEvent, () => { ) }) // res11: Option[..akka.actor.Cancellable] = Some( -// value = akka.actor.LightArrayRevolverScheduler$TaskHolder@5b7f9eaa +// value = akka.actor.LightArrayRevolverScheduler$TaskHolder@57b4fc1e // ) system.terminate() ``` diff --git a/build.sbt b/build.sbt index 962d1b8..cba94b8 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import com.github.sbt.git.SbtGit.GitKeys val scala212 = "2.12.18" val scala213 = "2.13.11" -val scala3 = "3.2.2" +val scala3 = "3.3.0" val updateReadme = inputKey[Unit]("Update readme") diff --git a/modules/doobie/src/test/scala/com/github/eikek/calev/doobie/CalevDoobieTest.scala b/modules/doobie/src/test/scala/com/github/eikek/calev/doobie/CalevDoobieTest.scala index cb3fd04..4e820c3 100644 --- a/modules/doobie/src/test/scala/com/github/eikek/calev/doobie/CalevDoobieTest.scala +++ b/modules/doobie/src/test/scala/com/github/eikek/calev/doobie/CalevDoobieTest.scala @@ -10,10 +10,11 @@ import munit._ class CalevDoobieTest extends FunSuite with CalevDoobieMeta { val xa = Transactor.fromDriverManager[IO]( - "org.h2.Driver", - "jdbc:h2:mem:testing;DB_CLOSE_DELAY=-1", - "sa", - "" + driver = "org.h2.Driver", + url = "jdbc:h2:mem:testing;DB_CLOSE_DELAY=-1", + user = "sa", + password = "", + logHandler = None ) case class Record(event: CalEvent) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index d8c9839..2254b8e 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -4,8 +4,8 @@ object Dependencies { val akkaVersion = "2.6.20" val circeVersion = "0.14.5" - val doobieVersion = "1.0.0-RC2" - val fs2Version = "3.7.0" + val doobieVersion = "1.0.0-RC4" + val fs2Version = "3.8.0" val h2Version = "2.2.220" val jacksonVersion = "2.15.2" val log4sVersion = "1.8.2" diff --git a/project/plugins.sbt b/project/plugins.sbt index 1026d9f..7a730a5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") -addSbtPlugin("com.47deg" % "sbt-microsites" % "1.4.2") +addSbtPlugin("com.47deg" % "sbt-microsites" % "1.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")