Class: Dev::Jira::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/firespring_dev_commands/jira.rb

Overview

Config object for setting top level jira config options “points_field_name” is the field holding the value for points on a story. If this is not present, all points will default to 0 “user_lookup_list” should be an array of Jira::User objects representing the usernames, ids, etc for all jira users

This is a bit clumsy but currently the jira api only returns the user id with issues
and there is no way to query this information from Jira directly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/firespring_dev_commands/jira.rb', line 25

def initialize
  Dotenv.load(CONFIG_FILE) if File.exist?(CONFIG_FILE)

  self.username = ENV.fetch(JIRA_USERNAME, nil)
  self.token = ENV.fetch(JIRA_TOKEN, nil)
  self.url = ENV.fetch(JIRA_URL, nil)
  self.points_field_name = nil
  self.expand = []
  self.user_lookup_list = []
  self.read_timeout = 120
  self.http_debug = false
end

Instance Attribute Details

#expandObject

Returns the value of attribute expand

Returns:

  • (Object)

    the current value of expand



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def expand
  @expand
end

#http_debugObject

Returns the value of attribute http_debug

Returns:

  • (Object)

    the current value of http_debug



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def http_debug
  @http_debug
end

#points_field_nameObject

Returns the value of attribute points_field_name

Returns:

  • (Object)

    the current value of points_field_name



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def points_field_name
  @points_field_name
end

#read_timeoutObject

Returns the value of attribute read_timeout

Returns:

  • (Object)

    the current value of read_timeout



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def read_timeout
  @read_timeout
end

#tokenObject

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def token
  @token
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def url
  @url
end

#user_lookup_listObject

Returns the value of attribute user_lookup_list

Returns:

  • (Object)

    the current value of user_lookup_list



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def user_lookup_list
  @user_lookup_list
end

#usernameObject

Returns the value of attribute username

Returns:

  • (Object)

    the current value of username



24
25
26
# File 'lib/firespring_dev_commands/jira.rb', line 24

def username
  @username
end