tapout 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby +3 -2
- data/HISTORY.rdoc +11 -0
- data/PROFILE +2 -1
- data/README.rdoc +11 -14
- data/TAP-YJ.md +1 -1
- data/lib/tapout.rb +6 -4
- data/lib/tapout/parsers/json.rb +1 -0
- data/lib/tapout/parsers/perl.rb +1 -0
- data/lib/tapout/parsers/yaml.rb +1 -0
- data/lib/tapout/reporters/abstract.rb +9 -1
- data/lib/tapout/version.rb +1 -1
- metadata +19 -9
- data/TODO +0 -5
data/.ruby
CHANGED
@@ -10,6 +10,7 @@ replacements: []
|
|
10
10
|
conflicts: []
|
11
11
|
requirements:
|
12
12
|
- name: ansi
|
13
|
+
- name: json
|
13
14
|
- name: detroit
|
14
15
|
groups:
|
15
16
|
- build
|
@@ -29,8 +30,8 @@ resources:
|
|
29
30
|
load_path:
|
30
31
|
- lib
|
31
32
|
extra: {}
|
32
|
-
date: '2011-10-
|
33
|
-
version: 0.2.
|
33
|
+
date: '2011-10-07'
|
34
|
+
version: 0.2.3
|
34
35
|
alternatives: []
|
35
36
|
revision: 0
|
36
37
|
source:
|
data/HISTORY.rdoc
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
|
4
|
+
== 0.2.3 / 2011-10-08
|
5
|
+
|
6
|
+
Exit code are important for a test output format. This release addressed that
|
7
|
+
issue.
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Fixed exit code.
|
12
|
+
|
13
|
+
|
3
14
|
== 0.2.2 / 2011-10-07
|
4
15
|
|
5
16
|
Fixed incorrect tally entry in breakdown reporter.
|
data/PROFILE
CHANGED
data/README.rdoc
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
=
|
1
|
+
= Tap Out
|
2
|
+
|
3
|
+
{Website}[http://rubyworks.github.com/tapout] |
|
4
|
+
{Development}[http://github.com/rubyworks/tapout]
|
2
5
|
|
3
6
|
Copyright:: 2010 Thomas Sawyer, Rubyworks
|
4
|
-
Author:: Thomas Sawyer
|
5
7
|
License:: BSD-2-Clause
|
6
|
-
|
7
|
-
|
8
|
-
== RESOURCES
|
9
|
-
|
10
|
-
* home: http://rubyworks.github.com/tapout
|
11
|
-
* work: http://github.com/rubyworks/tapout
|
8
|
+
Status:: {<img src="http://travis-ci.org/rubyworks/tapout.png" />}[http://travis-ci.org/rubyworks/tapout]
|
12
9
|
|
13
10
|
|
14
11
|
== DESCRIPTION
|
@@ -33,26 +30,26 @@ the stream into `tapout`.
|
|
33
30
|
|
34
31
|
$ ruby-test -y -Ilib test/foo.rb | tapout
|
35
32
|
|
36
|
-
TapOut supports a variety of output formats. These are selectable via the
|
37
|
-
|
33
|
+
TapOut supports a variety of output formats. These are selectable via the
|
34
|
+
first argument. The default if not given, as in the example above, is `dotprogress`.
|
38
35
|
|
39
|
-
$ ruby-test -y -Ilib test/foo.rb | tapout
|
36
|
+
$ ruby-test -y -Ilib test/foo.rb | tapout progessbar
|
40
37
|
|
41
38
|
TapOut is smart enough to match the closest matching format name. So, for
|
42
39
|
example, the above could be written as:
|
43
40
|
|
44
|
-
$ ruby-test -y -Ilib test/foo.rb | tapout
|
41
|
+
$ ruby-test -y -Ilib test/foo.rb | tapout pro
|
45
42
|
|
46
43
|
And tapout will know to use the `progressbar` format.
|
47
44
|
|
48
45
|
To see a list of supported formats use the list subcommand:
|
49
46
|
|
50
|
-
$ tapout
|
47
|
+
$ tapout --help
|
51
48
|
|
52
49
|
If your test framework does not support TAP-Y, but does support traditional
|
53
50
|
TAP, TapOut will automatically recognize the difference by TAP's `1..N` header.
|
54
51
|
|
55
|
-
$ ruby-test -ftap -Ilib test/foo.rb | tapout
|
52
|
+
$ ruby-test -ftap -Ilib test/foo.rb | tapout progressbar
|
56
53
|
|
57
54
|
|
58
55
|
== COPYRIGHTS
|
data/TAP-YJ.md
CHANGED
@@ -16,7 +16,7 @@ scalar, sequence and mapping.
|
|
16
16
|
|
17
17
|
A YAML stream is composed a sequence of YAML *documents*, each divided by
|
18
18
|
a start document marker (<code>---</code>). Each document MUST have a `type`
|
19
|
-
field which designates it a `suite`, `case`, `
|
19
|
+
field which designates it a `suite`, `case`, `test`, `note` or `tally`. Any
|
20
20
|
document MAY have an `extra` entry which contains an open mapping for
|
21
21
|
extraneous information.
|
22
22
|
|
data/lib/tapout.rb
CHANGED
@@ -25,7 +25,7 @@ module TapOut
|
|
25
25
|
#end
|
26
26
|
|
27
27
|
opt.on('--no-color', 'Supress ANSI color codes') do
|
28
|
-
# TODO
|
28
|
+
$ansi = false # TODO: Is this correct?
|
29
29
|
end
|
30
30
|
|
31
31
|
opt.on('--debug', 'Run with $DEBUG flag on') do |fmt|
|
@@ -61,14 +61,16 @@ module TapOut
|
|
61
61
|
case type
|
62
62
|
when :perl
|
63
63
|
stream_parser = PerlParser.new(options)
|
64
|
-
stream_parser.consume(stdin)
|
64
|
+
exit_code = stream_parser.consume(stdin)
|
65
65
|
when :yaml
|
66
66
|
stream_parser = YamlParser.new(options)
|
67
|
-
stream_parser.consume(stdin)
|
67
|
+
exit_code = stream_parser.consume(stdin)
|
68
68
|
when :json
|
69
69
|
stream_parser = JsonParser.new(options)
|
70
|
-
stream_parser.consume(stdin)
|
70
|
+
exit_code = stream_parser.consume(stdin)
|
71
71
|
end
|
72
|
+
|
73
|
+
exit(exit_code || 0)
|
72
74
|
end
|
73
75
|
|
74
76
|
#
|
data/lib/tapout/parsers/json.rb
CHANGED
data/lib/tapout/parsers/perl.rb
CHANGED
data/lib/tapout/parsers/yaml.rb
CHANGED
@@ -36,8 +36,14 @@ module TapOut
|
|
36
36
|
@skipped = []
|
37
37
|
@omitted = []
|
38
38
|
|
39
|
-
@source
|
39
|
+
@source = {}
|
40
40
|
@previous_case = nil
|
41
|
+
@exit_code = 0 # assume passing
|
42
|
+
end
|
43
|
+
|
44
|
+
# Exit code.
|
45
|
+
def exit_code
|
46
|
+
@exit_code
|
41
47
|
end
|
42
48
|
|
43
49
|
#
|
@@ -63,8 +69,10 @@ module TapOut
|
|
63
69
|
when 'pass'
|
64
70
|
pass(entry)
|
65
71
|
when 'fail'
|
72
|
+
@exit_code = -1
|
66
73
|
fail(entry)
|
67
74
|
when 'error'
|
75
|
+
@exit_code = -1
|
68
76
|
err(entry)
|
69
77
|
when 'omit'
|
70
78
|
omit(entry)
|
data/lib/tapout/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.3
|
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-
|
12
|
+
date: 2011-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ansi
|
16
|
-
requirement: &
|
16
|
+
requirement: &29881940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,21 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *29881940
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: json
|
27
|
+
requirement: &29881400 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *29881400
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: detroit
|
27
|
-
requirement: &
|
38
|
+
requirement: &29880900 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *29880900
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: qed
|
38
|
-
requirement: &
|
49
|
+
requirement: &29880400 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,7 +54,7 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *29880400
|
47
58
|
description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
|
48
59
|
and output it in a variety of useful formats.
|
49
60
|
email:
|
@@ -78,7 +89,6 @@ files:
|
|
78
89
|
- lib/tapout.rb
|
79
90
|
- HISTORY.rdoc
|
80
91
|
- PROFILE
|
81
|
-
- TODO
|
82
92
|
- LICENSE.txt
|
83
93
|
- README.rdoc
|
84
94
|
- COPYING.rdoc
|