Added Fallback to use old hoptoad_api_key if not application.yml is not update
This commit is contained in:
parent
f4801651eb
commit
5ce4f60736
2 changed files with 11 additions and 4 deletions
|
|
@ -93,8 +93,8 @@ defaults: &defaults
|
|||
# Enable extensive logging to websocket server.
|
||||
socket_debug : false
|
||||
|
||||
# Airbreak api key, send failures to http://projectname.airbreak.io/ (Former Hoptoad)
|
||||
airbreak_api_key: ''
|
||||
# Airbrake api key, send failures to http://projectname.airbrake.io/ (Former Hoptoad)
|
||||
airbrake_api_key: ''
|
||||
|
||||
#social media setup
|
||||
facebook_app_id: ''
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
# if old key still there, use it for new API,
|
||||
# update application.yml to use airbrake_api_key instead
|
||||
# (Former Hoptoad)
|
||||
if AppConfig[:airbreak_api_key].present?
|
||||
if AppConfig[:airbrake_api_key].present?
|
||||
Airbrake.configure do |config|
|
||||
config.api_key = AppConfig[:airbreak_api_key]
|
||||
config.api_key = AppConfig[:airbrake_api_key]
|
||||
end
|
||||
elsif AppConfig[:hoptoad_api_key].present?
|
||||
puts "You're using old hoptoad_api_key, please update application.yml to use airbrake_api_key instead."
|
||||
Airbrake.configure do |config|
|
||||
config.api_key = AppConfig[:hoptoad_api_key]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue