Class: Fog::Storage::Rackspace::Mock
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Utils
#cdn
#authenticate, #endpoint_uri, #request, #request_without_retry, #service_net?
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
77
78
79
80
81
|
# File 'lib/fog/rackspace/storage.rb', line 77
def initialize(options={})
@rackspace_api_key = options[:rackspace_api_key]
@rackspace_username = options[:rackspace_username]
@rackspace_cdn_ssl = options[:rackspace_cdn_ssl]
end
|
Class Method Details
.data ⇒ Object
67
68
69
70
71
|
# File 'lib/fog/rackspace/storage.rb', line 67
def self.data
@data ||= Hash.new do |hash, key|
hash[key] = {}
end
end
|
.reset ⇒ Object
73
74
75
|
# File 'lib/fog/rackspace/storage.rb', line 73
def self.reset
@data = nil
end
|
Instance Method Details
#data ⇒ Object
83
84
85
|
# File 'lib/fog/rackspace/storage.rb', line 83
def data
self.class.data[@rackspace_username]
end
|
#region ⇒ Object
95
96
97
|
# File 'lib/fog/rackspace/storage.rb', line 95
def region
@rackspace_region
end
|
#reset_data ⇒ Object
87
88
89
|
# File 'lib/fog/rackspace/storage.rb', line 87
def reset_data
self.class.data.delete(@rackspace_username)
end
|
#service_name ⇒ Object
91
92
93
|
# File 'lib/fog/rackspace/storage.rb', line 91
def service_name
:cloudFiles
end
|
#ssl? ⇒ Boolean
99
100
101
|
# File 'lib/fog/rackspace/storage.rb', line 99
def ssl?
!!@rackspace_cdn_ssl
end
|