tapout 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ source:
3
+ - var
2
4
  authors:
3
5
  - name: Thomas Sawyer
4
6
  email: transfire@gmail.com
@@ -7,7 +9,7 @@ copyrights:
7
9
  year: '2010'
8
10
  license: BSD-2-Clause
9
11
  replacements: []
10
- conflicts: []
12
+ alternatives: []
11
13
  requirements:
12
14
  - name: ansi
13
15
  - name: json
@@ -20,6 +22,7 @@ requirements:
20
22
  - test
21
23
  development: true
22
24
  dependencies: []
25
+ conflicts: []
23
26
  repositories:
24
27
  - uri: git://github.com/rubyworks/tapout.git
25
28
  scm: git
@@ -27,19 +30,16 @@ repositories:
27
30
  resources:
28
31
  home: http://rubyworks.github.com/tapout
29
32
  code: http://github.com/rubyworks/tapout
33
+ extra: {}
30
34
  load_path:
31
35
  - lib
32
- extra: {}
33
- source:
34
- - PROFILE
35
- alternatives: []
36
36
  revision: 0
37
- name: tapout
38
- title: TapOut
39
- version: 0.3.1
37
+ created: '2010-12-23'
40
38
  summary: Progressive TAP Harness
39
+ title: TapOut
40
+ version: 0.3.2
41
+ name: tapout
41
42
  description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
42
43
  and output it in a variety of useful formats.
43
44
  organization: RubyWorks
44
- created: '2010-12-23'
45
- date: '2011-10-18'
45
+ date: '2011-11-08'
@@ -2,11 +2,13 @@
2
2
 
3
3
  == TAPOUT
4
4
 
5
- Copyright:: (c) 2010 Thomas Sawyer, Rubyworks
5
+ Copyright:: (c) 2010 Rubyworks
6
6
  License:: BSD-2-Clause
7
7
  Website:: http://rubyworks.github.com/tapout
8
8
 
9
- Copyright 2011 Thomas Sawyer. All rights reserved.
9
+ TAPOUT - Modernized TAP Harness
10
+
11
+ Copyright 2010 Rubyworks. All rights reserved.
10
12
 
11
13
  Redistribution and use in source and binary forms, with or without
12
14
  modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,17 @@
1
1
  = RELEASE HISTORY
2
2
 
3
+
4
+ == 0.3.2 / 2011-11-08
5
+
6
+ Improve backtrace output in a number of reporters. Now, by default, full
7
+ backtraces are provided. Use the `--trace DEPTH` option to limit the
8
+ number of backtrace lines to report.
9
+
10
+ Changes:
11
+
12
+ * Improve backtrace output in most reporters.
13
+
14
+
3
15
  == 0.3.1 / 2011-10-18
4
16
 
5
17
  This release fixes an error raised when no report format is explicitly specified.
@@ -1,11 +1,10 @@
1
1
  = Tap Out
2
2
 
