autotest 4.2.4 → 4.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -40,11 +40,9 @@ Tips
40
40
 
41
41
  TODO
42
42
  ====
43
- - add documentation for hooks / flags
44
- - remove globals
45
- - cleanup bin/autotest Dir hacks / passing of globals
46
- - cleanup bin/unit_diff
47
- - add gnome notification library
43
+ - add documentation for hooks
44
+ - cleanup bin/autotest Dir hacks
45
+ - remove globals from unitdiff
48
46
  - add some automatic notifications e.g. autotest -n -> use any notify library found
49
47
 
50
48
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.4
1
+ 4.2.5
data/autotest.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{autotest}
8
- s.version = "4.2.4"
8
+ s.version = "4.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Davis"]
12
- s.date = %q{2010-01-31}
12
+ s.date = %q{2010-02-07}
13
13
  s.executables = ["unit_diff", "autotest"]
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
data/bin/autotest CHANGED
@@ -14,7 +14,7 @@ BANNER
14
14
  opts.on("-c", "--no-full-after-failed","Do not run full tests after failed test passed") { options[:no_full_after_failed] = true }
15
15
  opts.on("-v", "--verbose","Be verbose. Prints files that autotest doesn't know how to map to tests") { options[:verbose] = true }
16
16
  opts.on("-q", "--quiet","Be quiet.") { options[:quiet] = true }
17
- opts.on("-r", "--rc", String, "Path to config file. (Defaults to ~/.autotest or current_dir/.autotest)") do |opt|
17
+ opts.on("-r", "--rc CONFIG", String, "Path to config file. (Defaults to ~/.autotest or current_dir/.autotest)") do |opt|
18
18
  options[:rc] = opt
19
19
  end
20
20
  opts.on("-h", "--help","Show this.") { puts opts;exit }
data/bin/unit_diff CHANGED
@@ -1,17 +1,21 @@
1
- #!/usr/local/bin/ruby -ws
2
- #
3
- # unit_diff - a ruby unit test filter by Ryan Davis <ryand-ruby@zenspider.com>
4
- #
5
- # usage:
6
- #
7
- # test.rb | unit_diff [options]
8
- # options:
9
- # -b ignore whitespace differences
10
- # -c contextual diff
11
- # -h show usage
12
- # -k keep temp diff files around
13
- # -u unified diff
14
- # -v display version
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'optparse'
4
+
5
+ OptionParser.new do |opts|
6
+ opts.banner = <<BANNER
7
+ unit_diff - a ruby unit test filter by Ryan Davis <ryand-ruby@zenspider.com>
8
+
9
+ usage:
10
+ test.rb | unit_diff [options]
11
+ BANNER
12
+ opts.on("-b", "ignore whitespace differences") { $b = true }
13
+ opts.on("-c", "contextual diff") { $c = true }
14
+ opts.on("-k", "keep temp diff files around") { $k = true }
15
+ opts.on("-u", "unified diff") { $u = true }
16
+ opts.on("-v", "display version") { $v = true }
17
+ opts.on("-h", "--help","Show this.") { puts opts;exit }
18
+ end.parse!
15
19
 
16
20
  begin
17
21
  require 'unit_diff'
data/lib/autotest.rb CHANGED
@@ -157,7 +157,7 @@ class Autotest
157
157
  @exception_list = []
158
158
  @test_mappings = []
159
159
 
160
- ENV['UNIT_DIFF'] ||= 'unit_diff'
160
+ ENV['UNIT_DIFF'] ||= File.expand_path("./#{File.dirname(__FILE__)}/../bin/unit_diff")
161
161
 
162
162
  self.completed_re = /\d+ tests, \d+ assertions, \d+ failures, \d+ errors/
163
163
  self.extra_class_map = {}
@@ -362,8 +362,8 @@ test_error2(#{@test_class}):
362
362
  'test/test_fooby.rb' => [ 'test_something1', 'test_something2' ]
363
363
  }
364
364
 
365
- expected = [ "#{RUBY} -I.:lib:test -rubygems -e \"%w[test/unit #{@test}].each { |f| require f }\" | unit_diff -u",
366
- "#{RUBY} -I.:lib:test -rubygems test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | unit_diff -u" ].join("; ")
365
+ expected = [ "#{RUBY} -I.:lib:test -rubygems -e \"%w[test/unit #{@test}].each { |f| require f }\" | #{ENV['UNIT_DIFF']} -u",
366
+ "#{RUBY} -I.:lib:test -rubygems test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | #{ENV['UNIT_DIFF']} -u" ].join("; ")
367
367
 
368
368
  result = @a.make_test_cmd f
369
369
  assert_equal expected, result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.4
4
+ version: 4.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-31 00:00:00 +01:00
12
+ date: 2010-02-07 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15