[Mongrel] mongrel_upload_progress & plugin question in general

Carl Lerche carl.lerche at verizon.net
Mon Jun 12 22:47:12 EDT 2006


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"

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

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060612/fef72159/attachment-0001.htm 

More information about the Mongrel-users mailing list