<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>metrics.thor</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,11 @@
-# module: ssh
+#!/usr/bin/env ruby
 
 class Ssh &lt; Thor
   require 'net/sftp'
   require 'highline/import'
   
-  desc &quot;install_key HOSTNAME&quot;, &quot;installs your public key on the remote host.&quot;
-  method_options :username =&gt; :optional, :password =&gt; :optional, :key =&gt; :optional
+  desc &quot;install_key &lt;hostname&gt;&quot;, &quot;installs your public key on the remote host.&quot;
+  method_options :username =&gt; :string, :password =&gt; :string, :key =&gt; :string
   def install_key(host)
     username = options['username'] || ask(&quot;Enter your username: &quot;) { |q| q.default = ENV['USER'] }
     password = options['password'] || ask(&quot;Enter your password: &quot;) { |q| q.echo = false }</diff>
      <filename>ssh.thor</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,33 @@
-# module: watch
+#!/usr/bin/env ruby
 
 # Based on rstakeout, originally by Mike Clark, from
 # http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/StakingOutFileChanges.rdoc
 
+require 'find'
+
 class Watch &lt; Thor
-  
-  desc &quot;run COMMAND FILES&quot;, &quot;Watch the given files and execute the command every time they change.&quot;
-  def run(command, *files)
-    exit if files.empty?
-    files = Hash[files.map { |file| [file, File.mtime(file)] }]
-    puts &quot;Watching #{files.keys.join(', ')}\n\nFiles: #{files.keys.length}&quot;
+  desc &quot;path &lt;command&gt; &lt;path&gt; &lt;path&gt; ...&quot;, &quot;Watch the given paths and execute the command every time they change. Put FILE in the filename to substitute it for the changed file.&quot;
+  def path(command, *paths)
+    exit if paths.empty?
+    
+    files = {}
+    paths = paths.select { |path| File.exist?(path) }
+    
+    paths.each do |path|      
+      Find.find(File.expand_path(path)) do |file|
+        if FileTest.directory?(file)
+          if File.basename(file) =~ /^\.\w+/            
+            Find.prune
+          else
+            next
+          end          
+        else
+          files[file] = File.mtime(file)
+        end
+      end
+    end
+            
+    puts &quot;Watching #{paths.join(', ')}\n\nFiles: #{files.keys.length}&quot;
 
     trap('INT') do
       puts &quot;\nQuitting...&quot;
@@ -26,7 +44,7 @@ class Watch &lt; Thor
       if changed_file
         files[changed_file] = File.mtime(changed_file)
         puts &quot;=&gt; #{changed_file} changed, running #{command}&quot;
-        puts `#{command}`
+        puts `#{command.gsub(/FILE/, changed_file)}`
         puts &quot;=&gt; done&quot;
       end
     end</diff>
      <filename>watch.thor</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>audit.thor</filename>
    </removed>
    <removed>
      <filename>flog.thor</filename>
    </removed>
    <removed>
      <filename>provision_apache.thor</filename>
    </removed>
    <removed>
      <filename>provision_base.thor</filename>
    </removed>
    <removed>
      <filename>provision_ubuntu.thor</filename>
    </removed>
    <removed>
      <filename>ramaze.thor</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>1c552b331ef1a694d23edce83ef82b0943ecd467</id>
    </parent>
  </parents>
  <author>
    <name>Clinton R. Nixon</name>
    <email>crnixon@gmail.com</email>
  </author>
  <url>http://github.com/crnixon/thor_tasks/commit/b4e8888bb11c62a1c9605ed3eb9fb54d15765d49</url>
  <id>b4e8888bb11c62a1c9605ed3eb9fb54d15765d49</id>
  <committed-date>2009-09-15T16:37:14-07:00</committed-date>
  <authored-date>2009-09-15T16:37:14-07:00</authored-date>
  <message>updated for latest thor and removed old, unused ones</message>
  <tree>6acc8ff27a6ab876e10cc0082d18ce839f5ff874</tree>
  <committer>
    <name>Clinton R. Nixon</name>
    <email>crnixon@gmail.com</email>
  </committer>
</commit>
