Upgrade gem dependencies
Fix rubocop warnings

* Change raise to fail when the purpose is to fail, rather than
  raising an exception that will be caught and handled or reraised.