add_file (RubyForge)

    # File lib/rubyforge.rb, line 343
      def add_file(group_name, package_name, release_name, userfile)
        page         = '/frs/admin/editrelease.php'
        type_id      = @userconfig["type_id"]
        group_id     = lookup "group", group_name
        package_id   = lookup "package", package_name
        release_id   = (Integer === release_name) ? release_name : lookup("release", package_name)[release_name]
        processor_id = @userconfig["processor_id"]

        page = "/frs/admin/editrelease.php?group_id=#{group_id}&release_id=#{release_id}&package_id=#{package_id}"

        userfile = open userfile, 'rb'

        type_id ||= userfile.path[%r|\.[^\./]+$|]
        type_id = (lookup "type", type_id rescue lookup "type", ".oth")

        processor_id ||= "Any"
        processor_id = lookup "processor", processor_id

        form = {
          "step2"        => 1,
          "type_id"      => type_id,
          "processor_id" => processor_id,
          "userfile"     => userfile,
          "submit"       => "Add This File"
          }

        boundary = Array::new(8){ "%2.2d" % rand(42) }.join('__')
        boundary = "multipart/form-data; boundary=___#{ boundary }___"

        run page, form, 'content-type' => boundary
      end