diff --git a/Gemfile b/Gemfile index 2f2501b..7056c46 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "http://gems.github.com" gem "rake", "~> 0.9.2.2" gem "rdoc", "~> 3.12" gem "rails", "2.3.18" -gem "hoptoad_notifier", "2.4.9" +gem "airbrake", :require => 'airbrake/rails' gem "libxml-ruby", "2.2.2", :require => "libxml" gem "ambethia-smtp-tls", "1.1.2", :require => "smtp-tls" gem "paperclip", "2.3.1" diff --git a/Gemfile.lock b/Gemfile.lock index e9cb2ca..421aaf1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,6 +12,10 @@ GEM activeresource (2.3.18) activesupport (= 2.3.18) activesupport (2.3.18) + airbrake (3.1.12) + activesupport + builder + json ambethia-smtp-tls (1.1.2) builder (3.0.0) cucumber (1.1.0) @@ -36,9 +40,6 @@ GEM has_scope (0.4.2) hoe (3.6.0) rake (>= 0.8, < 11.0) - hoptoad_notifier (2.4.9) - activesupport - builder inherited_resources (1.0.4) has_scope (~> 0.4.2) responders (~> 0.4.3) @@ -91,6 +92,7 @@ PLATFORMS ruby DEPENDENCIES + airbrake ambethia-smtp-tls (= 1.1.2) cucumber (= 1.1.0) cucumber-rails (= 0.3.2) @@ -101,7 +103,6 @@ DEPENDENCIES fastercsv (= 1.5.1) formtastic (~> 0.2.2) has_scope (= 0.4.2) - hoptoad_notifier (= 2.4.9) inherited_resources (= 1.0.4) jferris-mocha (= 0.9.5.0.1241126838) json_pure (= 1.4.6) diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb new file mode 100644 index 0000000..34b700f --- /dev/null +++ b/config/initializers/airbrake.rb @@ -0,0 +1,3 @@ +Airbrake.configure do |config| + config.api_key = ENV['PAIRWISE_AIRBRAKE_API_KEY'] +end diff --git a/config/initializers/hoptoad.rb b/config/initializers/hoptoad.rb deleted file mode 100644 index 236ac13..0000000 --- a/config/initializers/hoptoad.rb +++ /dev/null @@ -1,3 +0,0 @@ -HoptoadNotifier.configure do |config| - config.api_key = 'eb60e75f67c9a67558ec90b25e75dfaa' -end diff --git a/lib/tasks/airbrake_tasks.rake b/lib/tasks/airbrake_tasks.rake new file mode 100644 index 0000000..b453356 --- /dev/null +++ b/lib/tasks/airbrake_tasks.rake @@ -0,0 +1,25 @@ +# Don't load anything when running the gems:* tasks. +# Otherwise, airbrake will be considered a framework gem. +# https://thoughtbot.lighthouseapp.com/projects/14221/tickets/629 +unless ARGV.any? {|a| a =~ /^gems/} + + Dir[File.join(Rails.root, 'vendor', 'gems', 'airbrake-*')].each do |vendored_notifier| + $: << File.join(vendored_notifier, 'lib') + end + + begin + require 'airbrake/tasks' + rescue LoadError => exception + namespace :airbrake do + %w(deploy test log_stdout).each do |task_name| + desc "Missing dependency for airbrake:#{task_name}" + task task_name do + $stderr.puts "Failed to run airbrake:#{task_name} because of missing dependency." + $stderr.puts "You probably need to run `rake gems:install` to install the airbrake gem" + abort exception.inspect + end + end + end + end + +end diff --git a/lib/tasks/hoptoad_notifier_tasks.rake b/lib/tasks/hoptoad_notifier_tasks.rake deleted file mode 100644 index c87a55d..0000000 --- a/lib/tasks/hoptoad_notifier_tasks.rake +++ /dev/null @@ -1,25 +0,0 @@ -# Don't load anything when running the gems:* tasks. -# Otherwise, hoptoad_notifier will be considered a framework gem. -# https://thoughtbot.lighthouseapp.com/projects/14221/tickets/629 -unless ARGV.any? {|a| a =~ /^gems/} - - Dir[File.join(RAILS_ROOT, 'vendor', 'gems', 'hoptoad_notifier-*')].each do |vendored_notifier| - $: << File.join(vendored_notifier, 'lib') - end - - begin - require 'hoptoad_notifier/tasks' - rescue LoadError => exception - namespace :hoptoad do - %w(deploy test log_stdout).each do |task_name| - desc "Missing dependency for hoptoad:#{task_name}" - task task_name do - $stderr.puts "Failed to run hoptoad:#{task_name} because of missing dependency." - $stderr.puts "You probably need to run `rake gems:install` to install the hoptoad_notifier gem" - abort exception.inspect - end - end - end - end - -end diff --git a/vendor/cache/airbrake-3.1.12.gem b/vendor/cache/airbrake-3.1.12.gem new file mode 100644 index 0000000..627d199 Binary files /dev/null and b/vendor/cache/airbrake-3.1.12.gem differ diff --git a/vendor/cache/hoptoad_notifier-2.4.9.gem b/vendor/cache/hoptoad_notifier-2.4.9.gem deleted file mode 100644 index 149c3da..0000000 Binary files a/vendor/cache/hoptoad_notifier-2.4.9.gem and /dev/null differ -- libgit2 0.21.2