Skip to content
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

Add CarrierWave::MagicMimeTypes #1584

Merged
merged 8 commits into from
Mar 9, 2015
Merged

Add CarrierWave::MagicMimeTypes #1584

merged 8 commits into from
Mar 9, 2015

Conversation

bensie
Copy link
Member

@bensie bensie commented Mar 4, 2015

Replacing #1559 with master merged and a few changes.

@avgerin0s
Copy link
Member

In order to fix the travis errors I think we need something like

addons:
  apt_packages:
  - libmagic-dev

in the travis.yml, I'd patch it, though since you changed the branch I don't have permission to push.

@bensie
Copy link
Member Author

bensie commented Mar 4, 2015

Haha I changed the branch yesterday for the same reason, I couldn't push :)

@avgerin0s
Copy link
Member

It's ok :) Though you could have asked me to perform the changes you wished :)

@bensie
Copy link
Member Author

bensie commented Mar 4, 2015

@eavgerinos You have to request that Travis whitelist apt packages before they can be used. :(

@avgerin0s
Copy link
Member

@bensie meh :S Then let's send them a request :) Will you do it please (since you own the project)?

@bensie
Copy link
Member Author

bensie commented Mar 4, 2015

Done: travis-ci/travis-ci#3331

@avgerin0s
Copy link
Member

Perfect!

@bensie
Copy link
Member Author

bensie commented Mar 9, 2015

@eavgerinos ruby-filemagic appears unsupported on JRuby :(

@avgerin0s
Copy link
Member

@bensie Well this is true since it has native extension in C, we can exclude it if RUBY_ENGINE is jruby. Do you want a patch for this or you are against supporting different features between different rubies?

@bensie
Copy link
Member Author

bensie commented Mar 9, 2015

I'll gladly take a patch, especially since this is an optional processor. Thanks!

@bensie
Copy link
Member Author

bensie commented Mar 9, 2015

@eavgerinos If you want, you pull this branch locally, push to your fork, and reopen the PR. Or you can open a separate PR that targets this branch. Up to you.

@avgerin0s
Copy link
Member

@bensie ok :) I'll open a PR directly to this branch, so it can be reviewed as a whole before it reach the master branch

bensie added a commit that referenced this pull request Mar 9, 2015
@bensie bensie merged commit cb1a5bf into master Mar 9, 2015
@bensie bensie deleted the eavgerinos-content-type branch March 9, 2015 19:57
mehlah pushed a commit to mehlah/carrierwave that referenced this pull request Jan 1, 2016
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)
mehlah pushed a commit to mehlah/carrierwave that referenced this pull request Jan 1, 2016
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)
mehlah pushed a commit to mehlah/carrierwave that referenced this pull request Jan 1, 2016
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)
@naaano
Copy link

naaano commented Feb 1, 2016

can someone help please update wiki pages about this? This old module is still recommended as how to set content type in 2 pages

@thomasfedb
Copy link
Contributor

@naaano Please open a new issue so we can track this properly and decide the best way to fix this problematic situation.

@carrierwaveuploader carrierwaveuploader locked and limited conversation to collaborators Feb 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants