API Classes
require 'buildmaster/cotta'
- Cotta: The factory class that is backed by different systems and also handles the shell processing.
- CottaFile: The class that represents the file in the system.
- CottaDiretory: The class that represents the directory in the system
Different Systems
Cotta objects can be backed by InMemroySystem and PhysicalSystem.
BuildMaster::InMemorySystem
require 'buildmaster/cotta/in_memory_system'InMemorySystem is the one that saves everything in the memory so that it does not depend on your local file system and does not require clean up.
BuildMaster::PhysicalSystem
PhylicalSystem is the default system used by Cotta. It delegates all the operations into the ruby file classes like
File, FileUtil and FileTest
Shell
You can use Cotta to help you handle launching programs through the shell method. It will check the return
value of the program automatically and throw exception if it exits with a value other than 0.
If a block is provided, it will be called with the io to the program. If not, the output will be recorded and returned upon finish of the program. So if it is a program that will generate lots of output, make sure that you provide an IO handler