| Class | PointyHairedBoss |
| In: |
bin/phb.rb
|
| Parent: | Object |
A Pointy-Haired Boss:
CAUTION:
| dependencies_loaded | [RW] | Map keys are project names. Values are Arrays of project or library names. |
| library_map | [RW] | Map keys are project names. Values are Arrays of project or library names. |
| project_map | [RW] | Map keys are project names. Values are Arrays of project or library names. |
| project_stack | [RW] | Map keys are project names. Values are Arrays of project or library names. |
| vars | [RW] | Map keys are project names. Values are Arrays of project or library names. |
Three ways to execute a command synchronously, with optional result capture.
Under OS X all three of these work equally well. Under Windows, all three work when tested in test_phb.rb, but _osExecute_backtick and _osExecute_popen raise:
"Errno::ENOEXEC: Exec format error"
when invoked from test_Rakefile_system.rb. Do not know why: the same command can be executed in a new shell. Think %x{} is synonomous with ``. Other possible implementations could possibly be based on:
open4, open3, win32/open3, Kernel.fork, Kernel.exec, IO.pipe, Kernel.open (with | as first char of fileneme)
Note: sh is defined in rake.rb: it calls Kernel::system.
Recursively prepend to load path the specified directory within each required project. The path for the root project is included. This is necessary if code is to be accessed without installation. Projects we depend upon are prepended first: the path for the specified project is prepended last (that way it can override the stuff it depends on).
Returns the local part of the project name (not the complete path) Argument can be"
the path (absolute or project-relative) to a rakefile
nil, if invoked within the project directory.
Returns the absolute path for file external to the projects, but within DevBase. directoryName is a Symbol within DevRootRelativeDirs
Returns the absolute path for a file internal to the project. directoryName is a Symbol within ProjectRelativeDirs projectName and fileName are local (not absolute)
Similar to File.join, except:
Recursively load dependency information It’s recursive because dependencies.rb invokes requires_projects. This is identical to _load_dependencies, except that this will only execute once.
Given an absolute path to a file within a project, strips off the prefix up to and including the directory that holds all the projects. Returns nil if the pathString does not start with the absolute path common to all projects.
Runs rakefile for specified project, with the specified taskName If projectName is nil, uses the DevRoot Rakefile ProjectName can also be an absolute unix path to the project’s directory. Absolute paths work under Windows, but they need to be unix paths that begin with ’/’. Caution: under Windows (but not OS X) this sometimes seems to fail to execute, unless pipeTo is provided. Have not adequately investigaged. The regression tests all include pipeTo
Runs rakefile with specified taskName for all required projects: optionally also run for the root project.
Most of the time we don’t care about which library is required for what project, and we don’t want duplicates
Sometimes we don’t care about the order of the required projects. extras, if specified, is an Array of names of additonal projects that will be incorporated into the list.
Execute a one-arg block for each (recursively determined) required project name. The required projects are visited before the named project.