Ruby Source code Auto-Formatter
There is RuboCop:
gem install rubocop
rubocop -a
It will also fix all the common mistakes.
Just use vim, in command mode press gg=G
- gg - move cursor to the beginning of your file
- = - reindent
- G - till the end of file