myronmarston/vcr — Issue #90: Allow block configuration of ignored requests
Author: myronmarston
Created: 2011-10-14 14:58:45+00:00
State: open

Currently there are two options for configuring ignored requests:

* `config.ignore_localhost = (true | false)
* `config.ignore_hosts foo.com, bar.com, bazz.com`

Some people have asked to be able to ignore requests to particular localhost ports but not all localhost requests. With the big VCR 2.0 refactoring it's a lot easier to provide more flexible ignore configuration. I think the simplest/most flexible is a block:

``` ruby
VCR.configure do |c|
c.ignore_requests do |request|
uri = URI(request.uri)
uri.host == 'localhost' && uri.port == 6723
end
end
```