<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Faster TDD with Stakeout.rb</title>
	<atom:link href="http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/</link>
	<description></description>
	<lastBuildDate>Fri, 01 Jul 2011 12:51:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: PHP Auto Test &#8211; Automatically monitor your project for changes and run your unit tests &#171; Web Application Development, E-commerce, Sales &#38; Marketing</title>
		<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-152450</link>
		<dc:creator>PHP Auto Test &#8211; Automatically monitor your project for changes and run your unit tests &#171; Web Application Development, E-commerce, Sales &#38; Marketing</dc:creator>
		<pubDate>Wed, 18 Nov 2009 21:27:37 +0000</pubDate>
		<guid isPermaLink="false">http://mikenaberezny.com/archives/78#comment-152450</guid>
		<description>[...] read about stakeout.rb but read that it might not work on windows. Rather then waste time even trying I just ported it to [...]</description>
		<content:encoded><![CDATA[<p>[...] read about stakeout.rb but read that it might not work on windows. Rather then waste time even trying I just ported it to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Ribakoff</title>
		<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-152448</link>
		<dc:creator>Josh Ribakoff</dc:creator>
		<pubDate>Wed, 18 Nov 2009 20:53:27 +0000</pubDate>
		<guid isPermaLink="false">http://mikenaberezny.com/archives/78#comment-152448</guid>
		<description>I ported it to PHP, and started breaking up the code into objects and sub-routines. http://pastebin.org/54979

- override runTests() with the command you want to run
- override doDelay() to check more/less often
- pass the path to files in the contstructor

Invoke like this:
C:/wamp/bin/php/php5.3.0/php E:\dev\path\phpautotest.php E:\dev\path\to\monitor</description>
		<content:encoded><![CDATA[<p>I ported it to PHP, and started breaking up the code into objects and sub-routines. <a href="http://pastebin.org/54979" rel="nofollow">http://pastebin.org/54979</a></p>
<p>- override runTests() with the command you want to run<br />
- override doDelay() to check more/less often<br />
- pass the path to files in the contstructor</p>
<p>Invoke like this:<br />
C:/wamp/bin/php/php5.3.0/php E:\dev\path\phpautotest.php E:\dev\path\to\monitor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joaquin Lippincott</title>
		<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-150605</link>
		<dc:creator>Joaquin Lippincott</dc:creator>
		<pubDate>Thu, 24 Sep 2009 18:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://mikenaberezny.com/archives/78#comment-150605</guid>
		<description>Here&#039;s a post on using stakeout.rb with Drupal:

http://www.metaltoad.com/blog/fun-stakeoutrb</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a post on using stakeout.rb with Drupal:</p>
<p><a href="http://www.metaltoad.com/blog/fun-stakeoutrb" rel="nofollow">http://www.metaltoad.com/blog/fun-stakeoutrb</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: René Leonhardt</title>
		<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-80604</link>
		<dc:creator>René Leonhardt</dc:creator>
		<pubDate>Fri, 01 Feb 2008 08:11:04 +0000</pubDate>
		<guid isPermaLink="false">http://mikenaberezny.com/archives/78#comment-80604</guid>
		<description>&lt;pre lang=&quot;python&quot;&gt;
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-

import os, subprocess, sys, time

if len(sys.argv) &lt; 3:
  print &quot;Usage: stakeout.py  [files to watch]+&quot;
  sys.exit(1)

command = sys.argv[1]
files = {}

for arg in sys.argv[2:]:
  if os.path.isfile(arg):
    files[arg] = os.path.getmtime(arg)
last_changed = max(files.values())

try:
  while True:

    time.sleep(1)

    for file in files.iterkeys():
      file_mtime = os.path.getmtime(file)
      if file_mtime &gt; last_changed:
        files[file] = last_changed = file_mtime

        print &quot;=&gt; %s changed, running %s&quot; % (file, command)
        try:
          retcode = subprocess.call(command, shell=True)
          print &quot;=&gt; done&quot;
        except OSError, e:
          print &gt;&gt;sys.stderr, &quot;Execution failed:&quot;, e
except KeyboardInterrupt:
    pass
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;"># -*- coding: iso-8859-15 -*-</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">subprocess</span>, <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">time</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span>lt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">3</span>:
  <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Usage: stakeout.py  [files to watch]+&quot;</span>
  <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
command = <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
files = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> arg <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span>:<span style="color: black;">&#93;</span>:
  <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isfile</span><span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span>:
    files<span style="color: black;">&#91;</span>arg<span style="color: black;">&#93;</span> = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">getmtime</span><span style="color: black;">&#40;</span>arg<span style="color: black;">&#41;</span>
last_changed = <span style="color: #008000;">max</span><span style="color: black;">&#40;</span>files.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">try</span>:
  <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:
&nbsp;
    <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #008000;">file</span> <span style="color: #ff7700;font-weight:bold;">in</span> files.<span style="color: black;">iterkeys</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
      file_mtime = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">getmtime</span><span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: black;">&#41;</span>
      <span style="color: #ff7700;font-weight:bold;">if</span> file_mtime <span style="color: #66cc66;">&gt;</span> last_changed:
        files<span style="color: black;">&#91;</span><span style="color: #008000;">file</span><span style="color: black;">&#93;</span> = last_changed = file_mtime
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;=&gt; %s changed, running %s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span><span style="color: #008000;">file</span>, command<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">try</span>:
          retcode = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">call</span><span style="color: black;">&#40;</span>command, shell=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
          <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;=&gt; done&quot;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">OSError</span>, e:
          <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #66cc66;">&gt;&gt;</span>sys.<span style="color: black;">stderr</span>, <span style="color: #483d8b;">&quot;Execution failed:&quot;</span>, e
<span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyboardInterrupt</span>:
    <span style="color: #ff7700;font-weight:bold;">pass</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Naberezny</title>
		<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-44663</link>
		<dc:creator>Mike Naberezny</dc:creator>
		<pubDate>Wed, 05 Sep 2007 13:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://mikenaberezny.com/archives/78#comment-44663</guid>
		<description>:-)

I&#039;d like to see everyone do more testing, regardless of whatever language they happen to be stuck using.</description>
		<content:encoded><![CDATA[<p>:-)</p>
<p>I&#8217;d like to see everyone do more testing, regardless of whatever language they happen to be stuck using.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Davis</title>
		<link>http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-44618</link>
		<dc:creator>Ryan Davis</dc:creator>
		<pubDate>Wed, 05 Sep 2007 08:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://mikenaberezny.com/archives/78#comment-44618</guid>
		<description>now that&#039;s just sad... Geoffrey didn&#039;t have THAT in mind!</description>
		<content:encoded><![CDATA[<p>now that&#8217;s just sad&#8230; Geoffrey didn&#8217;t have THAT in mind!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

