diff --git a/Gemfile b/Gemfile index 546de70bcab81c4fe7a847bf095622fe18a73822..d6f77787c1bbf78299aff9606460f01222cd656f 100644 --- a/Gemfile +++ b/Gemfile @@ -28,7 +28,7 @@ gem 'messagebus_ruby_api', '1.0.1' group :production do # we don't install these on travis to speed up test runs # reporting - gem 'hoptoad_notifier' + gem 'airbrake' gem 'newrelic_rpm' gem 'rack-google-analytics', :require => 'rack/google-analytics' gem 'rack-piwik', :require => 'rack/piwik' diff --git a/Gemfile.lock b/Gemfile.lock index cf74a0edf201b8c7e08ae0d08ee6e48fda3cbfcc..7d032c5a66b8785146b53c50ef009f72a0c03d68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,6 +90,9 @@ GEM activesupport (>= 3.0.0) rack (>= 1.1.0) addressable (2.2.4) + airbrake (3.0.9) + activesupport + builder archive-tar-minitar (0.5.2) arel (2.0.10) bcrypt-ruby (2.1.4) @@ -199,9 +202,6 @@ GEM heroku (>= 2) rails (>= 2) highline (1.6.9) - hoptoad_notifier (2.4.11) - activesupport - builder i18n (0.5.0) i18n-inflector (2.6.3) i18n (>= 0.4.1) @@ -424,6 +424,7 @@ DEPENDENCIES acts-as-taggable-on! acts_as_api addressable (= 2.2.4) + airbrake bundler (>= 1.0.0) capistrano (~> 2.9.0) capistrano-ext (= 1.2.1) @@ -450,7 +451,6 @@ DEPENDENCIES haml heroku heroku_san - hoptoad_notifier http_accept_language! i18n-inflector-rails (~> 1.0) jammit (= 0.6.5) diff --git a/config/application.yml.example b/config/application.yml.example index f9780de6f5cdae5c053fa48c14019b7c4c5e45f2..091ec031f09e6cafd61fa99401a21db5b05a88f7 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -98,8 +98,8 @@ defaults: &defaults # Enable extensive logging to log/{development,test,production}.log debug: false - # Hoptoad api key, send failures to Hoptoad - hoptoad_api_key: '' + # Airbrake api key, send failures to http://projectname.airbrake.io/ (Former Hoptoad) + airbrake_api_key: '' #social media setup facebook_app_id: '' diff --git a/config/deploy.rb b/config/deploy.rb index 44ab9053c24ddf3ff817e01e6e755ca30b7858fd..8d811d5d9d9720e180345e95992e07c70962364a 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -7,7 +7,7 @@ set :config_yaml, YAML.load_file(File.dirname(__FILE__) + '/deploy_config.yml') require './config/cap_colors' require 'bundler/capistrano' require './config/boot' -require 'hoptoad_notifier/capistrano' +require 'airbrake/capistrano' set :bundle_dir, '' set :stages, ['production', 'staging'] diff --git a/config/initializers/airbreak.rb b/config/initializers/airbreak.rb new file mode 100644 index 0000000000000000000000000000000000000000..904db41d0e01549d2eb6712830effcface883264 --- /dev/null +++ b/config/initializers/airbreak.rb @@ -0,0 +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[:airbrake_api_key].present? + Airbrake.configure do |config| + 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 diff --git a/config/initializers/hoptoad.rb b/config/initializers/hoptoad.rb deleted file mode 100644 index 7b219921b8a4f6fa7fbfe4343d9b751ac232a8f8..0000000000000000000000000000000000000000 --- a/config/initializers/hoptoad.rb +++ /dev/null @@ -1,5 +0,0 @@ -if AppConfig[:hoptoad_api_key].present? - HoptoadNotifier.configure do |config| - config.api_key = AppConfig[:hoptoad_api_key] - end -end