It would be great to have the ability to add addresses to a list that should be always allowed, even when disable_net_access is called without the :allow option (or when you toggle between disabling and enabling allowing addresses).
I've got a working fork here:
https://github.com/DylanLacey/webmock/tree/ae3a21d4ea8d7b79ff1836eaa74e5b10ddbb5d0d with a proposed model.
`WebMock.always_allow address` will add an address to the list
`WebMock.disable_net_access!(:ignore_global_allow_list)` will over-ride that list for a specific disabling.
The reason I'd like this feature, is that I maintain a library (
http://www.github.com/saucelabs/sauce_ruby) which requires access to the 'net in order to work. There's a webmock helper included which copies all the user's existing WebMock configuration and calls `disable_net_access` again with all the existing options, as well as the address the library needs to be able to hit.
Sometimes users will include the helper before configuring WebMock, so it doesn't work. We included it to help users get up and running faster, and it would be great if we could add an address to a global allow list, so that it doesn't matter how users configure WebMock, the Sauce gem will still play nicely. I can imagine this being useful for other purposes as well; Other gems that need to access specific addresses, or toggling net access on and off multiple times with a partially similar exclusion list.
Happy to turn the link above into a PR, just wanted to open things up for suggestion first.
Cheers,
Dylan.