Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

ruby Bugzilla access library

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 bicho.gemspec
README.rdoc

Bicho

Introduction

Library to access bugzilla and command line tool.

Its main goal is to be clean and provide a command line tool that exposes its features.

Features

Main use case is report generation, therefore only the following features are implemented right now:

  • get bugs

  • search bugs

Plugins can be written to deal with specific bugzilla installations.

Example (API)

Client API

require 'bicho'

server = Bicho::Client.new('http://bugzilla.gnome.org')
server.get_bugs(127043).each do |bug|
  puts bug.summary
  puts bug.url
end

You can give more than one bug or a named query, or both:

server.get_bugs(127043, 432423) => [....]
server.get_bugs("Named list") => [....]
server.get_bugs("Named list", 4423443) => [....]

ActiveRecord-like API

To use the ActiveRecord like interface over the Bug class, you need first to set the Bicho common client:

require 'bicho'

Bicho.client = Bicho::Client.new('https://bugzilla.gnome.org')

Bicho::Bug.where(:product => "vala", :status => "resolved").each do |bug|
  # .. do something with bug
end

Or alternatively:

Bicho::Bug.where.product("vala").status("resolved").each do |bug|
  # .. do something with bug
end

Example (CLI)

bicho -b http://bugzilla.gnome.org show 127043

bicho -b https://bugzilla.gnome.org search --summary "crash"

bicho -b https://bugzilla.gnome.org search --help

Extending Bicho

Commands

See the Command class to implement more commands.

Known issues

  • For now bugs respond to the bugs attributtes described in

www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Bug.html, I intend to make those real attributes.

  • There is no check if an API is supported on the server side

Roadmap

  • Define the plugin hooks, right now there is one :-)

  • Shortcuts for the bugzilla URL (bicho -b bko search ..), a plugin?

Authors

  • Duncan Mac-Vicar P. <dmacvicar@suse.de>

License

Copyright © 2011 SUSE LINUX Products GmbH.

Bicho is licensed under the MIT license. See MIT-LICENSE for details.

Something went wrong with that request. Please try again.