Object
# File lib/merb-exceptions/notification.rb, line 14 def initialize(details = nil) @details = details || [] Mailer.config = Merb::Plugins.config[:exceptions][:mailer_config] Mailer.delivery_method = Merb::Plugins.config[:exceptions][:mailer_delivery_method] end
# File lib/merb-exceptions/notification.rb, line 20 def deliver! deliver_web_hooks! deliver_emails! end
# File lib/merb-exceptions/notification.rb, line 32 def deliver_emails! Merb.logger.info "DELIVERING EXCEPTION EMAILS" email_addresses.each do |address| send_email(address) end end
# File lib/merb-exceptions/notification.rb, line 25 def deliver_web_hooks! Merb.logger.info "DELIVERING EXCEPTION WEB HOOKS" web_hooks.each do |address| post_hook(address) end end
# File lib/merb-exceptions/notification.rb, line 41 def email_addresses; option_as_array(:email_addresses); end
# File lib/merb-exceptions/notification.rb, line 43 def environments; option_as_array(:environments); end
# File lib/merb-exceptions/notification.rb, line 45 def params @params ||= { 'request_url' => details['url'], 'request_controller' => details['params'][:controller], 'request_action' => details['params'][:action], 'request_params' => details['params'], 'environment' => details['environment'], 'exceptions' => details['exceptions'], 'app_name' => Merb::Plugins.config[:exceptions][:app_name] } end
Generated with the Darkfish Rdoc Generator 2.