lib/fog/compute/new_servers.rb in fog-0.8.2 vs lib/fog/compute/new_servers.rb in fog-0.9.0

- old
+ new

@@ -1,12 +1,11 @@ module Fog - module NewServers - class Compute < Fog::Service + module Compute + class NewServers < Fog::Service requires :new_servers_password, :new_servers_username recognizes :host, :port, :scheme, :persistent - recognizes :provider # remove post deprecation model_path 'fog/compute/models/new_servers' request_path 'fog/compute/requests/new_servers' request :add_server @@ -28,17 +27,10 @@ def self.reset @data = nil end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::NewServers::Compute.new is deprecated, use Fog::Compute.new(:provider => 'NewServers') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @new_server_username = options[:new_servers_username] end def data self.class.data[@new_server_username] @@ -51,17 +43,10 @@ end class Real def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::NewServers::Compute.new is deprecated, use Fog::Compute.new(:provider => 'NewServers') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'fog/core/parser' @new_servers_password = options[:new_servers_password] @new_servers_username = options[:new_servers_username] @host = options[:host] || "noc.newservers.com" @@ -91,10 +76,10 @@ begin response = @connection.request(params.merge!({:host => @host})) rescue Excon::Errors::HTTPStatusError => error raise case error when Excon::Errors::NotFound - Fog::NewServers::Compute::NotFound.slurp(error) + Fog::Compute::NewServers::NotFound.slurp(error) else error end end