Class: Fog::Rackspace::CDN::Mock
- Inherits:
-
Object
- Object
- Fog::Rackspace::CDN::Mock
- Defined in:
- lib/fog/cdn/rackspace.rb,
lib/fog/cdn/requests/rackspace/put_container.rb,
lib/fog/cdn/requests/rackspace/get_containers.rb,
lib/fog/cdn/requests/rackspace/head_container.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_containers(options = {}) ⇒ Object
- #head_container(container) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #put_container(name, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/fog/cdn/rackspace.rb', line 30 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::Rackspace::CDN.new is deprecated, use Fog::CDN.new(:provider => 'Rackspace') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end @rackspace_username = [:rackspace_username] @data = self.class.data[@rackspace_username] end |
Class Method Details
.data ⇒ Object
18 19 20 21 22 |
# File 'lib/fog/cdn/rackspace.rb', line 18 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/cdn/rackspace.rb', line 24 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |
Instance Method Details
#get_containers(options = {}) ⇒ Object
32 33 34 |
# File 'lib/fog/cdn/requests/rackspace/get_containers.rb', line 32 def get_containers( = {}) Fog::Mock.not_implemented end |
#head_container(container) ⇒ Object
34 35 36 |
# File 'lib/fog/cdn/requests/rackspace/head_container.rb', line 34 def head_container(container) Fog::Mock.not_implemented end |
#put_container(name, options = {}) ⇒ Object
31 32 33 |
# File 'lib/fog/cdn/requests/rackspace/put_container.rb', line 31 def put_container(name, = {}) Fog::Mock.not_implemented end |