<commit_before># RubyBugzilla

[![Gem Version](https://badge.fury.io/rb/ruby_bugzilla.png)](http://badge.fury.io/rb/ruby_bugzilla)
[![Build Status](https://travis-ci.org/ManageIQ/ruby_bugzilla.png)](https://travis-ci.org/ManageIQ/ruby_bugzilla)
[![Code Climate](https://codeclimate.com/github/ManageIQ/ruby_bugzilla.png)](https://codeclimate.com/github/ManageIQ/ruby_bugzilla)
[![Coverage Status](https://coveralls.io/repos/ManageIQ/ruby_bugzilla/badge.png?branch=master)](https://coveralls.io/r/ManageIQ/ruby_bugzilla)
[![Dependency Status](https://gemnasium.com/ManageIQ/ruby_bugzilla.png)](https://gemnasium.com/ManageIQ/ruby_bugzilla)

A Ruby wrapper around the python-bugzilla CLI for easy access to the Bugzilla API

## Prerequisites

python-bugzilla must be installed.

* Download python-bugzilla from https://fedorahosted.org/python-bugzilla/
* Untar the file
* Run setup.py install

python-bugzilla uses pycurl and expects it to be installed.

* Download pycurl from http://pycurl.sourceforge.net/download/
* Untar the file
* Run setup.py install

## Installation

Add this line to your application's Gemfile:

    gem 'ruby_bugzilla'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ruby_bugzilla

## Example Usage

```ruby
bz = RubyBugzilla.new("http://uri.to/bugzilla, "username", "password")
bz.login
output = bz.query(:bug_status => "NEW")<commit_msg>Add python-bugzilla installation instructions for Fedora/RHEL.<commit_after># RubyBugzilla

[![Gem Version](https://badge.fury.io/rb/ruby_bugzilla.png)](http://badge.fury.io/rb/ruby_bugzilla)
[![Build Status](https://travis-ci.org/ManageIQ/ruby_bugzilla.png)](https://travis-ci.org/ManageIQ/ruby_bugzilla)
[![Code Climate](https://codeclimate.com/github/ManageIQ/ruby_bugzilla.png)](https://codeclimate.com/github/ManageIQ/ruby_bugzilla)
[![Coverage Status](https://coveralls.io/repos/ManageIQ/ruby_bugzilla/badge.png?branch=master)](https://coveralls.io/r/ManageIQ/ruby_bugzilla)
[![Dependency Status](https://gemnasium.com/ManageIQ/ruby_bugzilla.png)](https://gemnasium.com/ManageIQ/ruby_bugzilla)

A Ruby wrapper around the python-bugzilla CLI for easy access to the Bugzilla API

## Prerequisites

python-bugzilla must be installed.

* For Fedora/RHEL
  * sudo yum install python-bugzilla
* For Mac
  * Download python-bugzilla from https://fedorahosted.org/python-bugzilla/
  * Untar the file
  * Run setup.py install

python-bugzilla uses pycurl and expects it to be installed.

* For Mac
  * Download pycurl from http://pycurl.sourceforge.net/download/
  * Untar the file
  * Run setup.py install

## Installation

Add this line to your application's Gemfile:

    gem 'ruby_bugzilla'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ruby_bugzilla

## Example Usage

```ruby
bz = RubyBugzilla.new("http://uri.to/bugzilla, "username", "password")
bz.login
output = bz.query(:bug_status => "NEW")
{'fraction_non_alphanumeric': 0.1369535519125683, 'fraction_numerical': 0.0, 'mean_word_length': 4.989775051124744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782243', 'n_tokens_mistral': 1119, 'n_tokens_neox': 985, 'n_words': 200}