Class: Textus::Doctor::Check::Sentinels

Inherits:
Textus::Doctor::Check show all
Defined in:
lib/textus/doctor/check/sentinels.rb

Instance Method Summary collapse

Methods inherited from Textus::Doctor::Check

#initialize, name_key

Constructor Details

This class inherits a constructor from Textus::Doctor::Check

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/textus/doctor/check/sentinels.rb', line 5

def call
  store      = Textus::Ports::SentinelStore.new
  file_stat  = Textus::Ports::Storage::FileStat.new
  dir        = File.join(root, "sentinels")
  return [] unless file_stat.directory?(dir)

  repo_root = File.dirname(root)
  file_stat.glob(File.join(dir, "**", "*#{Textus::Ports::SentinelStore::SUFFIX}")).flat_map do |sentinel_path|
    inspect_sentinel(sentinel_path, repo_root, store, file_stat)
  end
end