Add CodeClimate and TravisCI badges
Add ruby-head to travis
Extract agent funcionality