mini_mime 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a46bf265494380ebc5d3bc4918b999e8e1b635a
4
- data.tar.gz: ead5c22a9b72e8cc4f8afdb22563427d5211ed80
3
+ metadata.gz: 519524c1e8a814d03548d567200eae2af6255498
4
+ data.tar.gz: 10173872af6271b41a3ac4723a8f1ceee26adc5d
5
5
  SHA512:
6
- metadata.gz: 603449f958807de86bc2097ab82afe78a0e67f237e0fac9fd73fec9abee13550c0f3a4dcd18518ddce48bc228a0030a57e07f537196949bbe9d2681a63d5eb23
7
- data.tar.gz: d617bc1422d36bde0dab45e44eb5823d2ba003260e3c1bb8f1e606bde22d533ad25b6ee7b778f9c2fd14945dc7a9092a0bec79c172bfe070a2a18c486763ee99
6
+ metadata.gz: 6f0ce7297cf0c718df1cf8a26aff6880136fdc84ec4f3c859792cf2d68064c2c2eb9beb8253cddf6238d4358da0608673627af31f66d158f0e4caa27b8c4e46b
7
+ data.tar.gz: 2dae81f176221e7241876ab965eda0020709c3b9595c756f81303b86858f475a13220257f9ef89014dfb279f9cf6efa4b7f21cabb528f09582645ea0c7fbc075
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 28-03-2016
2
+
3
+ - Version 0.1.3
4
+ - Prefer non-obsolete mime types to obsolete ones
5
+
1
6
  14-12-2016
2
7
 
3
8
  - Version 0.1.2
data/Rakefile CHANGED
@@ -46,8 +46,13 @@ task :rebuild_db do
46
46
  buffer = []
47
47
 
48
48
  index.each do |ext, list|
49
- first = list.first
50
- buffer << [ext.dup, first.content_type.dup, first.encoding.dup]
49
+ mime_type = nil
50
+ list.each do |type|
51
+ mime_type = type
52
+ break unless type.obsolete?
53
+ end
54
+ mime_type = list.first if mime_type.obsolete?
55
+ buffer << [ext.dup, mime_type.content_type.dup, mime_type.encoding.dup]
51
56
  end
52
57
 
53
58
  pad(buffer)
@@ -1,11 +1,8 @@
1
- bck application/VMSBACKUP base64
2
- mda application/access base64
3
1
  ez application/andrew-inset base64
4
2
  aw application/applixware base64
5
3
  atom application/atom+xml 8bit
6
4
  atomcat application/atomcat+xml 8bit
7
5
  atomsvc application/atomsvc+xml 8bit
8
- bleep application/bleeper base64
9
6
  ccxml application/ccxml+xml base64
10
7
  cdmia application/cdmi-capability base64
11
8
  cdmic application/cdmi-container base64
@@ -21,19 +18,15 @@ xdssc application/dssc+xml
21
18
  ecma application/ecmascript base64
22
19
  emma application/emma+xml base64
23
20
  epub application/epub+zip base64
24
- xls application/excel base64
25
21
  exi application/exi base64
26
22
  otf application/font-sfnt base64
27
23
  pfr application/font-tdpfr base64
28
24
  woff application/font-woff base64
29
- spl application/futuresplash base64
30
25
  gml application/gml+xml base64
31
26
  gpx application/gpx+xml base64
32
27
  gxf application/gxf base64
33
28
  gz application/gzip base64
34
- hep application/hep base64
35
29
  stk application/hyperstudio base64
36
- imagemap application/imagemap 8bit
37
30
  ink application/inkml+xml base64
38
31
  ipfix application/ipfix base64
39
32
  jar application/java-archive base64
@@ -43,13 +36,10 @@ js application/javascript
43
36
  json application/json 8bit
44
37
  jsonml application/jsonml+json base64
45
38
  lostxml application/lost+xml base64
46
- wks application/lotus-123 base64
47
39
  hqx application/mac-binhex40 8bit
48
- cpt application/mac-compactpro base64
49
40
  mads application/mads+xml base64
50
41
  mrc application/marc base64
51
42
  mrcx application/marcxml+xml base64
52
- mcd application/mathcad base64
53
43
  ma application/mathematica base64
54
44
  mathml application/mathml+xml base64
55
45
  mbox application/mbox base64
