def convert_remote_url(url)
      if url.is_a? String
        return {:url =>  URI.parse(url)}
      elsif url.is_a? Hash
        hash = { :url =>  URI.parse((url[:url] || url['url'])) }
        username = url[:username] || url['username']
        hash[:username] = username if username
        
        password = (url[:password] || url['password'])
        hash[:password] = password if password
        
        return hash
      elsif url.is_a? URI
        return { :url => url }
      else
        raise ArgumentError, "Unsupported :url, must be String, Hash, or URI: #{url.inspect}"
      end
    end
def convert_remote_url(url)
      if url.is_a? String
        return {:url =>  URI.parse(url)}
      elsif url.is_a? Hash
        hash = { :url =>  URI.parse((url[:url] || url['url'])) }
        username = url[:username] || url['username']
        hash[:username] = username if username
        
        password = (url[:password] || url['password'])
        hash[:password] = password if password
        
        return hash
      elsif url.is_a? URI
        return { :url => url }
      else
        raise ArgumentError, "Unsupported :url, must be String, Hash, or URI: #{url.inspect}"
      end
    end
:call-seq:
   url = url => hash
   url = Hash => hash

 With a String url, returns a standardize URL Hash.

 With a Hash argument { :url => 'url', :username => 'username', :password => 'password' }, returns a standardize URL Hash.