mime-types 1.17.2 → 3.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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +35 -0
  3. data/.gitignore +17 -0
  4. data/.hoerc +20 -12
  5. data/Code-of-Conduct.rdoc +41 -0
  6. data/Contributing.rdoc +169 -0
  7. data/History.rdoc +531 -30
  8. data/Licence.rdoc +25 -0
  9. data/Manifest.txt +32 -34
  10. data/README.rdoc +198 -13
  11. data/Rakefile +181 -159
  12. data/lib/mime/type/columnar.rb +55 -0
  13. data/lib/mime/type.rb +566 -0
  14. data/lib/mime/types/cache.rb +56 -0
  15. data/lib/mime/types/columnar.rb +142 -0
  16. data/lib/mime/types/container.rb +30 -0
  17. data/lib/mime/types/deprecations.rb +32 -0
  18. data/lib/mime/types/full.rb +17 -0
  19. data/lib/mime/types/loader.rb +148 -0
  20. data/lib/mime/types/logger.rb +37 -0
  21. data/lib/mime/types/registry.rb +81 -0
  22. data/lib/mime/types.rb +199 -819
  23. data/lib/mime-types.rb +1 -0
  24. data/support/benchmarks/load.rb +65 -0
  25. data/support/benchmarks/load_allocations.rb +90 -0
  26. data/support/benchmarks/object_counts.rb +43 -0
  27. data/support/profile/columnar.rb +5 -0
  28. data/support/profile/columnar_full.rb +5 -0
  29. data/support/profile/full.rb +5 -0
  30. data/test/bad-fixtures/malformed +9 -0
  31. data/test/fixture/json.json +1 -0
  32. data/test/fixture/old-data +9 -0
  33. data/test/fixture/yaml.yaml +55 -0
  34. data/test/minitest_helper.rb +12 -0
  35. data/test/test_mime_type.rb +527 -242
  36. data/test/test_mime_types.rb +130 -68
  37. data/test/test_mime_types_cache.rb +100 -0
  38. data/test/test_mime_types_class.rb +155 -0
  39. data/test/test_mime_types_lazy.rb +43 -0
  40. data/test/test_mime_types_loader.rb +32 -0
  41. metadata +286 -229
  42. data/License.rdoc +0 -10
  43. data/lib/mime/types/application +0 -940
  44. data/lib/mime/types/application.mac +0 -2
  45. data/lib/mime/types/application.nonstandard +0 -114
  46. data/lib/mime/types/application.obsolete +0 -40
  47. data/lib/mime/types/audio +0 -131
  48. data/lib/mime/types/audio.nonstandard +0 -10
  49. data/lib/mime/types/audio.obsolete +0 -1
  50. data/lib/mime/types/image +0 -43
  51. data/lib/mime/types/image.nonstandard +0 -17
  52. data/lib/mime/types/image.obsolete +0 -5
  53. data/lib/mime/types/message +0 -19
  54. data/lib/mime/types/message.obsolete +0 -1
  55. data/lib/mime/types/model +0 -15
  56. data/lib/mime/types/multipart +0 -14
  57. data/lib/mime/types/multipart.nonstandard +0 -1
  58. data/lib/mime/types/multipart.obsolete +0 -7
  59. data/lib/mime/types/other.nonstandard +0 -8
  60. data/lib/mime/types/text +0 -54
  61. data/lib/mime/types/text.nonstandard +0 -5
  62. data/lib/mime/types/text.obsolete +0 -7
  63. data/lib/mime/types/text.vms +0 -1
  64. data/lib/mime/types/video +0 -68
  65. data/lib/mime/types/video.nonstandard +0 -11
  66. data/lib/mime/types/video.obsolete +0 -3
  67. data/mime-types.gemspec +0 -57
  68. data/type-lists/application.txt +0 -951
  69. data/type-lists/audio.txt +0 -132
  70. data/type-lists/image.txt +0 -43
  71. data/type-lists/message.txt +0 -20
  72. data/type-lists/model.txt +0 -15
  73. data/type-lists/multipart.txt +0 -14
  74. data/type-lists/text.txt +0 -57
  75. data/type-lists/video.txt +0 -67
