The debci Ruby API

The main entry point of the API is the Debci::Repository class. It will allow you to find objects representing specific packages, and from there to test run results.

Accessing packages

require 'debci'
repository =

With a repository object, you can obtain Debci::Package objects:

package = repository.find_package('rails-3.2')

Obtaining data for a given package

With a Debci::Package object, you can obtain the current status with the status method. This method will return a table with architectures on rows, suites on columns, and a status object in each cell.

status_table = package.status

Obtaining package suites and architectures

A Debci::Package object will give the suites and architectures it is currently available on through the suites and architectures methods.

puts package.suites
puts package.architectures

Getting package news

The news method will return a news feed for that package, listing test runs where the package status changed from pass to fail or the other way around.

news =

news.each do |item|
  puts item.headline

Finding package failures (Overall Status)

The failures method returns an array of suite/architectures that the package is failing. If there are no failures, nothing is returned.

failures = package.failures

if failures
  puts failures
  puts 'Passing everywhere'

Getting test history

The history method obtains a package`s test history on a specific suite and architecture. This method will return an array of Debci::Status objects where each object represents one test entry.

history = package.history('unstable', 'amd64')


history.each do |entry|
  puts 'Version: ' + entry.version
  puts 'Date: ' +
  puts 'Status: ' + entry.status

See the documentation for the Debci::Package class for more information.