@@ -89,7 +79,6 @@ pot application/powerpoint
89
79
  cw application/prs.cww base64
90
80
  rct application/prs.nprend base64
91
81
  pskcxml application/pskc+xml base64
92
- qtl application/quicktimeplayer base64
93
82
  rdf application/rdf+xml 8bit
94
83
  rif application/reginfo+xml base64
95
84
  rnc application/relax-ng-compact-syntax base64
@@ -114,7 +103,7 @@ sgml application/sgml
114
103
  soc application/sgml-open-catalog base64
115
104
  shf application/shf+xml base64
116
105
  siv application/sieve base64
117
- smi application/smil 8bit
106
+ smi application/smil+xml 8bit
118
107
  rq application/sparql-query base64
119
108
  srx application/sparql-results+xml base64
120
109
  gram application/srgs base64
@@ -125,7 +114,6 @@ ssml application/ssml+xml
125
114
  tei application/tei+xml base64
126
115
  tfi application/thraud+xml base64
127
116
  tsd application/timestamped-data base64
128
- tbk application/toolbook base64
129
117
  pwn application/vnd.3M.Post-it-Notes base64
130
118
  plb application/vnd.3gpp.pic-bw-large base64
131
119
  psb application/vnd.3gpp.pic-bw-small base64
@@ -311,6 +299,7 @@ org application/vnd.lotus-organizer
311
299
  scm application/vnd.lotus-screencam base64
312
300
  lwp application/vnd.lotus-wordpro base64
313
301
  portpkg application/vnd.macports.portpkg base64
302
+ mcd application/vnd.mcd base64
314
303
  mc1 application/vnd.medcalcdata base64
315
304
  cdkey application/vnd.mediastation.cdkey base64
316
305
  mfm application/vnd.mfmp base64
@@ -504,13 +493,12 @@ vxml application/voicexml+xml
504
493
  wif application/watcherinfo+xml base64
505
494
  wgt application/widget base64
506
495
  hlp application/winhlp base64
507
- wp application/wordperfect base64
508
- wp5 application/wordperfect5.1 base64
509
- wp6 application/wordperfect6.1 base64
496
+ wp application/wordperfect5.1 base64
510
497
  wsdl application/wsdl+xml base64
511
498
  wspolicy application/wspolicy+xml base64
512
499
  wk application/x-123 base64
513
500
  7z application/x-7z-compressed base64
501
+ bck application/x-VMSBACKUP base64
514
502
  wkz application/x-Wingz base64
515
503
  abw application/x-abiword base64
516
504
  ace application/x-ace-compressed base64
@@ -520,6 +508,7 @@ aam application/x-authorware-map
520
508
  aas application/x-authorware-seg base64
521
509
  bcpio application/x-bcpio base64
522
510
  torrent application/x-bittorrent base64
511
+ bleep application/x-bleeper base64
523
512
  blb application/x-blorb base64
524
513
  bz application/x-bzip base64
525
514
  boz application/x-bzip2 base64
@@ -529,7 +518,7 @@ cfs application/x-cfs-compressed
529
518
  chat application/x-chat base64
530
519
  pgn application/x-chess-pgn base64
531
520
  crx application/x-chrome-extension base64
532
- z application/x-compress base64
521
+ z application/x-compressed base64
533
522
  nsc application/x-conference base64
534
523
  cpio application/x-cpio base64
535
524
  csh application/x-csh 8bit
@@ -552,16 +541,19 @@ snf application/x-font-snf
552
541
  ttc application/x-font-ttf base64
553
542
  afm application/x-font-type1 base64
554
543
  arc application/x-freearc base64
544
+ spl application/x-futuresplash base64
555
545
  gca application/x-gca-compressed base64
556
546
  ulx application/x-glulx base64
557
547
  gnumeric application/x-gnumeric base64
558
548
  gramps application/x-gramps-xml base64
559
549
  gtar application/x-gtar base64
560
550
  hdf application/x-hdf base64
551
+ hep application/x-hep base64
561
552
  rhtml application/x-html+ruby 8bit
562
553
  php application/x-httpd-php 8bit
563
554
  ibooks application/x-ibooks+zip base64
564
555
  ica application/x-ica base64
556
+ imagemap application/x-imagemap 8bit
565
557
  install application/x-install-instructions base64
566
558
  iso application/x-iso9660-image base64
567
559
  key application/x-iwork-keynote-sffkey base64
