Apache-independent support classes and function


Classes

class  Passenger::Application
 Represents a single Ruby on Rails or Rack application instance. More...
class  Passenger::ApplicationPool
 A persistent pool of Applications. More...
class  Passenger::ApplicationPoolServer
 Multi-process usage support for ApplicationPool. More...
class  Passenger::DummySpawnManager
 A dummy SpawnManager replacement for testing/debugging purposes. More...
class  Passenger::MessageChannel
 Convenience class for I/O operations on file descriptors. More...
class  Passenger::SpawnManager
 Spawning of Ruby on Rails/Rack application instances. More...
class  Passenger::StandardApplicationPool
 A standard implementation of ApplicationPool for single-process environments. More...
class  Passenger::TempFile
 Represents a temporary file. More...

Functions

template<typename T>
shared_ptr< T > Passenger::ptr (T *pointer)
 Convenience shortcut for creating a shared_ptr.
template<typename T>
string Passenger::toString (T something)
 Convert anything to a string.
int Passenger::atoi (const string &s)
 Converts the given string to an integer.
void Passenger::split (const string &str, char sep, vector< string > &output)
 Split the given string using the given separator.
bool Passenger::fileExists (const char *filename)
 Check whether the specified file exists.
string Passenger::findSpawnServer (const char *passengerRoot=NULL)
 Find the location of the Passenger spawn server script.
string Passenger::findApplicationPoolServer (const char *passengerRoot)
 Find the location of the Passenger ApplicationPool server executable.
string Passenger::canonicalizePath (const string &path)
 Returns a canonical version of the specified path.
bool Passenger::verifyRailsDir (const string &dir)
 Check whether the specified directory is a valid Ruby on Rails 'public' directory.
bool Passenger::verifyRackDir (const string &dir)
 Check whether the specified directory is a valid Rack 'public' directory.
bool Passenger::verifyWSGIDir (const string &dir)
 Check whether the specified directory is a valid WSGI 'public' directory.


Function Documentation

string Passenger::canonicalizePath ( const string &  path  ) 

Returns a canonical version of the specified path.

All symbolic links and relative path elements are resolved. Returns an empty string if something went wrong.

bool Passenger::fileExists ( const char *  filename  ) 

Check whether the specified file exists.

Parameters:
filename The filename to check.
Returns:
Whether the file exists.
Exceptions:
FileSystemException Unable to check because of a filesystem error.

string Passenger::findApplicationPoolServer ( const char *  passengerRoot  ) 

Find the location of the Passenger ApplicationPool server executable.

Parameters:
passengerRoot The Passenger root folder.
Returns:
An absolute path to the executable.
Exceptions:
FileSystemException Unable to access parts of the filesystem.
Precondition:
passengerRoot != NULL

string Passenger::findSpawnServer ( const char *  passengerRoot = NULL  ) 

Find the location of the Passenger spawn server script.

If passengerRoot is given, t T

Parameters:
passengerRoot The Passenger root folder. If NULL is given, then the spawn server is found by scanning $PATH. For security reasons, only absolute paths are scanned.
Returns:
An absolute path to the spawn server script, or an empty string on error.
Exceptions:
FileSystemException Unable to access parts of the filesystem.

template<typename T>
shared_ptr<T> Passenger::ptr ( T *  pointer  )  [inline]

Convenience shortcut for creating a shared_ptr.

Instead of:

    shared_ptr<Foo> foo;
    ...
    foo = shared_ptr<Foo>(new Foo());
one can write:
    shared_ptr<Foo> foo;
    ...
    foo = ptr(new Foo());

Parameters:
pointer The item to put in the shared_ptr object.

void Passenger::split ( const string &  str,
char  sep,
vector< string > &  output 
)

Split the given string using the given separator.

Parameters:
str The string to split.
sep The separator to use.
output The vector to write the output to.

template<typename T>
string Passenger::toString ( something  )  [inline]

Convert anything to a string.

Parameters:
something The thing to convert.

bool Passenger::verifyRackDir ( const string &  dir  ) 

Check whether the specified directory is a valid Rack 'public' directory.

Exceptions:
FileSystemException Unable to check because of a filesystem error.

bool Passenger::verifyRailsDir ( const string &  dir  ) 

Check whether the specified directory is a valid Ruby on Rails 'public' directory.

Exceptions:
FileSystemException Unable to check because of a system error.

bool Passenger::verifyWSGIDir ( const string &  dir  ) 

Check whether the specified directory is a valid WSGI 'public' directory.

Exceptions:
FileSystemException Unable to check because of a filesystem error.


Generated on Tue Jun 24 14:03:42 2008 for Passenger by  doxygen 1.5.5