Module: Cucumber::Formatters::ANSIColor
- Includes:
- Term::ANSIColor
- Included in:
- PrettyFormatter, ProgressFormatter
- Defined in:
- lib/cucumber/formatters/ansicolor.rb
Overview
Adds ANSI color support to formatters. You can define your own colours by defining CUCUMBER_COLORS in your shell. Example:
CUCUMBER_COLORS=pending=black,on_yellow:failed=dark,magenta:failed_param=bold,red
The string must be a series of key=value pairs where:
* Each key=value pair is separated by a colon (:)
* Each key must be one of:
** passed
** passed_param
** failed
** failed_param
** skipped
** skipped_param
** pending
* Each value must be a comma-separated string composed of:
** bold
** dark
** italic
** underline
** underscore
** blink
** rapid_blink
** negative
** concealed
** strikethrough
** black
** red
** green
** yellow
** blue
** magenta
** cyan
** white
** grey
** on_black
** on_red
** on_green
** on_yellow
** on_blue
** on_magenta
** on_cyan
** on_white
Constant Summary collapse
- ALIASES =
Default aliases
{ :passed => 'bold,green', :passed_param => "#{param}green", :failed => 'bold,red', :failed_param => "#{param}red", :skipped => 'bold,cyan', :skipped_param => "#{param}cyan", :pending => 'bold,yellow', # No pending_param :comment => 'grey' }
Instance Method Summary collapse
-
#grey(m) ⇒ Object
Not supported in Term::ANSIColor.
Instance Method Details
#grey(m) ⇒ Object
Not supported in Term::ANSIColor
93 94 95 96 97 98 99 |
# File 'lib/cucumber/formatters/ansicolor.rb', line 93 def grey(m) if ENV['CUCUMBER_COLORS_DISABLED'] == '1' m else "\e[90m#{m}\e[0m" end end |