Class: Terjira::Client::Base
Overview
Abstract class to delegate jira-ruby resource class
Direct Known Subclasses
Agile, Board, Field, Issue, Priority, Project, RapidView, Resolution, Sprint, Status, User
Constant Summary
collapse
- DEFAULT_CACHE_SEC =
60
- DEFAULT_API_PATH =
"/rest/api/2/"
- AGILE_API_PATH =
"/rest/agile/1.0/"
JQLQueryBuilder::JQL_KEYS
AuthOptionBuilder::AUTH_CACHE_KEY
Class Method Summary
collapse
build_jql_query
auth_file_cache, build_auth_options, build_auth_options_by_cached, build_auth_options_by_tty, expire_auth_options
Class Method Details
.cache(options = {}) ⇒ Object
.class_name ⇒ Object
31
32
33
|
# File 'lib/terjira/client/base.rb', line 31
def class_name
self.to_s.split("::").last
end
|
.client ⇒ Object
19
20
21
|
# File 'lib/terjira/client/base.rb', line 19
def client
@@client ||= JIRA::Client.new(build_auth_options)
end
|
.parse_body(response) ⇒ Object
66
67
68
|
# File 'lib/terjira/client/base.rb', line 66
def parse_body(response)
JSON.parse(response.body) if response.body.present?
end
|
.resource ⇒ Object
23
24
25
|
# File 'lib/terjira/client/base.rb', line 23
def resource
client.send(class_name) if client.respond_to?(class_name)
end
|
.username ⇒ Object
27
28
29
|
# File 'lib/terjira/client/base.rb', line 27
def username
client.options[:username]
end
|