All Case Studies Design Development Interviews Our Way Project Management

Checker gem for Ruby & Rails development

Recently, I had a chance to contribute to a nice ruby gem called Checker. As the name suggests, It’s an utility for checking source files.

Originally posted on pewniak747.info

Recently, I had a chance to contribute to a nice ruby gem called Checker. As the name suggests, It’s an utility for checking source files.

What’s cool about it is that it’ll check files you’re committing via git for errors or unwanted phrases, and will halt the commit if the check fails. No more typos & syntax errors in your repository!

It currently supports:

  • ruby syntax
  • haml & sass
  • checking for binding.pry occurences
  • javascript & coffeescript lint
  • yaml parsing

So it’s perfect kit for day-to-day Rails development.

Installing is dead-simple via rubygems:

gem install checker

And using is even simpler. Just say checker to process staged git files:

[ RUBY ] [ HAML ] [ PRY ] Checking source/2012/08/04/Checker-gem-for-ruby-rails-development.markdown... pry -> OK, remote_pry -> OK [ COFFEESCRIPT ] [ JAVASCRIPT ] [ SASS ] [ YAML ]

It’s convenient to add checker to .git/hooks/pre-commit . That way every single commit will be processed before saving.

For some modules to work you may need to install additional executables. See the gem README for more info. I hope you find it useful!

Other Ruby on Rails related posts from our blog.

Why it is impossible to hire quality engineers in London and how to deal with it
Follow Netguru
Join our Newsletter

Scaling SaaS
READ ALSO FROM Dev
Read also
Need a successful project?
Estimate project or contact us