From a55a93cb3b2eeb1b4f0d24d3b4fcb513a76f7629 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Fri, 13 Jan 2012 15:49:07 +0800 Subject: [PATCH] Add exception notification in development env --- Gemfile | 2 ++ Gemfile.lock | 5 ++++- config/environments/development.rb | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 4fe1340a..6fd6eaa1 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,8 @@ gem 'sprockets' gem 'radius' +gem 'exception_notification' + # For linux gem 'therubyracer' diff --git a/Gemfile.lock b/Gemfile.lock index fcf8f0b9..14d92fe0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,6 +69,8 @@ GEM warden (~> 1.1) diff-lcs (1.1.3) erubis (2.7.0) + exception_notification (2.5.2) + actionmailer (>= 3.0.4) execjs (1.2.9) multi_json (~> 1.0) factory_girl (2.3.2) @@ -97,7 +99,7 @@ GEM multi_json (1.0.4) orm_adapter (0.0.5) polyglot (0.3.3) - rack (1.3.5) + rack (1.3.6) rack-cache (1.1) rack (>= 0.4) rack-mount (0.8.3) @@ -196,6 +198,7 @@ DEPENDENCIES database_cleaner delorean devise + exception_notification execjs factory_girl_rails jquery-rails diff --git a/config/environments/development.rb b/config/environments/development.rb index ded9dff9..48f4d956 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -23,5 +23,22 @@ PrototypeR4::Application.configure do # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin + + config.middleware.use ExceptionNotifier, + :email_prefix => "[R4_error]", + :sender_address => %{"notifier" }, + :exception_recipients => %w{chris@rulingcom.com} + + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + :tls => true, + :enable_starttls_auto => true, + :address => "smtp.gmail.com", + :port => '587', + :domain => "smtp.gmail.com", + :authentication => "plain", + :user_name => "redmine@rulingcom.com", + :password => "rulingredmine" } + end