Fix and publish the ruby gem.
Add retry_if and retry_success options.

Some other fixes.