def initialize(*args)
if args[0].is_a?(Hash)
options = args[0]
@authuser = options[:username] ||( raise CloudFiles::Exception::Authentication, "Must supply a :username")
@authkey = options[:api_key] || (raise CloudFiles::Exception::Authentication, "Must supply an :api_key")
@auth_url = options[:authurl] || CloudFiles::AUTH_USA
@auth_url = options[:auth_url] || CloudFiles::AUTH_USA
@retry_auth = options[:retry_auth] || true
@snet = ENV['RACKSPACE_SERVICENET'] || options[:snet]
@proxy_host = options[:proxy_host]
@proxy_port = options[:proxy_port]
else
@authuser = args[0] ||( raise CloudFiles::Exception::Authentication, "Must supply the username as the first argument")
@authkey = args[1] || (raise CloudFiles::Exception::Authentication, "Must supply the API key as the second argument")
@retry_auth = args[2] || true
@snet = (ENV['RACKSPACE_SERVICENET'] || args[3]) ? true : false
@auth_url = CloudFiles::AUTH_USA
end
@authok = false
@http = {}
CloudFiles::Authentication.new(self)
end