Skip to content

Instantly share code, notes, and snippets.

@kabturek
Created July 18, 2012 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kabturek/3134986 to your computer and use it in GitHub Desktop.
Save kabturek/3134986 to your computer and use it in GitHub Desktop.
Simple script to check yml files
#!/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