# File lib/vcr/deprecations/http_stubbing_adapters/fakeweb.rb, line 4 def self.const_missing(const) return super unless const == :LOCALHOST_REGEX warn "WARNING: `VCR::HttpStubbingAdapters::FakeWeb::LOCALHOST_REGEX` is deprecated." VCR::Regexes.url_regex_for_hosts(VCR::LOCALHOST_ALIASES) end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 42 def create_stubs_checkpoint(cassette) checkpoints[cassette] = ::FakeWeb::Registry.instance.uri_map.dup end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 16 def http_connections_allowed=(value) @http_connections_allowed = value update_fakeweb_allow_net_connect end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 21 def http_connections_allowed? !!::FakeWeb.allow_net_connect?("http://some.url/besides/localhost") end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 25 def ignored_hosts=(hosts) @ignored_hosts = hosts update_fakeweb_allow_net_connect end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 50 def request_stubbed?(request, match_attributes) validate_match_attributes(match_attributes) !!::FakeWeb.registered_uri?(request.method, request.uri) end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 55 def request_uri(net_http, request) ::FakeWeb::Utility.request_uri_as_string(net_http, request) end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 46 def restore_stubs_checkpoint(cassette) ::FakeWeb::Registry.instance.uri_map = checkpoints.delete(cassette) || super end
# File lib/vcr/http_stubbing_adapters/fakeweb.rb, line 30 def stub_requests(http_interactions, match_attributes) validate_match_attributes(match_attributes) grouped_responses(http_interactions, match_attributes).each do |request_matcher, responses| ::FakeWeb.register_uri( request_matcher.method || :any, request_matcher.uri, responses.map{ |r| response_hash(r) } ) end end
Generated with the Darkfish Rdoc Generator 2.