@@ -569,6 +561,7 @@ numbers application/x-iwork-numbers-sffnumbers
569
561
  pages application/x-iwork-pages-sffpages base64
570
562
  jnlp application/x-java-jnlp-file base64
571
563
  latex application/x-latex 8bit
564
+ cpt application/x-mac-compactpro base64
572
565
  mie application/x-mie base64
573
566
  mobi application/x-mobipocket-ebook base64
574
567
  application application/x-ms-application base64
@@ -576,6 +569,7 @@ lnk application/x-ms-shortcut
576
569
  wmd application/x-ms-wmd base64
577
570
  wmz application/x-ms-wmz base64
578
571
  xbap application/x-ms-xbap base64
572
+ mda application/x-msaccess base64
579
573
  obd application/x-msbinder base64
580
574
  crd application/x-mscardfile base64
581
575
  clp application/x-msclip base64
@@ -597,6 +591,7 @@ p12 application/x-pkcs12
597
591
  p7b application/x-pkcs7-certificates base64
598
592
  p7r application/x-pkcs7-certreqresp base64
599
593
  py application/x-python 8bit
594
+ qtl application/x-quicktimeplayer base64
600
595
  rar application/x-rar-compressed base64
601
596
  ris application/x-research-info-systems base64
602
597
  rb application/x-ruby 8bit
@@ -619,13 +614,14 @@ tex application/x-tex
619
614
  tfm application/x-tex-tfm base64
620
615
  texi application/x-texinfo 8bit
621
616
  obj application/x-tgif base64
622
- roff application/x-troff base64
617
+ tbk application/x-toolbook base64
623
618
  man application/x-troff-man 8bit
624
619
  me application/x-troff-me base64
625
620
  ms application/x-troff-ms base64
626
621
  ustar application/x-ustar base64
627
622
  src application/x-wais-source base64
628
623
  webapp application/x-web-app-manifest+json base64
624
+ wp6 application/x-wordperfect6.1 base64
629
625
  crt application/x-x509-ca-cert base64
630
626
  fig application/x-xfig base64
631
627
  xlf application/x-xliff+xml base64
@@ -694,9 +690,6 @@ cif chemical/x-cif
694
690
  cmdf chemical/x-cmdf base64
695
691
  cml chemical/x-cml base64
696
692
  csml chemical/x-csml base64
697
- xyz chemical/x-xyz base64
698
- dwf drawing/dwf base64
699
- bmp image/bmp base64
700
693
  cgm image/cgm base64
701
694
  g3 image/g3fax base64
702
695
  gif image/gif base64
@@ -710,11 +703,9 @@ png image/png
710
703
  btif image/prs.btif base64
711
704
  sgi image/sgi base64
712
705
  svg image/svg+xml 8bit
713
- tga image/targa base64
714
706
  tif image/tiff base64
715
707
  psd image/vnd.adobe.photoshop base64
716
708
  uvg image/vnd.dece.graphic base64
717
- dgn image/vnd.dgn base64
718
709
  djv image/vnd.djvu base64
719
710
  sub image/vnd.dvb.subtitle base64
720
711
  dwg image/vnd.dwg base64
@@ -733,6 +724,7 @@ wbmp image/vnd.wap.wbmp
733
724
  xif image/vnd.xiff base64
734
725
  webp image/webp base64
735
726
  3ds image/x-3ds base64
727
+ bmp image/x-bmp base64
736
728
  ras image/x-cmu-raster base64
737
729
  cmx image/x-cmx base64
738
730
  xcfbz2 image/x-compressed-xcf base64
@@ -747,6 +739,8 @@ pbm image/x-portable-bitmap
747
739
  pgm image/x-portable-graymap base64
748
740
  ppm image/x-portable-pixmap base64
749
741
  rgb image/x-rgb base64
742
+ tga image/x-targa base64
743
+ dgn image/x-vnd.dgn base64
750
744
  xbm image/x-xbitmap 7bit
751
745
  xcf image/x-xcf base64
752
746
  xpm image/x-xpixmap 8bit
@@ -755,6 +749,7 @@ eml message/rfc822
755
749
  iges model/iges base64
756
750
  mesh model/mesh base64
757
751
  dae model/vnd.collada+xml base64
752
+ dwf model/vnd.dwf base64
758
753
  gdl model/vnd.gdl base64
