Hello,

So, I grabbed the mongrel_upload_progress code from subversion because I really need something similar for a project I am working on. Anyway, I installed the gem and can't figure out a few things.

1) I'm not sure what Upload < GemPlugin::Plugin "/handlers" is for

2) How to call the Progress < GemPlugin::Plugin "/handlers" handler.

While I was trying to figure it out, I wrote my own test plugin to mess around with the general plugin system and what I think it is is that the handlers aren't registering with a particular uri. In the Rdoc for mongrel there is the following code:

require 'mongrel'

 class SimpleHandler < Mongrel::HttpHandler
    def process(request, response)
      response.start(200) do |head,out|
        head["Content-Type"] = "text/plain"
        out.write("hello!\n")
      end
    end
 end

 h = Mongrel::HttpServer.new("0.0.0.0", "3000")
 h.register("/test", SimpleHandler.new)
 h.register("/files", Mongrel::DirHandler.new("."))
 h.run.join

Now, the key thing here is the h.register which associates a uri with a handler (or the method uri). I don't see anything like that happening with the gem plugins. Am I missing something? What would be the "GemPlugin" way to register a uri with a handler. I'm not even sure that it should be associated with the plugin, in which case do I have to modify mongrel_rails ?

Thanks for any pointers or suggestions on where to look.

-carl

_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to