FastCGI Wrapper for ruby

- a trick to wrap CGI in FastCGI easily

Author: Tatsuki Sugiura <[email protected]>

Licence: Ruby’s

Install:

Just copy fcgiwrap.rb to ruby's libdir or cgi's current directory.

Description:

This library was written for wrapping CGI to FastCGI without
modification.

FCGIWrap provides just FCGIWrap.each method. The method receives
a block and call it for each fcgi request. In this loop, CGI::new()
was overrided, then it will return instance of fcgi.

Usage:

Write a wrapper script.
If you want to wrap foo.cgi, write foo.fcgi like following;

------
   #!/usr/bin/ruby
   require 'fcgiwrap'
   FCGIWrap.each {
     load '/path/to/foo.cgi'
   }
------

Limitation:

Currently, FCGIWrap can not support some CGIs;
 - using global variable without initialization
 - substitution of constant in main routine of cgi
   (ruby will output warning).