man/man1/tork-driver.1.html in tork-19.11.1 vs man/man1/tork-driver.1.html in tork-20.0.0

- old
+ new

@@ -1,21 +1,20 @@ <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> - <meta name="generator" content="md2man 3.0.1 https://github.com/sunaku/md2man" /> + <meta name="generator" content="md2man 4.0.0 https://github.com/sunaku/md2man" /> <title>tork-driver(1) &mdash; drives tork-engine(1) when files change</title> <link rel="stylesheet" href="../style.css"/> <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> </head> -<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/tork-driver.1</span></div></div><div class="container-fluid"><h1 id="tork-driver-1-2014-10-24-19-11-1"><a name="tork-driver-1-2014-10-24-19-11-1" href="#tork-driver-1-2014-10-24-19-11-1" class="md2man-permalink" title="permalink"></a><span class="md2man-title">TORK-DRIVER</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-10-24</span> <span class="md2man-source">19.11.1</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>tork-driver - drives <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> when files change</p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>tork-driver</code> [<em>OPTION</em>]...</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program drives <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> when <a class="md2man-reference" href="../man1/tork-herald.1.html">tork-herald(1)</a> reports files changes.</p><p>This program can be controlled remotely by multiple <a class="md2man-reference" href="../man1/tork-remote.1.html">tork-remote(1)</a> instances.</p><h3 id="input"><a name="input" href="#input" class="md2man-permalink" title="permalink"></a>Input</h3><p>This program reads the following commands, which are single-line JSON arrays, +<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/tork-driver.1</span></div></div><div class="container-fluid"><h1 id="tork-driver-1-2014-10-26-20-0-0"><a name="tork-driver-1-2014-10-26-20-0-0" href="#tork-driver-1-2014-10-26-20-0-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">TORK-DRIVER</span> <span class="md2man-section">1</span> <span class="md2man-date">2014-10-26</span> <span class="md2man-source">20.0.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>tork-driver - drives <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> when files change</p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>tork-driver</code> [<em>OPTION</em>]...</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</h2><p>This program drives <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> when <a class="md2man-reference" href="../man1/tork-herald.1.html">tork-herald(1)</a> reports files changes.</p><p>This program can be controlled remotely by multiple <a class="md2man-reference" href="../man1/tork-remote.1.html">tork-remote(1)</a> instances.</p><h3 id="input"><a name="input" href="#input" class="md2man-permalink" title="permalink"></a>Input</h3><p>This program reads the following commands, which are single-line JSON arrays, from stdin and then performs the associated actions. For lines read from stdin that are single-line JSON arrays, it splits each of them into an array of words, using the same word-splitting algorithm as <a class="md2man-reference">sh(1)</a>, before processing -them. For example, the line <code>a &quot;b c&quot;</code> is split into the <code>[&quot;a&quot;, &quot;b c&quot;]</code> array.</p><dl><dt><code>[&quot;run_all_test_files&quot;]</code></dt><dd>Runs all test files found within and beneath the current working directory.</dd></dl><dl><dt><em>...</em></dt><dd>Commands for <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> are also accepted here.</dd></dl><h3 id="output"><a name="output" href="#output" class="md2man-permalink" title="permalink"></a>Output</h3><p>This program prints the following messages, which are single-line JSON arrays, -to stdout.</p><dl><dt><code>[&quot;reabsorb&quot;,</code> <em>overhead_file</em><code>]</code></dt><dd>Test execution overhead is being reabsorbed because <em>overhead_file</em> has -changed.</dd></dl><dl><dt><em>...</em></dt><dd>Messages from <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> and <a class="md2man-reference" href="../man1/tork-master.1.html">tork-master(1)</a> are also reproduced here.</dd></dl><h2 id="options"><a name="options" href="#options" class="md2man-permalink" title="permalink"></a>OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><h2 id="files"><a name="files" href="#files" class="md2man-permalink" title="permalink"></a>FILES</h2><dl><dt><em>.tork/config.rb</em></dt><dd>Optional Ruby script that is loaded inside this Tork process on startup. +them. For example, the line <code>a &quot;b c&quot;</code> is split into the <code>[&quot;a&quot;, &quot;b c&quot;]</code> array.</p><dl><dt><code>[&quot;test!&quot;]</code></dt><dd>Runs all test files found within and beneath the current working directory.</dd></dl><dl><dt><em>...</em></dt><dd>Commands for <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> are also accepted here.</dd></dl><h3 id="output"><a name="output" href="#output" class="md2man-permalink" title="permalink"></a>Output</h3><p>This program prints the following messages, which are single-line JSON arrays, +to stdout.</p><dl><dt><code>[&quot;boot!&quot;,</code> <em>overhead_file</em><code>]</code></dt><dd>Reabsorbing test execution overhead because <em>overhead_file</em> has changed.</dd></dl><dl><dt><em>...</em></dt><dd>Messages from <a class="md2man-reference" href="../man1/tork-engine.1.html">tork-engine(1)</a> and <a class="md2man-reference" href="../man1/tork-master.1.html">tork-master(1)</a> are also reproduced here.</dd></dl><h2 id="options"><a name="options" href="#options" class="md2man-permalink" title="permalink"></a>OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><h2 id="files"><a name="files" href="#files" class="md2man-permalink" title="permalink"></a>FILES</h2><dl><dt><em>.tork/config.rb</em></dt><dd>Optional Ruby script that is loaded inside this Tork process on startup. It can read and change the <code>ENV[&#39;TORK_CONFIGS&#39;]</code> environment variable.</dd></dl><dl><dt><code>.tork/driver.rb</code></dt><dd>Optional Ruby script that is loaded inside the driver process on startup. It can read and change the following variables.</dd></dl> <blockquote> <dl><dt><code>Tork::Driver::REABSORB_FILE_GREPS</code></dt><dd>Array of strings or regular expressions that match the paths of overhead files. If any of these equal or match the path of a changed file @@ -37,12 +36,11 @@ followed by an underscore and the file name in reverse like this:</p> <ul> <li>lib/hello.rb =&gt; test/hello_olleh.rb</li> <li>app/world.rb =&gt; spec/world_ldrow.rb</li> </ul> -<p>Then you would add the following to your configuration file:</p> -<pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( +<p>Then you would add the following to your configuration file:</p><pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( %r{^(lib|app)/.*?([^/]+?)\.rb$} =&gt; lambda do |matches| name = matches[2] &quot;{test,spec}/**/#{name}_#{name.reverse}.rb&quot; end ) @@ -53,34 +51,31 @@ <li>lib/hello.rb =&gt; test/hello_olleh_test.rb</li> <li>lib/hello.rb =&gt; test/test_hello_olleh.rb</li> <li>app/world.rb =&gt; spec/world_ldrow_spec.rb</li> <li>app/world.rb =&gt; spec/spec_world_ldrow.rb</li> </ul> -<p>Then you would add the following to your configuration file:</p> -<pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( +<p>Then you would add the following to your configuration file:</p><pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( %r{^(lib|app)/.*?([^/]+?)\.rb$} =&gt; lambda do |matches| name = matches[2] [&quot;{test,spec}/**/#{name}_#{name.reverse}.rb&quot;, &quot;{test,spec}/**/#{name}_#{name.reverse}_{test,spec}.rb&quot;, &quot;{test,spec}/**/{test,spec}_#{name}_#{name.reverse}.rb&quot;] end ) </code></pre> <p><strong><em>Recursive expansion</em></strong></p><p>For example, if you wanted to run test files associated with <code>lib/hello.rb</code> whenever the <code>app/world.rb</code> file changed, then you would -write:</p> -<pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( +write:</p><pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( %r{^app/world\.rb$} =&gt; lambda do |matches| &#39;lib/hello.rb&#39; end ) </code></pre> <p>This effectively aliases one file onto another, but not in both directions.</p><p><strong><em>Suppressing expansion</em></strong></p><p>These lambda functions can return <code>nil</code> if they do not wish for a particular source file to be tested. For example, to ignore tests for all source files except those within a <code>models/</code> directory, you would -write:</p> -<pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( +write:</p><pre><code>Tork::Driver::TEST_FILE_GLOBBERS.update( %r{^(lib|app)(/.*?)([^/]+?)\.rb$} =&gt; lambda do |matches| if matches[2].include? &#39;/models/&#39; [&quot;{test,spec}/**/#{matches[3]}_{test,spec}.rb&quot;, &quot;{test,spec}/**/{test,spec}_#{matches[3]}.rb&quot;] #else # implied by the Ruby language