Conversation
Ruby >= 3.3 (was >= 2.3) and canonical-type changes make this a major release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version bump plus regenerated lockfile pins (CI runs frozen). The release notes below are the draft GitHub Release body — the gem's changelog_uri points at Releases, so this is the changelog. Review it here in context.
Marcel 2.0.0 modernizes the toolchain, hardens the release pipeline, and teaches the content sniffer several new families of formats. It is a major release because it drops old Rubies and changes the canonical type returned for some inputs — details below so you can scan for the ones that affect you.
Breaking changes
audio/x-aac→audio/aac,audio/x-flac→audio/flac,audio/vnd.wave→audio/x-wav,text/x-yaml→application/yaml,application/x-debian-package→application/vnd.debian.binary-package,application/x-xliff+xml→application/xliff+xml. Lookups by any alias still work.image/bmp;format=compressedis now plainimage/bmp(Renameimage/bmp;format=compressedinto justimage/bmp#148)..cr2files areimage/x-canon-cr2instead ofimage/x-raw-canon(Probe common magic types within their priority band #172)..oxps) is split from XPS (Respect MIME type aliases #171).application/xml,text/html, orapplication/octet-stream.Security & hardening
A review of the detection pipeline landed as a series of PRs (#157–#164):
rake tables:check).New detection
.docx/.xlsx/.pptxand their macro-enabled variants) are identified from the ZIP central directory, regardless of which application produced them (Sniff ZIP central directories to identify OOXML documents #169).avisbrand) (Add AVIS magic to definitons #151, @mm12) and audio-only.m4afiles (Add fixture for audio only .m4a file #147).Performance
IO#seekwhere possible instead of reading and discarding, including for regexp magic (Use IO#seek when possible #144, Improvemagic_match_ioto also useseekfor regexp #145).Upgrading
Most applications need no changes beyond Ruby ≥ 3.3. If you compare Marcel's output against stored MIME types, re-check the canonical type changes above — lookups by the old aliases still resolve, but Marcel now returns the canonical name.