class FlowdockBuildNotifier::Configuration

Constants

FLOWDOCK_CONFIG

Attributes

email_map[R]
flow_name[R]
flowdock_user_token[R]
teamcity_password[R]
teamcity_url[R]
teamcity_user[R]

Public Class Methods

load() click to toggle source
# File lib/flowdock_build_notifier/configuration.rb, line 7
def self.load
  new(YAML.load_file(FLOWDOCK_CONFIG))
rescue Errno::ENOENT
  raise "#{FLOWDOCK_CONFIG} configuration not found"
end
new(config) click to toggle source
# File lib/flowdock_build_notifier/configuration.rb, line 16
def initialize(config)
  @flowdock_user_token = ENV['FLOWDOCK_USER_TOKEN'] || config.fetch('flowdock_user_token')
  @flow_name= config.fetch('flow_name')

  @email_map = config.fetch('email_map') { {} }

  @teamcity_url = config.fetch('teamcity_url')
  @teamcity_user = ENV['FLOWDOCK_NOTIFIER_TEAMCITY_USER'] || config.fetch('teamcity_user')
  @teamcity_password = ENV['FLOWDOCK_NOTIFIER_TEAMCITY_PASSWORD'] || config.fetch('teamcity_password')
end