mimemagic VS mimemagic

Compare mimemagic vs mimemagic and see what are their differences.

mimemagic

Mime type detection in ruby via file extension or file content [Moved to: https://github.com/mimemagicrb/mimemagic] (by minad)

mimemagic

Mime type detection in ruby via file extension or file content (by jellybob)
Our great sponsors
  • PopRuby - Clothing and Accessories for Ruby Developers
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
mimemagic mimemagic
12 2
370 9
- -
4.1 4.1
almost 3 years ago about 3 years ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

mimemagic

Posts with mentions or reviews of mimemagic. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-03-24.
  • MimeMagic versions prior to 0.3.6 have been yanked from RubyGems and it's GPL 2.0 now
    2 projects | /r/programming | 24 Mar 2021
    pretty clear that they copied GPL code, needed to relicense as GPL. they did a booboo https://github.com/minad/mimemagic/issues/97
    2 projects | /r/programming | 24 Mar 2021
    7 projects | /r/ruby | 24 Mar 2021
    His initial commit from 12 years ago referred to ‘shared-mime-info’ in this line: Blame: https://github.com/minad/mimemagic/blame/master/script/freedesktop.org.xml
    7 projects | /r/ruby | 24 Mar 2021
    Now I'm not a lawyer and the above is just a silly example. Most notably in the real case here it seems both the copyright holder and the Gem author are reasonable people, with their communication being reasonable and respectful (see here).
    7 projects | /r/ruby | 24 Mar 2021
  • Removed Gem “Breaks” Rails ActiveStorage
    10 projects | news.ycombinator.com | 24 Mar 2021
    I guess this is subjective (though maybe not legally), but this lookup table of extensions to mimetypes doesn't feel like GPL "software". It's just a description of other software conventions using the GPLed source as a reference: https://github.com/minad/mimemagic/blob/master/lib/mimemagic...
    10 projects | news.ycombinator.com | 24 Mar 2021
    Not so fast in that claim.

    First of all the infringing file is https://github.com/minad/mimemagic/blob/master/script/freede.... Sure, it is in XML. But it contains a tremendous amount of free-form text, specific sets of pattern matching rules for the data types, and so on. It is a compilation of sometimes original research on the best ways to detect file types. Ruby has other mime libraries. The reason why this one was chosen is that its detection algorithms make better choices. And the reason that they make better choices is that they copied the decision rules from a GPLed project.

    But even if it were a simple compilation, it still is not guaranteed that there is no copyright. See https://en.wikipedia.org/wiki/Copyright_in_compilation for an introductory article on what can and can't be copyrighted about a compilation. And one of the elements that matters is creativity in the selection of the material. A set of rules with a lot of "look for this" while leaving out various reasonable thats that don't work so well shows considerable creativity.

    That said, a judge may decide otherwise. You never know until a judge decides. But I would not presume that there is no copyright interest to be had here.

    10 projects | news.ycombinator.com | 24 Mar 2021
    One thing I am not sure is why such a radical action was taken so quickly without thinking carefully first? It's not like a lawsuit was threatened or something. The original request in https://github.com/minad/mimemagic/issues/97 that you linked to was very polite and professional.

    1) A time extension to remove the GPLed code could be politely requested. I know that the copyright belongs to all contributors but getting on good terms with the maintainer could be a solid first step. I think just opening a PR with that file deleted (and tests failing) could have been interpreted as a willingness to comply with the request in good faith.

    2) A request to relicense the XML file in question under LGPL could have been sent to the original project (could be problem without CLAs, but still worth a try). Then the library could have been relicensed under LGPL.

    3) Gem users could have been notified. Some prominent people could have helped with (1) and joined a kind request (2) to the original project.

    At least that's how we'd (try to) handle it on our Eclipse-based project (though we have a GPL code scanning for releases in the first place) if such situation arose. Anyway, talking to people first before doing something quickly is often a good idea.

    10 projects | news.ycombinator.com | 24 Mar 2021
    The reason this is happening is not obvious without reading https://github.com/minad/mimemagic/issues/97

    > I've historically been the maintainer of shared-mime-info for around 15 years, and script/freedesktop.org.xml looks like it's a copy of the database shipped with shared-mime-info, which is released under the GPL, with shared-mime-info's translators work merged in, and the GPL header removed.

    > The license that you're shipping mimemagic under (MIT) isn't compatible with shared-mime-info's.

    Seems like quite a reasonable request, even if folk don’t like the results.

    ..and to be clear, I’m quite sure that rolling back to the commit before the license change does exactly nothing to address the issue.

    You don’t magically get your MIT license back by forking before the license change was added, that’s not how it works.

    10 projects | news.ycombinator.com | 24 Mar 2021
    TL;DR

    This unfortunate chain of events is rooted in licensing issue: https://github.com/minad/mimemagic/issues/97

    Mimemagic got its MIME tables generated from freedesktop.org.xml, which is licensed under GPL2, and result was put in source control with permissive MIT license. All prior 0.3.6 mimemagic versions violated the GPL2 license.

    The author of mimemagic couldn't change the pre-0.3.6 versions so they simply deleted them.

    Unfortunately "the fix" has broken the dependent projects and such have to either:

mimemagic

Posts with mentions or reviews of mimemagic. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-03-29.

What are some alternatives?

When comparing mimemagic and mimemagic you can also consider the following projects:

gemstash - A RubyGems.org cache and private gem server

Ruby on Rails - Ruby on Rails

savant-core - This is the main project for the Savant build tool

compliance-backend - :construction: Insights Compliance backend gets reports, and offers everything to know about them through an API

mimemagic - Mime type detection in ruby via file extension or file content

mimemagic - Powerful and versatile MIME sniffing package using pre-compiled glob patterns, magic number signatures, XML document namespaces, and tree magic for mounted volumes, generated from the XDG shared-mime-info database.

rupy - HTTP App. Server and JSON DB - Shared Parallel (Atomic) & Distributed