Class: Fog::Rackspace::Files::Mock

Inherits:
Object
  • Object
show all
Includes:
Collections, Utils
Defined in:
lib/fog/rackspace/files.rb,
lib/fog/rackspace/requests/files/get_object.rb,
lib/fog/rackspace/requests/files/put_object.rb,
lib/fog/rackspace/requests/files/head_object.rb,
lib/fog/rackspace/requests/files/delete_object.rb,
lib/fog/rackspace/requests/files/get_container.rb,
lib/fog/rackspace/requests/files/put_container.rb,
lib/fog/rackspace/requests/files/get_containers.rb,
lib/fog/rackspace/requests/files/head_container.rb,
lib/fog/rackspace/requests/files/head_containers.rb,
lib/fog/rackspace/requests/files/delete_container.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

#parse_data

Methods included from Collections

#directories

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



67
68
69
70
# File 'lib/fog/rackspace/files.rb', line 67

def initialize(options={})
  @rackspace_username = options[:rackspace_username]
  @data = self.class.data[@rackspace_username]
end

Class Method Details

.dataObject



55
56
57
58
59
# File 'lib/fog/rackspace/files.rb', line 55

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.reset_data(keys = data.keys) ⇒ Object



61
62
63
64
65
# File 'lib/fog/rackspace/files.rb', line 61

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/rackspace/requests/files/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/rackspace/requests/files/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/rackspace/requests/files/get_container.rb', line 45

def get_container(container, options = {})
  Fog::Mock.not_implemented
end

#get_containers(options = {}) ⇒ Object



34
35
36
# File 'lib/fog/rackspace/requests/files/get_containers.rb', line 34

def get_containers(options = {})
  Fog::Mock.not_implemented
end

#get_object(container, object) ⇒ Object



26
27
28
# File 'lib/fog/rackspace/requests/files/get_object.rb', line 26

def get_object(container, object)
  Fog::Mock.not_implemented
end

#head_container(container) ⇒ Object



30
31
32
# File 'lib/fog/rackspace/requests/files/head_container.rb', line 30

def head_container(container)
  Fog::Mock.not_implemented
end

#head_containersObject



27
28
29
# File 'lib/fog/rackspace/requests/files/head_containers.rb', line 27

def head_containers
  Fog::Mock.not_implemented
end

#head_object(container, object) ⇒ Object



25
26
27
# File 'lib/fog/rackspace/requests/files/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/rackspace/requests/files/put_container.rb', line 24

def put_container(name)
  Fog::Mock.not_implemented
end

#put_object(container, object, data) ⇒ Object



27
28
29
# File 'lib/fog/rackspace/requests/files/put_object.rb', line 27

def put_object(container, object, data)
  Fog::Mock.not_implemented
end