thoughtbot/paperclip — pull request #1496 by stereoscott (2014-03-24 01:03:33+00:00)
Title: Fog: Add fog_encryption option; honor url protocol when generating expiring_url

Two features to enhance security when using fog:

1. Add a fog_encryption option pass encryption option to fog. This follows a similar pattern to the s3 provider implementation, and has the added benefit of relying on fog to set the proper header for whatever provider may be in use (see [fog's implementation here](https://github.com/fog/fog/blob/41fddec67d6f4ee02e3b0f9d6de48b12e8ecaa37/lib/fog/aws/models/storage/file.rb#L188)).

2. Recognize the url protocol when generating an expiring url instead of always using `get_http_url` which could result in duplicate protocols when using fog_host and prevent secure urls. This addresses https://github.com/thoughtbot/paperclip/issues/1112.