minitap 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.index +4 -2
- data/HISTORY.md +12 -0
- data/README.md +27 -7
- data/lib/minitap.rb +11 -0
- data/lib/minitap/autorun.rb +8 -0
- data/lib/minitap/minitest5.rb +7 -5
- data/lib/minitest/minitap_plugin.rb +14 -2
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3287678f9370253212c9674659d5e2cb9b316511
|
4
|
+
data.tar.gz: 04e448c48c2bdd11d00df0bcc2eff1006fd72766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 486e83b77907a254da1eedd730adc379ec92369fb03437b99d7b8d31aed2bf0f5d4d25930f5bd833767f762be3ed34f6abf623daa351e6b320e59b1f4ae38b7f
|
7
|
+
data.tar.gz: 505ea556923d93696cfa2f03a53fa942bad75a1c8d60f3602f010dce7f00478677bd7bd1386bc58639f2f6aba38060b67d21b2e4dbd2066e8f60b17902e9a7f6
|
data/.index
CHANGED
@@ -12,6 +12,8 @@ requirements:
|
|
12
12
|
name: tapout
|
13
13
|
- version: 5.0~
|
14
14
|
name: minitest
|
15
|
+
- version: 0.0.2+
|
16
|
+
name: minitest-reporter-api
|
15
17
|
- groups:
|
16
18
|
- test
|
17
19
|
development: true
|
@@ -60,5 +62,5 @@ title: MiniTap
|
|
60
62
|
summary: TAP-Y/J reporters for MiniTest
|
61
63
|
description: MiniTap provides a MiniTest TAP-Y/J report format suitable for use with
|
62
64
|
TAPOUT.
|
63
|
-
version: 0.5.
|
64
|
-
date: '2013-11-
|
65
|
+
version: 0.5.2
|
66
|
+
date: '2013-11-18'
|
data/HISTORY.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# RELEASE HISTORY
|
2
2
|
|
3
|
+
## 0.5.2 | 2013-11-18
|
4
|
+
|
5
|
+
This release makes it possible to specify reporters in code
|
6
|
+
(again), and not just on the command line. This makes it easier
|
7
|
+
to use with other test and build tools such as Rake.
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Add support for in code configuration of reporter.
|
12
|
+
* Use minitest-reporter-api gem to support in code reporter config.
|
13
|
+
|
14
|
+
|
3
15
|
## 0.5.1 | 2013-11-16
|
4
16
|
|
5
17
|
This release simply removes all the remaing v4 code that
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
[](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)
|
11
11
|
|
12
12
|
|
13
|
-
|
13
|
+
# About
|
14
14
|
|
15
15
|
The MiniTap project provides a TAP-Y and TAP-J output reporters for
|
16
16
|
the MiniTest test framework --the test framework that comes standard
|
@@ -20,13 +20,15 @@ See [TAPOUT](http://rubyworks.github.com/tapout) for more information about
|
|
20
20
|
TAP-Y/J formats.
|
21
21
|
|
22
22
|
|
23
|
-
|
23
|
+
# Usage
|
24
24
|
|
25
|
-
|
25
|
+
## Minitest 5
|
26
26
|
|
27
27
|
Minitest 5 has a new report system and plug-in API. Minitap takes advantage
|
28
28
|
of this new API to allow the TAP-Y or TAP-J formats to be selected via command-line
|
29
|
-
options
|
29
|
+
options as an alternative to setting the format in test helper scripts.
|
30
|
+
|
31
|
+
### Via Command Line
|
30
32
|
|
31
33
|
To use simply add `--tapy` or `--tapj` after an isolated `-` separator on the
|
32
34
|
ruby test command invocation, e.g.
|
@@ -49,10 +51,28 @@ Then pipe the output to the `tapout` command, e.g.
|
|
49
51
|
|
50
52
|
$ ruby test/some_test.rb - --tapy | tapout progressbar
|
51
53
|
|
52
|
-
|
54
|
+
### Via Helper Script
|
55
|
+
|
56
|
+
To use via test helper script, require the `minitap` library after `minitest/autorun`
|
57
|
+
and assign `Minitest.reporter` to the Minitap reporter to be used.
|
58
|
+
|
59
|
+
require "minitest/autorun"
|
60
|
+
require "minitap"
|
61
|
+
|
62
|
+
Minitest.reporter = Minitap::TapY
|
63
|
+
|
64
|
+
Then pipe the output to the `tapout` command, e.g.
|
65
|
+
|
66
|
+
$ ruby -Ilib test/runner.rb | tapout progrssbar
|
67
|
+
|
68
|
+
Or using Rake:
|
69
|
+
|
70
|
+
$ rake test | tapout progressbar
|
71
|
+
|
72
|
+
You may need the `-q` option for Rake to supress extraneous output.
|
53
73
|
|
54
74
|
|
55
|
-
|
75
|
+
## MiniTest 4
|
56
76
|
|
57
77
|
If you are still using MiniTest 4.x you will need to use Minitap version 4.x
|
58
78
|
as well. In your dependencies be sure to specify this version. For example in
|
@@ -93,7 +113,7 @@ Then pipe the output to the `tapout` command, e.g.
|
|
93
113
|
$ rpt=tapy ruby test/some_test.rb | tapout progressbar
|
94
114
|
|
95
115
|
|
96
|
-
|
116
|
+
# Copying
|
97
117
|
|
98
118
|
Copyright (c) 2011 Rubyworks
|
99
119
|
|
data/lib/minitap.rb
CHANGED
data/lib/minitap/minitest5.rb
CHANGED
@@ -36,7 +36,9 @@ module Minitest
|
|
36
36
|
attr_accessor :test_start_time
|
37
37
|
|
38
38
|
# Initialize new Minitap Minitest reporter.
|
39
|
-
def initialize(
|
39
|
+
def initialize(options = {})
|
40
|
+
io = options.delete(:io) || $stdout
|
41
|
+
|
40
42
|
super(io, options)
|
41
43
|
|
42
44
|
#@_stdout = StringIO.new
|
@@ -808,9 +810,9 @@ module Minitest
|
|
808
810
|
# TAP-Y adapater.
|
809
811
|
#
|
810
812
|
class TapY < Minitap
|
811
|
-
def initialize(
|
813
|
+
def initialize(options={})
|
812
814
|
require 'yaml' unless respond_to?(:to_yaml)
|
813
|
-
super(
|
815
|
+
super(options)
|
814
816
|
end
|
815
817
|
|
816
818
|
def tapout_before_suite()
|
@@ -845,9 +847,9 @@ module Minitest
|
|
845
847
|
# TAP-J adapater.
|
846
848
|
#
|
847
849
|
class TapJ < Minitap
|
848
|
-
def initialize(
|
850
|
+
def initialize(options={})
|
849
851
|
require 'json' unless respond_to?(:to_json)
|
850
|
-
super(
|
852
|
+
super(options)
|
851
853
|
end
|
852
854
|
|
853
855
|
def tapout_before_suite()
|
@@ -1,14 +1,26 @@
|
|
1
1
|
module Minitest
|
2
2
|
|
3
|
+
#
|
3
4
|
def self.plugin_minitap_options(opts, options)
|
4
5
|
opts.on "--tapy", "Use TapY reporter." do
|
5
6
|
options[:minitap] = 'tapy'
|
6
7
|
end
|
8
|
+
|
7
9
|
opts.on "--tapj", "Use TapJ reporter." do
|
8
10
|
options[:minitap] = 'tapj'
|
9
11
|
end
|
12
|
+
|
13
|
+
# DEPRECATED Thanks to minitest-reporter-api gem.
|
14
|
+
#unless options[:minitap]
|
15
|
+
# if defined?(Minitest::TapY) && self.reporter == Minitest::TapY
|
16
|
+
# options[:minitap] = 'tapy'
|
17
|
+
# elsif defined?(Minitest::TapJ) && self.reporter == Minitest::TapJ
|
18
|
+
# options[:minitap] = 'tapj'
|
19
|
+
# end
|
20
|
+
#end
|
10
21
|
end
|
11
22
|
|
23
|
+
#
|
12
24
|
def self.plugin_minitap_init(options)
|
13
25
|
if options[:minitap]
|
14
26
|
require 'minitap/minitest5'
|
@@ -17,9 +29,9 @@ module Minitest
|
|
17
29
|
|
18
30
|
case options[:minitap] || ENV['rpt']
|
19
31
|
when 'tapj'
|
20
|
-
self.reporter << TapJ.new(options
|
32
|
+
self.reporter << TapJ.new(options)
|
21
33
|
when 'tapy'
|
22
|
-
self.reporter << TapY.new(options
|
34
|
+
self.reporter << TapY.new(options)
|
23
35
|
end
|
24
36
|
end
|
25
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- trans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tapout
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest-reporter-api
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.2
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: qed
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,6 +109,7 @@ extra_rdoc_files:
|
|
95
109
|
files:
|
96
110
|
- .index
|
97
111
|
- .yardopts
|
112
|
+
- lib/minitap/autorun.rb
|
98
113
|
- lib/minitap/ignore_callers.rb
|
99
114
|
- lib/minitap/minitest5.rb
|
100
115
|
- lib/minitap.rb
|