Skip to content

Commit

Permalink
Prefer text/vcard for .vcf files
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeclaghorn committed Apr 1, 2021
1 parent b504be8 commit 27fac74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/marcel/mime_type/definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@
Marcel::MimeType.extend "font/ttf", magic: [[0, "\x00\x01\x00\x00"]], extensions: %w( ttf ttc )
Marcel::MimeType.extend "application/vnd.adobe.flash.movie", magic: [[0, "FWS"], [0, "CWS"]], extensions: %w( swf )
Marcel::MimeType.extend "application/sql", extensions: %w( sql )
Marcel::MimeType.extend "text/vcard", magic: [[0, "BEGIN:VCARD"]], extensions: %w( vcf ), parents: "text/plain"
3 changes: 3 additions & 0 deletions test/fixtures/magic/text/vcard.vcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN:VCARD
VERSION:3.0
END:VCARD
3 changes: 3 additions & 0 deletions test/fixtures/name/text/vcard.vcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN:VCARD
VERSION:3.0
END:VCARD

0 comments on commit 27fac74

Please sign in to comment.