Add *.gem to gitignore
Refactor Publisher socket read logic to more durably handle heartbeats.