Add ability to add to the list of currently allowed hosts #267

wants to merge 1 commit into


None yet
2 participants

Based on #263, this adds the ability to push to the list of allowed URLs.


bblimke commented Apr 1, 2013

Looks good. Sugar to WebMock api :)
I would just use allow_net_connect! instead of net_connect_allow! to follow convention

jredburn commented Apr 1, 2013

I struggled with the name of the method. Current behavior of allow_net_connect! is to allow all connections so we'd need to add an option (e.g. :only) which would restrict to a certain allowed host but that's basically duplicating disable_net_connect(:allow => ...). The challenge is differentiating the current behavior of any disable/enable calls which resets the list of allowed hosts from a new behavior which pushes on to the list of allowed hosts. Would it be preferable to expose the list of allowed hosts as an Enumerable and push to it?


bblimke commented Jun 4, 2013

Yes, I think having allow_net_connect! and net_connect_allow! is confusing. :only sounds like a good idea.


bblimke commented Nov 17, 2013

outdated pull request. closing

bblimke closed this Nov 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment