From: Rob H. <for...@us...> - 2002-10-05 18:31:51
|
Update of /cvsroot/sandweb/sandweb/doc/API In directory usw-pr-cvs1:/tmp/cvs-serv7519 Modified Files: Repository.txt Added Files: Diff.txt Shell.txt Removed Files: cvs.txt Log Message: added/updated some API docs --- NEW FILE --- SandWeb::Diff This class will eventually implement "diff" functionality for SandWeb. This will give us VCS-independant formatting of diffs, and will also give us the ability to do nicely-formatted, side-by-side colorized diffs. At the moment, all this class does is colorize any "unified format" diff given to it. -------------------------------------------------------------------------------- METHOD new SYNOPSIS my $diff = $diff->new( diff => $context_diff_format-data; ); DESCRIPTION This method is a constructor. PARAMETERS diff (type: string) (required) this contains data in context diff format Default: none. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD colored_diff SYNOPSIS my $output = $diff->colored_diff(); DESCRIPTION This method colorizes and returns the data that was provided via the constructor ( green for additions, red for removals, blue for all else ). PARAMETERS None RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- --- NEW FILE --- SandWeb::Shell This class makes any and all calls to the operating system shell. It has one public method, execute, which takes a command parameter. Shell is capable of understand SandWeb-specific needs, such as running a command as a specific Unix user, or authenticating to a VCS system like CVS. -------------------------------------------------------------------------------- METHOD new SYNOPSIS my $shell = SandWeb::Shell->new( 'vcs_username' => "$vcs_username", 'vcs_password' => "$vcs_password", 'system_username' => "$system_username", 'system_password' => "$system_password", 'bindir' => "$bindir", 'system' => "$system", 'vcs' => "$vcs", 'log_obj' => $log, ); DESCRIPTION This method is a constructor. PARAMETERS bindir (type: string) (required) the full path on the local box to SandWeb's scripts, like sandweb-expect and sandweb-admin Default: none. system_username (type: string) (optional) the user's OS username Default: none. system_password (type: string) (optional) the user's OS password Default: none. vcs_username (type: string) (optional) the user's VCS username Default: none. vcs_password (type: string) (optional) the user's VCS password Default: none. system (type: boolean) (optional) system is true if the user wants to authenticate with the OS, false if not Default: none. vcs (type: boolean) (optional) system is true if the user wants to authenticate with the VCS server, false if not Default: none. log (type: SandWeb::Log) (required) log is a reference to an object based on the SandWeb::Log class Default: none. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD execute SYNOPSIS my $output = $shell->execute( command => $command, ) DESCRIPTION This method carries out execution of a shell command. It decides how to use sandweb-expect if the user wants to authenticate against the system (OS) or a VCS server. PARAMETERS command (type: string) (required) the command to be executed. Returns a hash with the result in the "output" key and the errorlevel in the "error" key. Default: none. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD pipe SYNOPSIS my $filehandle = $shell->pipe( command => $command, ) DESCRIPTION This method carries out execution of a shell command, and attaches the command to a filehandle through a pipe. PARAMETERS command (type: string) (required) the command to be executed. Returns a filehandle which is a reference to a pipe to the running command. Default: none. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- Index: Repository.txt =================================================================== RCS file: /cvsroot/sandweb/sandweb/doc/API/Repository.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- Repository.txt 4 Apr 2002 20:22:37 -0000 1.12 +++ Repository.txt 5 Oct 2002 18:31:48 -0000 1.13 @@ -1,5 +1,6 @@ SandWeb::Repository ---------------------------------------------------------------------------------METHOD +-------------------------------------------------------------------------------- +METHOD new --- cvs.txt DELETED --- |