mime-types 2.99.3 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/{Code-of-Conduct.rdoc → Code-of-Conduct.md} +19 -20
  3. data/Contributing.md +139 -0
  4. data/History.md +208 -0
  5. data/{Licence.rdoc → Licence.md} +4 -18
  6. data/Manifest.txt +8 -25
  7. data/README.rdoc +63 -67
  8. data/Rakefile +144 -55
  9. data/lib/mime/type/columnar.rb +29 -62
  10. data/lib/mime/type.rb +192 -417
  11. data/lib/mime/types/_columnar.rb +137 -0
  12. data/lib/mime/types/cache.rb +51 -73
  13. data/lib/mime/types/columnar.rb +2 -147
  14. data/lib/mime/types/container.rb +94 -0
  15. data/lib/mime/types/deprecations.rb +5 -24
  16. data/lib/mime/types/full.rb +19 -0
  17. data/lib/mime/types/loader.rb +12 -141
  18. data/lib/mime/types/logger.rb +4 -0
  19. data/lib/mime/types/registry.rb +90 -0
  20. data/lib/mime/types.rb +43 -139
  21. data/lib/mime-types.rb +1 -1
  22. data/test/minitest_helper.rb +6 -12
  23. data/test/test_mime_type.rb +473 -455
  24. data/test/test_mime_types.rb +136 -86
  25. data/test/test_mime_types_cache.rb +83 -53
  26. data/test/test_mime_types_class.rb +119 -97
  27. data/test/test_mime_types_lazy.rb +27 -23
  28. data/test/test_mime_types_loader.rb +7 -32
  29. metadata +102 -62
  30. data/Contributing.rdoc +0 -170
  31. data/History-Types.rdoc +0 -454
  32. data/History.rdoc +0 -590
  33. data/data/mime-types.json +0 -1
  34. data/data/mime.content_type.column +0 -1980
  35. data/data/mime.docs.column +0 -1980
  36. data/data/mime.encoding.column +0 -1980
  37. data/data/mime.friendly.column +0 -1980
  38. data/data/mime.obsolete.column +0 -1980
  39. data/data/mime.registered.column +0 -1980
  40. data/data/mime.signature.column +0 -1980
  41. data/data/mime.use_instead.column +0 -1980
  42. data/data/mime.xrefs.column +0 -1980
  43. data/docs/COPYING.txt +0 -339
  44. data/docs/artistic.txt +0 -127
  45. data/lib/mime/types/loader_path.rb +0 -15
  46. data/support/apache_mime_types.rb +0 -108
  47. data/support/benchmarks/load.rb +0 -64
  48. data/support/benchmarks/load_allocations.rb +0 -83
  49. data/support/benchmarks/object_counts.rb +0 -41
  50. data/support/convert/columnar.rb +0 -88
  51. data/support/convert.rb +0 -158
  52. data/support/iana_registry.rb +0 -172
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mime-types
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.99.3
4
+ version: 3.2.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-09-11 00:00:00.000000000 Z
11
+ date: 2018-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest
14
+ name: mime-types-data
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.9'
20
- type: :development
19
+ version: '3.2015'
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.9'
26
+ version: '3.2015'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rdoc
28
+ name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
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: '4.0'
40
+ version: '5.11'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: hoe-doofus
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -137,19 +137,53 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rake
140
+ name: minitest-bonus-assertions
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '10.0'
145
+ version: '3.0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: minitest-hooks
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.4'
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.4'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rake
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '10.0'
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: '13.0'
177
+ type: :development
178
+ prerelease: false
179
+ version_requirements: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
151
182
  - !ruby/object:Gem::Version
152
183
  version: '10.0'
184
+ - - "<"
185
+ - !ruby/object:Gem::Version
186
+ version: '13.0'
153
187
  - !ruby/object:Gem::Dependency
154
188
  name: fivemat
155
189
  requirement: !ruby/object:Gem::Requirement
@@ -178,91 +212,99 @@ dependencies:
178
212
  - - "~>"
179
213
  - !ruby/object:Gem::Version
180
214
  version: '5.2'
