Add API for working with data from a package repository.

Review Request #7693 — Created Oct. 11, 2015 and submitted — Latest diff uploaded

Information

rbpkg
master

Reviewers

This introduces a set of classes for serializing/deserializing package
data stored in a repository, and classes for interacting with the
repository. It can be used to query packages, the available versions,
installation instructions, and more.

Each entry in the repository is a PackageBundle, which bundles together
a list of channels (PackageChannel). Each of these manages state for a
range of versions (1.0.x, 1.5.x, 2.0.x, etc.), and may also be mapped to
one or more aliases (beta, stable, etc.).

Each channel lists all available releases (PackageChannel), and also
contains rules (PackageRules) on how to install any given version.

These objects are populated with data from the repository through
deserialization class methods that they provide. That data comes from a
PackageDataLoader subclass, which knows how to fetch and deserialize
JSON data from a backend (the main package repository, a testing
repository, etc.).

Currently, there's no data loader implemented to talk to any
HTTPS-backed repository, nor are there any classes for
managing/installing packages beyond fetching data on them. Those will
come in future changes.

Unit tests pass.

Implemented a test command locally, and used it to introspect package data.

    Loading...