The linked gist is the initial draft of a module that allows Rex to show diffs on the terminal upon file changes during task execution. I'm posting it here both for early availability and early feedback.
I think it is a good example of how to extend Rex without changing the core, and publishing on CPAN would be a great way to share.
Additional features could include colored output support, and pluggable diff backends (like Text::Diff::Unified::XS, or even using
diff binary, if present).
The name is following this logic: it extends
Rex via a
File operations to show the
Diff of changes. It could be more specific (e.g.
Rex::Hook::File::Diff::Unified), but I feel it's already getting long, so I tried to find a good balance.
Some questions I am wondering about:
Feedback welcome both here and on the gist.