Skip to content

Instantly share code, notes, and snippets.

@r0h1t4sh
r0h1t4sh / validate_ymls.rb
Last active April 21, 2016 20:53
Recursively validate yml files in a directory using ruby
require 'yaml'
if ARGV.length != 1
puts "Usage: ruby validate_ymls.rb directory_absolute_path"
exit!
end
base_path = ARGV[0].chomp("/")
base_dir = Dir.glob("#{base_path}/**/*.yml")
base_dir.each do |file_name|