3
3
  {Website}[http://rubyworks.github.com/tapout] |
4
- {Development}[http://github.com/rubyworks/tapout]
4
+ {Development}[http://github.com/rubyworks/tapout] |
5
+ {Report Issue}[http://github.com/rubyworks/tapout/issues]
5
6
 
6
- Copyright:: 2010 Thomas Sawyer, Rubyworks
7
- License:: BSD-2-Clause
8
- Status:: {<img src="http://travis-ci.org/rubyworks/tapout.png" />}[http://travis-ci.org/rubyworks/tapout]
7
+ {<img src="http://travis-ci.org/rubyworks/tapout.png" />}[http://travis-ci.org/rubyworks/tapout]
9
8
 
10
9
 
11
10
  == DESCRIPTION
@@ -15,10 +14,10 @@ TapOut is a TAP handler. TapOut supports TAP-Y/J as well as traditional TAP.
15
14
  TAP-Y/J is a modernization of TAP using pure YAML/JSON streams.
16
15
  Traditional TAP has less detail than TAP-Y/J, but it can still be translated
17
16
  with fairly good results. TapOut includes a TAP adapter to handle the
18
- translation transparently. Current TapOut support TAP v12 with minor
19
- limitations.
17
+ translation transparently. Currently TapOut supports TAP v12 with minor
18
+ some limitations.
20
19
 
21
- To learn about the TAP-Y/J specification, see the TAP-YJ.rdoc file.
20
+ To learn about the TAP-Y/J specification, see the {TAP-YJ.rdoc} file.
22
21
 
23
22
  For information about TAP, see http://testanything.org/wiki/index.php/Main_Page.
24
23
 
@@ -54,8 +53,9 @@ TAP, TapOut will automatically recognize the difference by TAP's `1..N` header.
54
53
 
55
54
  == COPYRIGHTS
56
55
 
57
- TapOut, Copyright (c) 2010 Thomas Sawyer
56
+ TapOut - Copyright (c) 2010 Rubyworks
58
57
 
59
- TapOut is licensed under the terms of the FreeBSD license.
58
+ TapOut is licensed under the terms of the *BSD-2-Clause* license.
59
+
60
+ See COPYING.rdoc for details.
60
61
 
61
- See COPYING.rdoc and LICENSE.txt for details.
@@ -3,6 +3,9 @@ require 'tapout/parsers'
3
3
 
4
4
  module TapOut
5
5
 
6
+ # Default trace depth.
7
+ @trace = nil
8
+
6
9
  #
7
10
  def self.trace
8
11
  @trace
@@ -1,4 +1,6 @@
1
1
  ---
2
+ source:
3
+ - var
2
4
  authors:
3
5
  - name: Thomas Sawyer
4
6
  email: transfire@gmail.com
@@ -7,7 +9,7 @@ copyrights:
7
9
  year: '2010'
8
10
  license: BSD-2-Clause
9
11
  replacements: []
10
- conflicts: []
12
+ alternatives: []
11
13
  requirements:
12
14
  - name: ansi
13
15
  - name: json
@@ -20,6 +22,7 @@ requirements:
20
22
  - test
21
23
  development: true
22
24
  dependencies: []
25
+ conflicts: []
23
26
  repositories:
24
27
  - uri: git://github.com/rubyworks/tapout.git
25
28
  scm: git
@@ -27,19 +30,16 @@ repositories:
27
30
  resources:
28
31
  home: http://rubyworks.github.com/tapout
29
32
  code: http://github.com/rubyworks/tapout
33
+ extra: {}
30
34
  load_path:
31
35
  - lib
32
- extra: {}
33
- source:
34
- - PROFILE
35
- alternatives: []
36
36
  revision: 0
37
- name: tapout
38
- title: TapOut
39
- version: 0.3.1
37
+ created: '2010-12-23'
40
38
  summary: Progressive TAP Harness
39
+ title: TapOut
40
+ version: 0.3.2
41
+ name: tapout
41
42
  description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
42
43
  and output it in a variety of useful formats.
43
44
  organization: RubyWorks
44
- created: '2010-12-23'
45
- date: '2011-10-18'
45
+ date: '2011-11-08'
@@ -14,7 +14,7 @@ module TapOut::Reporters
14
14
 
15
15
  #
16
16
  def pass(entry)
17
- $stdout.print '.'
17
+ $stdout.print '.'.ansi(:green)
18
18
  $stdout.flush
19
19
  super(entry)
20
20
  end
@@ -40,25 +40,31 @@ module TapOut::Reporters
40
40
  i = 1
41
41
 
42
42
  @failed.each do |e|
43
- #backtrace = clean_backtrace(exception.backtrace)
43
+ backtrace = clean_backtrace(e['exception']['backtrace'])
44
+ depth = TapOut.trace || backtrace.size
45
+
44
46
  $stdout.puts "#{i}. " + (e['label']).ansi(:red)
45
47
  $stdout.puts
46
48
  $stdout.puts " #{e['exception']['class']}" if e['exception']['class']
47
- $stdout.puts " #{e['exception']['message']}"
49
+ $stdout.puts e['exception']['message'].to_s.tabto(4)
48
50
  $stdout.puts " #{e['exception']['file']}:#{e['exception']['line']}" #+ backtrace[0]
49
51
  $stdout.puts code_snippet(e['exception'])
52
+ $stdout.puts backtrace[0,depth].join("\n").tabto(4)
50
53
  $stdout.puts
51
54
  i += 1
52
55
  end
53
56
 
54
57
  @raised.each do |e|
55
- #backtrace = clean_backtrace(exception.backtrace)
58
+ backtrace = clean_backtrace(e['exception']['backtrace'])
59
+ depth = TapOut.trace || backtrace.size
60
+
56
61
  $stdout.puts "#{i}. " + (e['label']).ansi(:yellow)
57
62
  $stdout.puts
58
63
  $stdout.puts " #{e['exception']['class']}" if e['exception']['class']
59
64
  $stdout.puts " #{e['exception']['message']}"
60
65
  $stdout.puts " #{e['exception']['file']}:#{e['exception']['line']}" #+ backtrace[0..2].join(" \n")
61
66
  $stdout.puts code_snippet(e['exception'])
67
+ $stdout.puts backtrace[0,depth].join("\n").tabto(4)
62
68
  $stdout.puts
63
69
  i += 1
64
70
  end
@@ -77,17 +77,18 @@ module TapOut
77
77
  if bt = test['exception']['backtrace']
78
78
  _trace = clean_backtrace(bt)
79
79
  else
80
- _trace = clean_backtrace(bt)
80
+ _trace = []
81
81
  end
82
82
 
83
- puts
83
+ trace = _trace.shift
84
+ depth = TapOut.trace || trace.size
84
85
  tabsize = 10
86
+
87
+ puts
85
88
  #puts pad(message, tabsize)
86
89
  puts message.tabto(tabsize)
87
- puts _trace.shift.tabto(tabsize)
88
- if depth = TapOut.trace
89
- puts _trace[0,depth].map{|l| l.tabto(tabsize) }.join("\n")
90
- end
90
+ puts trace.tabto(tabsize)
91
+ puts _trace[0,depth].map{|l| l.tabto(tabsize) }.join("\n")
91
92
  #show_captured_output
92
93
  end
93
94
 
@@ -107,14 +108,14 @@ module TapOut
107
108
  _trace = filter_backtrace(bt)
108
109
  end
109
110
 
110
- trace = _trace.shift
111
- puts
111
+ trace = _trace.shift
112
+ depth = TapOut.trace || trace.size
112
113
  tabsize = 10
114
+
115
+ puts
113
116
  puts message.tabto(tabsize)
114
117
  puts trace.tabto(tabsize)
115
- if depth = TapOut.trace
116
- puts _trace[0,depth].map{|l| l.tabto(tabsize) }.join("\n")
117
- end
118
+ puts _trace[0,depth].map{|l| l.tabto(tabsize) }.join("\n")
118
119
  end
119
120
 
120
121
  # TODO: skip support
@@ -66,10 +66,12 @@ module TapOut
66
66
  #end
67
67
  end
68
68
 
69
+ #
69
70
  #
70
71
  def fail(doc)
71
72
  message = doc['exception']['message'].to_s
72
73
  backtrace = clean_backtrace(doc['exception']['backtrace'] || [])
74
+ depth = TapOut.trace || backtrace.size
73
75
 
74
76
  puts(" #{FAIL}")
75
77
  puts message.ansi(:bold).tabto(8)
@@ -79,19 +81,20 @@ module TapOut
79
81
  tabsize = 8
80
82
  backtrace1 = label + backtrace.shift
81
83
  puts(backtrace1.tabto(tabsize))
82
- if trace = TapOut.trace
83
- puts backtrace[0,depth].map{|l| l.tabto(label.length + tabsize) }.join("\n")
84
- end
84
+ puts backtrace[0,depth].map{|l| l.tabto(label.length + tabsize) }.join("\n")
85
85
  end
86
86
  show_captured_output
87
87
  end
88
88
 
89
- # TODO: TAP-Y/J needs a field for the error class
89
+ #
90
+ #
90
91
  def error(doc)
91
92
  exception_class = doc['exception']['class'].to_s
92
93
  message = doc['exception']['message'].to_s.ansi(:bold)
93
- backtrace = "Exception `#{exception_class}' at " +
94
- clean_backtrace(doc['exception']['backtrace'] || []).join("\n")
94
+
95
+ backtrace = clean_backtrace(doc['exception']['backtrace'] || [])
96
+ depth = TapOut.trace || backtrace.size
97
+ backtrace = "Exception `#{exception_class}' at " + backtrace[0,depth].join("\n")
95
98
 
96
99
  puts("#{ERROR}")
97
100
  puts(message.tabto(8))
@@ -0,0 +1 @@
1
+ require 'tapout'
@@ -0,0 +1,36 @@
1
+ ## Default Reporter
2
+
3
+ ### Issue #1 - tapout not defaulting output with minitap and minitest
4
+
5
+ #### Report Summary
6
+
7
+ Using minitap 0.3.0 and tapout 0.3.0 together, the command:
8
+
9
+ rake -q test | tapout
10
+
11
+ results in a stacktrace. This goes away if you actually specify a report
12
+ style to output. It seems the default dotprogress selection is getting
13
+ lost somehow.
14
+
15
+ See http://github.com/rubyworks/tapout/issues/1.
16
+
17
+ #### Problem
18
+
19
+ Each parser sets a default reporter name on it's own if no
20
+ name is given. But they were using an old name for the `dot`
21
+ reporter which caused this bug:
22
+
23
+ format = options[:format] || 'dotprogess'
24
+
25
+ The dotprogress reporter was renamed to `dot` in the 0.3 release.
26
+
27
+ #### Solution
28
+
29
+ Instead of having each parser worry about setting the default
30
+ we can let the factory method do it when `nil` is passed as an
31
+ argument.
32
+
33
+ reporter = TapOut::Reporters.factory(nil)
34
+
35
+ reporter #=> TapOut::Reporters::DotReporter
36
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-18 00:00:00.000000000 Z
12
+ date: 2011-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
16
- requirement: &15919940 !ruby/object:Gem::Requirement
16
+ requirement: &23948160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *15919940
24
+ version_requirements: *23948160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &15964400 !ruby/object:Gem::Requirement
27
+ requirement: &23946140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *15964400
35
+ version_requirements: *23946140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: detroit
38
- requirement: &15957180 !ruby/object:Gem::Requirement
38
+ requirement: &23943840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *15957180
46
+ version_requirements: *23943840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: qed
49
- requirement: &15391460 !ruby/object:Gem::Requirement
49
+ requirement: &23942460 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *15391460
57
+ version_requirements: *23942460
58
58
  description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
59
59
  and output it in a variety of useful formats.
60
60
  email:
@@ -63,7 +63,6 @@ executables:
63
63
  - tapout
64
64
  extensions: []
65
65
  extra_rdoc_files:
66
- - LICENSE.txt
67
66
  - HISTORY.rdoc
68
67
  - README.rdoc
69
68
  - COPYING.rdoc
@@ -92,19 +91,20 @@ files:
92
91
  - lib/tapout.rb
93
92
  - lib/tapout.yml
94
93
  - spec/applique/env.rb
94
+ - spec/issues/applique/env.rb
95
+ - spec/issues/default_reporter.rdoc
95
96
  - spec/perl_adapter.rdoc
96
97
  - spec/reporters/applique/cli.rb
97
98
  - spec/reporters/fixtures/tapy.yml
98
99
  - spec/reporters/reporters.rdoc
99
100
  - test/unit/test-progressbar.rb
100
101
  - HISTORY.rdoc
101
- - PROFILE
102
- - LICENSE.txt
103
102
  - README.rdoc
104
103
  - COPYING.rdoc
105
104
  - TAP-YJ.md
106
105
  homepage: http://rubyworks.github.com/tapout
107
- licenses: []
106
+ licenses:
107
+ - BSD-2-Clause
108
108
  post_install_message:
109
109
  rdoc_options: []
110
110
  require_paths:
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 1.8.5
126
+ rubygems_version: 1.8.10
127
127
  signing_key:
128
128
  specification_version: 3
129
129
  summary: Progressive TAP Harness
@@ -1,25 +0,0 @@
1
- BSD 2 Clause License
2
-
3
- Copyright 2011 Thomas Sawyer. All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without
6
- modification, are permitted provided that the following conditions are met:
7
-
8
- 1. Redistributions of source code must retain the above copyright notice,
9
- this list of conditions and the following disclaimer.
10
-
11
- 2. Redistributions in binary form must reproduce the above copyright
12
- notice, this list of conditions and the following disclaimer in the
13
- documentation and/or other materials provided with the distribution.
14
-
15
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
16
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
18
- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
-
data/PROFILE DELETED
@@ -1,34 +0,0 @@
1
- ---
2
- name: tapout
3
- version: 0.3.1
4
-
5
- title: TapOut
6
- summary: Progressive TAP Harness
7
- description:
8
- Tapout is a TAP consumer that can take any TAP, TAP-Y or
9
- TAP-J stream and output it in a variety of useful formats.
10
-
11
- requires:
12
- - ansi
13
- - json
14
- - detroit (build)
15
- - qed (test)
16
-
17
- resources:
18
- home: http://rubyworks.github.com/tapout
19
- code: http://github.com/rubyworks/tapout
20
-
21
- repositories:
22
- upstream: git://github.com/rubyworks/tapout.git
23
-
24
- authors:
25
- - Thomas Sawyer <transfire@gmail.com>
26
-
27
- organization: RubyWorks
28
-
29
- created: 2010-12-23
30
-
31
- copyrights:
32
- - Copyright (c) 2010 Thomas Sawyer (BSD-2-Clause)
33
-
34
- source: PROFILE