leftright 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.8.7
15
- * JRuby 1.4.0 and 1.5.2 (both in 1.8.7 mode)
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, so it won't work
20
- in Ruby 1.9+ using MiniTest. Support is planned as soon as I find myself
21
- using the Ruby 1.9 + Rails 3 combo day to day.
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
@@ -1,3 +1,6 @@
1
+ * 0.9.1 (2011-03-23):
2
+ - 1.9.2 support when using the 'test-unit' gem (thanks Aaron Quint)
3
+
1
4
  * 0.9.0 (2010-08-27):
2
5
  - Fixed "leftright.rb:113: warning: parenthesize argument(s) for future
3
6
  version" in 1.8.6 (2007-03-13 patchlevel 0) and possibly other
@@ -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!.gsub! /\s+/, ' '
13
+ }.strip.gsub(/\s+/, ' ')
14
14
 
15
15
  gem.has_rdoc = false
16
16
 
@@ -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
- @io.write "\n"
54
- @io.write lr.justify_left_side(
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
- @io.write "\n"
59
- @io.write lr.justify_left_side
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
- @io.write output
65
+ io.write output
66
66
  ensure # reset all of the nasty state stuff
67
- @io.flush
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
- @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)"
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
@@ -1,3 +1,4 @@
1
1
  module LeftRight
2
- VERSION = '0.9.0'
3
- end
2
+ VERSION = '0.9.1'
3
+ LOCATION = File.dirname __FILE__ # :nodoc:
4
+ end
metadata CHANGED
@@ -1,45 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leftright
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
5
- prerelease: false
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: 2010-08-27 00:00:00 -07:00
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
- - !ruby/object:Gem::Version
57
- hash: 3
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
- - !ruby/object:Gem::Version
66
- hash: 3
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.3.7
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