tapout 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/.index ADDED
@@ -0,0 +1,70 @@
1
+ ---
2
+ revision: 2013
3
+ type: ruby
4
+ sources:
5
+ - var
6
+ authors:
7
+ - name: Thomas Sawyer
8
+ email: transfire@gmail.com
9
+ organizations:
10
+ - name: Rubyworks
11
+ requirements:
12
+ - name: ansi
13
+ - name: json
14
+ - groups:
15
+ - build
16
+ development: true
17
+ name: ergo
18
+ - groups:
19
+ - test
20
+ development: true
21
+ name: qed
22
+ - groups:
23
+ - test
24
+ development: true
25
+ name: ae
26
+ conflicts: []
27
+ alternatives: []
28
+ resources:
29
+ - type: home
30
+ uri: http://rubyworks.github.com/tapout
31
+ label: Homepage
32
+ - type: wiki
33
+ uri: http://github.com/rubyworks/tapout/wiki
34
+ label: User Guide
35
+ - type: docs
36
+ uri: http://rubydoc.info/gems/tapout/frames
37
+ label: Documentation
38
+ - type: code
39
+ uri: http://github.com/rubyworks/tapout
40
+ label: Source Code
41
+ - type: bugs
42
+ uri: http://github.com/rubyworks/tapout/issues
43
+ label: Issue Tracker
44
+ - type: mail
45
+ uri: http://groups.google.com/rubyworks-mailinglist
46
+ label: Mailing List
47
+ - type: chat
48
+ uri: irc://chat.us.freenode.net#rubyworks
49
+ label: IRC Channel
50
+ repositories:
51
+ - name: upstream
52
+ scm: git
53
+ uri: git://github.com/rubyworks/tapout.git
54
+ categories: []
55
+ copyrights:
56
+ - holder: Thomas Sawyer
57
+ year: '2010'
58
+ license: BSD-2-Clause
59
+ customs: []
60
+ paths:
61
+ lib:
62
+ - lib
63
+ created: '2010-12-23'
64
+ summary: Progressive TAP Harness
65
+ title: TAPOUT
66
+ version: 0.4.2
67
+ name: tapout
68
+ description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
69
+ and output it in a variety of useful formats.
70
+ date: '2013-03-17'
data/.yardopts CHANGED
@@ -1,8 +1,9 @@
1
1
  --title "TAPout"
2
- --readme README.rdoc
2
+ --readme README.md
3
3
  --protected
4
4
  --private
5
5
  lib
6
6
  -
7
- [A-Z]*.*
8
- TAP-YJ.md
7
+ *.md
8
+ *.txt
9
+
@@ -1,15 +1,15 @@
1
- = COPYRIGHT NOTICES
1
+ # COPYRIGHT
2
2
 
3
- == TAPOUT
3
+ ## NOTICES
4
4
 
5
- Copyright:: (c) 2010 Rubyworks
6
- License:: BSD-2-Clause
7
- Website:: http://rubyworks.github.com/tapout
5
+ ### [TAPOUT](http://rubyworks.github.com/tapout)
8
6
 
9
7
  TAPOUT - Modernized TAP Harness
10
8
 
11
9
  Copyright 2010 Rubyworks. All rights reserved.
12
10
 
11
+ BSD-2-Clause License
12
+
13
13
  Redistribution and use in source and binary forms, with or without
14
14
  modification, are permitted provided that the following conditions are met:
15
15
 
@@ -31,17 +31,16 @@ Website:: http://rubyworks.github.com/tapout
31
31
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32
32
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
33
 
34
- == Detest
35
34
 
36
- Copyright:: (c) 2009 Suraj N. Kurapati
37
- License:: MIT
38
- Website:: http://detest.org
35
+ ### [Detest](http://detest.org)
39
36
 
40
37
  A small segement of code for outputing error messages was sourced from the
