Module: Cassette
- Extended by:
- Cassette, Forwardable
- Included in:
- Cassette
- Defined in:
- lib/cassette.rb,
lib/cassette/http.rb,
lib/cassette/cache.rb,
lib/cassette/client.rb,
lib/cassette/errors.rb,
lib/cassette/rubycas.rb,
lib/cassette/version.rb,
lib/cassette/client/cache.rb,
lib/cassette/http/request.rb,
lib/cassette/authentication.rb,
lib/cassette/rubycas/helper.rb,
lib/cassette/cache/null_store.rb,
lib/cassette/authentication/user.rb,
lib/cassette/authentication/cache.rb,
lib/cassette/http/ticket_response.rb,
lib/cassette/rubycas/user_factory.rb,
lib/cassette/authentication/filter.rb,
lib/cassette/errors/not_a_customer.rb,
lib/cassette/errors/not_an_employee.rb,
lib/cassette/authentication/authorities.rb,
lib/cassette/rubycas/routing_constraint.rb,
lib/cassette/rubycas/single_sign_out_constraint.rb,
lib/cassette/rubycas/not_single_sign_out_constraint.rb
Defined Under Namespace
Modules: Cache, Errors, Http, Rubycas
Classes: Authentication, Client, Version
Constant Summary
collapse
- DEFAULT_TIMEOUT =
10
- DEFAULT_TLS_VERSION =
'TLSv1_2'.freeze
- DEFAULT_VERIFY_SSL =
false
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#config ⇒ Object
39
40
41
42
43
44
45
46
47
|
# File 'lib/cassette.rb', line 39
def config
@config = OpenStruct.new unless defined?(@config)
@config.tls_version = DEFAULT_TLS_VERSION if @config.tls_version.nil?
@config.verify_ssl = DEFAULT_VERIFY_SSL if @config.verify_ssl.nil?
@config
end
|
#logger ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/cassette.rb', line 29
def logger
@logger ||= begin
if defined?(::Rails) && ::Rails.logger
::Rails.logger
else
Logger.new('/dev/null')
end
end
end
|
Class Method Details
.cache_backend=(cache_backend) ⇒ Object
61
62
63
|
# File 'lib/cassette.rb', line 61
def self.cache_backend=(cache_backend)
@cache_backend = cache_backend
end
|
Instance Method Details
#cache_backend ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/cassette.rb', line 49
def cache_backend
@cache_backend ||= begin
if defined?(::Rails) && ::Rails.cache
::Rails.cache
elsif defined?(::ActiveSupport::Cache::MemoryStore)
ActiveSupport::Cache::MemoryStore.new
else
Cache::NullStore.new
end
end
end
|