bin/tork-herald in tork-16.0.0 vs bin/tork-herald in tork-17.0.0
- old
+ new
@@ -1,9 +1,9 @@
#!/usr/bin/env ruby
=begin
-TORK-HERALD 1 2012-01-25 16.0.0
+TORK-HERALD 1 2012-01-27 17.0.0
==============================================================================
NAME
------------------------------------------------------------------------------
@@ -16,11 +16,12 @@
DESCRIPTION
------------------------------------------------------------------------------
This program monitors the current working directory and prints relative paths
-of modified files, one per line, to the standard output stream.
+of modified files in batches of single-line JSON arrays to the standard output
+stream.
OPTIONS
------------------------------------------------------------------------------
`-h`, `--help`
@@ -38,10 +39,11 @@
require 'binman'
BinMan.help
require 'guard'
require 'guard/listener'
+require 'json'
listener = Guard::Listener.select_and_init(:watch_all_modifications => true)
-listener.on_change {|files| puts files }
+listener.on_change {|files| puts JSON.dump(files) }
STDOUT.sync = true # don't buffer puts()
listener.start