Class: TicketAbstractorClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ticket_abstractor_client/configuration.rb

Constant Summary collapse

DEFAULT_JIRA_META_EXPIRATION_PERIOD =

1 week

604800
SNOW_DISPLAY_VALUES_LIST =
[
  SNOW_DISPLAY_VALUE_ALL = :all,
  SNOW_DISPLAY_VALUE_TRUE = true,
  SNOW_DISPLAY_VALUE_FALSE = false
].freeze
DEFAULT_SNOW_DISPLAY_VALUE =
SNOW_DISPLAY_VALUE_FALSE
DEFAULT_SSL_OPTIONS =
{ verify_ssl: true }.freeze
DEFAULT_TRACE_COMMUNICATIONS =
false

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#jira_fields_meta_hashObject

Returns the value of attribute jira_fields_meta_hash.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def jira_fields_meta_hash
  @jira_fields_meta_hash
end

#jira_meta_expiration_periodObject

Returns the value of attribute jira_meta_expiration_period.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def jira_meta_expiration_period
  @jira_meta_expiration_period
end

#security_tokenObject

Returns the value of attribute security_token.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def security_token
  @security_token
end

#snow_display_valueObject

Returns the value of attribute snow_display_value.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def snow_display_value
  @snow_display_value
end

#ssl_optionsObject

Returns the value of attribute ssl_options.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def ssl_options
  @ssl_options
end

#ticket_abstractor_urlObject

Returns the value of attribute ticket_abstractor_url.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def ticket_abstractor_url
  @ticket_abstractor_url
end

#trace_communicationsObject

Returns the value of attribute trace_communications.



3
4
5
# File 'lib/ticket_abstractor_client/configuration.rb', line 3

def trace_communications
  @trace_communications
end

Instance Method Details

#jira_fields_meta(endpoint = nil) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'lib/ticket_abstractor_client/configuration.rb', line 30

def jira_fields_meta(endpoint = nil)
  @jira_fields_meta_hash ||= {}

  if endpoint.present?
    @jira_fields_meta_hash[endpoint.to_sym] ||= ClientHelper.get_jira_fields_meta(endpoint)[endpoint.to_sym]
  else
    @jira_fields_meta_hash ||= ClientHelper.get_jira_fields_meta
  end
end

#jira_tickets_filter_classObject



20
21
22
# File 'lib/ticket_abstractor_client/configuration.rb', line 20

def jira_tickets_filter_class
  @jira_tickets_filter_class.presence
end

#jira_tickets_filter_class=(filter_class) ⇒ Object



24
25
26
27
28
# File 'lib/ticket_abstractor_client/configuration.rb', line 24

def jira_tickets_filter_class=(filter_class)
  raise_configuration_error(filter_class) unless filter_class < Base::TicketsFilter

  @jira_tickets_filter_class = filter_class
end

#snow_tickets_filter_classObject



52
53
54
# File 'lib/ticket_abstractor_client/configuration.rb', line 52

def snow_tickets_filter_class
  @snow_tickets_filter_class.presence
end

#snow_tickets_filter_class=(filter_class) ⇒ Object



56
57
58
59
60
# File 'lib/ticket_abstractor_client/configuration.rb', line 56

def snow_tickets_filter_class=(filter_class)
  raise_configuration_error(filter_class) unless filter_class < Base::TicketsFilter

  @snow_tickets_filter_class = filter_class
end