Class: Fog::Rackspace::Storage::Mock
- Inherits:
-
Object
- Object
- Fog::Rackspace::Storage::Mock
- Includes:
- Utils
- Defined in:
- lib/fog/storage/rackspace.rb,
lib/fog/storage/requests/rackspace/get_object.rb,
lib/fog/storage/requests/rackspace/put_object.rb,
lib/fog/storage/requests/rackspace/head_object.rb,
lib/fog/storage/requests/rackspace/delete_object.rb,
lib/fog/storage/requests/rackspace/get_container.rb,
lib/fog/storage/requests/rackspace/put_container.rb,
lib/fog/storage/requests/rackspace/get_containers.rb,
lib/fog/storage/requests/rackspace/head_container.rb,
lib/fog/storage/requests/rackspace/head_containers.rb,
lib/fog/storage/requests/rackspace/delete_container.rb
Class Method Summary collapse
Instance Method Summary collapse
- #delete_container(name) ⇒ Object
- #delete_object(container, object) ⇒ Object
- #get_container(container, options = {}) ⇒ Object
- #get_containers(options = {}) ⇒ Object
- #get_object(container, object, &block) ⇒ Object
- #head_container(container) ⇒ Object
- #head_containers ⇒ Object
- #head_object(container, object) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #put_container(name) ⇒ Object
- #put_object(container, object, data, options = {}) ⇒ Object
Methods included from Utils
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/fog/storage/rackspace.rb', line 91 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::Rackspace::Storage.new is deprecated, use Fog::Storage.new(:provider => 'Rackspace') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end require 'mime/types' @rackspace_api_key = [:rackspace_api_key] @rackspace_username = [:rackspace_username] @data = self.class.data[@rackspace_username] end |
Class Method Details
.data ⇒ Object
79 80 81 82 83 |
# File 'lib/fog/storage/rackspace.rb', line 79 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
85 86 87 88 89 |
# File 'lib/fog/storage/rackspace.rb', line 85 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |
Instance Method Details
#delete_container(name) ⇒ Object
24 25 26 |
# File 'lib/fog/storage/requests/rackspace/delete_container.rb', line 24 def delete_container(name) Fog::Mock.not_implemented end |
#delete_object(container, object) ⇒ Object
25 26 27 |
# File 'lib/fog/storage/requests/rackspace/delete_object.rb', line 25 def delete_object(container, object) Fog::Mock.not_implemented end |
#get_container(container, options = {}) ⇒ Object
45 46 47 |
# File 'lib/fog/storage/requests/rackspace/get_container.rb', line 45 def get_container(container, = {}) Fog::Mock.not_implemented end |
#get_containers(options = {}) ⇒ Object
34 35 36 |
# File 'lib/fog/storage/requests/rackspace/get_containers.rb', line 34 def get_containers( = {}) Fog::Mock.not_implemented end |
#get_object(container, object, &block) ⇒ Object
26 27 28 |
# File 'lib/fog/storage/requests/rackspace/get_object.rb', line 26 def get_object(container, object, &block) Fog::Mock.not_implemented end |
#head_container(container) ⇒ Object
30 31 32 |
# File 'lib/fog/storage/requests/rackspace/head_container.rb', line 30 def head_container(container) Fog::Mock.not_implemented end |
#head_containers ⇒ Object
27 28 29 |
# File 'lib/fog/storage/requests/rackspace/head_containers.rb', line 27 def head_containers Fog::Mock.not_implemented end |
#head_object(container, object) ⇒ Object
25 26 27 |
# File 'lib/fog/storage/requests/rackspace/head_object.rb', line 25 def head_object(container, object) Fog::Mock.not_implemented end |
#put_container(name) ⇒ Object
24 25 26 |
# File 'lib/fog/storage/requests/rackspace/put_container.rb', line 24 def put_container(name) Fog::Mock.not_implemented end |
#put_object(container, object, data, options = {}) ⇒ Object
28 29 30 |
# File 'lib/fog/storage/requests/rackspace/put_object.rb', line 28 def put_object(container, object, data, = {}) Fog::Mock.not_implemented end |