Skip to content

Instantly share code, notes, and snippets.

@josephwilk
Created June 25, 2009 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephwilk/136127 to your computer and use it in GitHub Desktop.
Save josephwilk/136127 to your computer and use it in GitHub Desktop.
gem 'term-ansicolor'
require 'term/ansicolor'
if Cucumber::WINDOWS_MRI
begin
gem 'win32console', '>= 1.2.0'
require 'Win32/Console/ANSI'
rescue LoadError
STDERR.puts %{*** WARNING: You must "gem install win32console" (1.2.0 or higher) to get coloured output on MRI/Windows}
Term::ANSIColor.coloring = false
end
elsif Cucumber::WINDOWS && Cucumber::JRUBY
begin
gem 'aslakhellesoy-ansicolor', '>= 1.0'
require 'ansicolor'
rescue LoadError
STDERR.puts %{*** WARNING: You must "gem install aslakhellesoy-ansicolor --source http://gems.github.com" (1.0 or higher) to get coloured output on JRuby/Windows}
Term::ANSIColor.coloring = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment