#!/usr/bin/env ruby =begin ======================================================================= # TORK-DRIVER 1 2012-02-13 18.0.1 ## NAME tork-driver - drives tork-engine(1) when files change ## SYNOPSIS `tork-driver` [*OPTION*]... ## DESCRIPTION This program drives tork-engine(1) according to tork-herald(1)'s observations. It reads the following single-line commands (JSON arrays) from its standard input stream and performs the respective actions as described below. It also funnels the standard output stream of tork-engine(1) into its own. `["run_all_test_files"]` Runs all test files found within and beneath the current working directory. `["reabsorb_overhead_files"]` Stops any test files that are currently running, reabsorbs the test execution overhead, and resumes running those interrupted test files. *...* This program accepts tork-engine(1) commands and delegates them accordingly. When tork-herald(1) reports that a file belonging to the test execution overhead has been modified, this program replaces tork-master(1) with a new instance, which then absorbs the modified test execution overhead into itself. This program emits the following single-line status messages (JSON arrays) on its standard output stream to provide notifications about its activity: `["over",` *overhead_file*`]` The test execution overhead is currently being reabsorbed, by replacing tork-master(1) with a new instance, because *overhead_file* has changed. ## OPTIONS `-h`, `--help` Show this help manual. ## FILES *.tork.rb* Optional Ruby script for configuring tork(1). ## ENVIRONMENT `TORK_CONFIGS` A single-line JSON array containing paths to actual files or names of helper libraries in the tork/config/ namespace of Ruby's load path. These configuration files are loaded just before *.tork.rb* is loaded. ## SEE ALSO tork(1), tork-herald(1), tork-driver(1), tork-engine(1), tork-master(1) =end ========================================================================= $0 = File.basename(__FILE__) # for easier identification in ps(1) output require 'binman' BinMan.help require 'tork/driver' Tork::Driver.new.loop