recibir errores por mail

This commit is contained in:
f 2018-02-03 19:40:29 -03:00
parent b83528cd96
commit 89c5d85ba0
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 19 additions and 0 deletions

View file

@ -37,6 +37,7 @@ gem 'bootstrap', '~> 4.0.0.beta3'
gem 'jekyll' gem 'jekyll'
gem 'jquery-rails' gem 'jquery-rails'
gem 'font-awesome-rails' gem 'font-awesome-rails'
gem 'exception_notification'
group :development, :test do group :development, :test do
gem 'pry' gem 'pry'

View file

@ -94,6 +94,9 @@ GEM
erubi (1.7.0) erubi (1.7.0)
erubis (2.7.0) erubis (2.7.0)
eventmachine (1.2.5) eventmachine (1.2.5)
exception_notification (4.2.2)
actionmailer (>= 4.0, < 6)
activesupport (>= 4.0, < 6)
execjs (2.7.0) execjs (2.7.0)
ffi (1.9.18) ffi (1.9.18)
font-awesome-rails (4.7.0.2) font-awesome-rails (4.7.0.2)
@ -284,6 +287,7 @@ DEPENDENCIES
capybara (~> 2.13) capybara (~> 2.13)
dotenv-rails dotenv-rails
email_address email_address
exception_notification
font-awesome-rails font-awesome-rails
haml-rails haml-rails
jbuilder (~> 2.5) jbuilder (~> 2.5)

View file

@ -84,4 +84,18 @@ Rails.application.configure do
# Do not dump schema after migrations. # Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false config.active_record.dump_schema_after_migration = false
# Recibir por mail notificaciones de excepciones
config.action_mailer.default_url_options = { host: 'sutty.kefir.red' }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :sendmail
config.action_mailer.default_options = { from: 'sutty@kefir.red' }
config.middleware.use ExceptionNotification::Rack,
email: {
email_prefix: '[ERROR]',
sender_address: %(sutty@kefir.red),
exception_recipients: 'sysadmin@kefir.red'
}
end end