modella/modella — pull request #5 by rschmukler (2013-03-20 21:55:22+00:00)
Title: Version bump of v0.1.0

Implementation to make `Model.sync` private. This fits with the overall goal of Modella to abstract sync layer stuff away from the developer...

Added a `Model.useSync` method that emits a `syncSet` event which is helpful for not requiring order dependency on plugin loading. E.g. without this event, User.use(validators); User.attr('someField', {unique: true}) would be impossible without User.use(mongo) being called first. You can see how I implemented this in the latest version of [modella/validators](http://github.com/modella/validators).

Along similar lines, I also added an `attrAdded` event which gets called on `Model.attr`. This is helpful for plugins that use options when an event is added, such as [modella/validators](http://github.com/modella/validators). Without this, the following would break since we only evaluate at `Model.use(plugin)`:

var User = modella('user');
User.use(validators);
User.attr('name', { required: true } );

All and all, I think that these changes + all the previous changes warrant enough to do a minor version bump. Let me know your thoughts @matthewmueller