1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Add an option for disabling colourful bacon output

If you don't want to see colours in your bacon output then export
`NO_PRY_COLORED_BACON` variable in your shell rc file and set it to
`true`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
This commit is contained in:
Kyrylo Silin 2012-10-18 05:36:50 +03:00
parent 98aa9a40aa
commit 8a135e7c85

View file

@ -12,7 +12,7 @@ require 'open4'
# TODO: Make own gem (assigned to rking) # TODO: Make own gem (assigned to rking)
module Bacon module Bacon
COLORS = {'F' => 31, 'E' => 35, 'M' => 33, '.' => 32} COLORS = {'F' => 31, 'E' => 35, 'M' => 33, '.' => 32}
USE_COLOR = Pry::Helpers::BaseHelpers.use_ansi_codes? USE_COLOR = !(ENV['NO_PRY_COLORED_BACON'] == 'true') && Pry::Helpers::BaseHelpers.use_ansi_codes?
module TestUnitOutput module TestUnitOutput
def handle_requirement(description) def handle_requirement(description)