mime-types 3.3.1 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,216 +1,241 @@
1
+ # Changelog
2
+
3
+ ## 3.4.1 / 2021-11-16
4
+
5
+ - 1 bugfix:
6
+
7
+ - Fixed a Ruby < 2.3 incompatibility introduced by the use of standardrb,
8
+ where `<<-` heredocs were converted to `<<~` heredocs. These have been
9
+ reverted back to `<<-` with the indentation kept and a `.strip` call
10
+ to prevent excess whitespace.
11
+
12
+ ## 3.4.0 / 2021-11-15
13
+
14
+ - 1 minor enhancement:
15
+
16
+ - Added a new field to `MIME::Type` for checking provisional registrations
17
+ from IANA. [#157]
18
+
19
+ - Documentation:
20
+
21
+ - Kevin Menard synced the documentation so that all examples are correct.
22
+ [#153]
23
+
24
+ - Administrivia:
25
+
26
+ - Added Ruby 3.0 to the CI test matrix. Added `windows/jruby` to the
27
+ CI exclusion list; it refuses to run successfully.
28
+ - Removed the Travis CI configuration and changed it to Github Workflows
29
+ [#150]. Removed Coveralls configuration.
30
+ - Igor Victor added TruffleRuby to the Travis CI configuration. [#149]
31
+ - Koichi ITO loosened an excessively tight dependency. [#147]
32
+ - Started using `standardrb` for Ruby formatting and validation.
33
+ - Moved `deps:top` functionality to a support file.
34
+
1
35
  ## 3.3.1 / 2019-12-26
2
36
 
3
- * 1 minor bugfix:
37
+ - 1 minor bugfix:
4
38
 
5
- * Al Snow fixed a warning with MIME::Types::Logger producing a warning
6
- because Ruby 2.7 introduces numbered block parameters. Because of the
7
- way that the MIME::Types::Logger works for deprecation messages, the
8
- initializer parameters had been named `_1`, `_2`, and `_3`. This has
9
- now been resolved. [#146][]
39
+ - Al Snow fixed a warning with MIME::Types::Logger producing a warning
40
+ because Ruby 2.7 introduces numbered block parameters. Because of the way
41
+ that the MIME::Types::Logger works for deprecation messages, the
42
+ initializer parameters had been named `_1`, `_2`, and `_3`. This has now
43
+ been resolved. [#146]
10
44
 
11
- * Administrivia:
45
+ - Administrivia:
12
46
 
13
- * Olle Jonsson removed an outdated Travis configuration option (`sudo:
14
- false`). [#142][]
47
+ - Olle Jonsson removed an outdated Travis configuration option (`sudo: false`). [#142]
15
48
 
16
49
  ## 3.3 / 2019-09-04
17
50
 
18
- * 1 minor enhancement
51
+ - 1 minor enhancement
19
52
 
20
- * Jean Boussier reduced memory usage for Ruby versions 2.3 or higher by
21
- interning various string values in each type. This is done with a
22
- backwards-compatible call that _freezes_ the strings on older
23
- versions of Ruby. [#141][]
53
+ - Jean Boussier reduced memory usage for Ruby versions 2.3 or higher by
54
+ interning various string values in each type. This is done with a
55
+ backwards-compatible call that _freezes_ the strings on older versions of
56
+ Ruby. [#141]
24
57
 
25
- * Administrivia:
58
+ - Administrivia:
26
59
 
27
- * Nicholas La Roux updated Travis build configurations. [#139][]
60
+ - Nicholas La Roux updated Travis build configurations. [#139]
28
61
 
29
62
  ## 3.2.2 / 2018-08-12
30
63
 
31
- * Hiroto Fukui removed a stray `debugger` statement that I had used in
32
- producing v3.2.1. [#137][]
64
+ - Hiroto Fukui removed a stray `debugger` statement that I had used in
65
+ producing v3.2.1. [#137]
33
66
 
34
67
  ## 3.2.1 / 2018-08-12
35
68
 
36
- * A few bugs related to MIME::Types::Container and its use in the
37
- mime-types-data helper tools reared their head because I released 3.2
38
- before verifying against mime-types-data.
69
+ - A few bugs related to MIME::Types::Container and its use in the
70
+ mime-types-data helper tools reared their head because I released 3.2
71
+ before verifying against mime-types-data.
39
72
 
40
73
  ## 3.2 / 2018-08-12
41
74
 
42
- * 2 minor enhancements
75
+ - 2 minor enhancements
43
76
 
44
- * Janko Marohnić contributed a change to `MIME::Type#priority_order` that
45
- should improve on strict sorting when dealing with MIME types that
46
- appear to be in the same family even if strict sorting would cause an
47
- unregistered type to be sorted first. [#132][]
77
+ - Janko Marohnić contributed a change to `MIME::Type#priority_order` that
78
+ should improve on strict sorting when dealing with MIME types that appear
79
+ to be in the same family even if strict sorting would cause an
80
+ unregistered type to be sorted first. [#132]
48
81
 
49
- * Dillon Welch contributed a change that added `frozen_string_literal:
50
- true` to files so that modern Rubies can automatically reduce duplicate
51
- string allocations. [#135][]
82
+ - Dillon Welch contributed a change that added `frozen_string_literal: true` to files so that modern Rubies can automatically reduce duplicate
83
+ string allocations. [#135]
52
84
 
53
- * 2 bug fixes
85
+ - 2 bug fixes
54
86
 
55
- * Burke Libbey fixed a problem with cached data loading. [#126][]
87
+ - Burke Libbey fixed a problem with cached data loading. [#126]
56
88
 
57
- * Resolved an issue where Enumerable#inject returns +nil+ when provided
58
- an empty enumerable and a default value has not been provided. This is
59
- because when Enumerable#inject isn't provided a starting value, the
60
- first value is used as the default value. In every case where this
61
- error was happening, the result was supposed to be an array containing
62
- Set objects so they can be reduced to a single Set. [#117][], [#127][],
63
- [#134][].
89
+ - Resolved an issue where Enumerable#inject returns `nil` when provided an
90
+ empty enumerable and a default value has not been provided. This is
91
+ because when Enumerable#inject isn't provided a starting value, the first
92
+ value is used as the default value. In every case where this error was
93
+ happening, the result was supposed to be an array containing Set objects
94
+ so they can be reduced to a single Set. [#117], [#127], [#134]
64
95
 
65
- * Fixed an uncontrolled growth bug in MIME::Types::Container where a key
66
- miss would create a new entry with an empty Set in the container. This
67
- was working as designed (this particular feature was heavily used
68
- during MIME::Type registry construction), but the design was flawed in
69
- that it did not have any way of determining the difference between
70
- construction and querying. This would mean that, if you have a function
71
- in your web app that queries the MIME::Types registry by extension, the
72
- extension registry would grow uncontrollably. [#136][]
96
+ - Fixed an uncontrolled growth bug in MIME::Types::Container where a key
97
+ miss would create a new entry with an empty Set in the container. This
98
+ was working as designed (this particular feature was heavily used during
99
+ MIME::Type registry construction), but the design was flawed in that it
100
+ did not have any way of determining the difference between construction
101
+ and querying. This would mean that, if you have a function in your web
102
+ app that queries the MIME::Types registry by extension, the extension
103
+ registry would grow uncontrollably. [#136]
73
104
 
74
- * Deprecations:
105
+ - Deprecations:
75
106
 
76
- * Lazy loading (`$RUBY_MIME_TYPES_LAZY_LOAD`) has been deprecated.
107
+ - Lazy loading (`$RUBY_MIME_TYPES_LAZY_LOAD`) has been deprecated.
77
108
 
78
- * Documentation Changes:
109
+ - Documentation Changes:
79
110
 
80
- * Supporting files are now Markdown instead of rdoc, except for the
81
- README.
111
+ - Supporting files are now Markdown instead of rdoc, except for the README.
82
112
 
83
- * The history file has been modified to remove all history prior to 3.0.
84
- This history can be found in previous commits.
113
+ - The history file has been modified to remove all history prior to 3.0.
114
+ This history can be found in previous commits.
85
115
 
86
- * A spelling error was corrected by Edward Betts ([#129][]).
116
+ - A spelling error was corrected by Edward Betts ([#129]).
87
117
 
88
- * Administrivia:
118
+ - Administrivia:
89
119
 
90
- * CI configuration for more modern versions of Ruby were added by Nicolas
91
- Leger ([#130][]), Jun Aruga ([#125][]), and Austin Ziegler. Removed
92
- ruby-head-clang and rbx (Rubinius) from CI.
120
+ - CI configuration for more modern versions of Ruby were added by Nicolas
121
+ Leger ([#130]), Jun Aruga ([#125]), and Austin Ziegler. Removed
122
+ ruby-head-clang and rbx (Rubinius) from CI.
93
123
 
94
- * Fixed tests which were asserting equality against nil, which will
95
- become an error in Minitest 6.
124
+ - Fixed tests which were asserting equality against nil, which will become
125
+ an error in Minitest 6.
96
126
 
97
127
  ## 3.1 / 2016-05-22
98
128
 
99
- * 1 documentation change:
129
+ - 1 documentation change:
100
130
 
101
- * Tim Smith (@tas50) updated the build badges to be SVGs to improve
102
- readability on high-density (retina) screens with pull request
103
- [#112][].
131
+ - Tim Smith (@tas50) updated the build badges to be SVGs to improve
132
+ readability on high-density (retina) screens with pull request [#112].
104
133
 
105
- * 3 bug fixes
134
+ - 3 bug fixes
106
135
 
107
- * A test for `MIME::Types::Cache` fails under Ruby 2.3 because of frozen
108
- strings, [#118][]. This has been fixed.
136
+ - A test for `MIME::Types::Cache` fails under Ruby 2.3 because of frozen
137
+ strings, [#118]. This has been fixed.
109
138
 
110
- * The JSON data has been incorrectly encoded since the release of
111
- mime-types 3 on the `xrefs` field, because of the switch to using a Set
112
- to store cross-reference information. This has been fixed.
139
+ - The JSON data has been incorrectly encoded since the release of
140
+ mime-types 3 on the `xrefs` field, because of the switch to using a Set
141
+ to store cross-reference information. This has been fixed.
113
142
 
114
- * A tentative fix for [#117][] has been applied, removing the only
115
- circular require dependencies that exist (and for which there was code
116
- to prevent, but the current fix is simpler). I have no way to verify
117
- this fix and depending on how things are loaded by `delayed_job`, this
118
- fix may not be sufficient.
143
+ - A tentative fix for [#117] has been applied, removing the only circular
144
+ require dependencies that exist (and for which there was code to prevent,
145
+ but the current fix is simpler). I have no way to verify this fix and
146
+ depending on how things are loaded by `delayed_job`, this fix may not be
147
+ sufficient.
119
148
 
120
- * 1 governance change
149
+ - 1 governance change
121
150
 
122
- * Updated to Contributor Covenant 1.4.
151
+ - Updated to Contributor Covenant 1.4.
123
152
 
124
153
  ## 3.0 / 2015-11-21
125
154
 
126
- * 2 governance changes
155
+ - 2 governance changes
127
156
 
128
- * This project and the related mime-types-data project are now
129
- exclusively MIT licensed. Resolves [#95][].
157
+ - This project and the related mime-types-data project are now exclusively
158
+ MIT licensed. Resolves [#95].
130
159
 
131
- * All projects under the mime-types organization now have a standard code
132
- of conduct adapted from the [Contributor Covenant][]. This text can be
133
- found in the [Code-of-Conduct.md][] file.
160
+ - All projects under the mime-types organization now have a standard code
161
+ of conduct adapted from the [Contributor Covenant]. This text can be
162
+ found in the [Code-of-Conduct.md] file.
134
163
 
135
- * 3 major changes
164
+ - 3 major changes
136
165
 
137
- * All methods deprecated in mime-types 2.x have been removed.
166
+ - All methods deprecated in mime-types 2.x have been removed.
138
167
 
139
- * mime-types now requires Ruby 2.0 compatibility or later. Resolves
140
- [#97][].
168
+ - mime-types now requires Ruby 2.0 compatibility or later. Resolves
169
+ [#97].
141
170
 
142
- * The registry data has been removed from mime-types and put into
143
- mime-types-data, maintained and released separately. It can be found at
144
- [mime-types-data][].
171
+ - The registry data has been removed from mime-types and put into
172
+ mime-types-data, maintained and released separately. It can be found at
173
+ [mime-types-data].
145
174
 
146
- * 17 minor changes:
175
+ - 17 minor changes:
147
176
 
148
- * `MIME::Type` changes:
177
+ - `MIME::Type` changes:
149
178
 
150
- * Changed the way that simplified types representations are created
151
- to reflect the fact that `x-` prefixes are no longer considered
152
- special according to IANA. A simplified MIME type is case-folded to
153
- lowercase. A new keyword parameter, `remove_x_prefix`, can be
154
- provided to remove `x-` prefixes.
179
+ - Changed the way that simplified types representations are created to
180
+ reflect the fact that `x-` prefixes are no longer considered special
181
+ according to IANA. A simplified MIME type is case-folded to lowercase.
182
+ A new keyword parameter, `remove_x_prefix`, can be provided to remove
183
+ `x-` prefixes.
155
184
 
156
- * Improved initialization with an Array works so that extensions do
157
- not need to be wrapped in another array. This means that
158
- `%w(text/yaml yaml yml)` works in the same way that
159
- `['text/yaml', %w(yaml yml)]` did (and still does).
185
+ - Improved initialization with an Array works so that extensions do not
186
+ need to be wrapped in another array. This means that `%w(text/yaml yaml yml)` works in the same way that `['text/yaml', %w(yaml yml)]` did (and
187
+ still does).
160
188
 
161
- * Changed `priority_compare` to conform with attributes that no
162
- longer exist.
189
+ - Changed `priority_compare` to conform with attributes that no longer
190
+ exist.
163
191
 
164
- * Changed the internal implementation of extensions to use a frozen
165
- Set.
192
+ - Changed the internal implementation of extensions to use a frozen Set.
166
193
 
167
- * When extensions are set or modified with `add_extensions`, the
168
- primary registry will be informed of a need to reindex extensions.
169
- Resolves [#84][].
194
+ - When extensions are set or modified with `add_extensions`, the primary
195
+ registry will be informed of a need to reindex extensions. Resolves
196
+ [#84].
170
197
 
171
- * The preferred extension can be set explicitly. If not set, it will
172
- be the first extension. If the preferred extension is not in the
173
- extension list, it will be added.
198
+ - The preferred extension can be set explicitly. If not set, it will be
199
+ the first extension. If the preferred extension is not in the extension
200
+ list, it will be added.
174
201
 
175
- * Improved how xref URLs are generated.
202
+ - Improved how xref URLs are generated.
176
203
 
177
- * Converted `obsolete`, `registered` and `signature` to
178
- `attr_accessors`.
204
+ - Converted `obsolete`, `registered` and `signature` to `attr_accessors`.
179
205
 
180
- * `MIME::Types` changes:
206
+ - `MIME::Types` changes:
181
207
 
182
- * Modified `MIME::Types.new` to track instances of `MIME::Types` so
183
- that they can be told to reindex the extensions as necessary.
208
+ - Modified `MIME::Types.new` to track instances of `MIME::Types` so that
209
+ they can be told to reindex the extensions as necessary.
184
210
 
185
- * Removed `data_version` attribute.
211
+ - Removed `data_version` attribute.
186
212
 
187
- * Changed `#[]` so that the `complete` and `registered` flags are
188
- keywords instead of a generic options parameter.
213
+ - Changed `#[]` so that the `complete` and `registered` flags are
214
+ keywords instead of a generic options parameter.
189
215
 
190
- * Extracted the class methods to a separate file.
216
+ - Extracted the class methods to a separate file.
191
217
 
192
- * Changed the container implementation to use a Set instead of an
193
- Array to prevent data duplication. Resolves [#79][].
218
+ - Changed the container implementation to use a Set instead of an Array
219
+ to prevent data duplication. Resolves [#79].
194
220
 
195
- * `MIME::Types::Cache` changes:
221
+ - `MIME::Types::Cache` changes:
196
222
 
197
- * Caching is now based on the data gem version instead of the
198
- mime-types version.
223
+ - Caching is now based on the data gem version instead of the mime-types
224
+ version.
199
225
 
200
- * Caching is compatible with columnar registry stores.
226
+ - Caching is compatible with columnar registry stores.
201
227
 
202
- * `MIME::Types::Loader` changes:
228
+ - `MIME::Types::Loader` changes:
203
229
 
204
- * `MIME::Types::Loader::PATH` has been removed and replaced with
205
- `MIME::Types::Data::PATH` from the mime-types-data gem. The
206
- environment variable `RUBY_MIME_TYPES_DATA` is still used.
230
+ - `MIME::Types::Loader::PATH` has been removed and replaced with
231
+ `MIME::Types::Data::PATH` from the mime-types-data gem. The environment
232
+ variable `RUBY_MIME_TYPES_DATA` is still used.
207
233
 
208
- * Support for the long-deprecated mime-types v1 format has been
209
- removed.
234
+ - Support for the long-deprecated mime-types v1 format has been removed.
210
235
 
211
- * The registry is default loaded from the columnar store by default.
212
- The internal format of the columnar store has changed; many of the
213
- boolean flags are now loaded from a single file. Resolves [#85][].
236
+ - The registry is default loaded from the columnar store by default. The
237
+ internal format of the columnar store has changed; many of the boolean
238
+ flags are now loaded from a single file. Resolves [#85].
214
239
 
215
240
  [#79]: https://github.com/mime-types/ruby-mime-types/pull/79
216
241
  [#84]: https://github.com/mime-types/ruby-mime-types/pull/84
@@ -235,6 +260,10 @@
235
260
  [#141]: https://github.com/mime-types/ruby-mime-types/pull/141
236
261
  [#142]: https://github.com/mime-types/ruby-mime-types/pull/142
237
262
  [#146]: https://github.com/mime-types/ruby-mime-types/pull/146
238
- [Code-of-Conduct.md]: Code-of-Conduct_md.html
239
- [Contributor Covenant]: http://contributor-covenant.org
263
+ [#147]: https://github.com/mime-types/ruby-mime-types/pull/147
264
+ [#149]: https://github.com/mime-types/ruby-mime-types/pull/149
265
+ [#150]: https://github.com/mime-types/ruby-mime-types/pull/150
266
+ [#153]: https://github.com/mime-types/ruby-mime-types/pull/153
267
+ [code-of-conduct.md]: Code-of-Conduct_md.html
268
+ [contributor covenant]: http://contributor-covenant.org
240
269
  [mime-types-data]: https://github.com/mime-types/mime-types-data
data/Licence.md CHANGED
@@ -1,10 +1,10 @@
1
- ## Licence
1
+ # Licence
2
2
 
3
- * Copyright 2003–2019 Austin Ziegler and contributors.
3
+ - Copyright 2003–2019 Austin Ziegler and contributors.
4
4
 
5
5
  The software in this repository is made available under the MIT license.
6
6
 
7
- ### MIT License
7
+ ## MIT License
8
8
 
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
data/README.rdoc CHANGED
@@ -65,6 +65,7 @@ files). A MIME::Type stores the known information about one MIME type.
65
65
  puts text.ascii? # => true
66
66
  puts text.obsolete? # => false
67
67
  puts text.registered? # => true
68
+ puts text.provisional? # => false
68
69
  puts text.complete? # => true
69
70
 
70
71
  puts text # => 'text/plain'