lib/fog/compute/new_servers.rb in fog-0.6.0 vs lib/fog/compute/new_servers.rb in fog-0.7.0

- old
+ new

@@ -23,24 +23,23 @@ @data ||= Hash.new do |hash, key| hash[key] = {} end end - def self.reset_data(keys=data.keys) - for key in [*keys] - data.delete(key) - end - 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] + reset_data + end + + def reset_data + self.class.data.delete(@new_server_username) @data = self.class.data[@new_server_username] end end