unfiltered/unfiltered — pull request #258 by n8han (2014-09-08 03:31:26+00:00)
Title: Support ad-hoc filtering of directives

Directives currently have no-op `filter` method that was added to support extraction of parameter directive tuples. This pull request moves filter functionality to a `FilterDirective` subtype so that the potentially surprising behavior of a no-op filter is now limited to and-ed parameter directives.

Further, these changes allow us to support proper filtering in cases where `orElse` is used. We can now construct a directive that knows how to fail for some conditions, and add more failure conditions via the `if` clause of a for expression. This behavior is demonstrated in an [example added to `DirectiveSpec`](https://github.com/unfiltered/unfiltered/commit/9ed6a7f32dc7068175e5306d0cc6284ffb4d2d26#diff-a5befc2e8b708b897958edbfcc266569R30).