759
754
  gtw model/vnd.gtw base64
760
755
  mts model/vnd.mts base64
@@ -767,8 +762,8 @@ x3dv model/x3d+vrml
767
762
  x3d model/x3d+xml base64
768
763
  appcache text/cache-manifest quoted-printable
769
764
  ics text/calendar quoted-printable
770
- csv text/comma-separated-values 8bit
771
765
  css text/css 8bit
766
+ csv text/csv 8bit
772
767
  htm text/html 8bit
773
768
  n3 text/n3 quoted-printable
774
769
  c text/plain quoted-printable
@@ -776,7 +771,7 @@ dsc text/prs.lines.tag
776
771
  rtx text/richtext 8bit
777
772
  sgm text/sgml quoted-printable
778
773
  tsv text/tab-separated-values quoted-printable
779
- troff text/troff 8bit
774
+ roff text/troff 8bit
780
775
  ttl text/turtle quoted-printable
781
776
  uri text/uri-list quoted-printable
782
777
  vcard text/vcard quoted-printable
@@ -818,8 +813,6 @@ h264 video/H264
818
813
  jpgv video/JPEG base64
819
814
  mj2 video/MJ2 base64
820
815
  ts video/MP2T base64
821
- dl video/dl base64
822
- gl video/gl base64
823
816
  f4p video/mp4 base64
824
817
  m1v video/mpeg base64
825
818
  ogv video/ogg base64
@@ -841,8 +834,10 @@ ssw video/vnd.sealed.swf
841
834
  s1q video/vnd.sealedmedia.softseal.mov base64
842
835
  uvu video/vnd.uvvu.mp4 base64
843
836
  viv video/vnd.vivo base64
837
+ dl video/x-dl base64
844
838
  fli video/x-fli base64
845
839
  flv video/x-flv base64
840
+ gl video/x-gl base64
846
841
  ivf video/x-ivf base64
847
842
  mk3d video/x-matroska base64
848
843
  mng video/x-mng base64
@@ -854,4 +849,5 @@ wmx video/x-ms-wmx
854
849
  wvx video/x-ms-wvx base64
855
850
  avi video/x-msvideo base64
856
851
  movie video/x-sgi-movie base64
852
+ xyz x-chemical/x-xyz base64
857
853
  ice x-conference/x-cooltalk base64
@@ -56,7 +56,7 @@ azf application/vnd.airzip.filesecure.azf
56
56
  azs application/vnd.airzip.filesecure.azs base64
57
57
  azw application/vnd.amazon.ebook base64
58
58
  bat application/x-msdos-program base64
59
- bck application/VMSBACKUP base64
59
+ bck application/x-VMSBACKUP base64
60
60
  bcpio application/x-bcpio base64
61
61
  bdf application/x-font-bdf base64
62
62
  bdm application/vnd.syncml.dm+wbxml base64
@@ -65,10 +65,10 @@ bh2 application/vnd.fujitsu.oasysprs
65
65
  bin application/octet-stream base64
66
66
  bkm application/vnd.nervana base64
67
67
  blb application/x-blorb base64
68
- bleep application/bleeper base64
68
+ bleep application/x-bleeper base64
69
69
  blorb application/x-blorb base64
70
70
  bmi application/vnd.bmi base64
71
- bmp image/bmp base64
71
+ bmp image/x-bmp base64
72
72
  book application/vnd.framemaker base64
73
73
  box application/vnd.previewsystems.box base64
74
74
  boz application/x-bzip2 base64
@@ -139,7 +139,7 @@ com application/x-msdos-program
139
139
  conf text/plain quoted-printable
140
140
  cpio application/x-cpio base64
141
141
  cpp text/plain quoted-printable
142
- cpt application/mac-compactpro base64
142
+ cpt application/x-mac-compactpro base64
143
143
  crd application/x-mscardfile base64
144
144
  crl application/pkix-crl base64
145
145
  crt application/x-x509-ca-cert base64
@@ -151,7 +151,7 @@ csml chemical/x-csml
151
151
  csp application/vnd.commonspace base64
152
152
  css text/css 8bit
153
153
  cst application/x-director base64
154
- csv text/comma-separated-values 8bit
154
+ csv text/csv 8bit
155
155
  cu application/cu-seeme base64
156
156
  curl application/vnd.curl base64
157
157
  cw application/prs.cww base64
