Permalink
Commits on Aug 26, 2012
  1. Fixed em-http-adapter bug. When a request is made to a URL that retur…

    …ns a 3xx response and the :redirects option is set, the globally_stub_request/after_request
    
    hooks are now fired for the original request and the redirect-following request.
    committed Aug 26, 2012
Commits on Aug 15, 2012
  1. Version 1.8.9

    committed Aug 15, 2012
  2. Added support for Addressable >= 2.3.0. Addressable 2.3.0 removed sup…

    …port for multiple query value notations and broke backwards compatibility.
    
    
    sporkmonger/addressable@f51e290
    sporkmonger/addressable#77
    committed Aug 15, 2012
Commits on Aug 14, 2012
  1. Merge pull request #201 from bblimke/prefer_super

    Prefer super to alias method chain.
    committed Aug 14, 2012
  2. Merge pull request #199 from bblimke/vcr-issue-190

    Clear cached webmock response in HTTPClient instance.
    committed Aug 14, 2012
Commits on Aug 13, 2012
  1. Prefer super to alias method chain.

    WebMock was using alias method chain in lots of situations where it didn't need to, since most of the adapters subclass the HTTP client.
    myronmarston committed Aug 12, 2012
Commits on Aug 7, 2012
  1. Clear cached webmock response in HTTPClient instance.

    When the a request was not stubbed, the `nil` value of the webmock response was
    being cached in the `webmock_responses` hash. Then, when a second request was 
    made with the same HTTPClient instance and an identical signature, it was not 
    checking for a stub again, even though there may have been one for the second request (e.g. when using a global stub hook or if another stub is registered between the 1st and 2nd requests).
    
    Fixes myronmarston/vcr#190.
    myronmarston committed Aug 7, 2012
Commits on Jul 23, 2012
  1. Bump version to 1.8.8

    committed Jul 23, 2012
  2. Merge pull request #190 from bblimke/nil_response_body

    Fix Net::HTTP adapter so that it returns `nil` for an empty body response.
    committed Jul 23, 2012
  3. Revert "Merge pull request #178 from HendrikW/master"

    This reverts commit 36aff46, reversing
    changes made to 1e61a8c.
    committed Jul 23, 2012
  4. Merge pull request #189 from i0rek/typhoeus

    Fix typhoeus 0.4.0 issues.
    committed Jul 23, 2012
  5. Merge pull request #178 from HendrikW/master

    Net:HTTP adapter tries to close connection two times and throws error
    committed Jul 23, 2012
  6. Merge pull request #194 from kjg/request_pattern_charset

    request_pattern should handle content_types that specify a charset
    committed Jul 23, 2012
  7. Merge pull request #192 from chatgris/em-http-proxy

    Fix EventMachine::HttpRequest on proxy method.
    committed Jul 23, 2012
  8. Merge pull request #191 from ryansch/fix-travis-image

    Fixing travis-ci image to report master's status
    committed Jul 23, 2012
  9. Merge pull request #196 from jonleighton/fix_em_http_callbacks

    Fix em-http-request callback triggering
    committed Jul 23, 2012
  10. Fix em-http-request callback triggering

    Previously, if there were other EM::Deferred callbacks registered, they
    might execute before WebMock's callback and raise an exception. This
    would prevent the WebMock callback ever running, even though there was a
    successful request.
    
    Overriding set_deferred_status prevents this by triggering WebMock's
    callbacks before running any of the EM::Deferred callbacks.
    
    Sorry, I have no idea how to test this.
    jonleighton committed Jul 23, 2012
Commits on Jul 12, 2012
Commits on Jul 11, 2012
  1. Fix EventMachine::HttpRequest on proxy method.

    Caused by
    igrigorik/em-http-request@7d5752d
    
    Signed-off-by: chatgris <jboyer@af83.com>
    chatgris committed Jul 11, 2012
Commits on Jul 5, 2012
Commits on Jun 12, 2012
  1. Fix Net::HTTP adapter so that it returns `nil` for an empty body resp…

    …onse.
    
    This mirrors the real behavior of Net::HTTP and is the source of myronmarston/vcr#173.
    
    A couple things to note:
    
    - Rather than hitting an external URL (httpstat.us/204), this should probably
      hit the local webmock server; however, I can't figure out how to make the
      webmock server return a different response for different requests since it's
      writing directly to the socket w/o any request context available. Maybe it
      should be refactored to use rack or sinatra?
    - I have no idea why, but Curb is returning a 400 Bad Request response for
      the request. Weird. Not sure why or how to fix it.
    myronmarston committed Jun 12, 2012
Commits on Jun 6, 2012
  1. Fix typhoeus 0.4.0 issues.

    i0rek committed Jun 6, 2012
Commits on May 25, 2012
  1. Add a failing spec demonstrating a bug in the em-http-request adapter.

    When a request is made to a URL that returns a 3xx response and the
    :redirects option is set, the globally_stub_request/after_request
    hooks are not paired properly.  Both hooks should receive the original
    request and the redirect-following request.
    
    This spec should probably be re-written to use the local webmock
    server, but I couldn't figure out how to get it to conditionally
    send a redirect response since it writes directly to the socket
    and doesn't (as far as I can tell) have the request info available
    in that scope...so there's not easy way to have it send a different
    response for different requests :(.
    
    See myronmarston/vcr#171 for the original VCR issue that caused
    me to investigate this bug.
    myronmarston committed May 24, 2012
Commits on May 21, 2012
  1. Merge pull request #184 from jonleighton/dont_mutate_uri

    Clone the URI before mutating it.
    committed May 21, 2012
Commits on May 17, 2012
  1. Clone the URI before mutating it.

    The #build_request_signature method was mutating the URI if there were
    any @req.query options. This means that if the request does actually get
    sent, em-http-request appends the query to the URI a second time, and
    the parameters are repeated.
    
    For example:
    
    EventMachine::HttpRequest.new('http://example.com/').get(:query => { :a => '1' })
    
    would result in the follow URI being used for a live request:
    
    http://example.com/?a=1&a=1
    jonleighton committed May 17, 2012
Commits on May 15, 2012
  1. Add failing spec demonstrating em-http-request bug.

    When a response modifying middleware is used with em-http-request, and a real request is made, the middleware can modify the response before the after_request is invoked. This prevents VCR from being able to record the response accurately.  The after_request hook should be invoked before the em-http-request middleware.
    
    Related to myronmarston/vcr#169.
    myronmarston committed May 15, 2012
Commits on May 12, 2012
  1. Bump to version 1.8.7

    committed May 12, 2012