CocoaPods/CLAide — pull request #20 by irrationalfab (2014-05-08 22:05:09+00:00)
Title: Add support for ANSI codes

Closes https://github.com/CocoaPods/CLAide/issues/17

Theres is problem with the specs related to the command logic caused by:
- The command class [checking wether the String class has defined](https://github.com/CocoaPods/CLAide/blob/ansi-support/lib/claide/command.rb#L108-L110) the `#red`, `#green` and `#blue` methods to decide wether to enable ANSI output.
- The help banner chaining according to the ANSI flag being present or not.
- The random order of the tests which might cause the `StringMixin` or the `StringMixinDisable` tests be called before tests depending on the output of the help banner.

I haven't identified a strong solution yet, the possibilities that I see are:

- Check only if for a TTY.
- Favor our mixing adding a flag somewhere indicating that the ANSI output has been requested (i.e. provide automatic detection only of the mixin). The drawback of this approach is that clients likely want to load the ANSI code only if needed.

I vote for the first.

/c @alloy