data/History.rdoc CHANGED
@@ -1,25 +1,537 @@
1
- == MIME::Types 1.17.2 / 2011-10-25
1
+ == 3.0 / 2015-11-21
2
+
3
+ * 2 governance changes
4
+
5
+ * This project and the related mime-types-data project are now exclusively
6
+ MIT licensed. Resolves
7
+ {#95}[https://github.com/mime-types/ruby-mime-types/issues/95].
8
+
9
+ * All projects under the mime-types organization now have a standard code of
10
+ conduct adapted from the {Contributor
11
+ Covenant}[http://contributor-covenant.org]. This text can be found in the
12
+ {Code-of-Conduct.rdoc}[Code-of-Conduct_rdoc.html] file.
13
+
14
+ * 3 major changes
15
+
16
+ * All methods deprecated in mime-types 2.x have been removed.
17
+ * mime-types now requires Ruby 2.0 compatibility or later. Resolves
18
+ {#97}[https://github.com/mime-types/ruby-mime-types/issues/97].
19
+ * The registry data has been removed from mime-types and put into
20
+ mime-types-data, maintained and released separately. It can be found at
21
+ {mime-types-data}[https://github.com/mime-types/mime-types-data].
22
+
23
+ * 17 minor changes:
24
+
25
+ * MIME::Type changes:
26
+
27
+ * Changed the way that simplified types representations are creatd to
28
+ reflect the fact that +x-+ prefixes are no longer considered special
29
+ according to IANA. A simplified MIME type is case-folded to lowercase. A
30
+ new keyword parameter, +remove_x_prefix+, can be provided to remove +x-+
31
+ prefixes.
32
+ * Improved initialization with an Array works so that extensions do not
33
+ need to be wrapped in another array. This means that <tt>%w(text/yaml
34
+ yaml yml)</tt> works in the same way that <tt>['text/yaml', %w(yaml
35
+ yml)]</tt> did (and still does).
36
+ * Changed +priority_compare+ to conform with attributes that no longer
37
+ exist.
38
+ * Changed the internal implementation of extensions to use a frozen Set.
39
+ * When extensions are set or modified with +add_extensions+, the primary
40
+ registry will be informed of a need to reindex extensions. Resolves
41
+ {#84}[https://github.com/mime-types/ruby-mime-types/issues/84].
42
+ * The preferred extension can be set explicitly. If not set, it will be the
43
+ first extension. If the preferred extension is not in the extension list,
44
+ it will be added.
45
+ * Improved how xref URLs are generated.
46
+ * Converted +obsolete+, +registered+ and +signature+ to attr_accessors.
47
+
48
+ * MIME::Types changes:
49
+
50
+ * Modified MIME::Types.new to track instances of MIME::Types so that they
51
+ can be told to reindex the extensions as necessary.
52
+ * Removed +data_version+ attribute.
53
+ * Changed #[] so that the +complete+ and +registered+ flags are keywords
54
+ instead of a generic options parameter.
55
+ * Extracted the class methods to a separate file.
56
+ * Changed the container implementation to use a Set instead of an Array to
57
+ prevent data duplication. Resolves
58
+ {#79}[https://github.com/mime-types/ruby-mime-types/issues/79].
59
+
60
+ * MIME::Types::Cache changes:
61
+
62
+ * Caching is now based on the data gem version instead of the mime-types
63
+ version.
64
+ * Caching is compatible with columnar registry stores.
65
+
66
+ * MIME::Types::Loader changes:
67
+
68
+ * MIME::Types::Loader::PATH has been removed and replaced with
69
+ MIME::Types::Data::PATH from the mime-types-data gem. The environment
70
+ variable RUBY_MIME_TYPES_DATA is still used.
71
+ * Support for the long-deprecated mime-types v1 format has been removed.
72
+ * The registry is default loaded from the columnar store by default. The
73
+ internal format of the columnar store has changed; many of the boolean
74
+ flags are now loaded from a single file. Resolves
75
+ {#85}[https://github.com/mime-types/ruby-mime-types/85].
76
+
77
+ == 2.6.2 / 2015-09-13
78
+
79
+ * Bugs:
80
+ * Emilio Losada (@losadaem) fixed an error where +each_with_object+'s block
81
+ parameters are the inverse of those used by +inject+. Resolves
82
+ {#107}[https://github.com/mime-types/ruby-mime-types/issues/107] with pull
83
+ request {#108}[https://github.com/mime-types/ruby-mime-types/pull/108].
84
+ * Matt Beedle (@mattbeedle) fixed a typo in MIME::Type::Columnar negatively
85
+ affecting people who use the +use_instead+ functionality. Resolved in
86
+ {#109}[https://github.com/mime-types/ruby-mime-types/pull/109].
87
+ * Documentation:
88
+ * Juanito Fatas (@JuanitoFatas) fixed a documentation issue with the README
89
+ not properly linking internally on the generated rdoc source. Resolved with
90
+ {#105}[https://github.com/mime-types/ruby-mime-types/pull/105].
91
+ * Development:
92
+ * Fixed a minor issue in the IANA registry parser that would generate empty
93
+ +text+ xrefs if the +text+ section was empty.
94
+
95
+ == 2.6.1 / 2015-05-25
96
+
97
+ * Bugs:
98
+ * Make columnar store handle all supported extensions, not just the first.
99
+ Resolved in {#103}[https://github.com/mime-types/ruby-mime-types/pull/103]
100
+ by Jeremy Evans (@jeremyevans).
101
+ * Avoid circular require when using the columnar store. Resolved in
102
+ {#102}[https://github.com/mime-types/ruby-mime-types/pull/102] by
103
+ Jeremy Evans (@jeremyevans).
104
+
105
+ == 2.6 / 2015-05-25
106
+
107
+ * New Feature:
108
+ * Columnar data storage for the MIME::Types registry, contributed by Jeremy
109
+ Evans (@jeremyevans). Reduces default memory use substantially (the mail
110
+ gem drops from 19 Mib to about 3 Mib). Resolves
111
+ {#96}[https://github.com/mime-types/ruby-mime-types/pull/96],
112
+ {#94}[https://github.com/mime-types/ruby-mime-types/issues/94],
113
+ {#83}[https://github.com/mime-types/ruby-mime-types/issues/83]. Partially
114
+ addresses {#64}[https://github.com/mime-types/ruby-mime-types/issues/64]
115
+ and {#62}[https://github.com/mime-types/ruby-mime-types/issues/62].
116
+ * Development:
117
+ * Removed caching of deprecation messages in preparation for mime-types 3.0.
118
+ Now, deprecated methods will always warn their deprecation instead of only
119
+ warning once.
120
+ * Added a logger for deprecation messages.
121
+ * Renamed <tt>lib/mime.rb</tt> to <tt>lib/mime/deprecations.rb</tt> to not
122
+ conflict with the {mime}[https://rubygems.org/gems/mime] gem on behalf of
123
+ the maintainers of the {Praxis Framework}[http://praxis-framework.io/].
124
+ Provided by Josep M. Blanquer (@blanquer),
125
+ {#100}[https://github.com/mime-types/ruby-mime-types/pull/100].
126
+ * Added the columnar data conversion tool, also provided by Jeremy Evans.
127
+ * Documentation:
128
+ * Improved documentation and ensured that all deprecated methods are marked
129
+ as such in the documentation.
130
+ * Development:
131
+ * Added more Ruby variants to Travis CI.
132
+ * Silenced deprecation messages for internal tools. Noisy deprecations are
133
+ noisy, but that's the point.
134
+
135
+ == 2.5 / 2015-04-25
136
+
137
+ * Bugs:
138
+ * David Genord (@albus522) fixed a bug in loading MIME::Types cache where a
139
+ container loaded from cache did not have the expected +default_proc+,
140
+ {#86}[https://github.com/mime-types/ruby-mime-types/pull/86].
141
+ * Richard Schneeman (@schneems) provided a patch that substantially reduces
142
+ unnecessary allocations.
143
+ * Documentation:
144
+ * Tibor Szolár (@flexik) fixed a typo in the README,
145
+ {#82}[https://github.com/mime-types/ruby-mime-types/pull/82]
146
+ * Fixed {#80}[https://github.com/mime-types/ruby-mime-types/issues/80],
147
+ clarifying the relationship of MIME::Type#content_type and
148
+ MIME::Type#simplified, with Ken Ip (@kenips).
149
+ * Development:
150
+ * Juanito Fatas (@JuanitoFatas) enabled container mode on Travis CI,
151
+ {#87}[https://github.com/mime-types/ruby-mime-types/pull/87].
152
+ * Moved development to a mime-types organization under
153
+ {mime-types/ruby-mime-types}[https://github.com/mime-types/ruby-mime-types].
154
+
155
+ == 2.4.3 / 2014-10-21
156
+
157
+ * Bugs:
158
+ * Restored Ruby 1.9.2 support by using +private_constant+ conditionally.
159
+ Fixes {#77}[https://github.com/mime-types/ruby-mime-types/issues/77] found by
160
+ Kris Leech (@krisleech). The conditional use of +private_constant+ here
161
+ will be removed for mime-types 3.0, when Ruby 1.9.2 support will be
162
+ unconditionally removed.
163
+
164
+ == 2.4.2 / 2014-10-15
165
+
166
+ * Bugs:
167
+ * Aaron Patterson (@tenderlove) found a loading bug and provided a fix that
168
+ nearly doubled registry load performance
169
+ ({#74}[https://github.com/mime-types/ruby-mime-types/pull/74]).
170
+ * Godfrey Chan (@chancancode) provided a prophylactic security fix to use
171
+ <tt>JSON.parse</tt> instead of <tt>JSON.load</tt> in
172
+ {#75}[https://github.com/mime-types/ruby-mime-types/pull/75]. This provides a
173
+ 20% improvement over the already improved result, resulting in a total 55%
174
+ performance boost.
175
+
176
+ == 2.4.1 / 2014-10-07
177
+
178
+ mime-types 2.4 was pulled.
179
+
180
+ * Bugs:
181
+ * Restored the extension sort order from mime-types 1.25.1 and modified
182
+ MIME::Type#extensions= to no longer sort extensions when set. This resolves
183
+ {#71}[https://github.com/mime-types/ruby-mime-types/issues/71] and should fix
184
+ Paperclip.
185
+ * API Changes:
186
+ * Added MIME::Type#preferred_extension to return the preferred extension for
187
+ the MIME type. This should be used in preference to the current mechanism
188
+ used by many clients, <tt>type.extensions.first</tt>. This will allow the
189
+ implementation to change over time.
190
+ * Added MIME::Type#friendly based on the concept presented by Łukasz Śliwa’s
191
+ {friendly_mime}[https://github.com/lukaszsliwa/friendly_mime] gem. The
192
+ initial English data for this is pulled from +friendly_mime+.
193
+ * Added MIME::Type#i18n_key and MIME::Type.i18n_key to represent and convert
194
+ MIME content types as translation keys for the I18n library.
195
+
196
+ * MIME Type Development Tools:
197
+ * Adding documentation to conversion methods.
198
+ * Adding some robustness to missing Nokogiri support.
199
+ * Extending coverage to fully cover new code. Tests now cover all of
200
+ mime-types.
201
+
202
+ == 2.3 / 2014-05-23
203
+
204
+ * Bugs:
205
+ * Fixed a bug in <tt>MIME::Types#type_for</tt> where type specifications that
206
+ did not match a MIME::Type would be returned as +nil+ inside the returned
207
+ array. This was incorrect behaviour as those values should not have been
208
+ returned, resulting in an empty array.
209
+ * MIME Type Development Tools:
210
+ * As always, there are bugs in the IANA registry because it's manually
211
+ maintained. Some robustness has been added to properly writing file
212
+ template references where the file template reference is not a full media
213
+ type specification (e.g., 'amr-wb\+' instead of 'audio/amr-wb\+').
214
+ * Both the IANA and Apache import tools were unnecessarily case-sensitive in
215
+ matching against already-existing MIME types, resulting in extra work to
216
+ weed out duplicates that differed only in the case of the canonical content
217
+ type. This has been fixed.
218
+
219
+ == 2.2 / 2014-03-14
220
+
221
+ * Clarified contribution guidelines for MIME types. Resolves
222
+ {#57}[https://github.com/mime-types/ruby-mime-types/issues/57].
223
+ * Fixed a small bug where deprecated methods would warn of deprecation when
224
+ called by internal methods. Resolves
225
+ {#60}[https://github.com/mime-types/ruby-mime-types/issues/60].
226
+ * Dropped Code Climate; added Coveralls for test coverage reports.
227
+ * Removing external references to RubyForge, as it is shutting down. Resolves
228
+ {#59}[https://github.com/mime-types/ruby-mime-types/issues/59].
229
+
230
+ == 2.1 / 2014-01-25
231
+
232
+ * API Changes (MIME::Type):
233
+ * Added MIME::Type#xrefs and MIME::Type#xref_urls that have better handling
234
+ of types of reference information. MIME::Type#references= has been
235
+ deprecated. In a future release, both MIME::Type#references will be turned
236
+ into a short-hand view on MIME::Type#xrefs, MIME::Type#urls will be an
237
+ alias for MIME::Type#xref_urls, and MIME::Type#references= will be removed.
238
+ * New or Updated MIME Types:
239
+ * This information is now tracked in History-Types.rdoc.
240
+ * MIME Type Development Tools:
241
+ * The IANA registry format changed, breaking the IANA registry tool
242
+ previously used. Rewrote IANADownloader and IANADownloader::Parser as
243
+ IANARegistryParser using the XML form.
244
+ * The LTSW list has been dropped as it has not been updated since 2002.
245
+ * The default Apache MIME types configuration list is now used to enrich MIME
246
+ type data with additional extension information.
247
+
248
+ == 2.0 / 2013-10-27
249
+
250
+ * API Changes (General):
251
+ * mime-types is no longer compatible with Ruby 1.8. Additionally, for its
252
+ YAML operations (normally development and test), it requires a YAML parser
253
+ that conforms to the Psych parser, not the Syck parser. This would only be
254
+ a problem with an alternative Ruby 1.9.2 interpreter that does not
255
+ implement the Psych parser conventions by requiring +psych+.
256
+ * MIME::InvalidContentType has been renamed to
257
+ MIME::Type::InvalidContentType.
258
+ * API Changes (MIME::Type):
259
+ * Construction of a MIME::Type can be with any of the following objects:
260
+ * An array containing a valid content type identifier and an optional array
261
+ of extensions. This allows MIME::Type.new to be used instead of
262
+ MIME::Type.from_array for the most common use-case. Fixes
263
+ {#43}[https://github.com/mime-types/ruby-mime-types/pull/43].
264
+ * A Hash containing the output of MIME::Type#to_h, as would be deserialized
265
+ from the JSON representation of a MIME::Type. This replaces
266
+ MIME::Type.from_hash using a different parameter set.
267
+ * Another MIME::Type.
268
+ * A content type identifier string.
269
+ * Assignment of an invalid encoding to MIME::Type#encoding= will raise a
270
+ MIME::Type::InvalidEncoding exception rather than a plain ArgumentError.
271
+ * MIME::Type#url has been renamed to MIME::Type#references.
272
+ * MIME::Type#use_instead is now tracked as its own attribute, not as part of
273
+ MIME::Type#docs.
274
+ * MIME::Type#system, MIME::Type#system?, MIME::Type#platform?,
275
+ MIME::Type#to_a, MIME::Type#to_hash, MIME::Type.from_array,
276
+ MIME::Type.from_hash, and MIME::Type.from_mime_type have been deprecated
277
+ for removal.
278
+ * Implemented YAML object encoding and decoding methods,
279
+ MIME::Type#encode_with and MIME::Type#init_with.
280
+ * Implemented JSON hash encoding methods.
281
+ * Added MIME::Type#add_extensions to easily add extensions to a MIME::Type.
282
+ Fixes {#44}[https://github.com/mime-types/ruby-mime-types/pull/44].
283
+ * API Changes (MIME::Types):
284
+ * MIME type caching has been extracted to its own class. It is structurally
285
+ similar to what was introduced with mime-types 1.25, but is no longer
286
+ considered an experimental interface.
287
+ * MIME type loading has been extracted to its own class. Loading has changed
288
+ substantially.
289
+ * MIME::Types#[] accepts a new filter flag, :registered. The :platform flag
290
+ has been deprecated.
291
+ * The MIME::Types#type_for platform parameter has been deprecated.
292
+ * Added the ability for MIME::Types#type_for produce results for multiple
293
+ filenames or extensions by providing an array as the first parameter. Fixes
294
+ {#42}[https://github.com/mime-types/ruby-mime-types/pull/42].
295
+ * MIME::Types#add_type_variant and MIME::Types#index_extensions have been
296
+ deprecated as public methods. They will be private in a future version.
297
+ * MIME::Types#defined_types, MIME::Types.cache_file,
298
+ MIME::Types.add_type_variant, and MIME::Types.index_extensions have been
299
+ deprecated for removal.
300
+ * Default Registry Changes:
301
+ * The default registry is now a file in the directory data/, located via
302
+ MIME::Types::Loader::PATH. +PATH+ is defined in the file
303
+ lib/mime/types/path.rb so that system packagers only have to modify one
304
+ file in order to put the registry in a location that is not where a gem
305
+ version of mime-types would expect it. This resolves issue
306
+ {#36}[https://github.com/mime-types/ruby-mime-types/pull/36], reported by
307
+ @postmodern.
308
+ * The default registry is now a single file in JSON format. This resolves
309
+ issue {#28}[https://github.com/mime-types/ruby-mime-types/pull/28] reported
310
+ by @jasonlor (an error with mime-types in MacRuby).
311
+ * The default registry is compiled from YAML files in type-lists/, resolving
312
+ issue {#37}[https://github.com/mime-types/ruby-mime-types/pull/37]
313
+ reported by @postmodern requesting an easier-to-edit format.
314
+ * New or Updated MIME Types:
315
+ * Major updates to the registered MIME type list from IANA using the improved
316
+ developer tools.
317
+ * Added:
318
+ * application/xhtml\+xml (HTML5)
319
+ * multipart/x-mixed-replace (HTML5)
320
+ * application/vnd.apple.pkpass (Apple PassBook) with extension pkpass.
321
+ * Modified:
322
+ * application/gzip (RFC6713) added extension (gz) and encoding.
323
+ * application/epub\+zip is not a registered MIME type.
324
+ * application/rss\+xml is not a registered MIME type.
325
+ * application/x-director reported incorrect extensions.
326
+ * application/x-gzip marked as obsolete (use application/gzip instead).
327
+ * application/x-maker marked as obsolete (use application/vnd.framemaker
328
+ instead).
329
+ * image/webp is not a registered MIME type; added a URL to Google's
330
+ proposed standard document.
331
+ * text/html added URL to the HTML5 specification.
332
+ * text/cache-manifest added URL to the HTML5 specification.
333
+ * text/plain (VMS .doc files) marked as non-standard. This type will be
334
+ merged with the standard text/plain type in a future release.
335
+ * Added md, markdown, rst, and textile extensions to text/plain.
336
+ * MIME Type Development Tools:
337
+ * The benchmarking task has been moved mostly to support/benchmarker.rb.
338
+ * A task for SimpleCov coverage has been added (<tt>rake test:coverage</tt>).
339
+ * IANA type registry downloading has been substantially improved and the
340
+ implementation no longer resides in the Rakefile; it has instead been moved
341
+ to support/iana_downloader.rb. This takes advantage of the new YAML
342
+ encoding functionality to update added or modified MIME types
343
+ non-destructively in <tt>type-lists/</tt> by default.
344
+ * Rake tasks <tt>convert:yaml:json</tt> and <tt>convert:json:yaml</tt>
345
+ provide functionality to convert the human-editable YAML format in
346
+ <tt>type-lists/</tt> to the JSON format in <tt>data/</tt> and vice-versa.
347
+ This is powered by support/convert.rb.
348
+
349
+ == 1.25 / 2013-08-30
350
+
351
+ * New Features:
352
+ * Adding lazy loading and caching functionality to the default data based on
353
+ work done by Greg Brockman (gdb).
354
+ * Bugs:
355
+ * Force the default internal application encoding to be used when reading the
356
+ MIME types database. Based on a change by briangamble, found in the rapid7
357
+ fork.
358
+ * New extensions:
359
+ * mjpeg (video/x-motion-jpeg) based on a change by punkrats, found in the
360
+ vidibus fork.
361
+ * Modernized Minitest configuration.
362
+
363
+ == 1.24 / 2013-08-14
364
+
365
+ * Code Climate:
366
+ * Working on improving the quality of the mime-types codebase through the use
367
+ of Code Climate.
368
+ * Simplified MIME::Type.from_array to make more assumptions about assignment.
369
+ * Documentation:
370
+ * LeoYoung <mrleoyoung@gmail.com> pointed out that the README.rdoc contained
371
+ examples that could never possibly work because MIME::Types#[] returns (for
372
+ all the versions I have handy) an array, not a single type. I have updated
373
+ README.rdoc to reflect this.
374
+ * Removed Nokogiri as a declared development dependency. It is still required
375
+ if you're going to use the IANA parser functionality, but it is not necessary
376
+ for most development purposes. This has been removed to ensure that Travis CI
377
+ passes on Ruby 1.8.7.
378
+ * New MIME Types:
379
+ * 7zip (application/x-7z-compressed). Fixes a request by @kodram.
380
+ {#32}[https://github.com/mime-types/ruby-mime-types/issues/32]
381
+ * application/x-www-form-urlencoded. Fixes a request by @alexkwolfe.
382
+ {#39}[https://github.com/mime-types/ruby-mime-types/issues/39]
383
+ * Various new MIME types from IANA:
384
+ * application/mbms-schedule\+xml from 3GPP and Turcotte.
385
+ * application/provenance\+xml from W3C and Herman.
386
+ * application/session-info from 3GPP and Firmin.
387
+ * application/urc-grpsheet\+xml, application/urc-targetdesc\+xml,
388
+ application/uisocketdesc\+xml from Zimmermann.
389
+ * application/api\+json from Klabnik.
390
+ * application/vnd.etsi.pstn\+xml from Han and Belling.
391
+ * application/vnd.fujixerox.docuworks.container from Tashiro.
392
+ * application/vnd.windows.devicepairing from Dandawate.
393
+ * video/vnd.radgamettools.bink and video/vnd.radgamettools.smacker from
394
+ Andersson.
395
+ * Updated MIME Types:
396
+ * RFC 6960 was adopted (application/ocsp-request and application/ocsp-response).
397
+
398
+ == 1.23 / 2013-04-20
399
+
400
+ * New Feature:
401
+ * Arnaud Meuret (@ameuret) suggested that it could be useful if the MIME type
402
+ collection was enumerable, so he implemented it in
403
+ {#30}[https://github.com/mime-types/ruby-mime-types/pull/30]. Thanks for
404
+ the contribution!
405
+ * Updated MIME Types:
406
+ * RFC6910 was adopted (application/call-completion).
407
+ * RFC6902 was adopted (application/json-patch\+json).
408
+ * RFC6917 was adopted (application/mrb-consumer\+xml,
409
+ application/mrb-publish\+xml).
410
+ * RFC6922 was adopted (application/sql).
411
+ * RFC2560 is being
412
+ {updated}[http://tools.ietf.org/html/draft-ietf-pkix-rfc2560bis].
413
+ * Administrivia:
414
+ * The gemspec now includes information about the licenses under which the
415
+ mime-types gem is available.
416
+ * Using hoe-gemspec2 instead of hoe-gemspec.
417
+
418
+ == 1.22 / 2013-03-30
419
+
420
+ * New MIME Types:
421
+ * Added support for 3FR (Hasselblad raw images) files. MIME-Type was obtained
422
+ by looking at exif data with exiftool. Thanks to cgat for these changes.
423
+ {#27}[https://github.com/mime-types/ruby-mime-types/pull/27]
424
+ * Updated MIME Types:
425
+ * Pulled the latest updates from the IANA MIME-Type registry.
426
+ * Added support for Ruby 2.0 with Travis CI.
427
+
428
+ == 1.21 / 2013-02-09
429
+
430
+ * New MIME Types:
431
+ * Various new or updated MIME types by Garret Alfert:
432
+ application/vnd.ms-fontobject, .eot; application/x-chrome-extension, .crx;
433
+ application/x-web-app-manifest\+json, .webapp; application/x-xpinstall,
434
+ .xpi; image/svg\+xml, .svg, .svgz; image/webp, .webp; text/cache-manifest,
435
+ .appcache, .manifest.
436
+ #{24}[https://github.com/mime-types/ruby-mime-types/pull/24]
437
+ * Fixed some Manifest.txt related madness on Travis.
438
+
439
+ == 1.20.1 / 2013-01-26
440
+
441
+ * New MIME Types:
442
+ * Apple iWork document types added by Hans de Graaff
443
+ (application/x-iwork-keynote-sffkey, .key;
444
+ application/x-iwork-pages-sffpages, .pages;
445
+ application/x-iwork-numbers-sffnumbers, .numbers).
446
+ {#20}[https://github.com/mime-types/ruby-mime-types/issue/20]
447
+ * epub, ibooks, mobi, and DMG content types by Mauricio
448
+ Linhares (mac:application/x-apple-diskimage, .dmg; application/epub\+zip,
449
+ .epub; application/x-ibooks\+zip, .ibooks; application/x-mobipocket-ebook,
450
+ .mobi). {#22}[https://github.com/mime-types/ruby-mime-types/issue/22]
451
+ * rss content type by Garret Alfert (application/rss\+xml, .rss).
452
+ {#23}[https://github.com/mime-types/ruby-mime-types/issue/23]
453
+ * Added or updated MIME types from the latest IANA list.
454
+ * Fixed MIME Types:
455
+ * Excel macro-enabled spreadsheets had an incorrect extension. Thanks to
456
+ Rafael Belvederese for reporting this issue.
457
+ {#21}[https://github.com/mime-types/ruby-mime-types/issue/21]
458
+ * Enabled for use with travis.
459
+ * Enabled gem signing.
460
+ * Fixed an error related to MIME type downloads.
461
+ * This was previously published as 1.20, but I had forgotten some attributions.
462
+
463
+ == 1.19 / 2012-06-20
464
+ * New MIME Types:
465
+ * XCF Gnome Images (image/x-xcf, image/x-compressed-xcf; .xcf).
466
+ {#17}[https://github.com/mime-types/ruby-mime-types/issue/17]
467
+ * Types reported in
468
+ {#12}[https://github.com/mime-types/ruby-mime-types/issues/12]:
469
+ * DV (video/x-dv; .dv)
470
+ * IVF (video/x-ivf; .ivf)
471
+ * Matroska (video/x-matroska; .mkv)
472
+ * Motion JPEG (video/x-motion-jpeg; .mjpg)
473
+ * RealMedia (official; application/vnd.rn-realmedia; .rm)
474
+ * New extensions:
475
+ * dcm (application/dicom);
476
+ {#16}[https://github.com/mime-types/ruby-mime-types/issue/16].
477
+ * Types reported in
478
+ {#12}[https://github.com/mime-types/ruby-mime-types/issues/12]:
479
+ * 3g2, 3gpp2 (video/3gpp2)
480
+ * mpeg (video/mpeg)
481
+ * mxf (application/mxf)
482
+ * ts (video/MP2T)
483
+ * ogg (video/ogg)
484
+ * Fixed MIME Types:
485
+ * Adobe AIR application installer packages was missing a hyphen.
486
+ {#13}[https://github.com/mime-types/ruby-mime-types/issue/13]
487
+ * Types reported in
488
+ {#12}[https://github.com/mime-types/ruby-mime-types/issues/12]:
489
+ * audio/x-pn-realaudio extension is .ra, not .rm.
490
+ * Resolved {#8}[https://github.com/mime-types/ruby-mime-types/issues/8].
491
+ Apparently some people run the tests on Linux. Imagine that.
492
+
493
+ == 1.18 / 2012-03-20
494
+ * New MIME Types:
495
+ * Types reported in
496
+ #{6}[https://github.com/mime-types/ruby-mime-types/issues/6]:
497
+ * CoffeeScript (text/x-coffeescript; .coffee; 8bit).
498
+ * AIR (application/vnd.adobe.air-applicationinstaller-package\+zip, .air; base64).
499
+ * WOFF (application/font-woff; .woff; base64).
500
+ * TrueType (application/x-font-truetype; .ttf; base64).
501
+ * OpenType (application/x-font-opentype; .otf; base64).
502
+ * WebM (audio/webm, video/webm; .webm).
503
+ {#11}[https://github.com/mime-types/ruby-mime-types/issues/11.]
504
+ * New extensions:
505
+ * f4v/f4p (video/mp4, used by Adobe); f4a/fb4 (audio/mp4, used by Adobe).
506
+ * Bug Fixes:
507
+ * It was pointed out that Licence.txt was incorrectly named. Fixed by
508
+ renaming to Licence.rdoc (from Issue/Pull Request
509
+ {#8}[https://github.com/mime-types/ruby-mime-types/issues/8]).
510
+ * It was pointed out that a plan to have the test output generated
511
+ automatically never went through.
512
+ {#10}[https://github.com/mime-types/ruby-mime-types/issues/10]
513
+
514
+ == 1.17.2 / 2011-10-25
2
515
  * Bug Fixes:
3
516
  * Fixed an issue with Ruby 1.9 and file encoding.
4
517
 
5
- == MIME::Types 1.17.1 / 2011-10-23
518
+ == 1.17.1 / 2011-10-23
6
519
  * Minor Enhancements:
7
520
  * Implemented modern 'hoe' semantics.
8
521
  * Switched to minitest instead of test/unit.
9
522
  * Converted documentation from .txt to .rdoc.
10
- * Removed setup.rb. (Issue #3:
11
- https://github.com/halostatue/mime-types/issues/3).
12
- * Should no longer complain about missing RubyGems keys (Issue #2:
13
- https://github.com/halostatue/mime-types/issues/2).
523
+ * Removed setup.rb.
524
+ {#3}[https://github.com/mime-types/ruby-mime-types/issues/3]
525
+ * Should no longer complain about missing RubyGems keys
526
+ {#2}[https://github.com/mime-types/ruby-mime-types/issues/2]
14
527
  * Added .mp4 and .mpg4 as recognized extensions for
15
- {application,audio,video}/mp4 per RFC4337. (Issue #1:
16
- https://github.com/halostatue/mime-types/issues/1).
17
- * Added audio/x-aac and .aac per RubyForge issue #28054
18
- (http://rubyforge.org/tracker/index.php?func=detail&aid=28054&group_id=293&atid=1194).
528
+ (application|audio|video)/mp4 per RFC4337.
529
+ {#1}[https://github.com/mime-types/ruby-mime-types/issues/1]
530
+ * Added audio/x-aac and .aac per RubyForge issue #28054.
19
531
  * Made it much easier to update MIME types from this point forward.
20
532
  * Updated MIME types from IANA.
21
533
 
22
- == MIME::Types 1.16
534
+ == 1.16
23
535
  * Made compatible with Ruby 1.8.6, 1.8.7, and 1.9.1.
24
536
  * Switched to the 'hoe' gem system and added a lot of build-time tools.
25
537
  * Updated the MIME types to the list based on the values in the Perl library
@@ -29,7 +541,7 @@
29
541
  starting soon on MIME::Types 2.x with richer data querying mechanisms
30
542
  and support for external data sources.
31
543
 
32
- == MIME::Types 1.15
544
+ == 1.15
33
545
  * Removed lib/mime/type.rb to form a single MIME::Types database source. It
34
546
  is unlikely that one will ever need MIME::Type without MIME::Types.
35
547
  * Re-synchronized the MIME type list with the sources, focusing primarily on
@@ -43,7 +555,7 @@
43
555
  priority as of this release. The data format and information has changed.
44
556
  * Removed MIME::Types.by_suffix and MIME::Types.by_mediatype.
45
557
 
46
- == MIME::Types 1.13.1
558
+ == 1.13.1
47
559
  * Fixed a problem with the installer running tests. This now works.
48
560
  * Improved the implementation of MIME::Type.signature?
49
561
  * Moved code around to use the class << self idiom instead of always
@@ -51,13 +563,13 @@
51
563
  * Added two new best-guess implementations of functions found in Perl's
52
564
  MIME::Types implementation (1.13). Do not rely on these until the purpose
53
565
  and implementation is stabilised.
54
- * Updated the MIME list to reflect changes noted by
566
+ * Updated the MIME list to reflect changes noted by
55
567
  Ville Skyttä <ville.skytta@iki.fi>.
56
568
  * Added a new constant to MIME::Types, DATA_VERSION. This will allow the Ruby
57
569
  version number to be updated separately from the Perl version while keeping
58
570
  the MIME Type list version in sync.
59
571
 
60
- == MIME::Types 1.13
572
+ == 1.13
61
573
  ! WARNING: This version changes the API of MIME::Types !
62
574
  ! WARNING: This version is compatible with Ruby 1.8 and higher ONLY !
63
575
  * Removed dependency on InstallPackage; offering 1.13 as either .tar.gz or
@@ -96,33 +608,22 @@
96
608
  exchange between the two projects.
97
609
  * Added additional unit tests from Mark Overmeer's 1.12 version.
98
610
 
99
- == MIME::Types 1.07
611
+ == 1.07
100
612
  * Changed version numbering to match Perl MIME::Types 1.07.
101
613
  * Re-synchronized with Mark Overmeer's list in Perl PMIME::Types 1.07.
102
614
  * [NN Poster] updated the attributes for the PGP types.
103
615
 
104
- == MIME::Types 1.005
616
+ == 1.005
105
617
  * Changed to Phil Thomson's InstallPackage.
106
618
  * Added several types from Perl MIME::Types 1.005.
107
619
  * Cleaned up data format; some data formats will show up with proper data now.
108
620
 
109
- == MIME::Types 1.004
621
+ == 1.004
110
622
  * Updated to match Perl MIME::Types 1.004, links credited to Dan Puro. Adds
111
623
  new reference list to http://www.indiana.edu/cgi-bin-local/mimetypes
112
624
  * Removed InvalidType and replaced with TypeError.
113
625
  * Changed instances of #type to #class.
114
626
  * Cleaned up how simplified versions are created.
115
627
 
116
- == MIME::Types 1.003
628
+ == 1.003
117
629
  * Initial release based on Perl MIME::Types 1.003.
118
-
119
- == Copyright
120
- MIME::Types
121
- A Ruby implementation of a MIME Types information library. Based in spirit
122
- on the Perl MIME::Types information library by Mark Overmeer.
123
- http://rubyforge.org/projects/mime-types/
124
-
125
- Licensed under the Ruby disjunctive licence with the GNU GPL or the Perl
126
- Artistic licence. See Licence.txt for more information.
127
-
128
- Copyright 2003 - 2009 Austin Ziegler
data/Licence.rdoc ADDED
@@ -0,0 +1,25 @@
1
+ == Licence
2
+
3
+ * Copyright 2003–2015 Austin Ziegler.
4
+
5
+ The software in this repository is made available under the MIT license.
6
+
7
+ === MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
10
+ this software and associated documentation files (the "Software"), to deal in
11
+ the Software without restriction, including without limitation the rights to
12
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
13
+ of the Software, and to permit persons to whom the Software is furnished to do
14
+ so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.