class BbDeploy::Config

Attributes

application_name[RW]
application_urls[RW]
deployment_channel[RW]
engineering_channel[RW]
logentries_token[RW]
slack_webhook_key[RW]

Public Class Methods

configuration() click to toggle source
# File lib/bb_deploy/config.rb, line 14
def configuration
  @configuration ||= BbDeploy::Config.new
end
configure() { |configuration| ... } click to toggle source
# File lib/bb_deploy/config.rb, line 18
def configure
  yield(configuration)
  configuration
end
configure_from_yaml(file_path) click to toggle source
# File lib/bb_deploy/config.rb, line 23
def configure_from_yaml(file_path)
  options = YAML.load(ERB.new(File.read(file_path)).result)
  configure do |config|
    %w(application_name application_urls deployment_channel engineering_channel).each do |key|
      config.send("#{key}=", options[key])
    end
  end
end
method_missing(method, *args) click to toggle source
# File lib/bb_deploy/config.rb, line 39
def method_missing(method, *args)
  configuration.send(method, *args)
end
set_heroku_fields!(phase) click to toggle source
# File lib/bb_deploy/config.rb, line 32
def set_heroku_fields!(phase)
  configure do |config|
    config.logentries_token  = BbDeploy::Heroku.get_variable(phase, 'DEPLOY_LOG_TOKEN').freeze
    config.slack_webhook_key = BbDeploy::Heroku.get_variable(phase, 'SLACK_WEBHOOK').freeze
  end
end