validator.rb 326 字节
Newer Older
张重言's avatar
张重言 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
require 'yaml'

# run `ruby validator.rb` in current directory

Dir.children('projects').each do |folder|
  begin
    path = "projects/#{folder}/imports.yml"
    YAML.load(File.read(path)) if File.exists?(path)
  rescue => exception
    puts "#{exception}"
    puts "Format wrong with projects/#{folder}/imports.yml"
  end
end