Validate templates and ruby files

This patch adds validation for ruby files and templates while also
providing an extremely minimal set of spec tests.