Class: RooOnRails::Checks::Documentation::Playbook

Inherits:
Base
  • Object
show all
Defined in:
lib/roo_on_rails/checks/documentation/playbook.rb

Constant Summary collapse

LOCATION =
'PLAYBOOK.md'.freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize, requires, #run

Methods included from Helpers

#bold, included

Constructor Details

This class inherits a constructor from RooOnRails::Checks::Base

Instance Method Details

#callObject



14
15
16
17
18
# File 'lib/roo_on_rails/checks/documentation/playbook.rb', line 14

def call
  fail! "no playbook at #{LOCATION}." if playbook_missing?
  final_fail! 'playbook still contains FIXME template sections' if playbook_unfinished?
  pass 'playbook found, legion on-call engineers thank you.'
end

#fixObject



20
21
22
23
24
25
# File 'lib/roo_on_rails/checks/documentation/playbook.rb', line 20

def fix
  FileUtils.cp(
    File.join(__dir__, 'playbook_template.md'),
    LOCATION
  )
end

#introObject



10
11
12
# File 'lib/roo_on_rails/checks/documentation/playbook.rb', line 10

def intro
  'Looking for an on-call Playbook...'
end