- 25 Mar, 2021 4 commits
- 24 Mar, 2021 7 commits
-
-
Jon Wood committed
-
Because we're required to build a C extension in order to do so (don't ask, its a long story), use that C extension to make the path provided at build time available at run time.
Jon Wood committed -
Currently looks at the value of `FREEDESKTOP_MIME_TYPES_PATH` and in `/usr/share/mime/packages/freedesktop.org.xml`, which is the path you would expect to find that file at on a typical Linux system.
Jon Wood committed -
This is the first step in removing the dependency on distributing freedesktop.og.xml as part of the gem.
Jon Wood committed -
This allows it to be called at runtime.
Jon Wood committed -
Daniel Mendler committed
-
Daniel Mendler committed
-
- 30 Jan, 2021 3 commits
-
-
Daniel Mendler committed
-
Daniel Mendler committed
-
Daniel Mendler committed
-
- 14 Jul, 2020 1 commit
-
-
Ali Ismayilov committed
-
- 04 May, 2020 1 commit
-
-
Daniel Mendler committed
-
- 27 Apr, 2020 1 commit
-
-
epitron committed
-
- 28 Jan, 2020 1 commit
-
-
Daniel Mendler committed
-
- 06 Oct, 2019 1 commit
-
-
Mathieu Mahé committed
-
- 20 Dec, 2018 2 commits
-
-
Daniel Mendler committed
-
Daniel Mendler committed
-
- 12 Sep, 2018 1 commit
-
-
It turns out that the position of '[Content_Types].xml' is not fixed in this format, and whereas MS Office adds it in the beginning in general, when files are generated using Google Docs, or RubyXL, this is not necessarily true. They might add it at the end, so all these would be detected as application/zip. This fixes #39
Rosa Gutierrez committed
-
- 02 Aug, 2016 1 commit
-
-
Daniel Mendler committed
-
- 26 Jul, 2016 1 commit
-
-
Previously if we passed in an IO object which doesn't respond to #seek, MimeMagic would read the whole IO into memory. And this is exactly the type of objects that the Shrine file upload library deals with. However, we can also "seek" by blank-reading that many bytes, and always rewinding to the beginning, which is what we've implemented in this change. This change also doesn't require IOs to respond to #binmode.
Janko Marohnić committed
-
- 23 Jul, 2016 3 commits
-
-
If you speed up detection of common MIME types, you speed up MIME type detection in general.
Janko Marohnić committed -
Janko Marohnić committed
-
Previously we had to separate branches which did the same thing, one was for IOs and other was for strings. However, if we wrap the string into a StringIO, we can use the same branch for both.
Janko Marohnić committed
-
- 28 Jun, 2016 1 commit
-
- 27 May, 2016 2 commits
-
-
Rob Cherry committed
-
Rob Cherry committed
-
- 15 Feb, 2016 1 commit
-
-
Fedot Praslov committed
-
- 04 Jan, 2016 1 commit
-
-
Daniel Mendler committed
-
- 14 Aug, 2015 1 commit
-
-
Gurusamy Sarathy committed
-
- 05 Aug, 2015 1 commit
-
-
Sometimes the first instance of the word/ or ppt/ is not in the first 2000 bytes - 5000 should cover it.
Jordan Thoms committed
-
- 25 Mar, 2015 2 commits
-
-
Daniel Mendler committed
-
Daniel Mendler committed
-
- 15 Mar, 2015 2 commits
-
-
Stephen Pike committed
-
The freedesktop magic doesn't work for the Office 2007+ files, it detects them all as application/zip. I have magic which detects them, but it requires looking at 2,000 byte ranges, too much for their project (which has to support things like file browsers). Since you already warn that `by_magic` is slow, it'd be nice to support it here at least. This would allow the paperclip project to use mimemagic and stop relying on the `file` binary: - https://github.com/thoughtbot/paperclip/issues/1530#issuecomment-43375497 Support is enabled through an overlay, required with require 'mimemagic/overlay' Documentation is in the README
Stephen Pike committed
-
- 10 Nov, 2014 1 commit
-
-
Daniel Mendler committed
-
- 29 Jul, 2013 1 commit
-
-
Daniel Mendler committed
-