How do I keep the *colorized* output result of a command when printing the result of a command in Ruby?
문제
Here's the thing:
I run a bunch of Cucumber tests from a ruby file by calling the command like this:
result = `bundle exec cucumber tests/specs/features`
[...] # do stuff with it
puts result
Now the result of the command has these nice colors telling me a lot about passing and failing tests by just looking at it without reading. But: when I put the result like this, the coloring is gone!
Is there any way of doing this without losing the coloring?
제휴하지 않습니다 StackOverflow