Sha256: 039da18f60b45f709ecf91b7d5710c72df89491f22c9c4e6ef0adb18579932a1
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
require 'fileutils' module VCR class Config class << self attr_reader :cassette_library_dir def cassette_library_dir=(cassette_library_dir) @cassette_library_dir = cassette_library_dir FileUtils.mkdir_p(cassette_library_dir) if cassette_library_dir end attr_writer :default_cassette_options def default_cassette_options @default_cassette_options ||= {} @default_cassette_options.merge!(:match_requests_on => RequestMatcher::DEFAULT_MATCH_ATTRIBUTES) unless @default_cassette_options.has_key?(:match_requests_on) @default_cassette_options end attr_writer :http_stubbing_library def http_stubbing_library @http_stubbing_library ||= begin defined_constants = [:FakeWeb, :WebMock].select { |c| Object.const_defined?(c) } defined_constants[0].to_s.downcase.to_sym if defined_constants.size == 1 end end def ignore_localhost=(value) VCR.http_stubbing_adapter && VCR.http_stubbing_adapter.ignore_localhost = value @ignore_localhost = value end def ignore_localhost? VCR.http_stubbing_adapter ? VCR.http_stubbing_adapter.ignore_localhost? : @ignore_localhost end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
vcr-1.2.0 | lib/vcr/config.rb |
vcr-1.1.2 | lib/vcr/config.rb |
vcr-1.1.1 | lib/vcr/config.rb |
vcr-1.1.0 | lib/vcr/config.rb |