1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Add reset method to other providers in addition to Compute providers.

This commit is contained in:
anomalousthought 2011-05-19 10:05:33 -04:00
parent 0f74c3f6c9
commit bdc84813f9
14 changed files with 56 additions and 4 deletions

View file

@ -26,6 +26,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
@aws_access_key_id = options[:aws_access_key_id]
@data = self.class.data[@aws_access_key_id]

View file

@ -28,6 +28,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -22,6 +22,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -959,10 +959,6 @@ module Fog
"https://fakey.com/api/v0.8b-ext2.6"
end
def self.data_reset
@mock_data = nil
end
def self.data( base_url = self.base_url )
@mock_data ||= MockData.new.tap do |vcloud_mock_data|
vcloud_mock_data.versions.clear
@ -1065,6 +1061,10 @@ module Fog
end
end
def self.reset
@mock_data = nil
end
def initialize(options = {})
require 'builder'
require 'fog/core/parser'

View file

@ -33,6 +33,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -30,6 +30,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -31,6 +31,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -30,6 +30,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -30,6 +30,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -36,6 +36,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -148,6 +148,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first

View file

@ -132,6 +132,10 @@ module Fog
@data = self.class.data[@google_storage_access_key_id]
end
def self.reset
@data = nil
end
def reset_data
self.class.data.delete(@google_storage_access_key_id)
@data = self.class.data[@google_storage_access_key_id]

View file

@ -19,6 +19,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
Fog::Mock.not_implemented

View file

@ -45,6 +45,10 @@ module Fog
end
end
def self.reset
@data = nil
end
def initialize(options={})
unless options.delete(:provider)
location = caller.first