Changed source to use secure rubygems site
Moved main loop into the on :connect method