# File lib/vcr/http_stubbing_adapters/typhoeus.rb, line 42 def create_stubs_checkpoint(cassette) checkpoints[cassette] = ::Typhoeus::Hydra.stubs.dup end
# File lib/vcr/http_stubbing_adapters/typhoeus.rb, line 12 def http_connections_allowed=(value) ::Typhoeus::Hydra.allow_net_connect = value end
# File lib/vcr/http_stubbing_adapters/typhoeus.rb, line 16 def http_connections_allowed? !!::Typhoeus::Hydra.allow_net_connect? end
# File lib/vcr/http_stubbing_adapters/typhoeus.rb, line 20 def ignored_hosts=(hosts) ::Typhoeus::Hydra.ignore_hosts = hosts end
# File lib/vcr/http_stubbing_adapters/typhoeus.rb, line 46 def restore_stubs_checkpoint(cassette) ::Typhoeus::Hydra.stubs = checkpoints.delete(cassette) || super end
# File lib/vcr/http_stubbing_adapters/typhoeus.rb, line 24 def stub_requests(http_interactions, match_attributes) grouped_responses(http_interactions, match_attributes).each do |request_matcher, responses| ::Typhoeus::Hydra.stub( request_matcher.method || :any, request_matcher.uri, request_hash(request_matcher) ).and_return( responses.map do |response| ::Typhoeus::Response.new( :code => response.status.code, :body => response.body, :headers_hash => normalized_response_headers(response) ) end ) end end