lib/crash_log.rb in crashlog-1.0.0.rc1 vs lib/crash_log.rb in crashlog-1.0.0.rc2
- old
+ new
@@ -64,11 +64,11 @@
end
end
# Sends the notice unless it is one of the default ignored exceptions.
def notify_or_ignore(exception, context = {})
- send_notification(exception, context = {}) unless ignored?(exception)
+ notify(exception, context = {}) unless ignored?(exception)
end
# Print a message at the top of the applciation's logs to say we're ready.
def report_for_duty!
application = CrashLog::Reporter.new(configuration).announce
@@ -80,15 +80,19 @@
end
end
# Configure the gem to send notifications, at the very least an api_key is
# required.
- def configure(&block)
+ def configure(announce = false, &block)
if block_given?
yield(configuration)
if configuration.valid?
- report_for_duty!
+ if announce.eql?(true)
+ report_for_duty!
+ else
+ info("Configuration updated")
+ end
elsif !configuration.invalid_keys.include?(:api_key)
error("Not configured correctly. Missing the following keys: #{configuration.invalid_keys.join(', ')}")
end
end
end