Class: Vidar::DeployConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/vidar/deploy_config.rb

Constant Summary collapse

SUCCESS_COLOR =
"008800".freeze
FAILURE_COLOR =
"ff1100".freeze
DEFAULT_COLOR =
"000000".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ DeployConfig

Returns a new instance of DeployConfig.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vidar/deploy_config.rb', line 12

def initialize(options)
  @name = options.fetch(:name)
  @url = options.fetch(:url, nil)

  @default_color = options.fetch(:default_color, DEFAULT_COLOR)
  @success_color = options.fetch(:success_color, SUCCESS_COLOR)
  @failure_color = options.fetch(:failure_color, FAILURE_COLOR)

  @slack_webhook_url = options[:slack_webhook_url]
  @sentry_webhook_url = options[:sentry_webhook_url]
  @honeycomb_dataset = options[:honeycomb_dataset]

  @https_proxy = options[:https_proxy]
end

Instance Attribute Details

#default_colorObject (readonly)

Returns the value of attribute default_color.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def default_color
  @default_color
end

#failure_colorObject (readonly)

Returns the value of attribute failure_color.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def failure_color
  @failure_color
end

#honeycomb_datasetObject (readonly)

Returns the value of attribute honeycomb_dataset.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def honeycomb_dataset
  @honeycomb_dataset
end

#https_proxyObject (readonly)

Returns the value of attribute https_proxy.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def https_proxy
  @https_proxy
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def name
  @name
end

#sentry_webhook_urlObject (readonly)

Returns the value of attribute sentry_webhook_url.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def sentry_webhook_url
  @sentry_webhook_url
end

#slack_webhook_urlObject (readonly)

Returns the value of attribute slack_webhook_url.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def slack_webhook_url
  @slack_webhook_url
end

#success_colorObject (readonly)

Returns the value of attribute success_color.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def success_color
  @success_color
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/vidar/deploy_config.rb', line 7

def url
  @url
end