Sha256: 4a9279ee1e8ebe1407f1782a1251782e0c0d47b67349411452112085d8f7642b

Contents?: true

Size: 849 Bytes

Versions: 17

Compression:

Stored size: 849 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,
      :https_proxy

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
vidar-1.13.4 lib/vidar/deploy_config.rb
vidar-1.13.3 lib/vidar/deploy_config.rb
vidar-1.13.2 lib/vidar/deploy_config.rb
vidar-1.13.1 lib/vidar/deploy_config.rb
vidar-1.13.0 lib/vidar/deploy_config.rb
vidar-1.13.0.rc1 lib/vidar/deploy_config.rb
vidar-1.12.1 lib/vidar/deploy_config.rb
vidar-1.12.0 lib/vidar/deploy_config.rb
vidar-1.11.0 lib/vidar/deploy_config.rb
vidar-1.10.0 lib/vidar/deploy_config.rb
vidar-1.9.4 lib/vidar/deploy_config.rb
vidar-1.9.3 lib/vidar/deploy_config.rb
vidar-1.9.2 lib/vidar/deploy_config.rb
vidar-1.9.1 lib/vidar/deploy_config.rb
vidar-1.9.0 lib/vidar/deploy_config.rb
vidar-1.8.0 lib/vidar/deploy_config.rb
vidar-1.8.0.rc4 lib/vidar/deploy_config.rb