Add event emitters to models and emit some interesting events. #10

merged 8 commits into from Apr 7, 2013
Commits on Apr 7, 2013
  1. Switched to emitting events for before/after um events instead of

    committed Apr 7, 2013
    testing for functions then calling them.
    I'm using LucidJS as an event library just in case I ever try to make
    this work in the browser.
    Added unit tests for all triggered events.
    Wrote a mock db and moved several tests from the couch adapter suite
    to the generic persistence layer suite. There's more work to be done
    Bumped the version number in anticipation of release.
  2. Formatting tweak.

    committed Apr 7, 2013
  3. The levelup adapter now cleans up attachments properly.

    committed Apr 7, 2013
    Added unit tests to prove it. Or so I hope.
    The default polyclay require no longer includes all the db adapters, so
    you do not need to have them all built in order to use the package.
    Right now you have to require the path inside the package directly.
    I'll find some better way to do that.
  4. Wrapped requires() for optional adapters in try/catch, so you don't need

    committed Apr 7, 2013
    to have everything installed.
  5. Emit change events when attachments are changed.

    committed Apr 7, 2013
    Added unit tests for the events.
  6. Remove an unused require().

    committed Apr 7, 2013