Sha256: 4f7dd54697536e730b48cf77e73060e7b1426a65e8dae68319ff37237573e180

Contents?: true

Size: 1.08 KB

Versions: 22

Compression:

Stored size: 1.08 KB

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'

OptionParser.new do |opts|
  opts.banner = <<BANNER
unit_diff - a ruby unit test filter by Ryan Davis <ryand-ruby@zenspider.com>

usage:
  test.rb | unit_diff [options]
BANNER
  opts.on("-b", "ignore whitespace differences") { $b = true }
  opts.on("-c", "contextual diff") { $c = true }
  opts.on("-k", "keep temp diff files around") { $k = true }
  opts.on("-u", "unified diff") { $u = true }
  opts.on("-v", "display version") { $v = true }
  opts.on("-h", "--help","Show this.") { puts opts;exit }
end.parse!

begin
  require 'unit_diff'
rescue LoadError
  require File.dirname(__FILE__) + '/../lib/unit_diff'
end

############################################################

if defined? $v then
  puts "#{File.basename $0} v. #{File.read( File.join(File.dirname(__FILE__),'..','VERSION') )}"
  exit 0
end

if defined? $h then
  File.open(__FILE__) do |f|
    begin; end until f.readline =~ /usage:/
    f.readline
    while line = f.readline and line.sub!(/^# ?/, '')
      $stderr.puts line
    end
  end
  exit 0
end

UnitDiff.unit_diff

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/autotest-4.4.5/bin/unit_diff
autotest-standalone-4.5.4 bin/unit_diff
autotest-standalone-4.5.3 bin/unit_diff
vim-jar-0.1.2 bundler/ruby/1.8/gems/autotest-4.4.5/bin/unit_diff
vim-jar-0.1.1 bundler/ruby/1.8/gems/autotest-4.4.5/bin/unit_diff
vim-jar-0.1.0 bundler/ruby/1.8/gems/autotest-4.4.5/bin/unit_diff
autotest-standalone-4.5.2 bin/unit_diff
autotest-standalone-4.5.1 bin/unit_diff
autotest-standalone-4.5.0 bin/unit_diff
autotest-4.4.5 bin/unit_diff
autotest-4.4.4 bin/unit_diff
autotest-4.4.3 bin/unit_diff
autotest-4.4.2 bin/unit_diff
autotest-4.4.1 bin/unit_diff
autotest-4.4.0 bin/unit_diff
autotest-4.3.2 bin/unit_diff
autotest-4.2.10 bin/unit_diff
autotest-4.2.9 bin/unit_diff
autotest-4.2.8 bin/unit_diff
autotest-4.2.7 bin/unit_diff