natgeo/modules-activitystream — pull request #22 by mmontenegro (2014-10-27 21:31:30+00:00)
Title: [MIE-1470] Routing and FilterManager modules

Added 2 modules:

### FilterModule
Allows us to set filters that can be used:
* When querying the service to get activities. When building the url to ask the service for activities, the url might have some variables and the FiltersModule can provide values to it.
* When receiving new activities from sockets. FiltersModule has a 'matchActivity' method which checks if the received activity must be appended to the list of activities.

So now, when instanciating the service you can do this:

```
config = {
activityStreamServiceAPI: 'http://as.dev.nationalgeographic.com:9365/',
filters: {actor: 'db_user/1' ,'verb': 'FAVORITED', object: 'blog_article'}
user: {
type: 'db_user',
id: 1
}
};
AS.ready(config)
```
Will filter by actor where actor_type='db_user' and aid=1, verb is 'FAVORITED' and 'object_type' is 'blog_article'. So filter values can have the format 'type' or 'type/aid'.

### Routing Module.
Has 2 main methods:
* 'urlForContext' method which allows us to get the most specific url for a given set of filters.
* 'get' which allows us to get the url for a given route name and a context.

Unit tests provided