dmacdougall/fezzik — pull request #50 by cespare (2013-05-31 04:11:41+00:00)
Title: We should use the current domain setting, even if it has changed

Right now, we create one `Weave::ConnectionPool` (or rather, weave does for us) and then even if the host list changes, we'll keep using the same hosts for subsequent `host_task`s.

Interestingly, the same behavior was present before 0.8.0, even though it used rake remote task instead.

I've changed Weave to have an additional method, `ConnectionPool#execute_with`, that allows for specifying the host list. You can just make an empty `ConnectionPool` and then add hosts when you need them.

These changes are all that is necessary to make Fezzik take advantage of that.

You can see an example of the bad behavior I experienced here:

https://gist.github.com/cespare/6ae5aeb00a2f3030dfc9