215
+ - !ruby/object:Gem::Dependency
216
+ name: simplecov
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - "~>"
220
+ - !ruby/object:Gem::Version
221
+ version: '0.7'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - "~>"
227
+ - !ruby/object:Gem::Version
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'
181
249
  - !ruby/object:Gem::Dependency
182
250
  name: hoe
183
251
  requirement: !ruby/object:Gem::Requirement
184
252
  requirements:
185
253
  - - "~>"
186
254
  - !ruby/object:Gem::Version
187
- version: '3.15'
255
+ version: '3.17'
188
256
  type: :development
189
257
  prerelease: false
190
258
  version_requirements: !ruby/object:Gem::Requirement
191
259
  requirements:
192
260
  - - "~>"
193
261
  - !ruby/object:Gem::Version
194
- version: '3.15'
262
+ version: '3.17'
195
263
  description: |-
196
264
  The mime-types library provides a library and registry for information about
197
265
  MIME content type definitions. It can be used to determine defined filename
198
266
  extensions for MIME types, or to use filename extensions to look up the likely
199
267
  MIME type definitions.
200
268
 
201
- This is release 2.99.1, the first scheduled data update for mime-types 2.x. As
202
- of mime-types 2.99. deprecation warnings are noisy and data that has been
203
- deprecated is now no longer available. The data is both dropped from the data
204
- files and is stubbed out as empty or +nil+ values as appropriate.
205
-
206
- mime-types-2.6 was the last version of mime-types 2.x with newly available
207
- features, and mime-types 2.99 will only receive quarterly updates to the IANA
208
- registered MIME media types plus any security updates that may be required.
209
-
210
- If the loss of the deprecated data matters, be sure to set your dependency
211
- appropriately:
212
-
213
- gem 'mime-types', '~> 2.6, < 2.99'
269
+ Version 3.0 is a major release that requires Ruby 2.0 compatibility and removes
270
+ deprecated functions. The columnar registry format introduced in 2.6 has been
271
+ made the primary format; the registry data has been extracted from this library
272
+ and put into {mime-types-data}[https://github.com/mime-types/mime-types-data].
273
+ Additionally, mime-types is now licensed exclusively under the MIT licence and
274
+ there is a code of conduct in effect. There are a number of other smaller
275
+ changes described in the History file.
214
276
  email:
215
277
  - halostatue@gmail.com
216
278
  executables: []
217
279
  extensions: []
218
280
  extra_rdoc_files:
219
- - Code-of-Conduct.rdoc
220
- - Contributing.rdoc
221
- - History-Types.rdoc
222
- - History.rdoc
223
- - Licence.rdoc
281
+ - Code-of-Conduct.md
282
+ - Contributing.md
283
+ - History.md
284
+ - Licence.md
224
285
  - Manifest.txt
225
286
  - README.rdoc
226
- - docs/COPYING.txt
227
- - docs/artistic.txt
228
287
  files:
229
- - Code-of-Conduct.rdoc
230
- - Contributing.rdoc
231
- - History-Types.rdoc
232
- - History.rdoc
233
- - Licence.rdoc
288
+ - Code-of-Conduct.md
289
+ - Contributing.md
290
+ - History.md
291
+ - Licence.md
234
292
  - Manifest.txt
235
293
  - README.rdoc
236
294
  - Rakefile
237
- - data/mime-types.json
238
- - data/mime.content_type.column
239
- - data/mime.docs.column
240
- - data/mime.encoding.column
241
- - data/mime.friendly.column
242
- - data/mime.obsolete.column
243
- - data/mime.registered.column
244
- - data/mime.signature.column
245
- - data/mime.use_instead.column
246
- - data/mime.xrefs.column
247
- - docs/COPYING.txt
248
- - docs/artistic.txt
249
295
  - lib/mime-types.rb
250
296
  - lib/mime/type.rb
251
297
  - lib/mime/type/columnar.rb
252
298
  - lib/mime/types.rb
299
+ - lib/mime/types/_columnar.rb
253
300
  - lib/mime/types/cache.rb
254
301
  - lib/mime/types/columnar.rb
302
+ - lib/mime/types/container.rb
255
303
  - lib/mime/types/deprecations.rb
304
+ - lib/mime/types/full.rb
256
305
  - lib/mime/types/loader.rb
257
- - lib/mime/types/loader_path.rb
258
306
  - lib/mime/types/logger.rb
259
- - support/apache_mime_types.rb
260
- - support/benchmarks/load.rb
261
- - support/benchmarks/load_allocations.rb
262
- - support/benchmarks/object_counts.rb
263
- - support/convert.rb
264
- - support/convert/columnar.rb
265
- - support/iana_registry.rb
307
+ - lib/mime/types/registry.rb
266
308
  - test/bad-fixtures/malformed
267
309
  - test/fixture/json.json
268
310
  - test/fixture/old-data
@@ -277,8 +319,6 @@ files:
277
319
  homepage: https://github.com/mime-types/ruby-mime-types/
278
320
  licenses:
279
321
  - MIT
280
- - Artistic-2.0
281
- - GPL-2.0
282
322
  metadata: {}
283
323
  post_install_message:
284
324
  rdoc_options:
@@ -290,7 +330,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
330
  requirements:
291
331
  - - ">="
292
332
  - !ruby/object:Gem::Version
293
- version: 1.9.2
333
+ version: '2.0'
294
334
  required_rubygems_version: !ruby/object:Gem::Requirement
295
335
  requirements:
296
336
  - - ">="
@@ -298,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
338
  version: '0'
299
339
  requirements: []
300
340
  rubyforge_project:
301
- rubygems_version: 2.5.1
341
+ rubygems_version: 2.7.7
302
342
  signing_key:
303
343
  specification_version: 4
304
344
  summary: The mime-types library provides a library and registry for information about
data/Contributing.rdoc DELETED
@@ -1,170 +0,0 @@
1
- == Contributing
2
-
3
- I value any contribution to mime-types you can provide: a bug report, a feature
4
- request, or code contributions.
5
-
6
- There are a few guidelines for contributing to mime-types:
7
-
8
- * Code changes *will* *not* be accepted without tests. The test suite is
9
- written with {Minitest}[https://github.com/seattlerb/minitest].
10
- * Match my coding style.
11
- * Use a thoughtfully-named topic branch that contains your change. Rebase your
12
- commits into logical chunks as necessary.
13
- * Use {quality commit messages}[http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html].
14
- * Do not change the version number; when your patch is accepted and a release
15
- is made, the version will be updated at that point.
16
- * Submit a GitHub pull request with your changes.
17
- * New or changed behaviours require new or updated documentation.
18
-
19
- === Adding or Modifying MIME Types
20
-
21
- The mime-types registry is loaded from encoded files in +data+. These are not
22
- editable and cannot be compared meaningfully in a pull request; pull requests
23
- that include changes to these files will require amendment to revert these
24
- files.
25
-
26
- New or modified MIME types should be edited in the appropriate YAML file under
27
- +type-lists+. The format is as shown below for the +application/xml+ MIME type
28
- in +type-lists/application.yml+.
29
-
30
- - !ruby/object:MIME::Type
31
- content-type: application/xml
32
- encoding: 8bit
33
- extensions:
34
- - xml
35
- - xsl
36
- xrefs: !ruby/hash:MIME::Types::Container
37
- rfc:
38
- - rfc3023
39
- registered: true
40
-
41
- There are other fields that can be added, matching the fields discussed in the
42
- documentation for MIME::Type. Pull requests for MIME types should just contain
43
- the changes to the YAML files for the new or modified MIME types; I will
44
- convert the YAML files to JSON prior to a new release. I would rather not have
45
- to verify that the JSON matches the YAML changes, which is why it is not
46
- necessary to convert for the pull request.
47
-
48
- If you are making a change for a private fork, use <tt>rake
49
- convert:yaml:json</tt> to convert the YAML to JSON, or <tt>rake
50
- convert:yaml:columnar</tt> to convert it to the new columnar format.
51
-
52
- ==== Updating Types from the IANA or Apache Lists
53
-
54
- If you are maintaining a private fork and wish to update your copy of the MIME
55
- types registry used by this gem, you can do this with the rake tasks:
56
-
57
- $ rake mime:iana
58
- $ rake mime:apache
59
-
60
- Both of these require
61
- {Nokogiri}[http://www.nokogiri.org/tutorials/installing_nokogiri.html], which
62
- is not installed by default. Install it in the usual way for your Ruby.
63
-
64
- === Test Dependencies
65
-
66
- mime-types uses Ryan Davis’s {Hoe}[https://github.com/seattlerb/hoe] to manage
67
- the release process, and it adds a number of rake tasks. You will mostly be
68
- interested in:
69
-
70
- $ rake
71
-
72
- which runs the tests the same way that:
73
-
74
- $ rake test
75
- $ rake travis
76
-
77
- will do.
78
-
79
- To assist with the installation of the development dependencies for mime-types,
80
- I have provided the simplest possible Gemfile pointing to the (generated)
81
- +mime-types.gemspec+ file. This will permit you to do:
82
-
83
- $ bundle install
84
-
85
- to get the development dependencies. If you aleady have +hoe+ installed, you
86
- can accomplish the same thing with:
87
-
88
- $ rake newb
89
-
90
- This task will install any missing dependencies, run the tests/specs, and
91
- generate the RDoc.
92
-
93
- You can run tests with code coverage analysis by running:
94
-
95
- $ rake test:coverage
96
-
97
- === Benchmarks
98
-
99
- mime-types offers several benchmark tasks to measure different measures of
100
- performance.
101
-
102
- There is a repeated load test, measuring how long it takes to start and load
103
- mime-types with its full registry. By default, it runs fifty loops and uses the
104
- built-in benchmark library.
105
-
106
- $ rake benchmark:load
107
-
108
- There are two allocation tracing benchmarks (for normal and columnar loads).
109
- These can only be run on Ruby 2.1 or better and requires the
110
- {allocation_tracer}[https://github.com/ko1/allocation_tracer] gem (not
111
- installed by default).
112
-
113
- $ rake benchmark:allocations
114
- $ rake benchmark:allocations:columnar
115
-
116
- There are two loaded object count benchmarks (for normal and columnar loads).
117
- These use <tt>ObjectSpace.count_objects</tt>.
118
-
119
- $ rake benchmark:objects
120
- $ rake benchmark:objects:columnar
121
-
122
- === Workflow
123
-
124
- Here's the most direct way to get your work merged into the project:
125
-
126
- * Fork the project.
127
- * Clone down your fork (<tt>git clone git://github.com/<username>/ruby-mime-types.git</tt>).
128
- * Create a topic branch to contain your change (<tt>git checkout -b my\_awesome\_feature</tt>).
129
- * Hack away, add tests. Not necessarily in that order.
130
- * Make sure everything still passes by running +rake+.
131
- * If necessary, rebase your commits into logical chunks, without errors.
132
- * Push the branch up (<tt>git push origin my\_awesome\_feature</tt>).
133
- * Create a pull request against mime-types/ruby-mime-types and describe what
134
- your change does and the why you think it should be merged.
135
-
136
- === Contributors
137
-
138
- * Austin Ziegler created mime-types.
139
-
140
- Thanks to everyone else who has contributed to mime-types:
141
-
142
- * Aaron Patterson
143
- * Aggelos Avgerinos
144
- * Andre Pankratz
145
- * Andy Brody
146
- * Arnaud Meuret
147
- * Brandon Galbraith
148
- * Chris Gat
149
- * David Genord
150
- * Eric Marden
151
- * Garret Alfert
152
- * Godfrey Chan
153
- * Greg Brockman
154
- * Hans de Graaff
155
- * Henrik Hodne
156
- * Jeremy Evans
157
- * Juanito Fatas
158
- * Łukasz Śliwa
159
- * Keerthi Siva
160
- * Ken Ip
161
- * Martin d'Allens
162
- * Mauricio Linhares
163
- * nycvotes-dev
164
- * Postmodern
165
- * Richard Hirner
166
- * Richard Hurt
167
- * Richard Schneeman
168
- * Tao Guo
169
- * Tibor Szolár
170
- * Todd Carrico