Fixed ruby 1.9 compatibility errors.
Added Travis CI and Code Climate badges.