41
- Detest[http://snk.tuxfamily.org/lib/detest/] project.
38
+ [Detest](http://snk.tuxfamily.org/lib/detest/) project.
42
39
 
43
40
  Copyright 2009 Suraj N. Kurapati <sunaku@gmail.com>
44
41
 
42
+ MIT License
43
+
45
44
  Permission to use, copy, modify, and/or distribute this software for any
46
45
  purpose with or without fee is hereby granted, provided that the above
47
46
  copyright notice and this permission notice appear in all copies.
@@ -1,6 +1,16 @@
1
- = RELEASE HISTORY
1
+ # RELEASE HISTORY
2
2
 
3
- == 0.4.1 / 2012-04-16
3
+ ## 0.4.2 / 2013-03-18
4
+
5
+ This release adds support for trace depth and snippet size options.
6
+
7
+ Changes:
8
+
9
+ * Tie trace depth config into backtrace filter.
10
+ * Tie lines config into snippet creator.
11
+
12
+
13
+ ## 0.4.1 / 2012-04-16
4
14
 
5
15
  Add support for autoloading reporter plugins. Just name the plugin script
6
16
  the same as the reporter prefixed by `tapout-`, e.g. `tapout-fivemat.rb`.
@@ -11,7 +21,7 @@ Changes:
11
21
  * Add -r/-require option to tapout command.
12
22
 
13
23
 
14
- == 0.4.0 / 2012-02-01
24
+ ## 0.4.0 / 2012-02-01
15
25
 
16
26
  TAP-Y/J spec now supports `stdout` and `stderr` fields. This allows test
17
27
  frameworks to capture stdout and stderr while running tests and pipe them
@@ -28,7 +38,7 @@ Changes:
28
38
  * Add markdown reporter.
29
39
 
30
40
 
31
- == 0.3.2 / 2011-11-08
41
+ ## 0.3.2 / 2011-11-08
32
42
 
33
43
  Improve backtrace output in a number of reporters. Now, by default, full
34
44
  backtraces are provided. Use the `--trace DEPTH` option to limit the
@@ -39,7 +49,7 @@ Changes:
39
49
  * Improve backtrace output in most reporters.
40
50
 
41
51
 
42
- == 0.3.1 / 2011-10-18
52
+ ## 0.3.1 / 2011-10-18
43
53
 
44
54
  This release fixes an error raised when no report format is explicitly specified.
45
55
  Where as it is supposed to default to the `dot` reporter. It also adds initial
@@ -51,7 +61,7 @@ Changes:
51
61
  * Add support for class field to Turn reporter.
52
62
 
53
63
 
54
- == 0.3.0 / 2011-10-09
64
+ ## 0.3.0 / 2011-10-09
55
65
 
56
66
  This release supports revision 3 of the TAP-Y/J specification, which adds `final`
57
67
  to the document types. The `final` document is the last document of a test suite.
@@ -67,7 +77,7 @@ Changes:
67
77
  * Port Turn report formats.
68
78
 
69
79
 
70
- == 0.2.3 / 2011-10-08
80
+ ## 0.2.3 / 2011-10-08
71
81
 
72
82
  Exit code are important for a test output format. This release addressed that
73
83
  issue.
@@ -77,7 +87,7 @@ Changes:
77
87
  * Fixed exit code.
78
88
 
79
89
 
80
- == 0.2.2 / 2011-10-07
90
+ ## 0.2.2 / 2011-10-07
81
91
 
82
92
  Fixed incorrect tally entry in breakdown reporter.
83
93
 
@@ -87,7 +97,7 @@ Changes:
87
97
  * Add integration specs for reporters.
88
98
 
89
99
 
90
- == 0.2.1 / 2011-10-06
100
+ ## 0.2.1 / 2011-10-06
91
101
 
92
102
  A quick fix for a malformed require call in the HTML reporter,
93
103
  and a fix for indention in the legacy TAP adapter.
@@ -98,7 +108,7 @@ Changes:
98
108
  * Fix indention of YAML in legacy TAP adapter.
99
109
 
100
110
 
101
- == 0.2.0 / 2011-10-06
111
+ ## 0.2.0 / 2011-10-06
102
112
 
103
113
  This release revises the specification a bit, primarily
104
114
  changing the names of header and footer sections to more
@@ -113,7 +123,7 @@ Changes:
113
123
  * Add rev field to suite entry.
114
124
 
115
125
 
116
- == 0.1.0 / 2011-05-21
126
+ ## 0.1.0 / 2011-05-21
117
127
 
118
128
  This is the first public release of TapOut, a TAP and TAP-Y/J output
119
129
  formatter.
@@ -0,0 +1,73 @@
1
+ # TAPOUT
2
+
3
+ [Website](http://rubyworks.github.com/tapout) |
4
+ [User Guide](http://github.com/rubyworks/tapout/wiki) |
5
+ [Report Issue](http://github.com/rubyworks/tapout/issues) |
6
+ [Development](http://github.com/rubyworks/tapout)
7
+
8
+ [![Build Status](https://secure.travis-ci.org/rubyworks/tapout.png)](http://travis-ci.org/rubyworks/tapout)
9
+ [![Gem Version](https://badge.fury.io/rb/tapout.png)](http://badge.fury.io/rb/tapout) &nbsp; &nbsp;
10
+ [![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)
11
+
12
+
13
+ ## About
14
+
15
+ *TAPOUT* is the next generation in test results viewing. You may have heard
16
+ of Turn or minitest-reporters. TAPOUT is the conceptual successor to these
17
+ gems by virture of its use of TAP, a standardized intermediate test results
18
+ protocol.
19
+
20
+ TAPOUT works as a TAP handler which supports TAP-Y/J as well as traditional
21
+ TAP streams. TAP-Y/J is a modernization of TAP using pure YAML/JSON streams.
22
+ Traditional TAP has less detail than TAP-Y/J, but it can still be translated
23
+ with fairly good results. TAPOUT includes a TAP adapter to handle the
24
+ translation transparently. Currently TAPOUT supports TAP v12 with some minor
25
+ limitations.
26
+
27
+ To learn about the TAP-Y/J specification, see the [TAP-Y/J Specification](https://github.com/rubyworks/tapout/wiki/Specification) document.
28
+
29
+ For information about TAP, see http://testanything.org/wiki/index.php/Main_Page.
30
+
31
+
32
+ ## Usage
33
+
34
+ To use TAPOUT you need either a plugin for your current test framework, or use of
35
+ a test framework that supports TAP-Y/J out of the box. You can find a
36
+ [list of plugins here](https://https://github.com/rubyworks/tapout/wiki)
37
+ under the section "Producers".
38
+
39
+ Using a test framework that produces a TAP-Y output stream, simply pipe
40
+ the stream into `tapout`.
41
+
42
+ $ rubytest -y -Ilib test/foo.rb | tapout
43
+
44
+ TAPOUT supports a variety of output formats. These are selectable via the
45
+ first argument. The default if not given, as in the example above, is `dot`.
46
+
47
+ $ rubytest -y -Ilib test/foo.rb | tapout progessbar
48
+
49
+ TAPOUT is smart enough to match the closest matching format name. So, for
50
+ example, the above could be written as:
51
+
52
+ $ rubytest -y -Ilib test/foo.rb | tapout pro
53
+
54
+ And tapout will know to use the `progressbar` format.
55
+
56
+ To see a list of supported formats use the list subcommand:
57
+
58
+ $ tapout --help
59
+
60
+ If your test framework does not support TAP-Y, but does support traditional
61
+ TAP, TAPOUT will automatically recognize the difference by TAP's `1..N` header.
62
+
63
+ $ rubytest -ftap -Ilib test/foo.rb | tapout progressbar
64
+
65
+
66
+ ## Legal
67
+
68
+ Copyright (c) 2010 Rubyworks
69
+
70
+ TAPOUT is modifiable and redistributable in accordance with the *BSD-2-Clause* license.
71
+
72
+ See COPYING.md for details.
73
+
@@ -0,0 +1,85 @@
1
+ ## Reporters
2
+
3
+ Using the following TAP-Y sample:
4
+
5
+ ---
6
+ type: suite
7
+ start: '2011-10-06 18:48:08'
8
+ count: 3
9
+ seed: 36440
10
+ rev: 2
11
+ ---
12
+ type: case
13
+ subtype: ''
14
+ label: ExampleTestCase
15
+ level: 0
16
+ ---
17
+ type: test
18
+ subtype: ''
19
+ status: error
20
+ label: test_error
21
+ exception:
22
+ message: ! 'RuntimeError:'
23
+ file: example.rb
24
+ line: 10
25
+ snippet:
26
+ - 8: ''
27
+ - 9: ! ' def test_error'
28
+ - 10: ! ' raise'
29
+ - 11: ! ' end'
30
+ - 12: ''
31
+ backtrace:
32
+ - example.rb:10
33
+ time: 0.001054606
34
+ ---
35
+ type: test
36
+ subtype: ''
37
+ status: fail
38
+ label: test_failing
39
+ exception:
40
+ message: ! "Expected: \"1\"\n Actual: \"2\""
41
+ file: example.rb
42
+ line: 14
43
+ snippet:
44
+ - 12: ''
45
+ - 13: ! ' def test_failing'
46
+ - 14: ! ' assert_equal(''1'', ''2'')'
47
+ - 15: ! ' end'
48
+ - 16: ''
49
+ backtrace:
50
+ - example.rb:14
51
+ time: 0.046170916
52
+ ---
53
+ type: test
54
+ subtype: ''
55
+ status: pass
56
+ label: test_passing
57
+ time: 1.04997403
58
+ ---
59
+ type: tally
60
+ time: 1.000800203
61
+ counts:
62
+ total: 3
63
+ pass: 1
64
+ fail: 1
65
+ error: 1
66
+ omit: 0
67
+ todo: 0
68
+ ...
69
+
70
+ The dot reporter should run without error.
71
+
72
+ The progress reporter should run without error.
73
+
74
+ The html reporter should run without error.
75
+
76
+ The outline reporter should run without error.
77
+
78
+ The breakdown reporter should run without error.
79
+
80
+ The tap reporter should run without error.
81
+
82
+ The turn reporter should run without error.
83
+
84
+ The pretty reporter should run without error.
85
+
@@ -0,0 +1,66 @@
1
+ # TAP Parser
2
+
3
+ Given a legacy TAP stream:
4
+
5
+ 1..3
6
+ ok 1 - Example A
7
+ not ok 2 - Example B
8
+ ---
9
+ file: foo.rb
10
+ line: 45
11
+ description: this is that
12
+ found: this
13
+ wanted: that
14
+ raw_test: assert_equal('that', 'this')
15
+ extensions:
16
+ THAC0: 16
17
+ ...
18
+ ok 3
19
+
20
+ The PerlAdapter can convert the stream into TAP-Y.
21
+
22
+ stream = StringIO.new(@tap)
23
+
24
+ adapter = Tapout::PerlAdapter.new(stream)
25
+
26
+ entries = adapter.to_a
27
+
28
+ Once converted, there should five entries --a header and footer, two
29
+ passing tests and one failing test.
30
+
31
+ entries.size.assert == 5
32
+
33
+ Or pipe the converted stream directly to another stream.
34
+
35
+ stream = StringIO.new(@tap)
36
+
37
+ adapter = Tapout::PerlAdapter.new(stream)
38
+
39
+ output = ""
40
+
41
+ tapy = adapter | output
42
+
43
+ Given a legacy TAP stream:
44
+
45
+ 1..5
46
+ # test by equality
47
+ ok 1 - pass-thru 1
48
+ ok 2 - pass-thru 2
49
+ ok 3 - pass-thru 3
50
+ ok 4 - pass-thru 4
51
+ ok 5 - pass-thru 5
52
+ 1..5
53
+
54
+ Let's see if this works.
55
+
56
+ stream = StringIO.new(@tap)
57
+
58
+ adapter = Tapout::PerlAdapter.new(stream)
59
+
60
+ entries = adapter.to_a
61
+
62
+ Once converted, there should eight entries --a header and footer, one note
63
+ and five passing tests.
64
+
65
+ entries.size.assert == 8
66
+
@@ -1,5 +1,8 @@
1
+ require 'tapout'
2
+
1
3
  require 'stringio'
2
4
 
3
5
  When 'Given a legacy TAP stream' do |text|
4
6
  @tap = text
5
7
  end
8
+
@@ -1,4 +1,3 @@
1
-
2
1
  module Tapout
3
2
  end
4
3
 
@@ -1,24 +1,41 @@
1
1
  module Tapout
2
2
 
3
- #
4
- #
5
- def self.config(settings=nil, &block)
3
+ # Define configuration.
4
+ def self.configure(&block)
5
+ configuration.update(&block)
6
+ end
7
+
8
+ # Access to configuration.
9
+ def self.configuration
6
10
  @config ||= Config.new
7
- @config.update(settings, &block)
8
11
  end
9
12
 
13
+ # Alias for `#configuration`.
14
+ def self.config
15
+ configuration
16
+ end
17
+
18
+ ##
19
+ # Configuration.
10
20
  #
21
+ # TODO: Rename the ANSI options with a _color suffix,
22
+ # or something to that effect.
11
23
  #
12
24
  class Config
13
25
 
26
+ # Initialize new Config instance.
14
27
  #
15
28
  def initialize
16
29
  initialize_defaults
17
30
  end
18
31
 
32
+ # Initialize defaults.
33
+ #
34
+ # * Default trace depth is 12.
35
+ # * Default snippet size is 3 (which means 7 total).
19
36
  #
20
37
  def initialize_defaults
21
- @trace = nil
38
+ @trace = 12
22
39
  @lines = 3
23
40
  @minimal = false
24
41
 
@@ -49,6 +66,11 @@ module Tapout
49
66
  @trace = depth.to_i
50
67
  end
51
68
 
69
+ # Alias for #trace.
70
+ def trace_depth
71
+ @trace
72
+ end
73
+
52
74
  #
53
75
  attr :lines
54
76
 
@@ -3,10 +3,12 @@ require 'abbrev'
3
3
 
4
4
  module Tapout
5
5
 
6
+ ##
6
7
  # Namespace for Report Formats.
8
+ #
7
9
  module Reporters
8
10
 
9
- #
11
+ # Default reporter.
10
12
  DEAFULT_REPORTER = 'dot'
11
13
 
12
14
  # Returns a Hash of name to reporter class.
@@ -31,6 +33,7 @@ module Tapout
31
33
  rptr
32
34
  end
33
35
 
36
+ ##
34
37
  # The Abstract class serves as a base class for all reporters. Reporters
35
38
  # must sublcass Abstract in order to be added the the Reporters Index.
36
39
  #
@@ -282,6 +285,7 @@ module Tapout
282
285
  end
283
286
  trace = backtrace if trace.empty?
284
287
  trace = trace.map{ |bt| bt.sub(Dir.pwd+File::SEPARATOR,'') }
288
+ trace = trace[0, config.trace_depth]
285
289
  trace
286
290
  end
287
291
 
@@ -311,18 +315,31 @@ module Tapout
311
315
  # Array of backtrace line and source code.
312
316
  def backtrace_snippets_chain(test)
313
317
  code = test['exception']['snippet']
318
+ file = test['exception']['file']
314
319
  line = test['exception']['line']
315
320
 
316
321
  chain = []
317
- backtrace(test).each do |bt|
322
+
323
+ bts = backtrace(test)
324
+
325
+ if bts.empty?
326
+ if file && line
327
+ bts << "#{file}:#{line}"
328
+ end
329
+ end
330
+
331
+ bts.each do |bt|
318
332
  if md = /(.+?):(\d+)/.match(bt)
319
333
  chain << [bt, code_snippet('file'=>md[1], 'line'=>md[2].to_i)]
320
334
  else
321
335
  chain << [bt, nil]
322
336
  end
323
337
  end
324
- # use the tap-y/j snippet if the first file was not found
325
- chain[0][1] = code_snippet('snippet'=>snippet, 'line'=>line) unless chain[0][1]
338
+
339
+ if chain.first && chain.first.last.nil?
340
+ chain[0][1] = code_snippet('snippet'=>code, 'line'=>line)
341
+ end
342
+
326
343
  chain
327
344
  end
328
345
 
@@ -367,7 +384,7 @@ module Tapout
367
384
  if file && File.file?(file)
368
385
  source = source(file)
369
386
 
370
- radius = 3 # number of surrounding lines to show
387
+ radius = config.lines # number of surrounding lines to show
371
388
  region = [line - radius, 1].max ..
372
389
  [line + radius, source.length].min
373
390
 
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.4.1
4
+ version: 0.4.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: 2012-04-14 00:00:00.000000000 Z
12
+ date: 2013-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
16
- requirement: &18065480 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *18065480
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: json
27
- requirement: &18062540 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *18062540
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
- name: detroit
38
- requirement: &19552740 !ruby/object:Gem::Requirement
47
+ name: ergo
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *19552740
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: qed
49
- requirement: &18172440 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *18172440
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: ae
60
- requirement: &18170480 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *18170480
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
70
95
  and output it in a variety of useful formats.
71
96
  email:
@@ -74,22 +99,22 @@ executables:
74
99
  - tapout
75
100
  extensions: []
76
101
  extra_rdoc_files:
77
- - HISTORY.rdoc
78
- - README.rdoc
79
- - COPYING.rdoc
102
+ - COPYING.md
103
+ - HISTORY.md
104
+ - README.md
80
105
  - TAP-YJ.md
81
106
  files:
82
- - .ruby
107
+ - .index
83
108
  - .yardopts
84
109
  - bin/tapout
110
+ - demo/01_reporters/applique/cli.rb
111
+ - demo/01_reporters/fixtures/tapy.yml
112
+ - demo/01_reporters/reporters.md
113
+ - demo/02_adapters/perl_adapter.md
114
+ - demo/09_issues/applique/env.rb
115
+ - demo/09_issues/default_reporter.md
85
116
  - demo/applique/ae.rb
86
117
  - demo/applique/env.rb
87
- - demo/issues/applique/env.rb
88
- - demo/issues/default_reporter.rdoc
89
- - demo/perl_adapter.rdoc
90
- - demo/reporters/applique/cli.rb
91
- - demo/reporters/fixtures/tapy.yml
92
- - demo/reporters/reporters.rdoc
93
118
  - lib/tapout/adapters/perl.rb
94
119
  - lib/tapout/cli.rb
95
120
  - lib/tapout/config.rb
@@ -112,10 +137,9 @@ files:
112
137
  - lib/tapout/reporters.rb
113
138
  - lib/tapout/version.rb
114
139
  - lib/tapout.rb
115
- - lib/tapout.yml
116
- - HISTORY.rdoc
117
- - README.rdoc
118
- - COPYING.rdoc
140
+ - COPYING.md
141
+ - HISTORY.md
142
+ - README.md
119
143
  - TAP-YJ.md
120
144
  homepage: http://rubyworks.github.com/tapout
121
145
  licenses:
@@ -138,8 +162,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
162
  version: '0'
139
163
  requirements: []
140
164
  rubyforge_project:
141
- rubygems_version: 1.8.11
165
+ rubygems_version: 1.8.24
142
166
  signing_key:
143
167
  specification_version: 3
144
168
  summary: Progressive TAP Harness
145
169
  test_files: []
170
+ has_rdoc:
data/.ruby DELETED
@@ -1,67 +0,0 @@
1
- ---
2
- source:
3
- - var
4
- authors:
5
- - name: Thomas Sawyer
6
- email: transfire@gmail.com
7
- copyrights:
8
- - holder: Thomas Sawyer
9
- year: '2010'
10
- license: BSD-2-Clause
11
- requirements:
12
- - name: ansi
13
- - name: json
14
- - name: detroit
15
- groups:
16
- - build
17
- development: true
18
- - name: qed
19
- groups:
20
- - test
21
- development: true
22
- - name: ae
23
- groups:
24
- - test
25
- development: true
26
- dependencies: []
27
- alternatives: []
28
- conflicts: []
29
- repositories:
30
- - uri: git://github.com/rubyworks/tapout.git
31
- scm: git
32
- name: upstream
33
- resources:
34
- - uri: http://rubyworks.github.com/tapout
35
- name: home
36
- type: home
37
- - uri: http://github.com/rubyworks/tapout/wiki
38
- name: wiki
39
- type: wiki
40
- - uri: http://rubydoc.info/gems/tapout/frames
41
- name: docs
42
- type: docs
43
- - uri: http://github.com/rubyworks/tapout
44
- name: code
45
- type: code
46
- - uri: http://github.com/rubyworks/tapout/issues
47
- name: bugs
48
- type: bugs
49
- - uri: http://groups.google.com/rubyworks-mailinglist
50
- name: mail
51
- type: mail
52
- - uri: irc://chat.us.freenode.net#rubyworks
53
- name: chat
54
- type: chat
55
- extra: {}
56
- load_path:
57
- - lib
58
- revision: 0
59
- created: '2010-12-23'
60
- summary: Progressive TAP Harness
61
- title: TAPOUT
62
- version: 0.4.1
63
- name: tapout
64
- description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
65
- and output it in a variety of useful formats.
66
- organization: RubyWorks
67
- date: '2012-04-14'
@@ -1,63 +0,0 @@
1
- = TAPOUT
2
-
3
- {Website}[http://rubyworks.github.com/tapout] |
4
- {User Guide}[http://github.com/rubyworks/tapout/wiki] |
5
- {Development}[http://github.com/rubyworks/tapout] |
6
- {Report Issue}[http://github.com/rubyworks/tapout/issues]
7
-
8
- {<img src="http://travis-ci.org/rubyworks/tapout.png" />}[http://travis-ci.org/rubyworks/tapout]
9
-
10
-
11
- == DESCRIPTION
12
-
13
- *TAPOUT* is a TAP handler which supports TAP-Y/J as well as traditional TAP streams.
14
- TAP-Y/J is a modernization of TAP using pure YAML/JSON streams.
15
-
16
- Traditional TAP has less detail than TAP-Y/J, but it can still be translated
17
- with fairly good results. TAPOUT includes a TAP adapter to handle the
18
- translation transparently. Currently TAPOUT supports TAP v12 with some minor
19
- limitations.
20
-
21
- To learn about the TAP-Y/J specification, see the {TAP-Y/J Specification}[https://github.com/rubyworks/tapout/wiki/Specification]
22
- document.
23
-
24
- For information about TAP, see http://testanything.org/wiki/index.php/Main_Page.
25
-
26
-
27
- == SYNOPSIS
28
-
29
- Using a test framework that produces a TAP-Y output stream, simply pipe
30
- the stream into `tapout`.
31
-
32
- $ rubytest -y -Ilib test/foo.rb | tapout
33
-
34
- TAPOUT supports a variety of output formats. These are selectable via the
35
- first argument. The default if not given, as in the example above, is `dotprogress`.
36
-
37
- $ rubytest -y -Ilib test/foo.rb | tapout progessbar
38
-
39
- TAPOUT is smart enough to match the closest matching format name. So, for
40
- example, the above could be written as:
41
-
42
- $ rubytest -y -Ilib test/foo.rb | tapout pro
43
-
44
- And tapout will know to use the `progressbar` format.
45
-
46
- To see a list of supported formats use the list subcommand:
47
-
48
- $ tapout --help
49
-
50
- If your test framework does not support TAP-Y, but does support traditional
51
- TAP, TAPOUT will automatically recognize the difference by TAP's `1..N` header.
52
-
53
- $ rubytest -ftap -Ilib test/foo.rb | tapout progressbar
54
-
55
-
56
- == COPYRIGHTS
57
-
58
- TAPOUT - Copyright (c) 2010 Rubyworks
59
-
60
- TAPOUT is distributable in accordance with the *BSD-2-Clause* license.
61
-
62
- See COPYING.rdoc for details.
63
-
@@ -1,68 +0,0 @@
1
- = TAP Parser
2
-
3
- require 'tapout'
4
-
5
- Given a legacy TAP stream:
6
-
7
- 1..3
8
- ok 1 - Example A
9
- not ok 2 - Example B
10
- ---
11
- file: foo.rb
12
- line: 45
13
- description: this is that
14
- found: this
15
- wanted: that
16
- raw_test: assert_equal('that', 'this')
17
- extensions:
18
- THAC0: 16
19
- ...
20
- ok 3
21
-
22
- The PerlAdapter can convert the stream into TAP-Y.
23
-
24
- stream = StringIO.new(@tap)
25
-
26
- adapter = Tapout::PerlAdapter.new(stream)
27
-
28
- entries = adapter.to_a
29
-
30
- Once converted, there should five entries --a header and footer, two
31
- passing tests and one failing test.
32
-
33
- entries.size.assert == 5
34
-
35
- Or pipe the converted stream directly to another stream.
36
-
37
- stream = StringIO.new(@tap)
38
-
39
- adapter = Tapout::PerlAdapter.new(stream)
40
-
41
- output = ""
42
-
43
- tapy = adapter | output
44
-
45
- Given a legacy TAP stream:
46
-
47
- 1..5
48
- # test by equality
49
- ok 1 - pass-thru 1
50
- ok 2 - pass-thru 2
51
- ok 3 - pass-thru 3
52
- ok 4 - pass-thru 4
53
- ok 5 - pass-thru 5
54
- 1..5
55
-
56
- Let's see if this works.
57
-
58
- stream = StringIO.new(@tap)
59
-
60
- adapter = Tapout::PerlAdapter.new(stream)
61
-
62
- entries = adapter.to_a
63
-
64
- Once converted, there should eight entries --a header and footer, one note
65
- and five passing tests.
66
-
67
- entries.size.assert == 8
68
-
@@ -1,86 +0,0 @@
1
- == Reporters
2
-
3
- Using the following TAP-Y sample:
4
-
5
- ---
6
- type: suite
7
- start: '2011-10-06 18:48:08'
8
- count: 3
9
- seed: 36440
10
- rev: 2
11
- ---
12
- type: case
13
- subtype: ''
14
- label: ExampleTestCase
15
- level: 0
16
- ---
17
- type: test
18
- subtype: ''
19
- status: error
20
- label: test_error
21
- exception:
22
- message: ! 'RuntimeError:'
23
- file: example.rb
24
- line: 10
25
- snippet:
26
- - 8: ''
27
- - 9: ! ' def test_error'
28
- - 10: ! ' raise'
29
- - 11: ! ' end'
30
- - 12: ''
31
- backtrace:
32
- - example.rb:10
33
- time: 0.001054606
34
- ---
35
- type: test
36
- subtype: ''
37
- status: fail
38
- label: test_failing
39
- exception:
40
- message: ! "Expected: \"1\"\n Actual: \"2\""
41
- file: example.rb
42
- line: 14
43
- snippet:
44
- - 12: ''
45
- - 13: ! ' def test_failing'
46
- - 14: ! ' assert_equal(''1'', ''2'')'
47
- - 15: ! ' end'
48
- - 16: ''
49
- backtrace:
50
- - example.rb:14
51
- time: 0.046170916
52
- ---
53
- type: test
54
- subtype: ''
55
- status: pass
56
- label: test_passing
57
- time: 1.04997403
58
- ---
59
- type: tally
60
- time: 1.000800203
61
- counts:
62
- total: 3
63
- pass: 1
64
- fail: 1
65
- error: 1
66
- omit: 0
67
- todo: 0
68
- ...
69
-
70
-
71
- The dot reporter should run without error.
72
-
73
- The progress reporter should run without error.
74
-
75
- The html reporter should run without error.
76
-
77
- The outline reporter should run without error.
78
-
79
- The breakdown reporter should run without error.
80
-
81
- The tap reporter should run without error.
82
-
83
- The turn reporter should run without error.
84
-
85
- The pretty reporter should run without error.
86
-
@@ -1,67 +0,0 @@
1
- ---
2
- source:
3
- - var
4
- authors:
5
- - name: Thomas Sawyer
6
- email: transfire@gmail.com
7
- copyrights:
8
- - holder: Thomas Sawyer
9
- year: '2010'
10
- license: BSD-2-Clause
11
- requirements:
12
- - name: ansi
13
- - name: json
14
- - name: detroit
15
- groups:
16
- - build
17
- development: true
18
- - name: qed
19
- groups:
20
- - test
21
- development: true
22
- - name: ae
23
- groups:
24
- - test
25
- development: true
26
- dependencies: []
27
- alternatives: []
28
- conflicts: []
29
- repositories:
30
- - uri: git://github.com/rubyworks/tapout.git
31
- scm: git
32
- name: upstream
33
- resources:
34
- - uri: http://rubyworks.github.com/tapout
35
- name: home
36
- type: home
37
- - uri: http://github.com/rubyworks/tapout/wiki
38
- name: wiki
39
- type: wiki
40
- - uri: http://rubydoc.info/gems/tapout/frames
41
- name: docs
42
- type: docs
43
- - uri: http://github.com/rubyworks/tapout
44
- name: code
45
- type: code
46
- - uri: http://github.com/rubyworks/tapout/issues
47
- name: bugs
48
- type: bugs
49
- - uri: http://groups.google.com/rubyworks-mailinglist
50
- name: mail
51
- type: mail
52
- - uri: irc://chat.us.freenode.net#rubyworks
53
- name: chat
54
- type: chat
55
- extra: {}
56
- load_path:
57
- - lib
58
- revision: 0
59
- created: '2010-12-23'
60
- summary: Progressive TAP Harness
61
- title: TAPOUT
62
- version: 0.4.1
63
- name: tapout
64
- description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
65
- and output it in a variety of useful formats.
66
- organization: RubyWorks
67
- date: '2012-04-14'