Class: Textus::Doctor::Check::Schemas
- Inherits:
-
Textus::Doctor::Check
- Object
- Textus::Doctor::Check
- Textus::Doctor::Check::Schemas
- Defined in:
- lib/textus/doctor/check/schemas.rb
Instance Method Summary collapse
Methods inherited from Textus::Doctor::Check
Constructor Details
This class inherits a constructor from Textus::Doctor::Check
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/textus/doctor/check/schemas.rb', line 5 def call out = [] store.manifest.entries.each do |entry| next if entry.schema.nil? sp = File.join(store.root, "schemas", "#{entry.schema}.yaml") next if File.exist?(sp) out << { "code" => "schema.missing", "level" => "error", "subject" => entry.key, "message" => "schema '#{entry.schema}' not found at #{sp}", "fix" => "create the schema file or run 'textus schema init #{entry.schema} --from=<key>'", } end out end |