Configure OSEM via environment variables

Instead of reading a yaml file we get configuration from the
environment.
This commit is contained in:
Henne Vogelsang 2016-03-22 18:14:40 +01:00
parent 45c31f210f
commit ebcb2780cd
17 changed files with 39 additions and 34 deletions

View file

@ -1,7 +1,7 @@
HoptoadNotifier.configure do |config|
# Change this to some sensible data for your errbit instance
config.api_key = Rails.application.secrets.errbit_key || ''
config.host = Rails.application.secrets.errbit_host || ''
config.api_key = ENV['OSEM_ERRBIT_APIKEY'] || Rails.application.secrets.errbit_key || ''
config.host = ENV['OSEM_ERRBIT_HOST']
if config.api_key.blank? || config.host.blank?
config.development_environments = 'production development test'
else