class Dude::ProjectManagement::Jira::Client

Attributes

client[R]
project[R]

Public Class Methods

new() click to toggle source
# File lib/dude/project_management/jira/client.rb, line 25
def initialize
  @client = JIRA::Client.new(options)
  @project = client.Project.find(Dude::SETTINGS.dig(:jira, :project, :key))
rescue StandardError
  nil
end

Public Instance Methods

fetch_current_task(id) click to toggle source
# File lib/dude/project_management/jira/client.rb, line 44
def fetch_current_task(id)
  FetchCurrentTask.new(client, id: id).call
end
fetch_current_tasks() click to toggle source
# File lib/dude/project_management/jira/client.rb, line 40
def fetch_current_tasks
  FetchCurrentTasks.new(client).call
end
get_task_name_by_id(id) click to toggle source
# File lib/dude/project_management/jira/client.rb, line 52
def get_task_name_by_id(id)
  GetTaskNameById.new(client, id: id).call
end
health_check() click to toggle source
# File lib/dude/project_management/jira/client.rb, line 56
def health_check
  @project && true
rescue StandardError
  false
end
method_missing(method, *args, &block) click to toggle source
# File lib/dude/project_management/jira/client.rb, line 36
def method_missing(method, *args, &block)
  client.send(method, *args, &block)
end
move_task_to_list(id, list) click to toggle source
# File lib/dude/project_management/jira/client.rb, line 48
def move_task_to_list(id, list)
  MoveTaskToList.new(client, id: id, list_name: list).call
end
options() click to toggle source
# File lib/dude/project_management/jira/client.rb, line 15
def options
  {
    username: Dude::SETTINGS.dig(:jira, :email),
    password: Dude::SETTINGS.dig(:jira, :token),
    site: Dude::SETTINGS.dig(:jira, :project, :url),
    context_path: '',
    auth_type: :basic
  }
end
respond_to_missing?(method_name, include_private = false) click to toggle source
# File lib/dude/project_management/jira/client.rb, line 32
def respond_to_missing?(method_name, include_private = false)
  client.respond_to_missing?(method_name, include_private)
end