…ould wrap the source exception too
I had to change a few things to make it work. Faraday::BetterRetry middleware is a slightly modified version of the one shipped with Faraday with the two customization we had: logging of retries and the passing along of the number of retries left to the Faraday::ExtendedParseJson middleware. The communication between the two middleware now it's done with a header because Faraday now uses closed structs to store the environent. I also left in the default exceptions used to retry requests that Faraday has. The logging and the header are tested. The header is deleted before making the HTTP request so it won't be sent to the server (though it's harmless). The tests removed in better_retry_test are those that were testing the functionality of the middleware itself which is better tested in the Faraday library now.
I removed the the @channel attribute because the behavior of the library is confusing if someone specifies both the channel during initialization and sets @channels later on. This way we only use @channels which is an obvious array of @channels someone wants to target and the channel given in the initialization ends up there. I also fixed #172 by making it so that automatically the channels end up in the where condition if @type is specified at the same time.
… same name
Also operations should be cleared on refresh.
Caught also a couple of bugs in the process.