@@ -176,7 +176,7 @@ deploy application/octet-stream
176
176
  der application/x-x509-ca-cert base64
177
177
  dfac application/vnd.dreamfactory base64
178
178
  dgc application/x-dgc-compressed base64
179
- dgn image/vnd.dgn base64
179
+ dgn image/x-vnd.dgn base64
180
180
  dic text/x-c quoted-printable
181
181
  dir application/x-director base64
182
182
  dis application/vnd.Mobius.DIS base64
@@ -184,7 +184,7 @@ dist application/octet-stream
184
184
  distz application/octet-stream base64
185
185
  djv image/vnd.djvu base64
186
186
  djvu image/vnd.djvu base64
187
- dl video/dl base64
187
+ dl video/x-dl base64
188
188
  dll application/octet-stream base64
189
189
  dmg application/x-apple-diskimage base64
190
190
  dmp application/vnd.tcpdump.pcap base64
@@ -209,7 +209,7 @@ dump application/octet-stream
209
209
  dv video/DV base64
210
210
  dvb video/vnd.dvb.file base64
211
211
  dvi application/x-dvi base64
212
- dwf drawing/dwf base64
212
+ dwf model/vnd.dwf base64
213
213
  dwg image/vnd.dwg base64
214
214
  dxf image/vnd.dxf base64
215
215
  dxp application/vnd.spotfire.dxp base64
@@ -307,7 +307,7 @@ ggt application/vnd.geogebra.tool
307
307
  ghf application/vnd.groove-help base64
308
308
  gif image/gif base64
309
309
  gim application/vnd.groove-identity-message base64
310
- gl video/gl base64
310
+ gl video/x-gl base64
311
311
  gml application/gml+xml base64
312
312
  gmx application/vnd.gmx base64
313
313
  gnumeric application/x-gnumeric base64
@@ -337,7 +337,7 @@ hal application/vnd.hal+xml
337
337
  hbc application/vnd.hbci base64
338
338
  hbci application/vnd.hbci base64
339
339
  hdf application/x-hdf base64
340
- hep application/hep base64
340
+ hep application/x-hep base64
341
341
  hh text/plain quoted-printable
342
342
  hlp application/winhlp base64
343
343
  hpgl application/vnd.hp-HPGL base64
@@ -371,8 +371,8 @@ igm application/vnd.insors.igm
371
371
  igs model/iges base64
372
372
  igx application/vnd.micrografx.igx base64
373
373
  iif application/vnd.shana.informed.interchange base64
374
- imagemap application/imagemap 8bit
375
- imap application/imagemap 8bit
374
+ imagemap application/x-imagemap 8bit
375
+ imap application/x-imagemap 8bit
376
376
  imp application/vnd.accpac.simply.imp base64
377
377
  ims application/vnd.ms-ims base64
378
378
  in text/plain quoted-printable
@@ -477,13 +477,13 @@ mb application/mathematica
477
477
  mbk application/vnd.Mobius.MBK base64
478
478
  mbox application/mbox base64
479
479
  mc1 application/vnd.medcalcdata base64
480
- mcd application/mathcad base64
480
+ mcd application/vnd.mcd base64
481
481
  mcurl text/vnd.curl.mcurl quoted-printable
482
482
  md text/plain quoted-printable
483
- mda application/access base64
484
- mdb application/access base64
485
- mde application/access base64
486
- mdf application/access base64
483
+ mda application/x-msaccess base64
484
+ mdb application/x-msaccess base64
485
+ mde application/x-msaccess base64
486
+ mdf application/x-msaccess base64
487
487
  mdi image/vnd.ms-modi base64
488
488
  me application/x-troff-me base64
489
489
  mesh model/mesh base64
@@ -719,7 +719,7 @@ qcp audio/vnd.qcelp
719
719
  qfx application/vnd.intu.qfx base64
720
720
  qps application/vnd.publishare-delta-tree base64
721
721
  qt video/quicktime base64
722
- qtl application/quicktimeplayer base64
722
+ qtl application/x-quicktimeplayer base64
723
723
  qwd application/vnd.Quark.QuarkXPress 8bit
724
724
  qwt application/vnd.Quark.QuarkXPress 8bit
725
725
  qxb application/vnd.Quark.QuarkXPress 8bit
