marcel 1.2.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -6
- data/SECURITY.md +7 -0
- data/lib/marcel/magic/definitions.rb +39 -0
- data/lib/marcel/magic/xml.rb +488 -0
- data/lib/marcel/magic/zip.rb +201 -0
- data/lib/marcel/magic.rb +204 -26
- data/lib/marcel/mime_type/definitions.rb +31 -40
- data/lib/marcel/mime_type.rb +60 -14
- data/lib/marcel/tables.rb +264 -25
- data/lib/marcel/version.rb +1 -1
- metadata +9 -19
data/lib/marcel/tables.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# This file is auto-generated. Instead of editing this file, please
|
|
4
|
-
# add MIMEs to data/custom.xml or lib/marcel
|
|
4
|
+
# add MIMEs to data/custom.xml or the definitions files under lib/marcel.
|
|
5
5
|
|
|
6
6
|
module Marcel
|
|
7
7
|
# @private
|
|
@@ -414,6 +414,7 @@ module Marcel
|
|
|
414
414
|
'grv' => 'application/vnd.groove-injector',
|
|
415
415
|
'grxml' => 'application/srgs+xml',
|
|
416
416
|
'gsf' => 'application/x-font-ghostscript',
|
|
417
|
+
'gsheet' => 'application/vnd.google-apps.spreadsheet',
|
|
417
418
|
'gslib' => 'audio/x-psf',
|
|
418
419
|
'gtar' => 'application/x-gtar',
|
|
419
420
|
'gtm' => 'application/vnd.groove-tool-message',
|
|
@@ -441,7 +442,7 @@ module Marcel
|
|
|
441
442
|
'hpgl' => 'application/vnd.hp-hpgl',
|
|
442
443
|
'hpid' => 'application/vnd.hp-hpid',
|
|
443
444
|
'hpp' => 'text/x-c++hdr',
|
|
444
|
-
'hprof' => 'application/vnd.java.hprof
|
|
445
|
+
'hprof' => 'application/vnd.java.hprof',
|
|
445
446
|
'hprof.txt' => 'application/vnd.java.hprof.text',
|
|
446
447
|
'hps' => 'application/vnd.hp-hps',
|
|
447
448
|
'hqx' => 'application/mac-binhex40',
|
|
@@ -769,7 +770,7 @@ module Marcel
|
|
|
769
770
|
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
|
|
770
771
|
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
|
771
772
|
'owl' => 'application/rdf+xml',
|
|
772
|
-
'oxps' => 'application/
|
|
773
|
+
'oxps' => 'application/oxps',
|
|
773
774
|
'oxt' => 'application/vnd.openofficeorg.extension',
|
|
774
775
|
'p' => 'text/x-pascal',
|
|
775
776
|
'p10' => 'application/pkcs10',
|
|
@@ -1360,6 +1361,7 @@ module Marcel
|
|
|
1360
1361
|
'application/onenote; format=package' => %w(onepkg), # OneNote Package
|
|
1361
1362
|
'application/onenote;format=one' => %w(one),
|
|
1362
1363
|
'application/onenote;format=onetoc2' => %w(onetoc onetoc2), # OneNote Table of Contents
|
|
1364
|
+
'application/oxps' => %w(oxps), # Open XML Paper Specification (OpenXPS)
|
|
1363
1365
|
'application/patch-ops-error+xml' => %w(xer),
|
|
1364
1366
|
'application/pdf' => %w(pdf), # Portable Document Format
|
|
1365
1367
|
'application/pgp-encrypted' => %w(pgp gpg),
|
|
@@ -1496,6 +1498,7 @@ module Marcel
|
|
|
1496
1498
|
'application/vnd.geogebra.tool' => %w(ggt),
|
|
1497
1499
|
'application/vnd.geometry-explorer' => %w(gex gre),
|
|
1498
1500
|
'application/vnd.gmx' => %w(gmx),
|
|
1501
|
+
'application/vnd.google-apps.spreadsheet' => %w(gsheet), # Google Sheets
|
|
1499
1502
|
'application/vnd.google-earth.kml+xml' => %w(kml), # Keyhole Markup Language
|
|
1500
1503
|
'application/vnd.google-earth.kmz' => %w(kmz),
|
|
1501
1504
|
'application/vnd.grafeq' => %w(gqf gqs),
|
|
@@ -1617,7 +1620,7 @@ module Marcel
|
|
|
1617
1620
|
'application/vnd.ms-word.template.macroenabled.12' => %w(dotm), # Office Open XML Document Template (macro-enabled)
|
|
1618
1621
|
'application/vnd.ms-works' => %w(wps wks wcm wdb),
|
|
1619
1622
|
'application/vnd.ms-wpl' => %w(wpl),
|
|
1620
|
-
'application/vnd.ms-xpsdocument' => %w(xps
|
|
1623
|
+
'application/vnd.ms-xpsdocument' => %w(xps), # Open XML Paper Specification
|
|
1621
1624
|
'application/vnd.msa-disk-image' => %w(msa), # Magic Shadow Archiver
|
|
1622
1625
|
'application/vnd.mseq' => %w(mseq),
|
|
1623
1626
|
'application/vnd.musician' => %w(mus),
|
|
@@ -2238,7 +2241,163 @@ module Marcel
|
|
|
2238
2241
|
'video/x-sgi-movie' => %w(movie),
|
|
2239
2242
|
'x-conference/x-cooltalk' => %w(ice), # Cooltalk Audio
|
|
2240
2243
|
}
|
|
2244
|
+
# @private
|
|
2245
|
+
# :nodoc:
|
|
2246
|
+
TYPE_ALIASES = {
|
|
2247
|
+
'application/acad' => 'image/vnd.dwg',
|
|
2248
|
+
'application/autocad_dwg' => 'image/vnd.dwg',
|
|
2249
|
+
'application/bat' => 'application/x-bat',
|
|
2250
|
+
'application/binhex' => 'application/mac-binhex40',
|
|
2251
|
+
'application/cdr' => 'application/coreldraw',
|
|
2252
|
+
'application/dwg' => 'image/vnd.dwg',
|
|
2253
|
+
'application/font-woff' => 'font/woff',
|
|
2254
|
+
'application/font-woff2' => 'font/woff2',
|
|
2255
|
+
'application/gzip-compressed' => 'application/gzip',
|
|
2256
|
+
'application/gzipped' => 'application/gzip',
|
|
2257
|
+
'application/javascript' => 'text/javascript',
|
|
2258
|
+
'application/mac-binhex' => 'application/mac-binhex40',
|
|
2259
|
+
'application/matlab-mat' => 'application/x-matlab-data',
|
|
2260
|
+
'application/ms-tnef' => 'application/vnd.ms-tnef',
|
|
2261
|
+
'application/msexcel' => 'application/vnd.ms-excel',
|
|
2262
|
+
'application/msonenote' => 'application/onenote',
|
|
2263
|
+
'application/mspowerpoint' => 'application/vnd.ms-powerpoint',
|
|
2264
|
+
'application/pgp' => 'application/pgp-encrypted',
|
|
2265
|
+
'application/photoshop' => 'image/vnd.adobe.photoshop',
|
|
2266
|
+
'application/smil' => 'application/smil+xml',
|
|
2267
|
+
'application/vnd.debian.binary-package' => 'application/x-debian-package',
|
|
2268
|
+
'application/vnd.ms-opentype' => 'application/x-font-otf',
|
|
2269
|
+
'application/vnd.ms-visio' => 'application/vnd.visio',
|
|
2270
|
+
'application/vnd.ms-word' => 'application/msword',
|
|
2271
|
+
'application/vnd.oasis.opendocument.database' => 'application/vnd.oasis.opendocument.base',
|
|
2272
|
+
'application/x-123' => 'application/vnd.lotus-1-2-3',
|
|
2273
|
+
'application/x-acad' => 'image/vnd.dwg',
|
|
2274
|
+
'application/x-arj-compressed' => 'application/x-arj',
|
|
2275
|
+
'application/x-autocad' => 'image/vnd.dwg',
|
|
2276
|
+
'application/x-cdr' => 'application/coreldraw',
|
|
2277
|
+
'application/x-coreldraw' => 'application/coreldraw',
|
|
2278
|
+
'application/x-dbm' => 'application/x-berkeley-db',
|
|
2279
|
+
'application/x-deflate' => 'application/zlib',
|
|
2280
|
+
'application/x-dwg' => 'image/vnd.dwg',
|
|
2281
|
+
'application/x-emf' => 'image/emf',
|
|
2282
|
+
'application/x-frame' => 'application/vnd.mif',
|
|
2283
|
+
'application/x-gnumeric-spreadsheet' => 'application/x-gnumeric',
|
|
2284
|
+
'application/x-gunzip' => 'application/gzip',
|
|
2285
|
+
'application/x-gzip' => 'application/gzip',
|
|
2286
|
+
'application/x-gzip-compressed' => 'application/gzip',
|
|
2287
|
+
'application/x-httpd-jsp' => 'text/x-jsp',
|
|
2288
|
+
'application/x-java' => 'application/java-vm',
|
|
2289
|
+
'application/x-java-vm' => 'application/java-vm',
|
|
2290
|
+
'application/x-javascript' => 'text/javascript',
|
|
2291
|
+
'application/x-kchart' => 'application/vnd.kde.kchart',
|
|
2292
|
+
'application/x-koan' => 'application/vnd.koan',
|
|
2293
|
+
'application/x-kpresenter' => 'application/vnd.kde.kpresenter',
|
|
2294
|
+
'application/x-kspread' => 'application/vnd.kde.kspread',
|
|
2295
|
+
'application/x-kword' => 'application/vnd.kde.kword',
|
|
2296
|
+
'application/x-mif' => 'application/vnd.mif',
|
|
2297
|
+
'application/x-mimearchive' => 'multipart/related',
|
|
2298
|
+
'application/x-ms-emz' => 'image/x-emf-compressed',
|
|
2299
|
+
'application/x-msi' => 'application/x-ms-installer',
|
|
2300
|
+
'application/x-msmetafile' => 'image/wmf',
|
|
2301
|
+
'application/x-ogg' => 'audio/vorbis',
|
|
2302
|
+
'application/x-pdf' => 'application/pdf',
|
|
2303
|
+
'application/x-rar' => 'application/x-rar-compressed',
|
|
2304
|
+
'application/x-setupscript' => 'application/inf',
|
|
2305
|
+
'application/x-speex' => 'audio/speex',
|
|
2306
|
+
'application/x-tcl' => 'text/x-tcl',
|
|
2307
|
+
'application/x-troff' => 'text/troff',
|
|
2308
|
+
'application/x-troff-man' => 'text/troff',
|
|
2309
|
+
'application/x-troff-me' => 'text/troff',
|
|
2310
|
+
'application/x-troff-ms' => 'text/troff',
|
|
2311
|
+
'application/x-unix-archive' => 'application/x-archive',
|
|
2312
|
+
'application/x-vnd.oasis.opendocument.chart' => 'application/vnd.oasis.opendocument.chart',
|
|
2313
|
+
'application/x-vnd.oasis.opendocument.chart-template' => 'application/vnd.oasis.opendocument.chart-template',
|
|
2314
|
+
'application/x-vnd.oasis.opendocument.formula' => 'application/vnd.oasis.opendocument.formula',
|
|
2315
|
+
'application/x-vnd.oasis.opendocument.formula-template' => 'application/vnd.oasis.opendocument.formula-template',
|
|
2316
|
+
'application/x-vnd.oasis.opendocument.graphics' => 'application/vnd.oasis.opendocument.graphics',
|
|
2317
|
+
'application/x-vnd.oasis.opendocument.graphics-template' => 'application/vnd.oasis.opendocument.graphics-template',
|
|
2318
|
+
'application/x-vnd.oasis.opendocument.image' => 'application/vnd.oasis.opendocument.image',
|
|
2319
|
+
'application/x-vnd.oasis.opendocument.image-template' => 'application/vnd.oasis.opendocument.image-template',
|
|
2320
|
+
'application/x-vnd.oasis.opendocument.presentation' => 'application/vnd.oasis.opendocument.presentation',
|
|
2321
|
+
'application/x-vnd.oasis.opendocument.presentation-template' => 'application/vnd.oasis.opendocument.presentation-template',
|
|
2322
|
+
'application/x-vnd.oasis.opendocument.spreadsheet' => 'application/vnd.oasis.opendocument.spreadsheet',
|
|
2323
|
+
'application/x-vnd.oasis.opendocument.spreadsheet-template' => 'application/vnd.oasis.opendocument.spreadsheet-template',
|
|
2324
|
+
'application/x-vnd.oasis.opendocument.text' => 'application/vnd.oasis.opendocument.text',
|
|
2325
|
+
'application/x-vnd.oasis.opendocument.text-master' => 'application/vnd.oasis.opendocument.text-master',
|
|
2326
|
+
'application/x-vnd.oasis.opendocument.text-template' => 'application/vnd.oasis.opendocument.text-template',
|
|
2327
|
+
'application/x-vnd.oasis.opendocument.text-web' => 'application/vnd.oasis.opendocument.text-web',
|
|
2328
|
+
'application/x-vnd.sun.xml.writer' => 'application/vnd.sun.xml.writer',
|
|
2329
|
+
'application/x-windows-installer' => 'application/x-ms-installer',
|
|
2330
|
+
'application/x-wine-extension-inf' => 'application/inf',
|
|
2331
|
+
'application/x-x509-user-cert' => 'application/x-x509-cert',
|
|
2332
|
+
'application/x-xml' => 'application/xml',
|
|
2333
|
+
'application/x-yaml' => 'text/x-yaml',
|
|
2334
|
+
'application/x-yml' => 'text/x-yaml',
|
|
2335
|
+
'application/x-zip-compressed' => 'application/zip',
|
|
2336
|
+
'application/yaml' => 'text/x-yaml',
|
|
2337
|
+
'audio/aac' => 'audio/x-aac',
|
|
2338
|
+
'audio/aiff' => 'audio/x-aiff',
|
|
2339
|
+
'audio/flac' => 'audio/x-flac',
|
|
2340
|
+
'audio/wav' => 'audio/vnd.wave',
|
|
2341
|
+
'audio/wave' => 'audio/vnd.wave',
|
|
2342
|
+
'audio/x-m4a' => 'audio/mp4',
|
|
2343
|
+
'audio/x-mp4a' => 'audio/mp4',
|
|
2344
|
+
'audio/x-mpeg' => 'audio/mpeg',
|
|
2345
|
+
'audio/x-ogg-flac' => 'audio/x-oggflac',
|
|
2346
|
+
'audio/x-ogg-pcm' => 'audio/x-oggpcm',
|
|
2347
|
+
'audio/x-realaudio' => 'audio/x-pn-realaudio',
|
|
2348
|
+
'audio/x-wav' => 'audio/vnd.wave',
|
|
2349
|
+
'drawing/dwg' => 'image/vnd.dwg',
|
|
2350
|
+
'drawing/x-dwf' => 'model/vnd.dwf',
|
|
2351
|
+
'gzip/document' => 'application/gzip',
|
|
2352
|
+
'image/cdr' => 'application/coreldraw',
|
|
2353
|
+
'image/hevc' => 'image/heic',
|
|
2354
|
+
'image/hevc-sequence' => 'image/heic-sequence',
|
|
2355
|
+
'image/ntf' => 'image/nitf',
|
|
2356
|
+
'image/vnd.dgn;ver=8' => 'image/vnd.dgn;version=8',
|
|
2357
|
+
'image/x-bmp' => 'image/bmp',
|
|
2358
|
+
'image/x-cdr' => 'application/coreldraw',
|
|
2359
|
+
'image/x-dcx' => 'image/vnd.zbrush.dcx',
|
|
2360
|
+
'image/x-dwg' => 'image/vnd.dwg',
|
|
2361
|
+
'image/x-emf' => 'image/emf',
|
|
2362
|
+
'image/x-icon' => 'image/vnd.microsoft.icon',
|
|
2363
|
+
'image/x-jb2' => 'image/x-jbig2',
|
|
2364
|
+
'image/x-ms-bmp' => 'image/bmp',
|
|
2365
|
+
'image/x-pc-paintbrush' => 'image/vnd.zbrush.pcx',
|
|
2366
|
+
'image/x-pcx' => 'image/vnd.zbrush.pcx',
|
|
2367
|
+
'image/x-psd' => 'image/vnd.adobe.photoshop',
|
|
2368
|
+
'image/x-targa' => 'image/x-tga',
|
|
2369
|
+
'image/x-wmf' => 'image/wmf',
|
|
2370
|
+
'image/xcf' => 'image/x-xcf',
|
|
2371
|
+
'message/rfc2557' => 'multipart/related',
|
|
2372
|
+
'text/properties' => 'text/x-java-properties',
|
|
2373
|
+
'text/rss' => 'application/rss+xml',
|
|
2374
|
+
'text/rtf' => 'application/rtf',
|
|
2375
|
+
'text/vnd.yaml' => 'text/x-yaml',
|
|
2376
|
+
'text/x-asm' => 'text/x-assembly',
|
|
2377
|
+
'text/x-c' => 'text/x-csrc',
|
|
2378
|
+
'text/x-dtd' => 'application/xml-dtd',
|
|
2379
|
+
'text/x-java' => 'text/x-java-source',
|
|
2380
|
+
'text/x-markdown' => 'text/markdown',
|
|
2381
|
+
'text/x-properties' => 'text/x-java-properties',
|
|
2382
|
+
'text/x-tex' => 'application/x-tex',
|
|
2383
|
+
'text/x-texinfo' => 'application/x-texinfo',
|
|
2384
|
+
'text/x-web-markdown' => 'text/markdown',
|
|
2385
|
+
'text/x-yml' => 'text/x-yaml',
|
|
2386
|
+
'text/xml' => 'application/xml',
|
|
2387
|
+
'text/xml-external-parsed-entity' => 'application/xml-external-parsed-entity',
|
|
2388
|
+
'text/xsl' => 'application/xslt+xml',
|
|
2389
|
+
'text/yaml' => 'text/x-yaml',
|
|
2390
|
+
'video/avi' => 'video/x-msvideo',
|
|
2391
|
+
'video/jpm' => 'image/jpm',
|
|
2392
|
+
'video/msvideo' => 'video/x-msvideo',
|
|
2393
|
+
'video/x-daala' => 'video/daala',
|
|
2394
|
+
'video/x-ogg-rgb' => 'video/x-oggrgb',
|
|
2395
|
+
'video/x-ogg-uvs' => 'video/x-ogguvs',
|
|
2396
|
+
'video/x-ogg-yuv' => 'video/x-oggyuv',
|
|
2397
|
+
'video/x-theora' => 'video/theora',
|
|
2398
|
+
}
|
|
2241
2399
|
TYPE_PARENTS = {
|
|
2400
|
+
'application/atom+xml' => %w(application/xml),
|
|
2242
2401
|
'application/bizagi-modeler' => %w(application/zip),
|
|
2243
2402
|
'application/dash+xml' => %w(application/xml),
|
|
2244
2403
|
'application/dif+xml' => %w(application/xml),
|
|
@@ -2258,8 +2417,10 @@ module Marcel
|
|
|
2258
2417
|
'application/onenote; format=package' => %w(application/vnd.ms-cab-compressed),
|
|
2259
2418
|
'application/onenote;format=one' => %w(application/onenote),
|
|
2260
2419
|
'application/onenote;format=onetoc2' => %w(application/onenote),
|
|
2420
|
+
'application/oxps' => %w(application/x-tika-ooxml),
|
|
2261
2421
|
'application/rdf+xml' => %w(application/xml),
|
|
2262
2422
|
'application/relax-ng-compact-syntax' => %w(text/plain),
|
|
2423
|
+
'application/rss+xml' => %w(application/xml),
|
|
2263
2424
|
'application/rtf' => %w(text/plain),
|
|
2264
2425
|
'application/sldworks' => %w(application/x-tika-msoffice),
|
|
2265
2426
|
'application/smil+xml' => %w(application/xml),
|
|
@@ -2273,6 +2434,7 @@ module Marcel
|
|
|
2273
2434
|
'application/vnd.apple.pages' => %w(application/vnd.apple.iwork),
|
|
2274
2435
|
'application/vnd.etsi.asic-e+zip' => %w(application/zip),
|
|
2275
2436
|
'application/vnd.etsi.asic-s+zip' => %w(application/zip),
|
|
2437
|
+
'application/vnd.google-apps.spreadsheet' => %w(application/json),
|
|
2276
2438
|
'application/vnd.google-earth.kml+xml' => %w(application/xml),
|
|
2277
2439
|
'application/vnd.google-earth.kmz' => %w(application/zip),
|
|
2278
2440
|
'application/vnd.iptc.g2.newsmessage+xml' => %w(application/xml),
|
|
@@ -2388,9 +2550,13 @@ module Marcel
|
|
|
2388
2550
|
'application/x-xliff+xml' => %w(application/xml),
|
|
2389
2551
|
'application/x-xliff+zip' => %w(application/zip),
|
|
2390
2552
|
'application/x-xmind' => %w(application/zip),
|
|
2553
|
+
'application/xhtml+xml' => %w(application/xml),
|
|
2391
2554
|
'application/xml' => %w(text/plain),
|
|
2392
2555
|
'application/xml-dtd' => %w(text/plain),
|
|
2393
2556
|
'application/xquery' => %w(text/plain),
|
|
2557
|
+
'application/xslfo+xml' => %w(application/xml),
|
|
2558
|
+
'application/xslt+xml' => %w(application/xml),
|
|
2559
|
+
'application/xspf+xml' => %w(application/xml),
|
|
2394
2560
|
'audio/mp4' => %w(video/mp4),
|
|
2395
2561
|
'audio/ogg' => %w(application/ogg),
|
|
2396
2562
|
'audio/opus' => %w(audio/ogg),
|
|
@@ -2510,6 +2676,79 @@ module Marcel
|
|
|
2510
2676
|
'video/x-ms-wmv' => %w(video/x-ms-asf),
|
|
2511
2677
|
'video/x-ogm' => %w(video/ogg),
|
|
2512
2678
|
}
|
|
2679
|
+
# @private
|
|
2680
|
+
# :nodoc:
|
|
2681
|
+
ROOT_XML = {
|
|
2682
|
+
[nil, 'ASX'] => 'application/x-ms-asx',
|
|
2683
|
+
[nil, 'BODY'] => 'text/html',
|
|
2684
|
+
[nil, 'DIF'] => 'application/dif+xml',
|
|
2685
|
+
[nil, 'FRAMESET'] => 'text/html',
|
|
2686
|
+
[nil, 'HTML'] => 'text/html',
|
|
2687
|
+
[nil, 'IFRAME'] => 'text/html',
|
|
2688
|
+
[nil, 'LINK'] => 'text/html',
|
|
2689
|
+
[nil, 'MD_metadata'] => 'text/iso19139+xml',
|
|
2690
|
+
[nil, 'ONIXMessage'] => 'application/onix-message+xml',
|
|
2691
|
+
[nil, 'P'] => 'text/html',
|
|
2692
|
+
[nil, 'PremiereData'] => 'image/vnd.adobe.premiere',
|
|
2693
|
+
[nil, 'RDF'] => 'application/rdf+xml',
|
|
2694
|
+
[nil, 'SCRIPT'] => 'text/html',
|
|
2695
|
+
[nil, 'Workbook'] => 'application/vnd.ms-spreadsheetml',
|
|
2696
|
+
[nil, 'amf'] => 'application/x-amf',
|
|
2697
|
+
[nil, 'asx'] => 'application/x-ms-asx',
|
|
2698
|
+
[nil, 'body'] => 'text/html',
|
|
2699
|
+
[nil, 'concept'] => 'application/dita+xml;format=concept',
|
|
2700
|
+
[nil, 'frameset'] => 'text/html',
|
|
2701
|
+
[nil, 'html'] => 'text/html',
|
|
2702
|
+
[nil, 'iframe'] => 'text/html',
|
|
2703
|
+
[nil, 'kml'] => 'application/vnd.google-earth.kml+xml',
|
|
2704
|
+
[nil, 'link'] => 'text/html',
|
|
2705
|
+
[nil, 'map'] => 'application/dita+xml;format=map',
|
|
2706
|
+
[nil, 'newsMessage'] => 'application/vnd.iptc.g2.newsmessage+xml',
|
|
2707
|
+
[nil, 'p'] => 'text/html',
|
|
2708
|
+
[nil, 'plist'] => 'application/x-plist',
|
|
2709
|
+
[nil, 'rss'] => 'application/rss+xml',
|
|
2710
|
+
[nil, 'script'] => 'text/html',
|
|
2711
|
+
[nil, 'smil'] => 'application/smil+xml',
|
|
2712
|
+
[nil, 'stata_dta'] => 'application/x-stata-dta',
|
|
2713
|
+
[nil, 'task'] => 'application/dita+xml;format=task',
|
|
2714
|
+
[nil, 'topic'] => 'application/dita+xml;format=topic',
|
|
2715
|
+
[nil, 'val'] => 'application/dita+xml;format=val',
|
|
2716
|
+
[nil, 'wordDocument'] => 'application/vnd.ms-wordml',
|
|
2717
|
+
['http://developer.apple.com/namespaces/keynote2', 'presentation'] => 'application/vnd.apple.keynote',
|
|
2718
|
+
['http://developer.apple.com/namespaces/ls', 'document'] => 'application/vnd.apple.numbers',
|
|
2719
|
+
['http://developer.apple.com/namespaces/sl', 'document'] => 'application/vnd.apple.pages',
|
|
2720
|
+
['http://docs.oasis-open.org/namespace', 'concept'] => 'application/dita+xml;format=concept',
|
|
2721
|
+
['http://docs.oasis-open.org/namespace', 'map'] => 'application/dita+xml;format=map',
|
|
2722
|
+
['http://docs.oasis-open.org/namespace', 'task'] => 'application/dita+xml;format=task',
|
|
2723
|
+
['http://docs.oasis-open.org/namespace', 'topic'] => 'application/dita+xml;format=topic',
|
|
2724
|
+
['http://docs.oasis-open.org/namespace', 'val'] => 'application/dita+xml;format=val',
|
|
2725
|
+
['http://earth.google.com/kml/2.0', 'kml'] => 'application/vnd.google-earth.kml+xml',
|
|
2726
|
+
['http://earth.google.com/kml/2.1', 'kml'] => 'application/vnd.google-earth.kml+xml',
|
|
2727
|
+
['http://earth.google.com/kml/2.2', 'kml'] => 'application/vnd.google-earth.kml+xml',
|
|
2728
|
+
['http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', 'DIF'] => 'application/dif+xml',
|
|
2729
|
+
['http://iptc.org/std/nar/2006-10-01/', 'newsMessage'] => 'application/vnd.iptc.g2.newsmessage+xml',
|
|
2730
|
+
['http://ns.adobe.com/xdp/', 'xdp'] => 'application/vnd.adobe.xdp+xml',
|
|
2731
|
+
['http://ns.adobe.com/xfdf/', 'xfdf'] => 'application/vnd.adobe.xfdf',
|
|
2732
|
+
['http://ns.editeur.org/onix/3.0/reference', 'ONIXMessage'] => 'application/onix-message+xml',
|
|
2733
|
+
['http://ns.editeur.org/onix/3.0/short', 'ONIXmessage'] => 'application/onix-message+xml',
|
|
2734
|
+
['http://purl.org/atom/ns#', 'feed'] => 'application/atom+xml',
|
|
2735
|
+
['http://schemas.microsoft.com/office/2006/xmlPackage', 'package'] => 'application/vnd.ms-word2006ml',
|
|
2736
|
+
['http://schemas.microsoft.com/office/word/2003/wordml', 'wordDocument'] => 'application/vnd.ms-wordml',
|
|
2737
|
+
['http://www.gribuser.ru/xml/fictionbook/2.0', 'FictionBook'] => 'application/x-fictionbook+xml',
|
|
2738
|
+
['http://www.isotc211.org/2005/gmd', 'MD_metadata'] => 'text/iso19139+xml',
|
|
2739
|
+
['http://www.opengis.net/kml/2.2', 'kml'] => 'application/vnd.google-earth.kml+xml',
|
|
2740
|
+
['http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'RDF'] => 'application/rdf+xml',
|
|
2741
|
+
['http://www.w3.org/1999/XSL/Format', 'root'] => 'application/xslfo+xml',
|
|
2742
|
+
['http://www.w3.org/1999/XSL/Transform', 'stylesheet'] => 'application/xslt+xml',
|
|
2743
|
+
['http://www.w3.org/1999/xhtml', 'html'] => 'application/xhtml+xml',
|
|
2744
|
+
['http://www.w3.org/2000/svg', 'svg'] => 'image/svg+xml',
|
|
2745
|
+
['http://www.w3.org/2005/Atom', 'feed'] => 'application/atom+xml',
|
|
2746
|
+
['http://www.w3.org/ns/ttml', 'tt'] => 'application/ttml+xml',
|
|
2747
|
+
['http://xspf.org/ns/0/', 'playlist'] => 'application/xspf+xml',
|
|
2748
|
+
['urn:oasis:names:tc:opendocument:xmlns:office:1.0', 'document'] => 'application/vnd.oasis.opendocument.tika.flat.document',
|
|
2749
|
+
['urn:oasis:names:tc:xliff:document:1.2', 'xliff'] => 'application/x-xliff+xml',
|
|
2750
|
+
['urn:schemas-microsoft-com:office:spreadsheet', 'Workbook'] => 'application/vnd.ms-spreadsheetml',
|
|
2751
|
+
}
|
|
2513
2752
|
b = Hash.new { |h, k| h[k] = k.b.freeze }
|
|
2514
2753
|
# @private
|
|
2515
2754
|
# :nodoc:
|
|
@@ -2517,16 +2756,22 @@ module Marcel
|
|
|
2517
2756
|
['image/jpeg', [[0, b["\377\330\377"]]]],
|
|
2518
2757
|
['image/png', [[0, b["\211PNG\r\n\032\n"]]]],
|
|
2519
2758
|
['image/gif', [[0, b['GIF87a']], [0, b['GIF89a']]]],
|
|
2759
|
+
['image/x-canon-cr2', [[0, b["MM\000*"], [[8, b['CR']]]], [0, b["II*\000"], [[8, b['CR']]]], [0, b["MM\000+"], [[8, b['CR']]]]]],
|
|
2520
2760
|
['image/tiff', [[0, b["MM\000*"]], [0, b["II*\000"]], [0, b["MM\000+"]]]],
|
|
2521
2761
|
['image/bmp', [[0, b['BM'], [[26, b["\001\000"], [[0, nil, [[0, nil, [[28, b["\000\000"]], [28, b["\001\000"]], [28, b["\004\000"]], [28, b["\b\000"]], [28, b["\020\000"]], [28, b["\030\000"]], [28, b[" \000"]]]], [30, b["\000\000\000\000"]]]]]]]]]],
|
|
2522
2762
|
['image/vnd.adobe.photoshop', [[0, b["8BPS\000\001"]], [0, b["8BPS\000\002"]]]],
|
|
2523
2763
|
['image/webp', [[0, b['RIFF'], [[8, b['WEBP']]]]]],
|
|
2524
|
-
['text/html', [[0, /(?i)<(html|head|body|title|div)[ >]/], [0, /(?i)<h[123][ >]/]]],
|
|
2525
2764
|
['image/svg+xml', [[0, b['<svg']]]],
|
|
2526
2765
|
['video/x-msvideo', [[0, b['RIFF'], [[8, b['AVI ']]]], [8, b['AVI ']]]],
|
|
2527
2766
|
['video/x-ms-wmv', [[0..8192, b["W\000i\000n\000d\000o\000w\000s\000 \000M\000e\000d\000i\000a\000 \000V\000i\000d\000e\000o\000"]], [0..8192, b["V\000C\000-\0001\000 \000A\000d\000v\000a\000n\000c\000e\000d\000 \000P\000r\000o\000f\000i\000l\000e\000"]], [0..8192, b["w\000m\000v\0002\000"]]]],
|
|
2528
2767
|
['video/mp4', [[4, b['ftypmp41']], [4, b['ftypmp42']]]],
|
|
2529
2768
|
['audio/mp4', [[4, b['ftypM4A ']], [4, b['ftypM4B ']], [4, b['ftypF4A ']], [4, b['ftypF4B ']]]],
|
|
2769
|
+
['image/heic', [[4, b['ftypheic']], [4, b['ftypheix']]]],
|
|
2770
|
+
['image/heic-sequence', [[4, b['ftyphevc']], [4, b['ftyphevx']]]],
|
|
2771
|
+
['image/heif', [[4, b['ftypmif1']]]],
|
|
2772
|
+
['image/heif-sequence', [[4, b['ftypmsf1']]]],
|
|
2773
|
+
['image/x-canon-cr3', [[4, b['ftypcrx ']]]],
|
|
2774
|
+
['video/x-m4v', [[4, b['ftypM4V ']], [4, b['ftypM4VH']], [4, b['ftypM4VP']]]],
|
|
2530
2775
|
['video/quicktime', [[4, b["moov\000"]], [4, b["mdat\000"]], [4, b["free\000"]], [4, b["skip\000"]], [4, b["pnot\000"]], [4, b['ftyp']], [0, b["\000\000\000\bwide"]]]],
|
|
2531
2776
|
['video/mpeg', [[0, b["\000\000\001\263"]], [0, b["\000\000\001\272"]]]],
|
|
2532
2777
|
['video/webm', [[0, b["\032E\337\243"], [[4..4096, b["B\202"], [[4..4096, b['webm'], [[4..4096, b['V_VP8']], [4..4096, b['V_VP9']], [4..4096, b['V_AV1']]]]]]]]]],
|
|
@@ -2534,16 +2779,17 @@ module Marcel
|
|
|
2534
2779
|
['video/x-flv', [[0, b['FLV']]]],
|
|
2535
2780
|
['audio/mpeg', [[0, b["\377\362"]], [0, b["\377\363"]], [0, b["\377\364"]], [0, b["\377\365"]], [0, b["\377\366"]], [0, b["\377\367"]], [0, b["\377\372"]], [0, b["\377\373"]], [0, b["\377\374"]], [0, b["\377\375"]], [0, b["\377\343"]], [0, b['ID3']]]],
|
|
2536
2781
|
['application/pdf', [[0, b['%PDF-']], [0, b["\357\273\277%PDF-"]]]],
|
|
2537
|
-
['application/msword', [[0..8, b["\320\317\021\340\241\261\032\341"], [[
|
|
2782
|
+
['application/msword', [[2080, b['Microsoft Word 6.0 Document']], [2080, b['Documento Microsoft Word 6']], [2112, b['MSWordDoc']], [0, b["1\276\000\000"]], [0, b['PO^Q`']], [0, b["\3767\000#"]], [0, b["\333\245-\000\000\000"]], [0, b["\224\246."]], [0..8, b["\320\317\021\340\241\261\032\341"], [[1152..4096, b["W\000o\000r\000d\000D\000o\000c\000u\000m\000e\000n\000t"]]]]]],
|
|
2538
2783
|
['application/vnd.openxmlformats-officedocument.wordprocessingml.document', [[0, b["PK\003\004"], [[30..65536, b['[Content_Types].xml'], [[0..4096, b['word/']]]], [30, b['_rels/.rels'], [[0..4096, b['word/']]]]]]]],
|
|
2539
2784
|
['application/vnd.ms-powerpoint', [[0..8, b["\320\317\021\340\241\261\032\341"], [[1152..4096, b["P\000o\000w\000e\000r\000P\000o\000i\000n\000t\000 D\000o\000c\000u\000m\000e\000n\000t"]]]]]],
|
|
2540
2785
|
['application/vnd.openxmlformats-officedocument.presentationml.presentation', [[0, b["PK\003\004"], [[30..65536, b['[Content_Types].xml'], [[0..4096, b['ppt/']]]], [30, b['_rels/.rels'], [[0..4096, b['ppt/']]]]]]]],
|
|
2786
|
+
['application/x-tika-msworks-spreadsheet', [[0..8, b["\320\317\021\340\241\261\032\341"], [[1152..4096, b["W\000k\000s\000S\000S\000W\000o\000r\000k\000B\000o\000o\000k"]]]]]],
|
|
2541
2787
|
['application/vnd.ms-excel', [[2080, b['Microsoft Excel 5.0 Worksheet']], [2080, b['Foglio di lavoro Microsoft Exce']], [2114, b['Biff5']], [2121, b['Biff5']], [0..8, b["\320\317\021\340\241\261\032\341"], [[1152..4096, b["W\000o\000r\000k\000b\000o\000o\000k"]]]]]],
|
|
2542
2788
|
['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', [[0, b["PK\003\004"], [[30..65536, b['[Content_Types].xml'], [[0..4096, b['xl/']]]], [30, b['_rels/.rels'], [[0..4096, b['xl/']]]]]]]],
|
|
2543
2789
|
['image/x-tga', [[1, b["\001\001\000\000"]], [1, b["\000\002\000\000"]], [1, b["\000\003\000\000"]]]],
|
|
2544
2790
|
['application/x-endnote-refer', [[0..50, b['%A '], [[0..1000, b["\n%D "], [[0..1000, b["\n%T "]]]]]]]],
|
|
2545
2791
|
['application/x-tmx', [[0..256, b['<tmx']]]],
|
|
2546
|
-
['image/svg+xml', [[0, b['<?xml'], [[
|
|
2792
|
+
['image/svg+xml', [[0, b['<?xml'], [[21..512, b['<svg']]]]]],
|
|
2547
2793
|
['application/mbox', [[0, b['From '], [[32..256, b["\nFrom: "]], [32..256, b["\nDate: "]], [32..256, b["\nSubject: "]], [32..256, b["\nDelivered-To: "]], [32..256, b["\nReceived: by "]], [32..256, b["\nReceived: via "]], [32..256, b["\nReceived: from "]], [32..256, b["\nMime-Version: "]], [32..256, b["\nX-"], [[32..8192, b["\nFrom: "]], [32..8192, b["\nDate: "]], [32..8192, b["\nSubject: "]], [32..8192, b["\nDelivered-To: "]], [32..8192, b["\nReceived: by "]], [32..8192, b["\nReceived: via "]], [32..8192, b["\nReceived: from "]], [32..8192, b["\nMime-Version: "]]]]]]]],
|
|
2548
2794
|
['application/x-bplist', [[0, b["bplist\000\000"]], [0, b["bplist\000\001"]], [0, b["bplist@\000"]], [0, b['bplist00']], [0, b['bplist01']], [0, b['bplist10']], [0, b['bplist15']], [0, b['bplist16']]]],
|
|
2549
2795
|
['application/x-dvd-ifo', [[0, b['DVDVIDEO-VTS']], [0, b['DVDVIDEO-VMG']]]],
|
|
@@ -2553,6 +2799,8 @@ module Marcel
|
|
|
2553
2799
|
['image/svg+xml', [[0, b['<!--'], [[4..1024, b['<svg']]]]]],
|
|
2554
2800
|
['application/cbor', [[0, b["\331\331\367"]]]],
|
|
2555
2801
|
['application/coreldraw', [[0, b['RIFF'], [[8, b['CDR']], [8, b['cdr']], [8, b['DES']], [8, b['des']]]]]],
|
|
2802
|
+
['application/timestamped-data', [[0, b['0x30'], [[2..6, b["\006\v*\206H\206\367\r\001\t\020\001\037"]]]]]],
|
|
2803
|
+
['application/timestamped-data', [[0, b['0'], [[2..6, b["\006\v*\206H\206\367\r\001\t\020\001\037"]]]]]],
|
|
2556
2804
|
['application/vnd.etsi.asic-e+zip', [[0, b["PK\003\004"], [[30, b['mimetypeapplication/vnd.etsi.asic-e+zip']]]]]],
|
|
2557
2805
|
['application/vnd.etsi.asic-s+zip', [[0, b["PK\003\004"], [[30, b['mimetypeapplication/vnd.etsi.asic-s+zip']]]]]],
|
|
2558
2806
|
['application/vnd.ms-excel.sheet.2', [[0, b["\t\000\004\000"], [[4, b["\000\000\020\000"]], [4, b["\000\000 \000"]], [4, b["\000\000@\000"]]]]]],
|
|
@@ -2607,7 +2855,6 @@ module Marcel
|
|
|
2607
2855
|
['application/x-stata-dta;version=14', [[0, b['<stata_dta><header><release>118</release>']]]],
|
|
2608
2856
|
['application/x-stata-dta;version=8', [[0, b['<stata_dta><header><release>113</release>']]]],
|
|
2609
2857
|
['application/x-texnicard', [[0, b["SQLite format 3\000"], [[68, b["j\003WD"]]]]]],
|
|
2610
|
-
['application/x-tika-msworks-spreadsheet', [[0..8, b["\320\317\021\340\241\261\032\341"], [[1152..4096, b["W\000k\000s\000S\000S\000W\000o\000r\000k\000B\000o\000o\000k"]]]]]],
|
|
2611
2858
|
['audio/opus', [[0, b['OggS'], [[29, b['pusHead']]]]]],
|
|
2612
2859
|
['audio/speex', [[0, b['OggS'], [[29, b['peex ']]]]]],
|
|
2613
2860
|
['audio/vorbis', [[0, b['OggS'], [[29, b['vorbis']]]]]],
|
|
@@ -2615,13 +2862,7 @@ module Marcel
|
|
|
2615
2862
|
['audio/x-oggflac', [[0, b['OggS'], [[29, b['LAC']]]]]],
|
|
2616
2863
|
['audio/x-oggpcm', [[0, b['OggS'], [[29, b['CM ']]]]]],
|
|
2617
2864
|
['image/avif', [[4, b['ftypavif']]]],
|
|
2618
|
-
['image/heic', [[4, b['ftypheic']], [4, b['ftypheix']]]],
|
|
2619
|
-
['image/heic-sequence', [[4, b['ftyphevc']], [4, b['ftyphevx']]]],
|
|
2620
|
-
['image/heif', [[4, b['ftypmif1']]]],
|
|
2621
|
-
['image/heif-sequence', [[4, b['ftypmsf1']]]],
|
|
2622
2865
|
['image/svg+xml', [[0, b[' <svg']], [0, b["\n<svg"]], [0, b["\r<svg"]], [0, b["\r\n<svg"]], [0, b["\t<svg"]]]],
|
|
2623
|
-
['image/x-canon-cr2', [[0, b["MM\000*"], [[8, b['CR']]]], [0, b["II*\000"], [[8, b['CR']]]], [0, b["MM\000+"], [[8, b['CR']]]]]],
|
|
2624
|
-
['image/x-canon-cr3', [[4, b['ftypcrx ']]]],
|
|
2625
2866
|
['message/news', [[0, b['Path:']], [0, b['Xref:']]]],
|
|
2626
2867
|
['model/e57', [[0, b['ASTM-E57']]]],
|
|
2627
2868
|
['model/vnd.dwf;version=2', [[0, b['(DWF V00.22)']]]],
|
|
@@ -2634,7 +2875,6 @@ module Marcel
|
|
|
2634
2875
|
['video/daala', [[0, b['OggS'], [[29, b['daala']]]]]],
|
|
2635
2876
|
['video/theora', [[0, b['OggS'], [[29, b['theora']]]]]],
|
|
2636
2877
|
['video/x-dirac', [[0, b['OggS'], [[29, b['BCD']]]]]],
|
|
2637
|
-
['video/x-m4v', [[4, b['ftypM4V ']], [4, b['ftypM4VH']], [4, b['ftypM4VP']]]],
|
|
2638
2878
|
['video/x-oggrgb', [[0, b['OggS'], [[29, b['RGB']]]]]],
|
|
2639
2879
|
['video/x-ogguvs', [[0, b['OggS'], [[29, b['VS ']]]]]],
|
|
2640
2880
|
['video/x-oggyuv', [[0, b['OggS'], [[29, b['YUV']]]]]],
|
|
@@ -2661,7 +2901,7 @@ module Marcel
|
|
|
2661
2901
|
['application/java-vm', [[0, b["\312\376\272\276"]]]],
|
|
2662
2902
|
['application/mac-binhex40', [[11, b['must be converted with BinHex']]]],
|
|
2663
2903
|
['application/mathematica', [[0, b['(**']], [0, b['(* ']]]],
|
|
2664
|
-
['application/msword', [[
|
|
2904
|
+
['application/msword', [[0..8, b["\320\317\021\340\241\261\032\341"], [[546, b['jbjb']], [546, b['bjbj']]]]]],
|
|
2665
2905
|
['application/msword2', [[0, b["\233\245"]], [0, b["\333\245"]]]],
|
|
2666
2906
|
['application/msword5', [[0, b["\3767"]]]],
|
|
2667
2907
|
['application/octet-stream', [[10, b['# This is a shell archive']], [0, b["\037\036"]], [0, b["\037\037"]], [0, b["\377\037"]], [0, b["\377\037"]], [0, b["\005\313"]]]],
|
|
@@ -2669,19 +2909,20 @@ module Marcel
|
|
|
2669
2909
|
['application/onenote;format=one', [[0, b["\344R\\{"], [[4, b["\214\330"], [[6, b["\247M"], [[8, b['0xAEB15378D02996D3']]]]]]]]]],
|
|
2670
2910
|
['application/onenote;format=onetoc2', [[0, b["\241/\377C"], [[4, b["\331\357"], [[6, b['vL'], [[8, b['0x9EE210EA5722765F']]]]]]]]]],
|
|
2671
2911
|
['application/pgp-encrypted', [[0, b["\205"], [[3, b["\003"]]]]]],
|
|
2672
|
-
['application/pkcs7-
|
|
2912
|
+
['application/pkcs7-mime', [[0, b['0x30'], [[0, b["\006\v*\206H\206\367\r\001\t\020\001"]]]]]],
|
|
2913
|
+
['application/pkcs7-signature', [[0, b['-----BEGIN PKCS7']], [0, b['0x30'], [[0, b["\006\t*\206H\206\367\r\001\a"], [[11, b["\240"]]]]]]]],
|
|
2673
2914
|
['application/postscript', [[0, b['%!']], [0, b["\004%!"]], [0, b["\305\320\323\306"]], [0, b['%!PS-Adobe-3.0 EPSF-3.0']]]],
|
|
2674
2915
|
['application/rtf', [[0, b["{\\rtf"]]]],
|
|
2675
2916
|
['application/sereal;version=1', [[0, b['=srl']]]],
|
|
2676
2917
|
['application/sereal;version=2', [[0, b['=srl']]]],
|
|
2677
2918
|
['application/sereal;version=3', [[0, b["=\363rl"]]]],
|
|
2678
|
-
['application/
|
|
2919
|
+
['application/vnd.android.axml', [[0, b["\003\000\b\000"], [[8, b["\001\000"]]]]]],
|
|
2679
2920
|
['application/vnd.apple.mpegurl', [[0, b['#EXTM3U']]]],
|
|
2680
2921
|
['application/vnd.digilite.prolights', [[0, b["\177\fD+"]]]],
|
|
2681
2922
|
['application/vnd.fdf', [[0, b['%FDF-']]]],
|
|
2682
2923
|
['application/vnd.iccprofile', [[36, b['acsp']]]],
|
|
2683
|
-
['application/vnd.java.hprof', [[0,
|
|
2684
|
-
['application/vnd.java.hprof.text', [[0,
|
|
2924
|
+
['application/vnd.java.hprof', [[0, Regexp.new("JAVA PROFILE \\d\\.\\d\\.\\d\\u0000".b, 0).freeze]]],
|
|
2925
|
+
['application/vnd.java.hprof.text', [[0, Regexp.new("JAVA PROFILE \\d\\.\\d\\.\\d,".b, 0).freeze]]],
|
|
2685
2926
|
['application/vnd.lotus-1-2-3;version=1', [[0, b["\000\000\002\000\004\004"]]]],
|
|
2686
2927
|
['application/vnd.lotus-1-2-3;version=2', [[0, b["\000\000\002\000\006\004\006\000\b\000"]]]],
|
|
2687
2928
|
['application/vnd.lotus-1-2-3;version=3', [[0, b["\000\000\032\000\000\020\004\000"]]]],
|
|
@@ -2754,7 +2995,7 @@ module Marcel
|
|
|
2754
2995
|
['application/x-endnote-style', [[0, b["\000\b"], [[4, b["\000\000"], [[8, b['RSFTSTYL']], [8, b['ENDNENFT']]]]]]]],
|
|
2755
2996
|
['application/x-erdas-hfa', [[0, b['EHFA_HEADER_TAG']]]],
|
|
2756
2997
|
['application/x-executable', [[0, b["\177ELF"], [[16, b["\002\000"]], [16, b["\000\002"]]]]]],
|
|
2757
|
-
['application/x-fat-diskimage', [[0, b["\\
|
|
2998
|
+
['application/x-fat-diskimage', [[0, b["\\xEB"], [[2, b["\\x90"]]]]]],
|
|
2758
2999
|
['application/x-filemaker', [[14, b["\300HBAM7"], [[525, b["HBAM2101OCT99\301\002H\aPro 7.0\300\300"]]]]]],
|
|
2759
3000
|
['application/x-foxmail', [[0, b["\020\020\020\020\020\020\020\021\021\021\021\021\021S"]]]],
|
|
2760
3001
|
['application/x-gnumeric', [[39, b['=<gmr:Workbook']]]],
|
|
@@ -2788,6 +3029,7 @@ module Marcel
|
|
|
2788
3029
|
['application/x-ole-storage', [[0..8, b["\320\317\021\340\241\261\032\341"]]]],
|
|
2789
3030
|
['application/x-parquet', [[0, b['PAR1']]]],
|
|
2790
3031
|
['application/x-pds', [[0, b['PDS_VERSION_ID']]]],
|
|
3032
|
+
['application/x-pkcs12', [[0, b['0x30'], [[2..6, b['0x02010330'], [[0, b["\006\t*\206H\206\367\r\001\a"]]]]]]]],
|
|
2791
3033
|
['application/x-project', [[0, b['MPX,Microsoft Project for Windows,']]]],
|
|
2792
3034
|
['application/x-prt', [[8, b['0M3C']]]],
|
|
2793
3035
|
['application/x-quattro-pro;version=1+5', [[0, b["\000\000\002\000\001\020"]]]],
|
|
@@ -2910,7 +3152,7 @@ module Marcel
|
|
|
2910
3152
|
['application/pdf', [[0..128, b['%%'], [[1..512, b['%PDF-1.']]]], [0..128, b['%%'], [[1..512, b['%PDF-2.']]]]]],
|
|
2911
3153
|
['application/vnd.wordperfect', [[0, b["\377WPC"]]]],
|
|
2912
3154
|
['application/x-bzip', [[0, b['BZ0']]]],
|
|
2913
|
-
['application/x-bzip2', [[0,
|
|
3155
|
+
['application/x-bzip2', [[0, Regexp.new("BZh[1-9]".b, 0).freeze]]],
|
|
2914
3156
|
['application/x-font-adobe-metric', [[0, b['StartFontMetrics']]]],
|
|
2915
3157
|
['application/x-font-otf', [[0, b["OTTO\000"]]]],
|
|
2916
3158
|
['application/x-font-printer-metric', [[0, b["\000\001"], [[4, b["\000\000Copyr"]]]]]],
|
|
@@ -2925,13 +3167,11 @@ module Marcel
|
|
|
2925
3167
|
['application/x-stata-dta', [[0, b['<stata_dta>']]]],
|
|
2926
3168
|
['application/x-tar', [[257, b["ustar\000"]]]],
|
|
2927
3169
|
['application/x-tika-msoffice', [[0..8, b["\320\317\021\340\241\261\032\341"]]]],
|
|
2928
|
-
['application/xhtml+xml', [[0..8192, b['<html xmlns=']]]],
|
|
2929
3170
|
['audio/ac3', [[0, b["\vw"]]]],
|
|
2930
3171
|
['audio/amr', [[0, b["#!AMR\n"]], [0, b['#!AMR']]]],
|
|
2931
3172
|
['audio/x-aac', [[0, b['ID3']]]],
|
|
2932
3173
|
['image/vnd.zbrush.pcx', [[0, b["\n"], [[1, b["\000"]], [1, b["\002"]], [1, b["\003"]], [1, b["\004"]], [1, b["\005"]]]]]],
|
|
2933
3174
|
['message/rfc822', [[0..1000, b["\nMessage-ID:"]]]],
|
|
2934
|
-
['text/html', [[0..64, b['<!DOCTYPE HTML']], [0..64, b['<!DOCTYPE html']], [0..64, b['<!doctype HTML']], [0..64, b['<!doctype html']], [0..64, b['<HEAD']], [0..64, b['<head']], [0..64, b['<TITLE']], [0..64, b['<title']], [0..64, b['<HTML']], [0..128, b['<html']]]],
|
|
2935
3175
|
['text/vtt', [[0, b["WEBVTT\r"]], [0, b["WEBVTT\n"]], [0, b['0xfeff'], [[2, b["WEBVTT\r"]], [2, b["WEBVTT\n"]]]], [0, b['0xfeff'], [[2, b["WEBVTT\r"]], [2, b["WEBVTT\n"]]]], [0, b['0xefbbbf'], [[3, b["WEBVTT\r"]], [3, b["WEBVTT\n"]]]], [0, b["WEBVTT FILE\r"]], [0, b["WEBVTT FILE\n"]]]],
|
|
2936
3176
|
['application/inf', [[0, b['[version]']], [0, b['[strings]']]]],
|
|
2937
3177
|
['application/x-bibtex-text-file', [[0, b['%'], [[2..128, b["\n@article{"]], [2..128, b["\n@book{"]], [2..128, b["\n@inbook{"]], [2..128, b["\n@incollection{"]], [2..128, b["\n@inproceedings{"]], [2..128, b["\n@manual{"]], [2..128, b["\n@misc{"]], [2..128, b["\n@preamble{"]], [2..128, b["\n@phdthesis{"]], [2..128, b["\n@string{"]], [2..128, b["\n@techreport{"]], [2..128, b["\n@unpublished{"]]]]]],
|
|
@@ -2950,7 +3190,6 @@ module Marcel
|
|
|
2950
3190
|
['audio/x-aiff', [[0, b['FORM'], [[8, b['AIFF']]]], [0, b['FORM'], [[8, b['AIFC']]]], [0, b['FORM'], [[8, b['8SVX']]]], [0, b["FORM\000"]]]],
|
|
2951
3191
|
['audio/x-dec-adpcm', [[0, b["\000ds."], [[12, b["\000\000\000\027"]]]]]],
|
|
2952
3192
|
['audio/x-dec-basic', [[0, b["\000ds."], [[12, b["\000\000\000\001"]], [12, b["\000\000\000\002"]], [12, b["\000\000\000\003"]], [12, b["\000\000\000\004"]], [12, b["\000\000\000\005"]], [12, b["\000\000\000\006"]], [12, b["\000\000\000\a"]]]]]],
|
|
2953
|
-
['text/html', [[128..8192, b['<html']]]],
|
|
2954
3193
|
['text/plain', [[0, b['This is TeX,']], [0, b['This is METAFONT,']], [0, b['/*']], [0, b['//']], [0, b[';;']], [0, b["\376\377"]], [0, b["\377\376"]], [0, b["\357\273\277"]]]],
|
|
2955
3194
|
['text/x-makefile', [[0, b['# Makefile.in generated by']], [0, b['#!make']], [0, b['#!/usr/bin/make']], [0, b['#!/usr/local/bin/make']], [0, b['#!/usr/bin/env make']]]],
|
|
2956
3195
|
['audio/mpeg', [[0, b['ID3']]]],
|
data/lib/marcel/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: marcel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Ward
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
18
|
+
version: '6.0'
|
|
19
19
|
type: :development
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '
|
|
25
|
+
version: '6.0'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: bundler
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -65,20 +65,6 @@ dependencies:
|
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: '2'
|
|
68
|
-
- !ruby/object:Gem::Dependency
|
|
69
|
-
name: nokogiri
|
|
70
|
-
requirement: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - ">="
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: 1.9.1
|
|
75
|
-
type: :development
|
|
76
|
-
prerelease: false
|
|
77
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - ">="
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: 1.9.1
|
|
82
68
|
email:
|
|
83
69
|
- tom@basecamp.com
|
|
84
70
|
executables: []
|
|
@@ -88,8 +74,12 @@ files:
|
|
|
88
74
|
- APACHE-LICENSE
|
|
89
75
|
- MIT-LICENSE
|
|
90
76
|
- README.md
|
|
77
|
+
- SECURITY.md
|
|
91
78
|
- lib/marcel.rb
|
|
92
79
|
- lib/marcel/magic.rb
|
|
80
|
+
- lib/marcel/magic/definitions.rb
|
|
81
|
+
- lib/marcel/magic/xml.rb
|
|
82
|
+
- lib/marcel/magic/zip.rb
|
|
93
83
|
- lib/marcel/mime_type.rb
|
|
94
84
|
- lib/marcel/mime_type/definitions.rb
|
|
95
85
|
- lib/marcel/tables.rb
|
|
@@ -107,14 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
107
97
|
requirements:
|
|
108
98
|
- - ">="
|
|
109
99
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
100
|
+
version: '3.3'
|
|
111
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
102
|
requirements:
|
|
113
103
|
- - ">="
|
|
114
104
|
- !ruby/object:Gem::Version
|
|
115
105
|
version: '0'
|
|
116
106
|
requirements: []
|
|
117
|
-
rubygems_version:
|
|
107
|
+
rubygems_version: 3.6.9
|
|
118
108
|
specification_version: 4
|
|
119
109
|
summary: Simple mime type detection using magic numbers, filenames, and extensions
|
|
120
110
|
test_files: []
|