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

[core] Uses Logger deprecation for Compute.new

Two Compute providers were issuing deprecation warnings to Kernel#warn
which bypassed highlighting and any future suppressing
This commit is contained in:
Paul Thornthwaite 2013-01-21 17:31:15 +00:00
parent 98e18600b4
commit 853fa96409

View file

@ -51,7 +51,7 @@ module Fog
Fog::Compute::Linode.new(attributes)
when :new_servers
require 'fog/bare_metal_cloud/compute'
warn "[DEPRECATION] `new_servers` is deprecated. Please use `bare_metal_cloud` instead."
Fog::Logger.deprecation "`new_servers` is deprecated. Please use `bare_metal_cloud` instead."
Fog::Compute::BareMetalCloud.new(attributes)
when :baremetalcloud
require 'fog/bare_metal_cloud/compute'
@ -72,7 +72,7 @@ module Fog
require 'fog/rackspace/compute_v2'
Fog::Compute::RackspaceV2.new(attributes)
else
warn "[DEPRECATION] First Gen Cloud Servers are deprecated. Please use `:version => :v2` attribute to use Next Gen Cloud Servers."
Fog::Logger.deprecation "First Gen Cloud Servers are deprecated. Please use `:version => :v2` attribute to use Next Gen Cloud Servers."
require 'fog/rackspace/compute'
Fog::Compute::Rackspace.new(attributes)
end