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

rely on service to include collections

This commit is contained in:
geemus 2010-09-14 10:51:13 -07:00
parent 4076bbaec5
commit f0e2cfd21d
15 changed files with 1 additions and 30 deletions

View file

@ -64,7 +64,6 @@ module Fog
request :stop_instances
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -127,7 +126,6 @@ module Fog
end
class Real
include Collections
# Initialize connection to EC2
#

View file

@ -15,7 +15,6 @@ module Fog
request :register_instances_with_load_balancer
class Mock
include Collections
def initialize(options={})
Fog::Mock.not_implemented
@ -24,7 +23,6 @@ module Fog
end
class Real
include Collections
# Initialize connection to ELB
#

View file

@ -16,7 +16,6 @@ module Fog
request :select
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -40,7 +39,6 @@ module Fog
end
class Real
include Collections
# Initialize connection to SimpleDB
#

View file

@ -70,7 +70,6 @@ module Fog
end
class Mock
include Collections
include Utils
def self.data
@ -98,7 +97,6 @@ module Fog
end
class Real
include Collections
include Utils
extend Fog::Deprecation
deprecate(:reset, :reload)

View file

@ -24,7 +24,6 @@ module Fog
request :reboot_block
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -46,7 +45,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
@bluebox_api_key = options[:bluebox_api_key]

View file

@ -19,7 +19,6 @@ module Fog
request :grid_server_power
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -42,7 +41,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
@go_grid_api_key = options[:go_grid_api_key]

View file

@ -18,7 +18,6 @@ module Fog
request :linode_reboot
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -40,7 +39,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
@linode_api_key = options[:linode_api_key]

View file

@ -11,7 +11,6 @@ module Fog
collection :files
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -40,7 +39,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
@local_root = ::File.expand_path(options[:local_root])

View file

@ -19,7 +19,6 @@ module Fog
request :reboot_server
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -41,7 +40,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
@new_servers_password = options[:new_servers_password]

View file

@ -33,7 +33,6 @@ module Fog
request :update_server
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -62,7 +61,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
credentials = Fog::Rackspace.authenticate(options)

View file

@ -48,7 +48,6 @@ module Fog
end
class Mock
include Collections
include Utils
def self.data
@ -71,7 +70,6 @@ module Fog
end
class Real
include Collections
include Utils
def initialize(options={})

View file

@ -25,7 +25,6 @@ module Fog
request :reboot_slice
class Mock
include Collections
def self.data
@data ||= Hash.new do |hash, key|
@ -47,7 +46,6 @@ module Fog
end
class Real
include Collections
def initialize(options={})
@slicehost_password = options[:slicehost_password]

View file

@ -38,7 +38,7 @@ module Vcloud
def [](service)
@@connections ||= Hash.new do |hash, key|
if credentials = Fog.credentials[:vcloud][key]
hash[key] = Fog::Vcloud.new(credentials)
hash[key] = eval(credentials[:module]).new(credentials)
else
raise ArgumentError.new("Unregistered service: :#{key}. Registered services are: #{Vcloud.registered_services}")
end

View file

@ -63,7 +63,6 @@ module Fog
request :power_shutdown
class Mock < Fog::Vcloud::Mock
include Collections
def initialize(options={})
end
@ -192,7 +191,6 @@ module Fog
end
class Real < Fog::Vcloud::Real
include Collections
def supporting_versions
["v0.8b-ext2.3", "0.8b-ext2.3"]

View file

@ -6,7 +6,6 @@ module Fog
request :get_vdc
class Real < Fog::Vcloud::Real
include Collections
def supporting_versions
["0.8", "0.8a-ext1.6"]
@ -15,8 +14,6 @@ module Fog
end
class Mock < Fog::Vcloud::Mock
include Collections
end
end