lib/crash_log.rb in crashlog-1.0.2.1 vs lib/crash_log.rb in crashlog-1.0.3

- old
+ new

@@ -1,19 +1,21 @@ $: << File.expand_path('..', __FILE__) require 'crash_log/version' + begin require 'active_support' require 'active_support/core_ext' rescue LoadError require 'activesupport' require 'activesupport/core_ext' end + require 'faraday' require 'multi_json' -require 'crash_log/railtie' if defined?(Rails::Railtie) +require 'crash_log/railtie' if defined?(Rails::Railtie) require 'crash_log/logging' module CrashLog extend Logging::ClassMethods @@ -68,10 +70,11 @@ 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 + self.reporter = CrashLog::Reporter.new(configuration) + application = reporter.announce if application info("Configured correctly and ready to handle exceptions for '#{application}'") else error("Failed to report for duty, your application failed to authenticate correctly with stdin.crashlog.io")