[rspec-devel] [ rspec-Bugs-15604 ] Cannot use console colouring mode without " win32console" gem on Windows.

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 18 23:42:28 EST 2007


Bugs item #15604, was opened at 2007-11-13 07:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=15604&group_id=797

Category: runner module
Group: None
Status: Open
Resolution: Accepted
Priority: 3
Submitted By: Roman Chernyatchik (romeo)
Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary: Cannot use console colouring mode without "win32console" gem on Windows.

Initial Comment:
Cannot use console colouring mode without "win32console" gem on Windows.

Hi guys! I've written renderer for rspec colouring output, but I cannot use it on Windows platform. Please add opportunity to use colouring mode on Windows without "win32console" gem!

The problem is in base_text_formatter.rb: 

def colour=(colour)
     @colour = colour
     begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ;  raise "You must gem install win32console to use colour on Windows" ; end
end 

----------------------------------------------------------------------

Comment By: Chad Humphries (spicycode)
Date: 2007-11-18 23:42

Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/78-15604-cannot-use-console-colouring-mode-without-win32console-gem-on-windows#ticket-78-2

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-11-14 19:14

Message:
So what's your suggestion for coloured console output without the win32console gem?

Would it help if you could give --colour an argument like:

--colour MyColourer

where MyColourer is some alternative (your?) implementation of colouring?

Can you submit a patch? (I'm reopening this now that I think I understand what you mean)

----------------------------------------------------------------------

Comment By: Roman Chernyatchik (romeo)
Date: 2007-11-14 11:37

Message:
We've implemented  colour support in console panel of ROR plugin for IntelliJ 
IDEA.  But "win32console" gem doesn't allow us to redirect output stream thus it 
hides all output from our console even when colour mode is disabled. 

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-11-13 11:26

Message:
This makes no sense. You must install the gem to have console colour on windows. The error message even tells you that.

Or tell us how to have colour support without the gem - I don't think it's possible.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=15604&group_id=797


More information about the rspec-devel mailing list