mime-types 3.1 → 3.2

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