Convert Ruby 1.8 to 1.9 Hash Syntax

In vim, for an entire file:

:%s/:\([^ ]*\)\(\s*\)=>/\1:/g

In the shell, for an entire project:

perl -pi -e 's/:([\w\d_]+)(\s*)=>/\1:/g' **/*.rb

Now, instead of those old-school hashes like this:

get '/', :agent => MOBILE_BROWSERS do

You’ll have new-school hashes like this:

get '/', agent: MOBILE_BROWSERS do

Hound automatically reviews Ruby, JavaScript, CoffeeScript, and SCSS code in your GitHub pull requests and comments on style violations. It is free for open source repos and $12/month per private repo.