Module: Newshound

Defined in:
lib/newshound.rb,
lib/newshound/railtie.rb,
lib/newshound/version.rb,
lib/newshound/scheduler.rb,
lib/newshound/que_reporter.rb,
lib/newshound/configuration.rb,
lib/newshound/transport/sns.rb,
lib/newshound/slack_notifier.rb,
lib/newshound/transport/base.rb,
lib/newshound/transport/slack.rb,
lib/newshound/daily_report_job.rb,
lib/newshound/exception_reporter.rb,
lib/generators/newshound/install/install_generator.rb

Defined Under Namespace

Modules: Generators, Transport Classes: Configuration, DailyReportJob, Error, ExceptionReporter, QueReporter, Railtie, Scheduler, SlackNotifier

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.configurationObject



16
17
18
# File 'lib/newshound.rb', line 16

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



20
21
22
# File 'lib/newshound.rb', line 20

def configure
  yield(configuration)
end

.report!Object



24
25
26
27
28
29
30
31
32
# File 'lib/newshound.rb', line 24

def report!
  slack_notifier = SlackNotifier.new
  
  exception_report = ExceptionReporter.new.generate_report
  que_report = QueReporter.new.generate_report
  
  message = format_daily_report(exception_report, que_report)
  slack_notifier.post(message)
end