Sha256: c168c7ef9bab441af0a96211d8251ef49bfbfbd098038b8aa7dfd19a32a64a41

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 Bytes

Contents

module Vidar
  class DeployConfig
    SUCCESS_COLOR = "008800".freeze
    FAILURE_COLOR = "ff1100".freeze
    DEFAULT_COLOR = "000000".freeze

    attr_reader :name, :url,
      :default_color, :success_color, :failure_color,
      :slack_webhook_url, :sentry_webhook_url, :honeycomb_dataset

    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]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vidar-1.7.0 lib/vidar/deploy_config.rb