@@ -757,7 +757,7 @@ rmvb application/vnd.rn-realmedia-vbr
757
757
  rnc application/relax-ng-compact-syntax base64
758
758
  rnd application/prs.nprend base64
759
759
  roa application/rpki-roa base64
760
- roff application/x-troff base64
760
+ roff text/troff 8bit
761
761
  rp9 application/vnd.cloanto.rp9 base64
762
762
  rpm audio/x-pn-realaudio-plugin base64
763
763
  rpss application/vnd.nokia.radio-presets base64
@@ -847,8 +847,8 @@ sm application/vnd.stepmania.stepchart
847
847
  smf application/vnd.stardivision.math base64
848
848
  smh application/vnd.sealed.mht base64
849
849
  smht application/vnd.sealed.mht base64
850
- smi application/smil 8bit
851
- smil application/smil 8bit
850
+ smi application/smil+xml 8bit
851
+ smil application/smil+xml 8bit
852
852
  smo video/vnd.sealedmedia.softseal.mov base64
853
853
  smov video/vnd.sealedmedia.softseal.mov base64
854
854
  smp audio/vnd.sealedmedia.softseal.mpeg base64
@@ -865,7 +865,7 @@ spc application/x-pkcs7-certificates
865
865
  spd application/vnd.sealedmedia.softseal.pdf base64
866
866
  spdf application/vnd.sealedmedia.softseal.pdf base64
867
867
  spf application/vnd.yamaha.smaf-phrase base64
868
- spl application/futuresplash base64
868
+ spl application/x-futuresplash base64
869
869
  spo application/x-spss base64
870
870
  spot text/vnd.in3d.spot quoted-printable
871
871
  spp application/scvp-vp-response base64
@@ -915,12 +915,12 @@ sxl application/vnd.sealed.xls
915
915
  sxls application/vnd.sealed.xls base64
916
916
  sxm application/vnd.sun.xml.math base64
917
917
  sxw application/vnd.sun.xml.writer base64
918
- t application/x-troff base64
918
+ t text/troff 8bit
919
919
  t3 application/x-t3vm-image base64
920
920
  taglet application/vnd.mynfc base64
921
921
  tao application/vnd.tao.intent-module-archive base64
922
922
  tar application/x-tar base64
923
- tbk application/toolbook base64
923
+ tbk application/x-toolbook base64
924
924
  tbz application/x-gtar base64
925
925
  tbz2 application/x-gtar base64
926
926
  tcap application/vnd.3gpp2.tcap base64
@@ -935,7 +935,7 @@ text text/plain
935
935
  textile text/plain quoted-printable
936
936
  tfi application/thraud+xml base64
937
937
  tfm application/x-tex-tfm base64
938
- tga image/targa base64
938
+ tga image/x-targa base64
939
939
  tgz application/x-gtar base64
940
940
  thmx application/vnd.ms-officetheme base64
941
941
  tif image/tiff base64
@@ -944,7 +944,7 @@ tmo application/vnd.tmobile-livetv
944
944
  torrent application/x-bittorrent base64
945
945
  tpl application/vnd.groove-tool-template base64
946
946
  tpt application/vnd.trid.tpt base64
947
- tr application/x-troff base64
947
+ tr text/troff 8bit
948
948
  tra application/vnd.trueapp base64
949
949
  trm application/x-msterminal base64
950
950
  troff text/troff 8bit
@@ -1043,7 +1043,7 @@ wg application/vnd.pmi.widget
1043
1043
  wgt application/widget base64
1044
1044
  wif application/watcherinfo+xml base64
1045
1045
  wk application/x-123 base64
1046
- wks application/lotus-123 base64
1046
+ wks application/vnd.lotus-1-2-3 base64
1047
1047
  wkz application/x-Wingz base64
1048
1048
  wm video/x-ms-wm base64
1049
1049
  wma audio/x-ms-wma base64
@@ -1058,9 +1058,9 @@ wmx video/x-ms-wmx
1058
1058
  wmz application/x-ms-wmz base64
1059
1059
  woff application/font-woff base64
1060
1060
  woff2 application/font-woff base64
1061
- wp application/wordperfect base64
1061
+ wp application/wordperfect5.1 base64
1062
1062
  wp5 application/wordperfect5.1 base64
1063
- wp6 application/wordperfect6.1 base64
1063
+ wp6 application/x-wordperfect6.1 base64
1064
1064
  wpd application/vnd.wordperfect base64
