Created
July 18, 2012 08:13
-
-
Save kabturek/3134986 to your computer and use it in GitHub Desktop.
Simple script to check yml files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'yaml' | |
YAML::ENGINE.yamler = 'psych' # or 'syck' for old parser | |
d = Dir["./**/*.yml"] | |
d.each do |file| | |
begin | |
puts "checking : #{file}" | |
f = YAML.load_file(file) | |
rescue Exception | |
puts "failed to read #{file}: #{$!}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment