mime-types 3.6.0 → 3.6.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.
- checksums.yaml +4 -4
- data/{History.md → CHANGELOG.md} +144 -116
- data/CONTRIBUTING.md +93 -0
- data/CONTRIBUTORS.md +51 -0
- data/{Licence.md → LICENCE.md} +9 -10
- data/Manifest.txt +8 -6
- data/README.md +199 -0
- data/Rakefile +55 -93
- data/SECURITY.md +7 -0
- data/lib/mime/type.rb +2 -3
- data/lib/mime/types/container.rb +43 -13
- data/lib/mime/types/logger.rb +34 -3
- data/lib/mime/types/version.rb +14 -0
- data/lib/mime/types.rb +1 -3
- data/test/minitest_helper.rb +3 -3
- metadata +39 -92
- data/.standard.yml +0 -4
- data/Contributing.md +0 -133
- data/README.rdoc +0 -195
- /data/{Code-of-Conduct.md → CODE_OF_CONDUCT.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d48539865c96a17991bbceab6d3ff2b2d6db5e281448d9bd76dd5fc12a48cd2
|
4
|
+
data.tar.gz: 79bcc6970d5f1774fc6a45162ba28222e72eeb37110e4d61eef96a50faeea4ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72aaaf23f926bd1ec8b4d978b8878d0c4b2a8b9083600ebbd051328c3f6cc3b15bbdb73be20cd87b9b3e49c83f29a63b8c54fad6026e4dc9dbaac052554f84f3
|
7
|
+
data.tar.gz: 503bef89f86cf2cfbbbc5d76f642289ad011ca0c98ebef86e855be599efc3b90e59e3d4b984d4a17f59298ccf2b30c267ced17ee0b11ba905c9e732af51dd6f2
|
data/{History.md → CHANGELOG.md}
RENAMED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.6.2 / 2025-03-25
|
4
|
+
|
5
|
+
- Updated the reference to the changelog in the README, fixing RubyGems metadata
|
6
|
+
on the next release. Fixed in [#189][pull-189] by nna774.
|
7
|
+
|
8
|
+
## 3.6.1 / 2025-03-15
|
9
|
+
|
10
|
+
- Restructure project structure to be more consistent with mime-types-data.
|
11
|
+
|
12
|
+
- Increased GitHub action security. Added Ruby 3.4, dropped macOS 12, added
|
13
|
+
macOS 15.
|
14
|
+
|
15
|
+
- Added [trusted publishing][tp] for fully automated releases.
|
16
|
+
|
17
|
+
- Added `MIME::Types::NullLogger` to completely silence MIME::Types logging.
|
18
|
+
|
19
|
+
- Improved the development experience with updates to the Gemfile.
|
20
|
+
|
21
|
+
- Worked around various issues with the benchmarks and profiling code.
|
22
|
+
|
23
|
+
- Removed Forwardable from MIME::Types::Container.
|
24
|
+
|
25
|
+
- Added coverage support (back).
|
26
|
+
|
3
27
|
## 3.6.0 / 2024-10-02
|
4
28
|
|
5
29
|
- 2 deprecations:
|
@@ -25,9 +49,9 @@ there are some validation changes and updated code with formatting.
|
|
25
49
|
|
26
50
|
- Dependency and CI updates:
|
27
51
|
|
28
|
-
- Masato Nakamura added Ruby 3.3 to the CI workflow in [#179][].
|
52
|
+
- Masato Nakamura added Ruby 3.3 to the CI workflow in [#179][pull-179].
|
29
53
|
|
30
|
-
- Fixed regressions in standard formatting in [#180][].
|
54
|
+
- Fixed regressions in standard formatting in [#180][pull-180].
|
31
55
|
|
32
56
|
- Removed `minitest-bonus-assertions` because of a bundler resolution issue.
|
33
57
|
Created a better replacement in-line.
|
@@ -37,18 +61,18 @@ there are some validation changes and updated code with formatting.
|
|
37
61
|
- 1 bug fix:
|
38
62
|
|
39
63
|
- Better handle possible line-termination strings (legal in Unix filenames)
|
40
|
-
such as `\n` in `MIME::Types.type_for`. Reported by ooooooo-q in
|
41
|
-
resolved in [#178][].
|
64
|
+
such as `\n` in `MIME::Types.type_for`. Reported by ooooooo-q in
|
65
|
+
[#177][issue-177], resolved in [#178][pull-178].
|
42
66
|
|
43
67
|
## 3.5.0 / 2023-08-07
|
44
68
|
|
45
69
|
- 1 minor enhancement:
|
46
70
|
|
47
71
|
- Robb Shecter changed the default log level for duplicate type variant from
|
48
|
-
`warn` to `debug` in [#170][]. This works because
|
49
|
-
intended to fit the `::Logger` interface, and the
|
50
|
-
(`WarnLogger`) is a subclass of `::Logger` that passes
|
51
|
-
`Kernel.warn`.
|
72
|
+
`warn` to `debug` in [#170][pull-170]. This works because
|
73
|
+
`MIME::Types.logger` is intended to fit the `::Logger` interface, and the
|
74
|
+
default logger (`WarnLogger`) is a subclass of `::Logger` that passes
|
75
|
+
through to `Kernel.warn`.
|
52
76
|
|
53
77
|
- Further consideration has changed cache load messages from `warn` to
|
54
78
|
`error` and deprecation messages from `warn` to `debug`.
|
@@ -56,7 +80,7 @@ there are some validation changes and updated code with formatting.
|
|
56
80
|
- 1 bug fix:
|
57
81
|
|
58
82
|
- Added a definition of `MIME::Type#hash`. Contributed by Alex Vondrak in
|
59
|
-
[#167][], fixing [#166][].
|
83
|
+
[#167][pull-167], fixing [#166][issue-166].
|
60
84
|
|
61
85
|
- Dependency and CI updates:
|
62
86
|
|
@@ -81,8 +105,8 @@ there are some validation changes and updated code with formatting.
|
|
81
105
|
|
82
106
|
- Fixed a Ruby < 2.3 incompatibility introduced by the use of standardrb,
|
83
107
|
where `<<-` heredocs were converted to `<<~` heredocs. These have been
|
84
|
-
reverted back to `<<-` with the indentation kept and a `.strip` call
|
85
|
-
|
108
|
+
reverted back to `<<-` with the indentation kept and a `.strip` call to
|
109
|
+
prevent excess whitespace.
|
86
110
|
|
87
111
|
## 3.4.0 / 2021-11-15
|
88
112
|
|
@@ -98,10 +122,10 @@ there are some validation changes and updated code with formatting.
|
|
98
122
|
|
99
123
|
- Administrivia:
|
100
124
|
|
101
|
-
- Added Ruby 3.0 to the CI test matrix. Added `windows/jruby` to the
|
102
|
-
|
125
|
+
- Added Ruby 3.0 to the CI test matrix. Added `windows/jruby` to the CI
|
126
|
+
exclusion list; it refuses to run successfully.
|
103
127
|
- Removed the Travis CI configuration and changed it to Github Workflows
|
104
|
-
[#150][]. Removed Coveralls configuration.
|
128
|
+
[#150][pull-150]. Removed Coveralls configuration.
|
105
129
|
- Igor Victor added TruffleRuby to the Travis CI configuration. [#149]
|
106
130
|
- Koichi ITO loosened an excessively tight dependency. [#147]
|
107
131
|
- Started using `standardrb` for Ruby formatting and validation.
|
@@ -111,15 +135,16 @@ there are some validation changes and updated code with formatting.
|
|
111
135
|
|
112
136
|
- 1 minor bug fix:
|
113
137
|
|
114
|
-
- Al Snow fixed a warning with MIME::Types::Logger producing a warning
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
138
|
+
- Al Snow fixed a warning with MIME::Types::Logger producing a warning because
|
139
|
+
Ruby 2.7 introduces numbered block parameters. Because of the way that the
|
140
|
+
MIME::Types::Logger works for deprecation messages, the initializer
|
141
|
+
parameters had been named `_1`, `_2`, and `_3`. This has now been resolved.
|
142
|
+
[#146]
|
119
143
|
|
120
144
|
- Administrivia:
|
121
145
|
|
122
|
-
- Olle Jonsson removed an outdated Travis configuration option.
|
146
|
+
- Olle Jonsson removed an outdated Travis configuration option.
|
147
|
+
[#142][pull-142]
|
123
148
|
|
124
149
|
## 3.3 / 2019-09-04
|
125
150
|
|
@@ -136,23 +161,23 @@ there are some validation changes and updated code with formatting.
|
|
136
161
|
|
137
162
|
## 3.2.2 / 2018-08-12
|
138
163
|
|
139
|
-
- Hiroto Fukui removed a stray `debugger` statement that I had used in
|
140
|
-
|
164
|
+
- Hiroto Fukui removed a stray `debugger` statement that I had used in producing
|
165
|
+
v3.2.1. [#137]
|
141
166
|
|
142
167
|
## 3.2.1 / 2018-08-12
|
143
168
|
|
144
169
|
- A few bugs related to MIME::Types::Container and its use in the
|
145
|
-
mime-types-data helper tools reared their head because I released 3.2
|
146
|
-
|
170
|
+
mime-types-data helper tools reared their head because I released 3.2 before
|
171
|
+
verifying against mime-types-data.
|
147
172
|
|
148
173
|
## 3.2 / 2018-08-12
|
149
174
|
|
150
175
|
- 2 minor enhancements
|
151
176
|
|
152
177
|
- Janko Marohnić contributed a change to `MIME::Type#priority_order` that
|
153
|
-
should improve on strict sorting when dealing with MIME types that appear
|
154
|
-
|
155
|
-
|
178
|
+
should improve on strict sorting when dealing with MIME types that appear to
|
179
|
+
be in the same family even if strict sorting would cause an unregistered
|
180
|
+
type to be sorted first. [#132]
|
156
181
|
|
157
182
|
- Dillon Welch contributed a change that added `frozen_string_literal: true`
|
158
183
|
to files so that modern Rubies can automatically reduce duplicate string
|
@@ -163,20 +188,21 @@ there are some validation changes and updated code with formatting.
|
|
163
188
|
- Burke Libbey fixed a problem with cached data loading. [#126]
|
164
189
|
|
165
190
|
- Resolved an issue where Enumerable#inject returns `nil` when provided an
|
166
|
-
empty enumerable and a default value has not been provided. This is
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
registry
|
191
|
+
empty enumerable and a default value has not been provided. This is because
|
192
|
+
when Enumerable#inject isn't provided a starting value, the first value is
|
193
|
+
used as the default value. In every case where this error was happening, the
|
194
|
+
result was supposed to be an array containing Set objects so they can be
|
195
|
+
reduced to a single Set. [#117][issue-117], [#127][issue-127],
|
196
|
+
[#134][issue-134]
|
197
|
+
|
198
|
+
- Fixed an uncontrolled growth bug in MIME::Types::Container where a key miss
|
199
|
+
would create a new entry with an empty Set in the container. This was
|
200
|
+
working as designed (this particular feature was heavily used during
|
201
|
+
MIME::Type registry construction), but the design was flawed in that it did
|
202
|
+
not have any way of determining the difference between construction and
|
203
|
+
querying. This would mean that, if you have a function in your web app that
|
204
|
+
queries the MIME::Types registry by extension, the extension registry would
|
205
|
+
grow uncontrollably. [#136]
|
180
206
|
|
181
207
|
- Deprecations:
|
182
208
|
|
@@ -186,40 +212,41 @@ there are some validation changes and updated code with formatting.
|
|
186
212
|
|
187
213
|
- Supporting files are now Markdown instead of rdoc, except for the README.
|
188
214
|
|
189
|
-
- The history file has been modified to remove all history prior to 3.0.
|
190
|
-
|
215
|
+
- The history file has been modified to remove all history prior to 3.0. This
|
216
|
+
history can be found in previous commits.
|
191
217
|
|
192
|
-
- A spelling error was corrected by Edward Betts ([#129][]).
|
218
|
+
- A spelling error was corrected by Edward Betts ([#129][pull-129]).
|
193
219
|
|
194
220
|
- Administrivia:
|
195
221
|
|
196
222
|
- CI configuration for more modern versions of Ruby were added by Nicolas
|
197
|
-
Leger ([#130][]), Jun Aruga ([#125][]), and Austin Ziegler.
|
198
|
-
ruby-head-clang and rbx (Rubinius) from CI.
|
223
|
+
Leger ([#130][pull-130]), Jun Aruga ([#125][pull-125]), and Austin Ziegler.
|
224
|
+
Removed ruby-head-clang and rbx (Rubinius) from CI.
|
199
225
|
|
200
|
-
- Fixed tests which were asserting equality against nil, which will become
|
201
|
-
|
226
|
+
- Fixed tests which were asserting equality against nil, which will become an
|
227
|
+
error in Minitest 6.
|
202
228
|
|
203
229
|
## 3.1 / 2016-05-22
|
204
230
|
|
205
231
|
- 1 documentation change:
|
206
232
|
|
207
233
|
- Tim Smith (@tas50) updated the build badges to be SVGs to improve
|
208
|
-
readability on high-density (retina) screens with pull request
|
234
|
+
readability on high-density (retina) screens with pull request
|
235
|
+
[#112][pull-112].
|
209
236
|
|
210
237
|
- 3 bug fixes
|
211
238
|
|
212
239
|
- A test for `MIME::Types::Cache` fails under Ruby 2.3 because of frozen
|
213
|
-
strings, [#118][]. This has been fixed.
|
240
|
+
strings, [#118][pull-118]. This has been fixed.
|
214
241
|
|
215
|
-
- The JSON data has been incorrectly encoded since the release of
|
216
|
-
|
217
|
-
|
242
|
+
- The JSON data has been incorrectly encoded since the release of mime-types 3
|
243
|
+
on the `xrefs` field, because of the switch to using a Set to store
|
244
|
+
cross-reference information. This has been fixed.
|
218
245
|
|
219
|
-
- A tentative fix for [#117][] has been applied, removing the only
|
220
|
-
require dependencies that exist (and for which there was code to
|
221
|
-
but the current fix is simpler). I have no way to verify this fix
|
222
|
-
depending on how things are loaded by `delayed_job`, this fix may not be
|
246
|
+
- A tentative fix for [#117][issue-117] has been applied, removing the only
|
247
|
+
circular require dependencies that exist (and for which there was code to
|
248
|
+
prevent, but the current fix is simpler). I have no way to verify this fix
|
249
|
+
and depending on how things are loaded by `delayed_job`, this fix may not be
|
223
250
|
sufficient.
|
224
251
|
|
225
252
|
- 1 governance change
|
@@ -230,23 +257,23 @@ there are some validation changes and updated code with formatting.
|
|
230
257
|
|
231
258
|
- 2 governance changes
|
232
259
|
|
233
|
-
- This project and the related mime-types-data project are now exclusively
|
234
|
-
|
260
|
+
- This project and the related mime-types-data project are now exclusively MIT
|
261
|
+
licensed. Resolves [#95][pull-95].
|
235
262
|
|
236
|
-
- All projects under the mime-types organization now have a standard code
|
237
|
-
|
238
|
-
found in the [Code
|
263
|
+
- All projects under the mime-types organization now have a standard code of
|
264
|
+
conduct adapted from the [Contributor Covenant][contributor covenant]. This
|
265
|
+
text can be found in the [Code of Conduct][code of conduct] file.
|
239
266
|
|
240
267
|
- 3 major changes
|
241
268
|
|
242
269
|
- All methods deprecated in mime-types 2.x have been removed.
|
243
270
|
|
244
271
|
- mime-types now requires Ruby 2.0 compatibility or later. Resolves
|
245
|
-
[#97][].
|
272
|
+
[#97][pull-97].
|
246
273
|
|
247
274
|
- The registry data has been removed from mime-types and put into
|
248
275
|
mime-types-data, maintained and released separately. It can be found at
|
249
|
-
[mime-types-data][].
|
276
|
+
[mime-types-data][mime-types-data].
|
250
277
|
|
251
278
|
- 17 minor changes:
|
252
279
|
|
@@ -254,14 +281,14 @@ there are some validation changes and updated code with formatting.
|
|
254
281
|
|
255
282
|
- Changed the way that simplified types representations are created to
|
256
283
|
reflect the fact that `x-` prefixes are no longer considered special
|
257
|
-
according to IANA. A simplified MIME type is case-folded to lowercase.
|
258
|
-
|
259
|
-
|
284
|
+
according to IANA. A simplified MIME type is case-folded to lowercase. A
|
285
|
+
new keyword parameter, `remove_x_prefix`, can be provided to remove `x-`
|
286
|
+
prefixes.
|
260
287
|
|
261
|
-
- Improved initialization with an Array works so that extensions do not
|
262
|
-
|
263
|
-
|
264
|
-
|
288
|
+
- Improved initialization with an Array works so that extensions do not need
|
289
|
+
to be wrapped in another array. This means that `%w(text/yaml yaml yml)`
|
290
|
+
works in the same way that `['text/yaml', %w(yaml yml)]` did (and still
|
291
|
+
does).
|
265
292
|
|
266
293
|
- Changed `priority_compare` to conform with attributes that no longer
|
267
294
|
exist.
|
@@ -270,11 +297,11 @@ there are some validation changes and updated code with formatting.
|
|
270
297
|
|
271
298
|
- When extensions are set or modified with `add_extensions`, the primary
|
272
299
|
registry will be informed of a need to re-index extensions. Resolves
|
273
|
-
[#84][].
|
300
|
+
[#84][pull-84].
|
274
301
|
|
275
|
-
- The preferred extension can be set explicitly. If not set, it will be
|
276
|
-
|
277
|
-
|
302
|
+
- The preferred extension can be set explicitly. If not set, it will be the
|
303
|
+
first extension. If the preferred extension is not in the extension list,
|
304
|
+
it will be added.
|
278
305
|
|
279
306
|
- Improved how xref URLs are generated.
|
280
307
|
|
@@ -287,13 +314,13 @@ there are some validation changes and updated code with formatting.
|
|
287
314
|
|
288
315
|
- Removed `data_version` attribute.
|
289
316
|
|
290
|
-
- Changed `#[]` so that the `complete` and `registered` flags are
|
291
|
-
|
317
|
+
- Changed `#[]` so that the `complete` and `registered` flags are keywords
|
318
|
+
instead of a generic options parameter.
|
292
319
|
|
293
320
|
- Extracted the class methods to a separate file.
|
294
321
|
|
295
|
-
- Changed the container implementation to use a Set instead of an Array
|
296
|
-
|
322
|
+
- Changed the container implementation to use a Set instead of an Array to
|
323
|
+
prevent data duplication. Resolves [#79][pull-79].
|
297
324
|
|
298
325
|
- `MIME::Types::Cache` changes:
|
299
326
|
|
@@ -312,42 +339,43 @@ there are some validation changes and updated code with formatting.
|
|
312
339
|
|
313
340
|
- The registry is default loaded from the columnar store by default. The
|
314
341
|
internal format of the columnar store has changed; many of the boolean
|
315
|
-
flags are now loaded from a single file. Resolves [#85][].
|
316
|
-
|
317
|
-
[
|
318
|
-
[#84]: https://github.com/mime-types/ruby-mime-types/pull/84
|
319
|
-
[#85]: https://github.com/mime-types/ruby-mime-types/pull/85
|
320
|
-
[#95]: https://github.com/mime-types/ruby-mime-types/pull/95
|
321
|
-
[#97]: https://github.com/mime-types/ruby-mime-types/pull/97
|
322
|
-
[#112]: https://github.com/mime-types/ruby-mime-types/pull/112
|
323
|
-
[#117]: https://github.com/mime-types/ruby-mime-types/issues/117
|
324
|
-
[#118]: https://github.com/mime-types/ruby-mime-types/pull/118
|
325
|
-
[#125]: https://github.com/mime-types/ruby-mime-types/pull/125
|
326
|
-
[#126]: https://github.com/mime-types/ruby-mime-types/pull/126
|
327
|
-
[#127]: https://github.com/mime-types/ruby-mime-types/issues/127
|
328
|
-
[#129]: https://github.com/mime-types/ruby-mime-types/pull/129
|
329
|
-
[#130]: https://github.com/mime-types/ruby-mime-types/pull/130
|
330
|
-
[#127]: https://github.com/mime-types/ruby-mime-types/issues/127
|
331
|
-
[#132]: https://github.com/mime-types/ruby-mime-types/pull/132
|
332
|
-
[#134]: https://github.com/mime-types/ruby-mime-types/issues/134
|
333
|
-
[#135]: https://github.com/mime-types/ruby-mime-types/pull/135
|
334
|
-
[#136]: https://github.com/mime-types/ruby-mime-types/issues/136
|
335
|
-
[#137]: https://github.com/mime-types/ruby-mime-types/pull/137
|
336
|
-
[#139]: https://github.com/mime-types/ruby-mime-types/pull/139
|
337
|
-
[#141]: https://github.com/mime-types/ruby-mime-types/pull/141
|
338
|
-
[#142]: https://github.com/mime-types/ruby-mime-types/pull/142
|
339
|
-
[#146]: https://github.com/mime-types/ruby-mime-types/pull/146
|
340
|
-
[#147]: https://github.com/mime-types/ruby-mime-types/pull/147
|
341
|
-
[#149]: https://github.com/mime-types/ruby-mime-types/pull/149
|
342
|
-
[#150]: https://github.com/mime-types/ruby-mime-types/pull/150
|
343
|
-
[#153]: https://github.com/mime-types/ruby-mime-types/pull/153
|
344
|
-
[#166]: https://github.com/mime-types/ruby-mime-types/issues/166
|
345
|
-
[#167]: https://github.com/mime-types/ruby-mime-types/pull/167
|
346
|
-
[#170]: https://github.com/mime-types/ruby-mime-types/pull/170
|
347
|
-
[#177]: https://github.com/mime-types/ruby-mime-types/issues/177
|
348
|
-
[#178]: https://github.com/mime-types/ruby-mime-types/pull/178
|
349
|
-
[#179]: https://github.com/mime-types/ruby-mime-types/pull/179
|
350
|
-
[#180]: https://github.com/mime-types/ruby-mime-types/pull/180
|
351
|
-
[code-of-conduct.md]: Code-of-Conduct_md.html
|
342
|
+
flags are now loaded from a single file. Resolves [#85][pull-85].
|
343
|
+
|
344
|
+
[code of conduct]: CODE_OF_CONDUCT.md
|
352
345
|
[contributor covenant]: http://contributor-covenant.org
|
346
|
+
[issue-117]: https://github.com/mime-types/ruby-mime-types/issues/117
|
347
|
+
[issue-127]: https://github.com/mime-types/ruby-mime-types/issues/127
|
348
|
+
[issue-134]: https://github.com/mime-types/ruby-mime-types/issues/134
|
349
|
+
[issue-136]: https://github.com/mime-types/ruby-mime-types/issues/136
|
350
|
+
[issue-166]: https://github.com/mime-types/ruby-mime-types/issues/166
|
351
|
+
[issue-177]: https://github.com/mime-types/ruby-mime-types/issues/177
|
353
352
|
[mime-types-data]: https://github.com/mime-types/mime-types-data
|
353
|
+
[pull-112]: https://github.com/mime-types/ruby-mime-types/pull/112
|
354
|
+
[pull-118]: https://github.com/mime-types/ruby-mime-types/pull/118
|
355
|
+
[pull-125]: https://github.com/mime-types/ruby-mime-types/pull/125
|
356
|
+
[pull-126]: https://github.com/mime-types/ruby-mime-types/pull/126
|
357
|
+
[pull-129]: https://github.com/mime-types/ruby-mime-types/pull/129
|
358
|
+
[pull-130]: https://github.com/mime-types/ruby-mime-types/pull/130
|
359
|
+
[pull-132]: https://github.com/mime-types/ruby-mime-types/pull/132
|
360
|
+
[pull-135]: https://github.com/mime-types/ruby-mime-types/pull/135
|
361
|
+
[pull-137]: https://github.com/mime-types/ruby-mime-types/pull/137
|
362
|
+
[pull-139]: https://github.com/mime-types/ruby-mime-types/pull/139
|
363
|
+
[pull-141]: https://github.com/mime-types/ruby-mime-types/pull/141
|
364
|
+
[pull-142]: https://github.com/mime-types/ruby-mime-types/pull/142
|
365
|
+
[pull-146]: https://github.com/mime-types/ruby-mime-types/pull/146
|
366
|
+
[pull-147]: https://github.com/mime-types/ruby-mime-types/pull/147
|
367
|
+
[pull-149]: https://github.com/mime-types/ruby-mime-types/pull/149
|
368
|
+
[pull-150]: https://github.com/mime-types/ruby-mime-types/pull/150
|
369
|
+
[pull-153]: https://github.com/mime-types/ruby-mime-types/pull/153
|
370
|
+
[pull-167]: https://github.com/mime-types/ruby-mime-types/pull/167
|
371
|
+
[pull-170]: https://github.com/mime-types/ruby-mime-types/pull/170
|
372
|
+
[pull-178]: https://github.com/mime-types/ruby-mime-types/pull/178
|
373
|
+
[pull-179]: https://github.com/mime-types/ruby-mime-types/pull/179
|
374
|
+
[pull-180]: https://github.com/mime-types/ruby-mime-types/pull/180
|
375
|
+
[pull-189]: https://github.com/mime-types/ruby-mime-types/pull/189
|
376
|
+
[pull-79]: https://github.com/mime-types/ruby-mime-types/pull/79
|
377
|
+
[pull-84]: https://github.com/mime-types/ruby-mime-types/pull/84
|
378
|
+
[pull-85]: https://github.com/mime-types/ruby-mime-types/pull/85
|
379
|
+
[pull-95]: https://github.com/mime-types/ruby-mime-types/pull/95
|
380
|
+
[pull-97]: https://github.com/mime-types/ruby-mime-types/pull/97
|
381
|
+
[tp]: https://guides.rubygems.org/trusted-publishing/
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Contribution to mime-types is encouraged in any form: a bug report, a feature
|
4
|
+
request, or code contributions. There are a few DOs and DON'Ts for
|
5
|
+
contributions.
|
6
|
+
|
7
|
+
- DO:
|
8
|
+
|
9
|
+
- Keep the coding style that already exists for any updated Ruby code (support
|
10
|
+
or otherwise). I use [Standard Ruby][standardrb] for linting and formatting.
|
11
|
+
|
12
|
+
- Use thoughtfully-named topic branches for contributions. Rebase your commits
|
13
|
+
into logical chunks as necessary.
|
14
|
+
|
15
|
+
- Use [quality commit messages][qcm].
|
16
|
+
|
17
|
+
- Add your name or GitHub handle to `CONTRIBUTORS.md` and a record in the
|
18
|
+
`CHANGELOG.md` as a separate commit from your main change. (Follow the style
|
19
|
+
in the `CHANGELOG.md` and provide a link to your PR.)
|
20
|
+
|
21
|
+
- Add or update tests as appropriate for your change. The test suite is
|
22
|
+
written with [minitest][minitest].
|
23
|
+
|
24
|
+
- Add or update documentation as appropriate for your change. The
|
25
|
+
documentation is RDoc; mime-types does not use extensions that may be
|
26
|
+
present in alternative documentation generators.
|
27
|
+
|
28
|
+
- DO NOT:
|
29
|
+
|
30
|
+
- Modify `VERSION` in `lib/mime/types/version.rb`. When your patch is accepted
|
31
|
+
and a release is made, the version will be updated at that point.
|
32
|
+
|
33
|
+
- Modify `mime-types.gemspec`; it is a generated file. (You _may_ use
|
34
|
+
`rake gemspec` to regenerate it if your change involves metadata related to
|
35
|
+
gem itself).
|
36
|
+
|
37
|
+
- Modify the `Gemfile`.
|
38
|
+
|
39
|
+
## Adding or Modifying MIME Types
|
40
|
+
|
41
|
+
The mime-types registry is managed in [mime-types-data][mtd].
|
42
|
+
|
43
|
+
## Test Dependencies
|
44
|
+
|
45
|
+
mime-types uses Ryan Davis's [Hoe][Hoe] to manage the release process, and it
|
46
|
+
adds a number of rake tasks. You will mostly be interested in `rake`, which runs
|
47
|
+
the tests the same way that `rake test` will do.
|
48
|
+
|
49
|
+
To assist with the installation of the development dependencies for mime-types,
|
50
|
+
I have provided the simplest possible Gemfile pointing to the (generated)
|
51
|
+
`mime-types.gemspec` file. This will permit you to do `bundle install` to get
|
52
|
+
the development dependencies.
|
53
|
+
|
54
|
+
You can run tests with code coverage analysis by running `rake coverage`.
|
55
|
+
|
56
|
+
## Benchmarks
|
57
|
+
|
58
|
+
mime-types offers several benchmark tasks to measure different measures of
|
59
|
+
performance.
|
60
|
+
|
61
|
+
There is a repeated load test, measuring how long it takes to start and load
|
62
|
+
mime-types with its full registry. By default, it runs fifty loops and uses the
|
63
|
+
built-in benchmark library:
|
64
|
+
|
65
|
+
- `rake benchmark:load`
|
66
|
+
|
67
|
+
There are two loaded object count benchmarks (for normal and columnar loads).
|
68
|
+
These use `ObjectSpace.count_objects`.
|
69
|
+
|
70
|
+
- `rake benchmark:objects`
|
71
|
+
- `rake benchmark:objects:columnar`
|
72
|
+
|
73
|
+
## Workflow
|
74
|
+
|
75
|
+
Here's the most direct way to get your work merged into the project:
|
76
|
+
|
77
|
+
- Fork the project.
|
78
|
+
- Clone down your fork
|
79
|
+
(`git clone git://github.com/<username>/ruby-mime-types.git`).
|
80
|
+
- Create a topic branch to contain your change
|
81
|
+
(`git checkout -b my_awesome_feature`).
|
82
|
+
- Hack away, add tests. Not necessarily in that order.
|
83
|
+
- Make sure everything still passes by running `rake`.
|
84
|
+
- If necessary, rebase your commits into logical chunks, without errors.
|
85
|
+
- Push the branch up (`git push origin my_awesome_feature`).
|
86
|
+
- Create a pull request against mime-types/ruby-mime-types and describe what
|
87
|
+
your change does and the why you think it should be merged.
|
88
|
+
|
89
|
+
[hoe]: https://github.com/seattlerb/hoe
|
90
|
+
[minitest]: https://github.com/seattlerb/minitest
|
91
|
+
[mtd]: https://github.com/mime-types/mime-types-data
|
92
|
+
[qcm]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
93
|
+
[standardrb]: https://github.com/standardrb/standard
|
data/CONTRIBUTORS.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Contributors
|
2
|
+
|
3
|
+
- Austin Ziegler created mime-types.
|
4
|
+
|
5
|
+
Thanks to everyone else who has contributed to mime-types over the years:
|
6
|
+
|
7
|
+
- Aaron Patterson
|
8
|
+
- Aggelos Avgerinos
|
9
|
+
- Al Snow
|
10
|
+
- Alex Vondrak
|
11
|
+
- Andre Pankratz
|
12
|
+
- Andy Brody
|
13
|
+
- Arnaud Meuret
|
14
|
+
- Brandon Galbraith
|
15
|
+
- Burke Libbey
|
16
|
+
- Chris Gat
|
17
|
+
- David Genord
|
18
|
+
- Dillon Welch
|
19
|
+
- Edward Betts
|
20
|
+
- Eric Marden
|
21
|
+
- Garret Alfert
|
22
|
+
- Godfrey Chan
|
23
|
+
- Greg Brockman
|
24
|
+
- Hans de Graaff
|
25
|
+
- Henrik Hodne
|
26
|
+
- Igor Victor
|
27
|
+
- Janko Marohnić
|
28
|
+
- Jean Boussier
|
29
|
+
- Jeremy Evans
|
30
|
+
- Juanito Fatas
|
31
|
+
- Jun Aruga
|
32
|
+
- Keerthi Siva
|
33
|
+
- Ken Ip
|
34
|
+
- Kevin Menard
|
35
|
+
- Koichi ITO
|
36
|
+
- Łukasz Śliwa
|
37
|
+
- Martin d'Allens
|
38
|
+
- Masato Nakamura
|
39
|
+
- Mauricio Linhares
|
40
|
+
- Nana Kugayama
|
41
|
+
- Nicholas La Roux
|
42
|
+
- Nicolas Leger
|
43
|
+
- nycvotes-dev
|
44
|
+
- Olle Jonsson
|
45
|
+
- Postmodern
|
46
|
+
- Richard Hirner
|
47
|
+
- Richard Hurt
|
48
|
+
- Richard Schneeman
|
49
|
+
- Robb Shecter
|
50
|
+
- Tibor Szolár
|
51
|
+
- Todd Carrico
|
data/{Licence.md → LICENCE.md}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Licence
|
2
2
|
|
3
|
-
- Copyright 2003
|
3
|
+
- Copyright 2003-2025 Austin Ziegler and contributors.
|
4
4
|
|
5
5
|
The software in this repository is made available under the MIT license.
|
6
6
|
|
@@ -9,17 +9,16 @@ The software in this repository is made available under the MIT license.
|
|
9
9
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
10
10
|
this software and associated documentation files (the "Software"), to deal in
|
11
11
|
the Software without restriction, including without limitation the rights to
|
12
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
13
|
-
|
14
|
-
|
12
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
13
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
14
|
+
subject to the following conditions:
|
15
15
|
|
16
16
|
The above copyright notice and this permission notice shall be included in all
|
17
17
|
copies or substantial portions of the Software.
|
18
18
|
|
19
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
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
SOFTWARE.
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
21
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
22
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
23
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
24
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest.txt
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
CHANGELOG.md
|
2
|
+
CODE_OF_CONDUCT.md
|
3
|
+
CONTRIBUTING.md
|
4
|
+
CONTRIBUTORS.md
|
5
|
+
LICENCE.md
|
6
6
|
Manifest.txt
|
7
|
-
README.
|
7
|
+
README.md
|
8
8
|
Rakefile
|
9
|
+
SECURITY.md
|
9
10
|
lib/mime-types.rb
|
10
11
|
lib/mime/type.rb
|
11
12
|
lib/mime/type/columnar.rb
|
@@ -19,6 +20,7 @@ lib/mime/types/full.rb
|
|
19
20
|
lib/mime/types/loader.rb
|
20
21
|
lib/mime/types/logger.rb
|
21
22
|
lib/mime/types/registry.rb
|
23
|
+
lib/mime/types/version.rb
|
22
24
|
test/bad-fixtures/malformed
|
23
25
|
test/fixture/json.json
|
24
26
|
test/fixture/old-data
|