{"action":"opened","issue":{"url":"https://api.github.com/repos/zhangsu/ccspec/issues/1","labels_url":"https://api.github.com/repos/zhangsu/ccspec/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/zhangsu/ccspec/issues/1/comments","events_url":"https://api.github.com/repos/zhangsu/ccspec/issues/1/events","html_url":"https://github.com/zhangsu/ccspec/issues/1","id":89954735,"number":1,"title":"Implement basic `ConsoleCode` module for colored console output","user":{"login":"zhangsu","id":743034,"avatar_url":"https://avatars.githubusercontent.com/u/743034?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangsu","html_url":"https://github.com/zhangsu","followers_url":"https://api.github.com/users/zhangsu/followers","following_url":"https://api.github.com/users/zhangsu/following{/other_user}","gists_url":"https://api.github.com/users/zhangsu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangsu/subscriptions","organizations_url":"https://api.github.com/users/zhangsu/orgs","repos_url":"https://api.github.com/users/zhangsu/repos","events_url":"https://api.github.com/users/zhangsu/events{/privacy}","received_events_url":"https://api.github.com/users/zhangsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-21T20:12:03Z","updated_at":"2015-06-21T20:12:03Z","closed_at":null,"body":"Currently all our text output onto the console are in the console's default color:\r\n![screen shot 2015-06-21 at 3 59 16 pm](https://cloud.githubusercontent.com/assets/743034/8273161/8d334536-182e-11e5-8494-76b23bf8c41d.png)\r\nWe would like have the ability to output colored output. In particular, we want tests that pass to be output as green and failures to be red.\r\n\r\nFor example, In the top half of the screenshot where a `ProgressFormatter` is used, the character `F` should be output as red whereas the character `.` should be marked green. The whole paragraph including and after `Failures:` should also be in red. In the bottom half of the screenshot, the failure line `1 + 1 = 2 (FAILED)` should be marked red.\r\n\r\nThis can be done through ANSI escape sequences for colors:\r\nhttps://en.wikipedia.org/wiki/ANSI_escape_code#Colors\r\n\r\nIn a way similar to how RSpec did it with a `ConsoleCode` module under `formatters`:\r\nhttps://github.com/rspec/rspec-core/blob/master/lib/rspec/core/formatters/console_codes.rb\r\n\r\n- [ ] create a very basic `ConsoleCode` module that has a mapping between color codes and enums such as `SUCCESS` and `FAILURE`.\r\n- [ ] Modify ProgressFormatter to output successful test output as green and failure as red.\r\n- [ ] Ditto for DocumentationFormatter."}}