login (RubyForge)

    # File lib/rubyforge.rb, line 171
      def login
        return if cookie_store['rubyforge.org']['session_ser'] rescue false

        page = self.uri + "/account/login.php"
        page.scheme = 'https'
        page = URI.parse page.to_s # set SSL port correctly

        username = @userconfig["username"]
        password = @userconfig["password"]

        form = {
          "return_to"      => "",
          "form_loginname" => username,
          "form_pw"        => password,
          "login"          => "Login"
        }

        response = run page, form

        re = %r/personal\s+page\s+for:\s+#{ Regexp.escape username }/iom
        unless response =~ re
          warn("%s:%d: warning: potentially failed login using %s:%s" %
               [__FILE__,__LINE__,username,password]) unless $TESTING
        end

        response
      end