Class: Jira
- Inherits:
-
Object
- Object
- Jira
- Defined in:
- lib/jira.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Jira
constructor
A new instance of Jira.
- #query(jql) ⇒ Object
Constructor Details
#initialize(config) ⇒ Jira
Returns a new instance of Jira.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/jira.rb', line 6 def initialize(config) @jira = Jira4R::JiraTool.new(2, "http://#{config.jira_url}") @jira.login(config.username, config.password) @types = {} @custom_fields = {} @jira.getIssueTypes().each {|t| @types[t.id] = t.name } @jira.getCustomFields().each { |f| @custom_fields[f.id] = f.name.downcase.gsub(/ /, '_') } end |