Skip to content

Commit

Permalink
added exception report email address to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed May 21, 2010
1 parent e22f7cc commit e05151b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions config/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
Merb.add_mime_type(:ics, :to_ics, %w[text/calendar])
Merb::Mailer.delivery_method = :sendmail
require Merb.root / "lib/rubytime/misc"

Merb::Plugins.config[:exceptions] = {
:email_addresses => ['jakub.suder@llp.pl'],
:app_name => "RubyTime",
:environments => ['production', 'staging'],
:email_from => "exceptions@rt.llp.pl",
:mailer_config => nil,
:mailer_delivery_method => :sendmail
}
end

Merb::BootLoader.after_app_loads do
Expand All @@ -38,5 +29,17 @@
Rubytime::Misc.check_activity_roles

require Merb.root / "config/local_config.rb"

if Rubytime::CONFIG[:exception_report_email]
Merb::Plugins.config[:exceptions] = {
:email_addresses => [Rubytime::CONFIG[:exception_report_email]],
:app_name => "RubyTime",
:environments => ['production', 'staging'],
:email_from => Rubytime::CONFIG[:mail_from],
:mailer_config => nil,
:mailer_delivery_method => :sendmail
}
end

Dir[ Merb.root / "lib/extensions/*.rb" ].each { |filename| require filename }
end
1 change: 1 addition & 0 deletions config/local_config.rb.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Rubytime::CONFIG[:mail_from] = "rubytime@localhost"
Rubytime::CONFIG[:site_url] = "http://localhost:4000"
Rubytime::CONFIG[:timesheet_report_addressee_email] = "email@localhost"
Rubytime::CONFIG[:exception_report_email] = "email@localhost"

0 comments on commit e05151b

Please sign in to comment.