mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
consolidate deprecated service init
This commit is contained in:
parent
865ac70f61
commit
0d45273144
10 changed files with 68 additions and 64 deletions
|
@ -1,15 +0,0 @@
|
||||||
module Fog
|
|
||||||
module AWS
|
|
||||||
class EC2
|
|
||||||
|
|
||||||
def self.new(attributes = {})
|
|
||||||
location = caller.first
|
|
||||||
warning = "[yellow][WARN] Fog::AWS::EC2#new is deprecated, use Fog::AWS::Compute#new instead[/]"
|
|
||||||
warning << " [light_black](" << location << ")[/] "
|
|
||||||
Formatador.display_line(warning)
|
|
||||||
Fog::AWS::Compute.new(attributes)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,15 +0,0 @@
|
||||||
module Fog
|
|
||||||
module AWS
|
|
||||||
class S3
|
|
||||||
|
|
||||||
def self.new(attributes = {})
|
|
||||||
location = caller.first
|
|
||||||
warning = "[yellow][WARN] Fog::AWS::S3#new is deprecated, use Fog::AWS::Storage#new instead[/]"
|
|
||||||
warning << " [light_black](" << location << ")[/] "
|
|
||||||
Formatador.display_line(warning)
|
|
||||||
Fog::AWS::Storage.new(attributes)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
module Fog
|
||||||
|
module AWS
|
||||||
|
class EC2
|
||||||
|
|
||||||
|
def self.new(attributes = {})
|
||||||
|
location = caller.first
|
||||||
|
warning = "[yellow][WARN] Fog::AWS::EC2#new is deprecated, use Fog::AWS::Compute#new instead[/]"
|
||||||
|
warning << " [light_black](" << location << ")[/] "
|
||||||
|
Formatador.display_line(warning)
|
||||||
|
Fog::AWS::Compute.new(attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class Compute < Fog::Service
|
class Compute < Fog::Service
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
module Fog
|
||||||
|
module Rackspace
|
||||||
|
class Servers
|
||||||
|
|
||||||
|
def self.new(attributes = {})
|
||||||
|
location = caller.first
|
||||||
|
warning = "[yellow][WARN] Fog::Rackspace::Servers#new is deprecated, use Fog::Rackspace::Compute#new instead[/]"
|
||||||
|
warning << " [light_black](" << location << ")[/] "
|
||||||
|
Formatador.display_line(warning)
|
||||||
|
Fog::Rackspace::Compute.new(attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Fog
|
module Fog
|
||||||
module Rackspace
|
module Rackspace
|
||||||
class Compute < Fog::Service
|
class Compute < Fog::Service
|
||||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
||||||
service(:cdn, 'cdn/aws')
|
service(:cdn, 'cdn/aws')
|
||||||
service(:compute, 'compute/aws')
|
service(:compute, 'compute/aws')
|
||||||
service(:dns, 'dns/aws')
|
service(:dns, 'dns/aws')
|
||||||
service(:ec2, 'aws/ec2')
|
service(:ec2, 'compute/aws')
|
||||||
service(:elb, 'aws/elb')
|
service(:elb, 'aws/elb')
|
||||||
service(:iam, 'aws/iam')
|
service(:iam, 'aws/iam')
|
||||||
service(:s3, 'aws/s3')
|
service(:s3, 'storage/aws')
|
||||||
service(:simpledb, 'aws/simpledb')
|
service(:simpledb, 'aws/simpledb')
|
||||||
service(:storage, 'storage/aws')
|
service(:storage, 'storage/aws')
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ module Fog
|
||||||
|
|
||||||
service(:cdn, 'cdn/rackspace')
|
service(:cdn, 'cdn/rackspace')
|
||||||
service(:compute, 'rackspace/compute')
|
service(:compute, 'rackspace/compute')
|
||||||
service(:files, 'rackspace/files')
|
service(:files, 'storage/rackspace')
|
||||||
service(:servers, 'rackspace/servers')
|
service(:servers, 'rackspace/compute')
|
||||||
service(:storage, 'storage/rackspace')
|
service(:storage, 'storage/rackspace')
|
||||||
|
|
||||||
def self.authenticate(options)
|
def self.authenticate(options)
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
module Fog
|
|
||||||
module Rackspace
|
|
||||||
class Files
|
|
||||||
|
|
||||||
def self.new(attributes = {})
|
|
||||||
location = caller.first
|
|
||||||
warning = "[yellow][WARN] Fog::Rackspace::Files#new is deprecated, use Fog::Rackspace::Storage#new instead[/]"
|
|
||||||
warning << " [light_black](" << location << ")[/] "
|
|
||||||
Formatador.display_line(warning)
|
|
||||||
Fog::Rackspace::Storage.new(attributes)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,15 +0,0 @@
|
||||||
module Fog
|
|
||||||
module Rackspace
|
|
||||||
class Servers
|
|
||||||
|
|
||||||
def self.new(attributes = {})
|
|
||||||
location = caller.first
|
|
||||||
warning = "[yellow][WARN] Fog::Rackspace::Servers#new is deprecated, use Fog::Rackspace::Compute#new instead[/]"
|
|
||||||
warning << " [light_black](" << location << ")[/] "
|
|
||||||
Formatador.display_line(warning)
|
|
||||||
Fog::Rackspace::Compute.new(attributes)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
module Fog
|
||||||
|
module AWS
|
||||||
|
class S3
|
||||||
|
|
||||||
|
def self.new(attributes = {})
|
||||||
|
location = caller.first
|
||||||
|
warning = "[yellow][WARN] Fog::AWS::S3#new is deprecated, use Fog::AWS::Storage#new instead[/]"
|
||||||
|
warning << " [light_black](" << location << ")[/] "
|
||||||
|
Formatador.display_line(warning)
|
||||||
|
Fog::AWS::Storage.new(attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class Storage < Fog::Service
|
class Storage < Fog::Service
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
module Fog
|
||||||
|
module Rackspace
|
||||||
|
class Files
|
||||||
|
|
||||||
|
def self.new(attributes = {})
|
||||||
|
location = caller.first
|
||||||
|
warning = "[yellow][WARN] Fog::Rackspace::Files#new is deprecated, use Fog::Rackspace::Storage#new instead[/]"
|
||||||
|
warning << " [light_black](" << location << ")[/] "
|
||||||
|
Formatador.display_line(warning)
|
||||||
|
Fog::Rackspace::Storage.new(attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Fog
|
module Fog
|
||||||
module Rackspace
|
module Rackspace
|
||||||
class Storage < Fog::Service
|
class Storage < Fog::Service
|
||||||
|
|
Loading…
Reference in a new issue