mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
don't reset data on Mock#initialize
This commit is contained in:
parent
c1152c3272
commit
cae1fd80d6
20 changed files with 20 additions and 20 deletions
|
@ -28,7 +28,7 @@ module Fog
|
|||
|
||||
def initialize(options={})
|
||||
@aws_access_key_id = options[:aws_access_key_id]
|
||||
reset_data
|
||||
@data = self.class.data[@aws_access_key_id]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -39,7 +39,7 @@ module Fog
|
|||
require 'mime/types'
|
||||
@aws_access_key_id = options[:aws_access_key_id]
|
||||
@region = options[:region]
|
||||
reset_data
|
||||
@data = self.class.data[@region][@aws_access_key_id]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -31,7 +31,7 @@ module Fog
|
|||
end
|
||||
|
||||
@rackspace_username = options[:rackspace_username]
|
||||
reset_data
|
||||
@data = self.class.data[@rackspace_username]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -137,7 +137,7 @@ module Fog
|
|||
@aws_access_key_id = options[:aws_access_key_id]
|
||||
@region = options[:region] || 'us-east-1'
|
||||
|
||||
reset_data
|
||||
@data = self.class.data[@region][@aws_access_key_id]
|
||||
@owner_id = @data[:owner_id]
|
||||
end
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ module Fog
|
|||
end
|
||||
|
||||
@bluebox_api_key = options[:bluebox_api_key]
|
||||
reset_data
|
||||
@data = self.class.data[@bluebox_api_key]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -46,7 +46,7 @@ module Fog
|
|||
|
||||
@go_grid_api_key = options[:go_grid_api_key]
|
||||
@go_grid_shared_secret = options[:go_grid_shared_secret]
|
||||
reset_data
|
||||
@data = self.class.data[@go_grid_api_key]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -40,7 +40,7 @@ module Fog
|
|||
end
|
||||
|
||||
@linode_api_key = options[:linode_api_key]
|
||||
reset_data
|
||||
@data = self.class.data[@linode_api_key]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
end
|
||||
|
||||
@new_server_username = options[:new_servers_username]
|
||||
reset_data
|
||||
@data = self.class.data[@new_server_username]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -62,7 +62,7 @@ module Fog
|
|||
end
|
||||
|
||||
@rackspace_username = options[:rackspace_username]
|
||||
reset_data
|
||||
@data = self.class.data[@rackspace_username]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -43,7 +43,7 @@ module Fog
|
|||
end
|
||||
|
||||
@slicehost_password = options[:slicehost_password]
|
||||
reset_data
|
||||
@data = self.class.data[@slicehost_password]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -50,7 +50,7 @@ module Fog
|
|||
|
||||
def initialize(options={})
|
||||
@voxel_api_key = options[:voxel_api_key]
|
||||
reset_data
|
||||
@data = self.class.data[@voxel_api_key]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -44,7 +44,7 @@ module Fog
|
|||
require 'mime/types'
|
||||
@aws_access_key_id = options[:aws_access_key_id]
|
||||
@region = options[:region]
|
||||
reset_data
|
||||
@data = self.class.data[@region][@aws_access_key_id]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -40,7 +40,7 @@ module Fog
|
|||
|
||||
@bluebox_customer_id = options[:bluebox_customer_id]
|
||||
@bluebox_api_key = options[:bluebox_api_key]
|
||||
reset_data
|
||||
@data = self.class.data[@bluebox_customer_id]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -39,7 +39,7 @@ module Fog
|
|||
end
|
||||
|
||||
@linode_api_key = options[:linode_api_key]
|
||||
reset_data
|
||||
@data = self.class.data[@linode_api_key]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -39,7 +39,7 @@ module Fog
|
|||
end
|
||||
|
||||
@slicehost_password = options[:slicehost_password]
|
||||
reset_data
|
||||
@data = self.class.data[@slicehost_password]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -46,7 +46,7 @@ module Fog
|
|||
|
||||
@zerigo_email = options[:zerigo_email]
|
||||
@zerigo_token = options[:zerigo_token]
|
||||
reset_data
|
||||
@data = self.class.data[@zerigo_email]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -175,7 +175,7 @@ module Fog
|
|||
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
||||
end
|
||||
@region = options[:region]
|
||||
reset_data
|
||||
@data = self.class.data[@region][@aws_access_key_id]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -129,7 +129,7 @@ module Fog
|
|||
|
||||
require 'mime/types'
|
||||
@google_storage_access_key_id = options[:google_storage_access_key_id]
|
||||
reset_data
|
||||
@data = self.class.data[@google_storage_access_key_id]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
|
@ -31,7 +31,7 @@ module Fog
|
|||
end
|
||||
|
||||
@local_root = ::File.expand_path(options[:local_root])
|
||||
reset_data
|
||||
@data = self.class.data[@local_root]
|
||||
end
|
||||
|
||||
def local_root
|
||||
|
|
|
@ -56,7 +56,7 @@ module Fog
|
|||
require 'mime/types'
|
||||
@rackspace_api_key = options[:rackspace_api_key]
|
||||
@rackspace_username = options[:rackspace_username]
|
||||
reset_data
|
||||
@data = self.class.data[@rackspace_username]
|
||||
end
|
||||
|
||||
def reset_data
|
||||
|
|
Loading…
Reference in a new issue