Travis Ruby 2.1 fix

https://github.com/travis-ci/travis-ci/issues/2220
Update to Ruby 1.9 hash syntax
Use single-quotes when string interpolation is not needed
Fix some indentation issues
Fix multi-line blocks syntax and introduce lambda literal syntax
Use fail instead of raise to signal exceptions
Remove redundant curly braces around hash parameters
Remove redundant returns
Remove useless commas
Use LOAD_PATH instead of $:
Fix litterals delimiters
Use Rails.logger instead of writing to stdout
Use %w for array of words
Remove a non-ascii symbol in comment
Fixe some style.
Use module_function instead of extending self
Merge pull request #390 from simonbnrd/code-cleanup

Style adjustments.
CHANGELOG update [ci skip]