jnicklas/carrierwave — pull request #996 by taavo (2013-02-24 16:40:46+00:00)
Title: Uri encode url path parts

This is an attempt to fix the longstanding issue where we generate bad urls if somebody uploads a file with a "+" (plus) character in the filename.

See: #994, #989, #986, #733 etc

Long story short I'm making sure the path parts are uri encoded before sending urls out into the world.

Notes:
* This is a breaking change because it requires that `store_dir` is always _not_ uri encoded. This seemed like a good assumption, since `store_dir` is generally a filesystem path.
* My thoughts that got me here are [here](https://github.com/jnicklas/carrierwave/issues/994#issuecomment-14009327), and earlier in the thread.
* Yes, I'm seriously reimplementing Ruby 1.9.3's deprecated URI.encode so we can use it on 2.0+. Would love an alternative.
* May have problems on windows since their directory separators are different, but I'm not sure how the existing code works on Windows anyway.

Very interested in feedback.