rspec-formatter-webkit 2.1.5 → 2.2.0
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.
- data.tar.gz.sig +0 -0
- data/History.rdoc +5 -0
- data/README.rdoc +61 -5
- data/data/rspec-formatter-webkit/css/textmate-rspec.css +14 -6
- data/lib/rspec/core/formatters/webkit.rb +1 -1
- metadata +109 -136
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -20,16 +20,72 @@ To get started, install the `rspec-formatter-webkit` gem:
|
|
20
20
|
|
21
21
|
$ gem install rspec-formatter-webkit
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
RSpec
|
23
|
+
|
24
|
+
== Usage
|
25
|
+
|
26
|
+
If you're running specs in Textmate 2 via
|
27
|
+
{the RSpec bundle}[http://github.com/rspec/rspec-tmbundle], include
|
28
|
+
these in your <tt>.tm_properties</tt> file:
|
29
|
+
|
30
|
+
TM_RSPEC_OPTS = '-rrspec/core/formatters/webkit'
|
31
|
+
TM_RSPEC_FORMATTER = 'RSpec::Core::Formatters::WebKit'
|
32
|
+
|
33
|
+
To do the same in TextMate 1, open the 'Advanced' Preferences and
|
34
|
+
adding the same variables there:
|
28
35
|
|
29
36
|
http://deveiate.org/images/tmrspecopts-shellvar.png
|
30
37
|
|
31
38
|
That's it!
|
32
39
|
|
40
|
+
=== Logging Output
|
41
|
+
|
42
|
+
If you have some kind of log output that you'd like to show up underneath
|
43
|
+
the example, you can append lines of HTML to the <tt>logger-output</tt>
|
44
|
+
thread-local variable and they'll be inserted into a +div+ under
|
45
|
+
the example line that can be toggled open and closed by clicking the
|
46
|
+
example line:
|
47
|
+
|
48
|
+
Thread.current['logger-output'] << %{<p>Some stuff happened.</p>}
|
49
|
+
|
50
|
+
Each line that has such logging appended will appear with
|
51
|
+
an asterisk after it in the output.
|
52
|
+
|
53
|
+
==== Loggability
|
54
|
+
|
55
|
+
If you're using Loggability for logging, the WebKit formatter has CSS rules
|
56
|
+
for the output of its HTML formatter. You can inject logs into the spec output
|
57
|
+
with the following helper methods:
|
58
|
+
|
59
|
+
### Reset the logging subsystem to its default state.
|
60
|
+
def reset_logging
|
61
|
+
Loggability.format_as( :color )
|
62
|
+
Loggability.output_to( $stderr )
|
63
|
+
Loggability.level = :fatal
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
### Alter the output of the default log formatter to be pretty in SpecMate output
|
68
|
+
def setup_logging( level=:fatal )
|
69
|
+
|
70
|
+
# Only do this when executing from a spec in TextMate or when
|
71
|
+
# HTML_LOGGING=1 is set in the environment
|
72
|
+
if ENV['HTML_LOGGING'] ||
|
73
|
+
(ENV['TM_FILENAME'] && ENV['TM_FILENAME'] =~ /_spec\.rb/)
|
74
|
+
logarray = []
|
75
|
+
Thread.current['logger-output'] = logarray
|
76
|
+
Loggability.output_to( logarray )
|
77
|
+
Loggability.format_as( :html )
|
78
|
+
Loggability.level = :debug
|
79
|
+
else
|
80
|
+
Loggability.level = level
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
Then, in your examples:
|
85
|
+
|
86
|
+
before( :all ) { setup_logging }
|
87
|
+
after( :all ) { reset_logging }
|
88
|
+
|
33
89
|
|
34
90
|
== Miscellaneous
|
35
91
|
|
@@ -310,23 +310,31 @@ div.log-message .log-message-text {
|
|
310
310
|
|
311
311
|
|
312
312
|
/* Distinguish levels */
|
313
|
-
div.log-message.debug
|
314
|
-
div.log-message
|
313
|
+
div.log-message.debug,
|
314
|
+
div.debug-log-message { color: #666; }
|
315
|
+
div.log-message.info,
|
316
|
+
div.info-log-message {}
|
315
317
|
|
316
318
|
div.log-message.warn,
|
317
|
-
div.log-message
|
319
|
+
div.warn-log-message,
|
320
|
+
div.log-message.error,
|
321
|
+
div.error-log-message {
|
318
322
|
background: #ff9;
|
319
323
|
}
|
320
324
|
div.log-message.error .log-level,
|
321
|
-
div.log-message
|
325
|
+
div.error-log-message .log-level,
|
326
|
+
div.log-message.error .log-message-text,
|
327
|
+
div.error-log-message .log-message-text {
|
322
328
|
color: #900;
|
323
329
|
}
|
324
|
-
div.log-message.fatal
|
330
|
+
div.log-message.fatal,
|
331
|
+
div.fatal-log-message {
|
325
332
|
background: #900;
|
326
333
|
color: white;
|
327
334
|
font-weight: bold;
|
328
335
|
border: 0;
|
329
336
|
}
|
330
|
-
div.log-message.fatal .log-name
|
337
|
+
div.log-message.fatal .log-name,
|
338
|
+
div.fatal-log-message .log-name {
|
331
339
|
color: white;
|
332
340
|
}
|
@@ -14,7 +14,7 @@ class RSpec::Core::Formatters::WebKit < RSpec::Core::Formatters::BaseTextFormatt
|
|
14
14
|
include ERB::Util
|
15
15
|
|
16
16
|
# Version constant
|
17
|
-
VERSION = '2.
|
17
|
+
VERSION = '2.2.0'
|
18
18
|
|
19
19
|
# Look up the datadir falling back to a relative path (mostly for prerelease testing)
|
20
20
|
DATADIR = begin
|
metadata
CHANGED
@@ -1,138 +1,127 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-formatter-webkit
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 1
|
9
|
-
- 5
|
10
|
-
version: 2.1.5
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Michael Granger
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
|
-
cert_chain:
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-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akJEVFV4NkRqYmd4dzc3OTA5eDZnSTlkb1U0TEQ1WE1jQ0F3
|
28
|
+
RUEKQWFNNU1EY3dDUVlEVlIwVEJBSXdBREFMQmdOVkhROEVCQU1DQkxBd0hR
|
29
|
+
WURWUjBPQkJZRUZKZW9Ha09yOWw0Qgorc2FNa1cvWlhUNFVlU3ZWTUEwR0NT
|
30
|
+
cUdTSWIzRFFFQkJRVUFBNElCQVFCRzJLT2J2WUkyZUh5eUJVSlNKM2pOCnZF
|
31
|
+
blUzZDYwem5BWGJyU2QycWIzcjFsWTFFUEREM2JjeTBNZ2dDZkdkZzNYdTU0
|
32
|
+
ejIxb3F5SWRrOHVHdFdCUEwKSElhOUVnZkZHU1VFZ3ZjSXZhWXFpTjRqVFV0
|
33
|
+
aWRmRUZ3K0x0anM4QVA5Z1dnU0lZUzZHcjM4VjBXR0ZGTnpJSAphT0Qyd211
|
34
|
+
OW9vL1JmZlc0aFMvOEd1dmZNemN3N0NRMzU1d0ZSNEtCL255emUrRXNaMVk1
|
35
|
+
RGVyQ0FhZ01WdURRClUwQkxtV0RGelBHR1dsUGVRQ3JZSENyK0FjSnorTlJu
|
36
|
+
YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
|
37
|
+
Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
|
38
|
+
cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
+
date: 2012-05-30 00:00:00.000000000 Z
|
40
|
+
dependencies:
|
41
|
+
- !ruby/object:Gem::Dependency
|
41
42
|
name: rspec-core
|
42
|
-
|
43
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
|
-
requirements:
|
45
|
+
requirements:
|
46
46
|
- - ~>
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
|
49
|
-
segments:
|
50
|
-
- 2
|
51
|
-
- 7
|
52
|
-
version: "2.7"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.7'
|
53
49
|
type: :runtime
|
54
|
-
version_requirements: *id001
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: hoe-mercurial
|
57
50
|
prerelease: false
|
58
|
-
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
52
|
none: false
|
60
|
-
requirements:
|
53
|
+
requirements:
|
61
54
|
- - ~>
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '2.7'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: hoe-mercurial
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ~>
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.4.0
|
69
65
|
type: :development
|
70
|
-
version_requirements: *id002
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: hoe-highline
|
73
66
|
prerelease: false
|
74
|
-
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ~>
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 1.4.0
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: rdoc
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
75
76
|
none: false
|
76
|
-
requirements:
|
77
|
+
requirements:
|
77
78
|
- - ~>
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
segments:
|
81
|
-
- 0
|
82
|
-
- 0
|
83
|
-
- 1
|
84
|
-
version: 0.0.1
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.10'
|
85
81
|
type: :development
|
86
|
-
version_requirements: *id003
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: hoe
|
89
82
|
prerelease: false
|
90
|
-
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
84
|
none: false
|
92
|
-
requirements:
|
85
|
+
requirements:
|
93
86
|
- - ~>
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.10'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: hoe
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
100
97
|
type: :development
|
101
|
-
version_requirements: *id004
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
name: rdoc
|
104
98
|
prerelease: false
|
105
|
-
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
100
|
none: false
|
107
|
-
requirements:
|
101
|
+
requirements:
|
108
102
|
- - ~>
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
- 10
|
114
|
-
version: "3.10"
|
115
|
-
type: :development
|
116
|
-
version_requirements: *id005
|
117
|
-
description: |-
|
118
|
-
This is a formatter for RSpec 2 that takes advantage of features in
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '3.0'
|
105
|
+
description: ! 'This is a formatter for RSpec 2 that takes advantage of features in
|
106
|
+
|
119
107
|
WebKit[http://webkit.org/] to make the output from RSpec in Textmate more
|
108
|
+
|
120
109
|
fun.
|
121
|
-
|
110
|
+
|
111
|
+
|
122
112
|
Test output looks like this:
|
123
|
-
|
124
|
-
|
125
|
-
|
113
|
+
|
114
|
+
|
115
|
+
http://deveiate.org/images/tmrspec-example.png'
|
116
|
+
email:
|
126
117
|
- ged@FaerieMUD.org
|
127
118
|
executables: []
|
128
|
-
|
129
119
|
extensions: []
|
130
|
-
|
131
|
-
extra_rdoc_files:
|
132
|
-
- Manifest.txt
|
120
|
+
extra_rdoc_files:
|
133
121
|
- History.rdoc
|
122
|
+
- Manifest.txt
|
134
123
|
- README.rdoc
|
135
|
-
files:
|
124
|
+
files:
|
136
125
|
- History.rdoc
|
137
126
|
- LICENSE
|
138
127
|
- Manifest.txt
|
@@ -182,49 +171,33 @@ files:
|
|
182
171
|
- lib/rspec/core/formatters/web_kit.rb
|
183
172
|
- lib/rspec/core/formatters/webkit.rb
|
184
173
|
homepage: http://deveiate.org/webkit-rspec-formatter.html
|
185
|
-
licenses:
|
174
|
+
licenses:
|
186
175
|
- BSD
|
187
|
-
post_install_message:
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
shell variable (in the 'Advanced' preference pane) to:
|
192
|
-
|
193
|
-
--format RSpec::Core::Formatters::WebKit
|
194
|
-
|
195
|
-
Have fun!
|
196
|
-
|
197
|
-
rdoc_options:
|
176
|
+
post_install_message: ! "\n\nYou can use this formatter from TextMate by setting the
|
177
|
+
TM_RSPEC_OPTS \nshell variable (in the 'Advanced' preference pane) to:\n\n --format
|
178
|
+
RSpec::Core::Formatters::WebKit\n\nHave fun!\n\n"
|
179
|
+
rdoc_options:
|
198
180
|
- --main
|
199
181
|
- README.rdoc
|
200
|
-
require_paths:
|
182
|
+
require_paths:
|
201
183
|
- lib
|
202
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
203
185
|
none: false
|
204
|
-
requirements:
|
205
|
-
- -
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
hash: 57
|
208
|
-
segments:
|
209
|
-
- 1
|
210
|
-
- 8
|
211
|
-
- 7
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
212
189
|
version: 1.8.7
|
213
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
191
|
none: false
|
215
|
-
requirements:
|
216
|
-
- -
|
217
|
-
- !ruby/object:Gem::Version
|
218
|
-
|
219
|
-
segments:
|
220
|
-
- 0
|
221
|
-
version: "0"
|
192
|
+
requirements:
|
193
|
+
- - ! '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
222
196
|
requirements: []
|
223
|
-
|
224
197
|
rubyforge_project: rspec-formatter-webkit
|
225
|
-
rubygems_version: 1.8.
|
198
|
+
rubygems_version: 1.8.24
|
226
199
|
signing_key:
|
227
200
|
specification_version: 3
|
228
|
-
summary: This is a formatter for RSpec 2 that takes advantage of features in WebKit[http://webkit.org/]
|
201
|
+
summary: This is a formatter for RSpec 2 that takes advantage of features in WebKit[http://webkit.org/]
|
202
|
+
to make the output from RSpec in Textmate more fun
|
229
203
|
test_files: []
|
230
|
-
|
metadata.gz.sig
CHANGED
Binary file
|