leftright 0.9.0 → 0.9.1
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/README.rdoc +12 -7
- data/WHATSNEW +3 -0
- data/leftright.gemspec +2 -2
- data/lib/leftright/runner.rb +17 -13
- data/lib/leftright/version.rb +3 -2
- metadata +25 -36
data/README.rdoc
CHANGED
@@ -9,16 +9,21 @@ green, exceptions yellow, and failures red. But then there's more:
|
|
9
9
|
|
10
10
|
This release was tested under:
|
11
11
|
|
12
|
-
* Rubinius 1.0.1
|
13
12
|
* REE 1.8.7
|
14
|
-
* MRI 1.8.6 and 1.
|
15
|
-
* JRuby 1.
|
13
|
+
* MRI 1.8.6, 1.8.7 and 1.9.2
|
14
|
+
* JRuby 1.6.0 (in 1.8 mode only for now)
|
15
|
+
|
16
|
+
JRuby versions earlier than 1.6 and Rubinius are not building on my laptop
|
17
|
+
right now. If you need those, please use 0.9.0 until I can figure out a
|
18
|
+
better way to test these.
|
16
19
|
|
17
20
|
== Dependencies
|
18
21
|
|
19
|
-
Right now this is pretty heavily dependent on Test::Unit
|
20
|
-
|
21
|
-
|
22
|
+
Right now this is pretty heavily dependent on Test::Unit. It works in both
|
23
|
+
1.8 and 1.9, but in 1.9 it is assumed you have the 'test-unit' gem installed
|
24
|
+
and properly loaded (as opposed to the MiniTest compatibility shim).
|
25
|
+
|
26
|
+
Thanks to https://github.com/quirkey for Ruby 1.9 help.
|
22
27
|
|
23
28
|
== Installation instructions
|
24
29
|
|
@@ -43,4 +48,4 @@ your own tests, specially if they fail. :)
|
|
43
48
|
|
44
49
|
== Legal
|
45
50
|
|
46
|
-
Copyright (c) 2009, 2010 Jordi Bunster, released under the MIT license
|
51
|
+
Copyright (c) 2009, 2010, 2011 Jordi Bunster, released under the MIT license.
|
data/WHATSNEW
CHANGED
data/leftright.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'lib/leftright/version'
|
1
|
+
require File.join(File.dirname(__FILE__), 'lib/leftright/version')
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'leftright'
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.description = %{ leftright is kind of like the redgreen gem. It makes
|
11
11
|
passing tests look green, exceptions yellow, and failures red. It also
|
12
12
|
has a few features that make your workflow a bit faster (see README).
|
13
|
-
}.strip
|
13
|
+
}.strip.gsub(/\s+/, ' ')
|
14
14
|
|
15
15
|
gem.has_rdoc = false
|
16
16
|
|
data/lib/leftright/runner.rb
CHANGED
@@ -50,21 +50,21 @@ module LeftRight
|
|
50
50
|
# If we're here, we need to print a new class name on the left side
|
51
51
|
lr.state.last_class_printed = lr.state.class
|
52
52
|
lr.state.dots = 0
|
53
|
-
|
54
|
-
|
53
|
+
io.write "\n"
|
54
|
+
io.write lr.justify_left_side(
|
55
55
|
lr.format_class_name(lr.state.class.name))
|
56
56
|
elsif captured != '.'
|
57
57
|
# This handles the edge case when the first test for a class fails
|
58
|
-
|
59
|
-
|
58
|
+
io.write "\n"
|
59
|
+
io.write lr.justify_left_side
|
60
60
|
end
|
61
61
|
|
62
62
|
# Justify all lines but first:
|
63
63
|
output.gsub! "\n", "\n" + lr.justify_left_side
|
64
64
|
|
65
|
-
|
65
|
+
io.write output
|
66
66
|
ensure # reset all of the nasty state stuff
|
67
|
-
|
67
|
+
io.flush
|
68
68
|
lr.state.previous_failed = captured != '.'
|
69
69
|
lr.state.skip = false
|
70
70
|
end
|
@@ -102,12 +102,16 @@ module LeftRight
|
|
102
102
|
results << lr::C.yellow("#{total[:errors]} #{plural}")
|
103
103
|
end
|
104
104
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
105
|
+
io.write "\n"
|
106
|
+
io.write "\n" unless lr.state.previous_failed
|
107
|
+
io.write "#{total[:tests]} test#{'s' if @result.run_count > 1}: "
|
108
|
+
io.write results.join(', ').reverse.sub(',', 'dna ').reverse # :(
|
109
|
+
io.write "\n" + "\n"
|
110
|
+
io.puts "(#{elapsed_time} seconds)"
|
111
|
+
end
|
112
|
+
|
113
|
+
def io
|
114
|
+
@io || @output || STDOUT
|
111
115
|
end
|
112
116
|
end
|
113
|
-
end
|
117
|
+
end
|
data/lib/leftright/version.rb
CHANGED
metadata
CHANGED
@@ -1,45 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leftright
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 9
|
9
|
-
- 0
|
10
|
-
version: 0.9.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.9.1
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
|
-
- Jordi Bunster
|
8
|
+
- Jordi Bunster
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date:
|
13
|
+
date: 2011-03-23 00:00:00 -07:00
|
19
14
|
default_executable:
|
20
15
|
dependencies: []
|
21
16
|
|
22
17
|
description: leftright is kind of like the redgreen gem. It makes passing tests look green, exceptions yellow, and failures red. It also has a few features that make your workflow a bit faster (see README).
|
23
18
|
email: jordi@bunster.org
|
24
19
|
executables:
|
25
|
-
- lr
|
20
|
+
- lr
|
26
21
|
extensions: []
|
27
22
|
|
28
23
|
extra_rdoc_files: []
|
29
24
|
|
30
25
|
files:
|
31
|
-
- MIT-LICENSE
|
32
|
-
- README.rdoc
|
33
|
-
- WHATSNEW
|
34
|
-
- bin/lr
|
35
|
-
- leftright.gemspec
|
36
|
-
- lib/leftright.rb
|
37
|
-
- lib/leftright/autorun.rb
|
38
|
-
- lib/leftright/color.rb
|
39
|
-
- lib/leftright/runner.rb
|
40
|
-
- lib/leftright/tty.rb
|
41
|
-
- lib/leftright/version.rb
|
42
|
-
- lib/leftright/force_tty.rb
|
26
|
+
- MIT-LICENSE
|
27
|
+
- README.rdoc
|
28
|
+
- WHATSNEW
|
29
|
+
- bin/lr
|
30
|
+
- leftright.gemspec
|
31
|
+
- lib/leftright.rb
|
32
|
+
- lib/leftright/autorun.rb
|
33
|
+
- lib/leftright/color.rb
|
34
|
+
- lib/leftright/runner.rb
|
35
|
+
- lib/leftright/tty.rb
|
36
|
+
- lib/leftright/version.rb
|
37
|
+
- lib/leftright/force_tty.rb
|
43
38
|
has_rdoc: true
|
44
39
|
homepage:
|
45
40
|
licenses: []
|
@@ -48,29 +43,23 @@ post_install_message:
|
|
48
43
|
rdoc_options: []
|
49
44
|
|
50
45
|
require_paths:
|
51
|
-
- lib
|
46
|
+
- lib
|
52
47
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
48
|
none: false
|
54
49
|
requirements:
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
version: "0"
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
61
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
54
|
none: false
|
63
55
|
requirements:
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
segments:
|
68
|
-
- 0
|
69
|
-
version: "0"
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
70
59
|
requirements: []
|
71
60
|
|
72
61
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
62
|
+
rubygems_version: 1.5.1
|
74
63
|
signing_key:
|
75
64
|
specification_version: 3
|
76
65
|
summary: Cool replacement for Test::Unit's TestRunner
|