gavinlaking/vedeu — pull request #93 by gavinlaking (2014-09-14 15:33:21+00:00)
Title: New features!

- Add new `keys` API to define and handle keys pressed.

- Add Registrar class to record new interface definitions;
This class also stores the associated Buffers, Focus, Groups and Interfaces
repositories, and the Refresh events for the new interface.

- Add API.render method;
Rather than queueing views up to be rendered, then triggering the
respective refresh event, one can now render a view directly and it will be
rendered immediately. If the rendering is part of an event with throttling
or debouncing, this is also honoured.

- Add more documentation.
- Add more logging.

- Fix bug with passed options to Vedeu::API.event; options were being discarded
as the local variable 'opts' was being overwritten.

- Fix bug in registering refresh events; using wrong variable led to refresh
events being registered multiple times.

- Refactor Trace to be even more useful!
Trying to work out why colours and styles were not being reset after each
line or stream led me to refactor Trace to give better output. It is very
noisy in the log file, but allows a level of inspection which is extremely
helpful (to me?!).

- Extract building of new Stream and Line objects;
This reduces the complexity of #processed_lines a little. By exploring this
refactoring, I discovered that colours and styles were not resetting
correctly at the end of each stream/line, which makes this a big win. Added
a test to verify that colours and styles were resetting correctly.