Croupier version v0.3.1 is out
A new release
of Croupier
my Crystal library for tasks and
dataflow programming is out!
What's Changed
-
Inotify support by @ralsina in #1
This adds the
TaskManager.auto_run
method that monitors task inputs and
reruns tasks as needed, andTaskManager.auto_stop
to stop it.This will be useful for Hacé (the croupier-based make-like) and Nicolino
(a SSG)Here's an example from the tests:
x = 0
counter = TaskProc.new { x += 1; x.to_s }
Task.new(output: "t1", inputs: ["i"], proc: counter)
TaskManager.auto_run
# We need to yield or else the watch callbacks never run
Fiber.yield
File.open("i", "w") << "foo"
Fiber.yield
TaskManager.auto_stop
# It should have run
(x > 0).should be_true
Full Changelog: v0.3.0...v0.3.1