Sha256: 1cdb13616745b5ab67c05126156ffd0860f885df5d7a4894c1b1b665a28d4e6c

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

#!/usr/local/bin/ruby -ws

$h    ||= false
$help ||= false

if $h or $help then
  help = []
  help << "autotest [options]"
  help << nil
  help << "options:"
  help << "\t-h"
  help << "\t-help\t\tYou're looking at it."
  help << nil
  help << "\t-v\t\tBe verbose."
  help << "\t\t\tPrints files that autotest doesn't know how to map to"
  help << "\t\t\ttests."
  help << nil
  help << "\t-rails\t\tForce rails mode."
  help << "\t\t\tRails will be automatically detected by the presence of"
  help << "\t\t\tconfig/environment.rb"
  help << nil
  help << "\t-vcs=NAME\tVersion control system to update."
  help << "\t\t\tAutotest will automatically update every vcstime"
  help << "\t\t\tseconds."
  help << "\t\t\tAutotest understands Perforce (p4), CVS (cvs) and"
  help <<  "\t\t\tSubversion (svn)."
  help << nil
  help << "\t-vcstime=N\tUpdate source control every N seconds."
  help << "\t\t\tDefaults to every five minutes (300 seconds)."
  STDERR.puts help.join("\n")
  exit 1
end

$v       ||= false
$rails   ||= false
$vcs     ||= nil
$vcstime ||= 300
$vcstime = $vcstime.to_i

if $rails or File.exist? 'config/environment.rb' then
  require 'rails_autotest'
  RailsAutotest.run
else
  require 'autotest'
  Autotest.run
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ZenTest-3.1.0 bin/autotest
ZenTest-3.2.0 bin/autotest