Skip to content

Instantly share code, notes, and snippets.

@bumi
Forked from jhilden/yamltester.rb
Created June 7, 2011 09:53
Show Gist options
  • Save bumi/1011972 to your computer and use it in GitHub Desktop.
Save bumi/1011972 to your computer and use it in GitHub Desktop.
YAML tester
# USAGE:
# ruby -e "$(curl -fsSL https://raw.github.com/gist/1011972/2e6ac978bc06905f60e380b5fe5abbf898b3af0a)" <directory>
# for example:
# ruby -e "$(curl -fsSL https://raw.github.com/gist/1011972/2e6ac978bc06905f60e380b5fe5abbf898b3af0a)" .
require 'rubygems'
require 'yaml'
YAML::ENGINE.yamler = 'psych'
directory = ARGV[0]
puts "checking #{directory}"
Dir["#{directory}/**/*.yml"].each do |file|
puts file
YAML.load_file file
end;0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment