class VCR::LibraryHooks::WebMock::RequestHandler
def externally_stubbed?
def externally_stubbed? # prevent infinite recursion... VCR::LibraryHooks::WebMock.with_global_hook_disabled(request) do ::WebMock.registered_request?(request) end end
def initialize(request)
def initialize(request) @request = request end
def on_externally_stubbed_request
def on_externally_stubbed_request # nil allows WebMock to handle the request nil end
def on_stubbed_by_vcr_request
def on_stubbed_by_vcr_request { :body => stubbed_response.body.dup, # Excon mutates the body, so we must dup it :-( :status => [stubbed_response.status.code.to_i, stubbed_response.status.message], :headers => stubbed_response.headers } end
def on_unhandled_request
def on_unhandled_request invoke_after_request_hook(nil) super end
def set_typed_request_for_after_hook(*args)
def set_typed_request_for_after_hook(*args) super request.instance_variable_set(:@__typed_vcr_request, @after_hook_typed_request) end
def vcr_request
def vcr_request @vcr_request ||= vcr_request_for(request) end