1065
1065
  wpl application/vnd.ms-wpl base64
1066
1066
  wps application/vnd.ms-works base64
@@ -1110,11 +1110,11 @@ xlam application/vnd.ms-excel.addin.macroEnabled.12
1110
1110
  xlc application/vnd.ms-excel base64
1111
1111
  xlf application/x-xliff+xml base64
1112
1112
  xlm application/vnd.ms-excel base64
1113
- xls application/excel base64
1113
+ xls application/vnd.ms-excel base64
1114
1114
  xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12 base64
1115
1115
  xlsm application/vnd.ms-excel.sheet.macroEnabled.12 base64
1116
1116
  xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet base64
1117
- xlt application/excel base64
1117
+ xlt application/vnd.ms-excel base64
1118
1118
  xltm application/vnd.ms-excel.template.macroEnabled.12 base64
1119
1119
  xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template base64
1120
1120
  xlw application/vnd.ms-excel base64
@@ -1139,13 +1139,13 @@ xul application/vnd.mozilla.xul+xml
1139
1139
  xvm application/xv+xml base64
1140
1140
  xvml application/xv+xml base64
1141
1141
  xwd image/x-xwindowdump base64
1142
- xyz chemical/x-xyz base64
1142
+ xyz x-chemical/x-xyz base64
1143
1143
  xz application/x-xz base64
1144
1144
  yaml text/x-yaml 8bit
1145
1145
  yang application/yang base64
1146
1146
  yin application/yin+xml base64
1147
1147
  yml text/x-yaml 8bit
1148
- z application/x-compress base64
1148
+ z application/x-compressed base64
1149
1149
  z1 application/x-zmachine base64
1150
1150
  z2 application/x-zmachine base64
1151
1151
  z3 application/x-zmachine base64
@@ -2,7 +2,6 @@ require "mini_mime/version"
2
2
  require "thread"
3
3
 
4
4
  module MiniMime
5
-
6
5
  def self.lookup_by_filename(filename)
7
6
  Db.lookup_by_filename(filename)
8
7
  end
@@ -15,8 +14,9 @@ module MiniMime
15
14
  BINARY_ENCODINGS = %w(base64 8bit)
16
15
 
17
16
  attr_accessor :extension, :content_type, :encoding
17
+
18
18
  def initialize(buffer)
19
- @extension,@content_type,@encoding = buffer.split(/\s+/).map!(&:freeze)
19
+ @extension, @content_type, @encoding = buffer.split(/\s+/).map!(&:freeze)
20
20
  end
21
21
 
22
22
  def [](idx)
@@ -60,18 +60,15 @@ module MiniMime
60
60
  end
61
61
  end
62
62
 
63
-
64
63
  class Cache
65
64
  def initialize(size)
66
65
  @size = size
67
66
  @hash = {}
68
67
  end
69
68
 
70
- def []=(key,val)
69
+ def []=(key, val)
71
70
  rval = @hash[key] = val
72
- if @hash.length > @size
73
- @hash.shift
74
- end
71
+ @hash.shift if @hash.length > @size
75
72
  rval
76
73
  end
77
74
 
@@ -81,7 +78,6 @@ module MiniMime
81
78
  end
82
79
 
83
80
  class RandomAccessDb
84
-
85
81
  MAX_CACHED = 100
86
82
 
87
83
  def initialize(name, sort_order)
@@ -113,7 +109,7 @@ module MiniMime
113
109
  end
114
110
  end
115
111
 
116
- #lifted from marcandre/backports
112
+ # lifted from marcandre/backports
117
113
  def lookup_uncached(val)
118
114
  from = 0
119
115
  to = @rows - 1
@@ -139,7 +135,6 @@ module MiniMime
139
135
  @file.seek(row*@row_length)
140
136
  Info.new(@file.readline)
141
137
  end
142
-
143
138
  end
144
139
 
145
140
  def initialize
@@ -154,6 +149,5 @@ module MiniMime
154
149
  def lookup_by_content_type(content_type)
155
150
  @content_type_db.lookup(content_type)
156
151
  end
157
-
158
152
  end
159
153
  end
@@ -1,3 +1,3 @@
1
1
  module MiniMime
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_mime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-14 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.5.1
98
+ rubygems_version: 2.5.2
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: A lightweight mime type lookup toy