spagalloco/silencer — pull request #10 by ryanjohns (2014-01-15 03:45:17+00:00)
Title: add support for silencing specific request methods

This adds support for silencing requests for specific request methods. For example, say you have a restful resource where the show action is polled repeatedly by clients. You probably don't care about all those polling requests but would like to see any POSTs made to the same resource. This allows you to specify something like `:get => [%r{^/api/messages}]` which will ignore the requests to get messages, but would still log the requests that create messages.

Backwards compatibility is maintained for anyone currently using the `:silence` option (use the silence option if you don't care about the request method) and requests with the `HTTP_X_SILENCE_LOGGER` will also still be silenced.

I ran the tests using ruby 1.9.3-p484 and 2.0.0-p353 on rails versions 3.0.20, 3.1.12, 3.2.16, 4.0.0, and 4.0.2.