tapout 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.index +1 -1
- data/README.md +5 -5
- data/lib/tapout.yml +70 -0
- data/lib/tapout/parsers/abstract.rb +1 -1
- data/lib/tapout/parsers/json.rb +2 -0
- data/lib/tapout/parsers/yaml.rb +20 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 894ae68c00afca1ffdb08227b13c27b153cf89b4
|
4
|
+
data.tar.gz: fb29eb396e27bccc98a60fafb248d257d5bf63b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4484f2dce824135bdf68c283c660462f056bde926bcc62d71678bbf1026d744a27f6e03529d338e180fad489fb7276114c21b99b2a1f3ae396553682ef8f345
|
7
|
+
data.tar.gz: dd9b9af957e1d374785122361f92af2829160055be02710f92f8cd6db7b025a24cb2a0e670521225978e77717bef7af538888428ac7f99b6a2b79ae0ac879062
|
data/.index
CHANGED
data/README.md
CHANGED
@@ -86,19 +86,19 @@ A good example of this is debugging with Pry using `binding.pry`.
|
|
86
86
|
end
|
87
87
|
|
88
88
|
As it turns out, if your are using TAP-Y (not TAP-J) then you can also
|
89
|
-
use YAML's *END DOCUMENT*
|
90
|
-
same effect.
|
89
|
+
use YAML's *END DOCUMENT* marker to acheive a similar result.
|
91
90
|
|
92
91
|
def test_something
|
93
92
|
STDOUT.puts "..." # tells tapout to pause processing
|
94
93
|
binding.pry
|
95
|
-
STDOUT.puts "---" # tells tapout to start again
|
96
94
|
assert somthing
|
97
95
|
end
|
98
96
|
|
99
|
-
But
|
97
|
+
But this **only works for YAML** and if you happend to be debugging code
|
98
|
+
that emits YAML you might accidently trigger tapout to resume. Therefore
|
99
|
+
it is recommended that the ASCII codes be used.
|
100
100
|
|
101
|
-
Note:
|
101
|
+
Note: When sending these codes, be sure to send a newline character as well.
|
102
102
|
|
103
103
|
|
104
104
|
## Legal
|
data/lib/tapout.yml
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
|
+
name: tapout
|
64
|
+
title: TAPOUT
|
65
|
+
summary: Progressive TAP Harness
|
66
|
+
created: '2010-12-23'
|
67
|
+
description: Tapout is a TAP consumer that can take any TAP, TAP-Y or TAP-J stream
|
68
|
+
and output it in a variety of useful formats.
|
69
|
+
version: 0.4.4
|
70
|
+
date: '2013-11-18'
|
data/lib/tapout/parsers/json.rb
CHANGED
data/lib/tapout/parsers/yaml.rb
CHANGED
@@ -17,6 +17,8 @@ module Tapout
|
|
17
17
|
format = options[:format]
|
18
18
|
@reporter = Reporters.factory(format).new
|
19
19
|
@input = options[:input] || $stdin
|
20
|
+
|
21
|
+
@resume = NEW_DOCUMENT
|
20
22
|
end
|
21
23
|
|
22
24
|
# Read from input using `gets` and parse, routing
|
@@ -32,10 +34,12 @@ module Tapout
|
|
32
34
|
while line = @input.gets
|
33
35
|
case line
|
34
36
|
when PAUSE_DOCUMENT
|
37
|
+
@resume = RESUME_DOCUMENT
|
35
38
|
passthru
|
36
39
|
when RESUME_DOCUMENT # (no effect)
|
37
40
|
when END_DOCUMENT
|
38
41
|
handle(entry)
|
42
|
+
@resume = NEW_DOCUMENT
|
39
43
|
entry = passthru
|
40
44
|
when NEW_DOCUMENT
|
41
45
|
handle(entry)
|
@@ -44,6 +48,7 @@ module Tapout
|
|
44
48
|
entry << line
|
45
49
|
end
|
46
50
|
end
|
51
|
+
|
47
52
|
handle(entry) # in case final `...` was left out
|
48
53
|
|
49
54
|
@reporter.finalize #@reporter.exit_code
|
@@ -56,10 +61,12 @@ module Tapout
|
|
56
61
|
#
|
57
62
|
# Returns nothing.
|
58
63
|
def handle(entry)
|
59
|
-
return if entry.empty?
|
60
|
-
return if entry == NEW_DOCUMENT
|
61
64
|
return if entry == RESUME_DOCUMENT
|
62
65
|
|
66
|
+
stripped = entry.strip
|
67
|
+
return if stripped.empty?
|
68
|
+
return if stripped == "---"
|
69
|
+
|
63
70
|
begin
|
64
71
|
data = YAML.load(entry)
|
65
72
|
@reporter << data
|
@@ -71,6 +78,17 @@ module Tapout
|
|
71
78
|
# Alias for handle.
|
72
79
|
alias << handle
|
73
80
|
|
81
|
+
# Passthru incoming data directly to `$stdout`.
|
82
|
+
#
|
83
|
+
def passthru(doc=nil)
|
84
|
+
$stdout << doc if doc
|
85
|
+
while line = @input.gets
|
86
|
+
return line if @resume === line
|
87
|
+
$stdout << line
|
88
|
+
end
|
89
|
+
return ''
|
90
|
+
end
|
91
|
+
|
74
92
|
end
|
75
93
|
|
76
94
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Sawyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- lib/tapout/reporters.rb
|
128
128
|
- lib/tapout/version.rb
|
129
129
|
- lib/tapout.rb
|
130
|
+
- lib/tapout.yml
|
130
131
|
- COPYING.md
|
131
132
|
- README.md
|
132
133
|
- TAP-YJ.md
|