Fixed code to account for API changes in Rubyzip gem version 1.0.0
Adapted to changes in Devise 3.1.0

For information about these changes and migrating to 3.1.0 see:

  http://blog.plataformatec.com.br/2013/08/devise-3-1-now-with-more-secure-defaults/

The devise.rb initializer now contains the secret key with which to encrypt authentication tokens saved in the database. Therefore it cannot be in the git repo anymore. There will be versions of this file (with different encription keys) for each environment. They will have to be copied by hand to the development machines and using capistrano to the servers. Also there will be another version of the file, again with a different encryption key, to be used during CI.
Use CI-specific version of devise initializer in CI environment. Copy environment-specific version of devise initializer when deploying with capistrano.

Each version of the devise initializer is intended for use in a different environment and therefore has a different encription key (for use when storing authentication tokens in database).