-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added CarrierWave::MimeTypes processor for more advanced content-type guessing #372
Conversation
… guessing, with specs.
I'm interested to know any issues you're having with HEAD. Will wait to merge until you try this with a real app. |
Sounds good. I'm working on it now. |
Alrighty, as Trevor pointed out in the other issue, I wasn't completely mocking S3 with Fog properly in my specs, no clue why it worked with rubygems though. Anyway, testing for the win! I dropped this baby in my app, and it worked perfectly :-) |
Added CarrierWave::MimeTypes processor for more advanced content-type gue
Cool -- merged! |
W00t, thanks! |
A-W-E-S-O-M-E Steve! Thanks so much! When is the next release planned? :) |
Soon! Just waiting to hear confirmation that the last blocking issue was successfully fixed. |
The last blocking issue if you're wondering: #321 |
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
As requested, here's a new pull request with the commit from pull 356 that creates a new CarrierWave::MimeTypes file processor, complete with specs.
I'm still having problems getting jnicklas/carrierwave HEAD to work with my app (I'll submit a separate issue once I figure it out), so I haven't been able to do any real-world integration testing on this with my app yet.