fog/fog — pull request #1209 by michael-harrison (2012-10-17 05:19:50+00:00)
Title: Public URL and File Destroy

I recently started using CarrierWave and had great success using AWS for storage. Although it was successful its performance wasn't suitable for an application I was developing for the Australian market. Hence I started to have a look at Ninefold (who uses Atmos) but found Fog failed to work with CarrierWave.

I'm relatively new to cloud storage so after a few of days of research and reverse engineering I identified that the public_url method didn't seem to work as expected. I've made some changes to get it working as expected and done some rudimentary manual testing. Ideally automated testing (ie RSpec) would be more desirable but without the background in cloud storage I found it difficult to do.

I've also identified a problem with file deletion where a Fog::Storage::Atmos::NotFound exception occurs if the file doesn't exist. I figured if you wanted to delete the file then the fact it didn't exist doesn't really matter because you got what you wanted: the file is gone. To that effect I've changed the File.destroy method.

Let me know what you think.