Add validation of yml files on startup and proper error reporting
Created by: vasilievip
We've made typo (wrong amount of spaces before preference) in gitlab.yml and this caused issues with startup of application with veeery strange error messages. Like this one:
/usr/local/lib/ruby/site_ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 16 column 3 (Psych::SyntaxError)
from /usr/local/lib/ruby/site_ruby/1.9.1/psych.rb:203:in `parse_stream'
from /usr/local/lib/ruby/site_ruby/1.9.1/psych.rb:151:in `parse'
from /usr/local/lib/ruby/site_ruby/1.9.1/psych.rb:127:in `load'
It would be really great if all config files will be validated at least for readability (with dropping invalid preferences) or even better for correctness (via schema to report on incorrect preferences) before startup.
http://stackoverflow.com/questions/287346/yaml-validation http://stackoverflow.com/questions/5060086/yaml-schema-validation