alphagov/email-alert-api — pull request #13 by bestie (2014-10-01 16:38:37+00:00)
Title: Get subscriber list

A better name might be "Search subscriber lists by tags"

Beyond the obvious `find_by_tags` operation you would expect it was also necessary to normalise the tags from the params hash because tags can have their values (`Array`) in arbitrary order and comparison would have to happen in application space rather than the data store.

Having implemented the normalisation as a high level filter I've found it takes many integration tests to make sure every end point has the necessary wiring up.

I think we should probably stop using a primitive `Hash` for tags and implement a `TagSet` domain object that would serialise correctly ordered.

Also I think we should start currying our services because that would have made this change far more elegant and flexible.