yamllint is a super basic rails app that wraps the ya2yaml gem to provide yaml syntax checking and prettification.
There are probably a million better ways to do this but it seems to work, check out yamllint.com for an example.
yamllint is released under the MIT license: