pengwynn/faraday_middleware — pull request #17 by mislav (2012-01-18 06:15:22+00:00)
Title: Refactoring & faraday-stack merge

I'm almost done merging in middleware from faraday-stack. I started out by moving all old middleware to under the FaradayMiddleware module. However I have kept backwards compatibility by mapping old constants to new ones.

I've added JSON encoding middleware that Faraday threw out in its latest version. I've refactored JSON parsing middleware to inherit from the base parser class, which made it gain extra features. It no longer uses multi_json, though. I plan to refactor other parsers to inherit from the same base class.

I've added redirect-following, instrumentation and caching middleware from faraday-stack.

I don't intend this to be a long-lived branch. I'm going to merge to master as soon as I make one failing test pass on rbx and when I finish the parsing middleware refactor. Of course, in the meantime I welcome your feedback.