<commit_before># TODO update require 'ruby_bugzilla' once gem is available
# TODO require 'ruby_bugzilla'
# require '/home/jvlcek/.rvm/gems/ruby-1.9.3-p392@cfme_bz/gems/ruby_bugzilla-0.2.0/lib/ruby_bugzilla'
require 'ruby_bugzilla'

class Issue < ActiveRecord::Base
  attr_accessible :assigned_to,  :bz_id, :status, :summary, :version,
    :version_ack, :devel_ack, :doc_ack, :pm_ack, :qa_ack

  VERSION_REGEX=/cfme-[0-9]\.?[0-9]?\.?z?/

  def self.update_from_bz

    RubyBugzilla.login!

    product = "CloudForms Management Engine"
    bug_status = "NEW, ASSIGNED, POST, MODIFIED, ON_DEV, ON_QA, VERIFIED, RELEASE_PENDING"
    flag = ""
    output_format = "BZ_ID: %{id} BZ_ID_END ASSIGNED_TO: %{assigned_to} ASSIGNED_TO_END "
    output_format << "SUMMARY: %{summary} SUMMARY_END "
    output_format << "BUG_STATUS: %{bug_status} BUG_STATUS_END "
    output_format << "VERSION: %{version} VERSION_END "
    output_format << "FLAGS: %{flags} FLAGS_END "
    output_format << "KEYWORDS: %{keywords} KEYWORDS_END"

    cmd, output = RubyBugzilla.query(product, flag, bug_status, output_format)
    self.recreate_all_issues(output)
    output

  end<commit_msg>Removed stale comment regarding require ruby_bugzilla<commit_after>require 'ruby_bugzilla'

class Issue < ActiveRecord::Base
  attr_accessible :assigned_to,  :bz_id, :status, :summary, :version,
    :version_ack, :devel_ack, :doc_ack, :pm_ack, :qa_ack

  VERSION_REGEX=/cfme-[0-9]\.?[0-9]?\.?z?/

  def self.update_from_bz

    RubyBugzilla.login!

    product = "CloudForms Management Engine"
    bug_status = "NEW, ASSIGNED, POST, MODIFIED, ON_DEV, ON_QA, VERIFIED, RELEASE_PENDING"
    flag = ""
    output_format = "BZ_ID: %{id} BZ_ID_END ASSIGNED_TO: %{assigned_to} ASSIGNED_TO_END "
    output_format << "SUMMARY: %{summary} SUMMARY_END "
    output_format << "BUG_STATUS: %{bug_status} BUG_STATUS_END "
    output_format << "VERSION: %{version} VERSION_END "
    output_format << "FLAGS: %{flags} FLAGS_END "
    output_format << "KEYWORDS: %{keywords} KEYWORDS_END"

    cmd, output = RubyBugzilla.query(product, flag, bug_status, output_format)
    self.recreate_all_issues(output)
    output

  end
{'fraction_non_alphanumeric': 0.12863070539419086, 'fraction_numerical': 0.007837713231904103, 'mean_word_length': 4.695538057742782, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6157480', 'n_tokens_mistral': 878, 'n_tokens_neox': 784, 'n_words': 158}