jnicklas/carrierwave — pull request #831 by bquorning (2012-09-06 09:36:27+00:00)
Title: Fog local file absolute path

* `CarrierWave::SanitizedFile#path` returns an absolute path.
* `CarrierWave::Storage::Fog::File#path` returns a relative path (the `store_path`, actually).

This is fine when using Fog to store on S3 etc., but problematic when storing on local filesystem (`fog_credentials[:provider] == 'Local'`), as `CarrierWave::Uploader::Url#url` tries to remove `root` from `current_path` and returns a non-existing path.

May be that it’s `CarrierWave::Storage::Fog::File#authenticated_url` and/or `CarrierWave::Storage::Fog::File#public_url` that need to be patched instead of `CarrierWave::Storage::Fog::File#path`?

I didn’t manage to write specs for my code changes. It seems that the Fog specs (in `fog_helper.rb`) are testing the Fog File rather than its integration with i.e. Uploader::Url. Any suggestions on how to test this are welcome.

Also, I have added (more) conditionals to the existing specs, sorry about that.