RiotGames/ridley — pull request #82 by promisedlandt (2013-03-21 14:33:50+00:00)
Title: Improved syntax checker error output

Hi,

I made two commits to change the syntax checker error messages.

The first one shows the cookbook version only once in the error message, instead of twice:
Before: Ridley::Errors::CookbookSyntaxError Invalid template files in
cookbook: ridley_test-0.1.0 (0.1.0).
After: Ridley::Errors::CookbookSyntaxError Invalid template files in
cookbook: ridley_test (0.1.0).

I think it simply increases readability.

The second one shows the actual syntax check errors on a failed check:
Before: Ridley::Errors::CookbookSyntaxError Invalid template files in
cookbook: ridley_test (0.1.0).
After: Erb template templates/default/defect.erb has a syntax error:
-:1: syntax error, unexpected '>'
Ridley::Errors::CookbookSyntaxError Invalid template files in cookbook:
ridley_test (0.1.0).

This might get ugly with a lot of syntax errors, but we should at least point to user to file with the error.

The third commit includes a tiny refactor which imo improves readability, but that's arguable.

Since these aren't strictly improvements, let me know if anything should be changed.