Class | Juicer::Install::Base |
In: |
lib/juicer/install/base.rb
|
Parent: | Object |
Installer skeleton. Provides basic functionality like figuring out where to install, create base directories, remove unneeded directories and more housekeeping.
install_dir | [R] |
Yields depencies one at a time: class and version and returns an array of arrays: [dependency, version] where dependency is an instance and version a string.
Add a dependency. Dependency should be a Juicer::Install::Base installer class (not instance) OR a symbol/string like :rhino/"rhino" (which will be expanded unto Juicer::Install::RhinoInstaller). Version is optional and defaults to latest and greatest.
Checks if the component is currently installed.
If no version is provided the most recent version is assumed.
Returns the latest available version number. Must be implemented in subclasses. Raises an exception when called directly.
Uninstalls the given version of the component.
If no version is provided the most recent version is assumed.
If there are no more files left in INSTALLATION_PATH/<path>, the whole directory is removed.
This method takes a block and can be used from subclasses like so:
def self.uninstall(install_dir = nil, version = nil) super do |home_dir, version| # Custom uninstall logic end end