Ver este sitio en EspañolIcon

GoferProjectLoader

Synopsis

GoferProjectLoader is a loader for Metacello configurations (A metacello configuration is a full project load tool, including package/project dependencies with it corresponding versions). GoferProjectLoader automatically scan projects stored on MetacelloRepository, but you can add your private repositories as well. GoferProjectLoader responsibilities include:

  • Install project versions and keep track of them.
  • Update configurations and upgrade projects (if desired).

GoferProjectLoader relies on Metacello and Gofer to perform this tasks (In fact, It can be thought as a Gofer extension to understand Metacello packages).

Installation

GoferProjectLoader should be included on future versions of Pharo and Gemstone (at least, I want to ;)), but for now you need to do:

Gofer it
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfGoferProjectLoader';
load.
(Smalltalk at: #ConfigurationOfGoferProjectLoader) project latestVersion load.

Updating

GoferProjectLoader is managed on itself, so to upgrade it’s version you need to execute:

Gofer project upgrade: 'GoferProjectLoader'.

Usage

Accessing operations

list Answers a collection with all available projects on configured repositories
search: Answers a collection of projects matching the string
managed Answers a collection of currently managed project names
availableVersionsOf:Answers a collection of available versions of project. WARNING: this command actually installs the configuration package if not present
versionOf: Answer current version of project
attributesOf: Answer current attributes of project. The answer is a Dictionary with following keys: Author, Timestamp, Description
repository: Adds a repository to current list of repositories, this repostory works just for this instance of GoferProjectLoader
repository:username:password: Same to #repository:, but also adds user identification
rememberRepository: Adds a persistent repository to current list of repositories
rememberRepository:username:password: Same to #rememberRepository:, but also adds user identification
removeRepository: Removes a persistent repository
load: load a project
load:group: load latest stable version of project, just the selected groups. A group can be a string (e.g. ’default’) or a collection of strings (e.g. #(’Core’ ’Test’)
load:version: load a specified version of project
load:version:group: load a specified version and group(s) of project
update Updates all configuration files for managed projects, and answers a list of new versions available for each project (if there is new versions)
update: Update the configuration for specified project
upgrade Upgrade all managed projects with new versions if any available. Be careful, this option can lead to a unusable image
upgrade: Upgrade specified project with latest stable version if it is newer than the version installed
upgrade:version: Upgrade specified project with specified version
upgrade:version:group: Upgrade specified project with specified version and group(s)

Examples

Gofer project list. "It will answer a list of all available projects".
Gofer project search: 'seaside'.
Gofer project load: 'Seaside28'.
Gofer project load: 'Seaside28' version: '2.8.4.3'.
Gofer project load: 'Seaside28' group: 'default'.
Gofer project load: 'Seaside28' version: '2.8.4.3' group: 'default'.
Gofer project update.
Gofer project update: 'Seaside28'.
Gofer project upgrade.
Gofer project upgrade: 'Seaside28'.

You can also prepare more complex scripts, by cascading commands:

Gofer project
repository: 'ftp://myownrepository.com/myapp'
username: 'foo'
password: 'pass';
load: 'Seaside28' version: '2.8.4.3';
load: 'Pier' version: '1.2.1';
load: 'MyApp'.