DemocracyOS/app — pull request #208 by cristiandouce (2014-01-03 19:08:46+00:00)
Title: Mongoose gravatar

This provides several changes. Non of them have been made in a breaking mode. But, there are a few considerations for the future:

1. At the API `endpoint` level, we should be able to `select` the fields requiered from the queried documents, and at the same time, `filter` which ones we'd like to actually `expose` to the client. I was thinking on 2 separate new libs: `query-select` and `json-expose` or something alike.
2. In order to properly make use of `mongoose-gravatar` component, any `model` instance MUST contain an `email` field within its attributes. This means, that any `Mongoose.Query` builder MUST `select` that value from MongoDB. But, non `email` should be shared to the client app, but the logged `citizen` account only.
3. The actual `select-expose` implementation, as said in `1.` should be applied at least till the new modules are developed.