mime-types 2.6.2 → 3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.hoerc +4 -4
- data/Code-of-Conduct.rdoc +41 -0
- data/Contributing.rdoc +0 -3
- data/History.rdoc +76 -0
- data/Licence.rdoc +2 -16
- data/Manifest.txt +7 -20
- data/README.rdoc +61 -73
- data/Rakefile +112 -78
- data/lib/mime/type/columnar.rb +27 -84
- data/lib/mime/type.rb +183 -449
- data/lib/mime/types/cache.rb +49 -73
- data/lib/mime/types/columnar.rb +42 -60
- data/lib/mime/types/container.rb +30 -0
- data/lib/mime/types/deprecations.rb +1 -22
- data/lib/mime/types/full.rb +17 -0
- data/lib/mime/types/loader.rb +10 -142
- data/lib/mime/types/logger.rb +2 -0
- data/lib/mime/types/registry.rb +81 -0
- data/lib/mime/types.rb +41 -145
- data/lib/mime-types.rb +0 -2
- data/support/benchmarks/load.rb +27 -26
- data/support/benchmarks/load_allocations.rb +14 -7
- data/support/benchmarks/object_counts.rb +6 -4
- data/support/profile/columnar.rb +5 -0
- data/support/profile/columnar_full.rb +5 -0
- data/support/profile/full.rb +5 -0
- data/test/fixture/json.json +1 -1
- data/test/fixture/yaml.yaml +0 -17
- data/test/minitest_helper.rb +4 -13
- data/test/test_mime_type.rb +443 -508
- data/test/test_mime_types.rb +126 -86
- data/test/test_mime_types_cache.rb +55 -45
- data/test/test_mime_types_class.rb +113 -97
- data/test/test_mime_types_lazy.rb +19 -23
- data/test/test_mime_types_loader.rb +5 -33
- metadata +66 -58
- data/History-Types.rdoc +0 -370
- data/data/mime-types.json +0 -1
- data/data/mime.content_type.column +0 -1924
- data/data/mime.docs.column +0 -1924
- data/data/mime.encoding.column +0 -1924
- data/data/mime.friendly.column +0 -1924
- data/data/mime.obsolete.column +0 -1924
- data/data/mime.references.column +0 -1924
- data/data/mime.registered.column +0 -1924
- data/data/mime.signature.column +0 -1924
- data/data/mime.system.column +0 -1924
- data/data/mime.use_instead.column +0 -1924
- data/data/mime.xrefs.column +0 -1924
- data/docs/COPYING.txt +0 -339
- data/docs/artistic.txt +0 -127
- data/lib/mime/types/loader_path.rb +0 -15
- data/support/apache_mime_types.rb +0 -108
- data/support/convert/columnar.rb +0 -90
- data/support/convert.rb +0 -158
- data/support/iana_registry.rb +0 -170
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7023816dbfc18473c51bed6f14864322167273fe
|
4
|
+
data.tar.gz: d29e9c15601cca71c991bc5cc1b50b31c1864d74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e7ba49d9b78b1331085a956c9c4c6c24687e7f69443bc00370b4e233874d32d28067d9171d50d14b14ea2bd4885a9b452b6ccc0a1fd179283855aebf9a23a3d
|
7
|
+
data.tar.gz: 7aa2a2ff6b297ed18a4feb6029d30b051fcc87bcd6d7aa6be37be3b9caa15e4207756614c729322e62592ae71abc5beeafbae40959194719fb11ac8acbfde2d9
|
data/.gitignore
CHANGED
data/.hoerc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
exclude: !ruby/regexp '/
|
3
3
|
\.(tmp|swp)$
|
4
4
|
|
|
5
|
-
CVS
|
5
|
+
(CVS|tmp)\/
|
6
6
|
|
|
7
7
|
(?i:TAGS)
|
8
8
|
|
|
@@ -10,11 +10,11 @@ exclude: !ruby/regexp '/
|
|
10
10
|
|
|
11
11
|
Gemfile(?:\.lock)?
|
12
12
|
|
|
13
|
-
|
14
|
-
|
|
15
|
-
\.(coveralls|pullreview|travis).yml$
|
13
|
+
\.(rubocop|coveralls|pullreview|travis).yml$
|
16
14
|
|
|
17
15
|
\.gemspec
|
18
16
|
|
|
17
|
+
\.byebug_history
|
18
|
+
|
|
19
19
|
Vagrantfile
|
20
20
|
/x'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
== Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct.
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct. By adopting this Code of Conduct,
|
26
|
+
project maintainers commit themselves to fairly and consistently applying these
|
27
|
+
principles to every aspect of managing this project. Project maintainers who do
|
28
|
+
not follow or enforce the Code of Conduct may be permanently removed from the
|
29
|
+
project team.
|
30
|
+
|
31
|
+
This code of conduct applies both within project spaces and in public spaces
|
32
|
+
when an individual is representing the project or its community.
|
33
|
+
|
34
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
35
|
+
reported by opening an issue or contacting one or more of the project
|
36
|
+
maintainers.
|
37
|
+
|
38
|
+
This Code of Conduct is adapted from the
|
39
|
+
{Contributor Covenant}[http://contributor-covenant.org], version 1.2.0,
|
40
|
+
available at
|
41
|
+
{http://contributor-covenant.org/version/1/2/0/}[http://contributor-covenant.org/version/1/2/0/].
|
data/Contributing.rdoc
CHANGED
data/History.rdoc
CHANGED
@@ -1,3 +1,79 @@
|
|
1
|
+
== 3.0 / 2015-11-21
|
2
|
+
|
3
|
+
* 2 governance changes
|
4
|
+
|
5
|
+
* This project and the related mime-types-data project are now exclusively
|
6
|
+
MIT licensed. Resolves
|
7
|
+
{#95}[https://github.com/mime-types/ruby-mime-types/issues/95].
|
8
|
+
|
9
|
+
* All projects under the mime-types organization now have a standard code of
|
10
|
+
conduct adapted from the {Contributor
|
11
|
+
Covenant}[http://contributor-covenant.org]. This text can be found in the
|
12
|
+
{Code-of-Conduct.rdoc}[Code-of-Conduct_rdoc.html] file.
|
13
|
+
|
14
|
+
* 3 major changes
|
15
|
+
|
16
|
+
* All methods deprecated in mime-types 2.x have been removed.
|
17
|
+
* mime-types now requires Ruby 2.0 compatibility or later. Resolves
|
18
|
+
{#97}[https://github.com/mime-types/ruby-mime-types/issues/97].
|
19
|
+
* The registry data has been removed from mime-types and put into
|
20
|
+
mime-types-data, maintained and released separately. It can be found at
|
21
|
+
{mime-types-data}[https://github.com/mime-types/mime-types-data].
|
22
|
+
|
23
|
+
* 17 minor changes:
|
24
|
+
|
25
|
+
* MIME::Type changes:
|
26
|
+
|
27
|
+
* Changed the way that simplified types representations are creatd to
|
28
|
+
reflect the fact that +x-+ prefixes are no longer considered special
|
29
|
+
according to IANA. A simplified MIME type is case-folded to lowercase. A
|
30
|
+
new keyword parameter, +remove_x_prefix+, can be provided to remove +x-+
|
31
|
+
prefixes.
|
32
|
+
* Improved initialization with an Array works so that extensions do not
|
33
|
+
need to be wrapped in another array. This means that <tt>%w(text/yaml
|
34
|
+
yaml yml)</tt> works in the same way that <tt>['text/yaml', %w(yaml
|
35
|
+
yml)]</tt> did (and still does).
|
36
|
+
* Changed +priority_compare+ to conform with attributes that no longer
|
37
|
+
exist.
|
38
|
+
* Changed the internal implementation of extensions to use a frozen Set.
|
39
|
+
* When extensions are set or modified with +add_extensions+, the primary
|
40
|
+
registry will be informed of a need to reindex extensions. Resolves
|
41
|
+
{#84}[https://github.com/mime-types/ruby-mime-types/issues/84].
|
42
|
+
* The preferred extension can be set explicitly. If not set, it will be the
|
43
|
+
first extension. If the preferred extension is not in the extension list,
|
44
|
+
it will be added.
|
45
|
+
* Improved how xref URLs are generated.
|
46
|
+
* Converted +obsolete+, +registered+ and +signature+ to attr_accessors.
|
47
|
+
|
48
|
+
* MIME::Types changes:
|
49
|
+
|
50
|
+
* Modified MIME::Types.new to track instances of MIME::Types so that they
|
51
|
+
can be told to reindex the extensions as necessary.
|
52
|
+
* Removed +data_version+ attribute.
|
53
|
+
* Changed #[] so that the +complete+ and +registered+ flags are keywords
|
54
|
+
instead of a generic options parameter.
|
55
|
+
* Extracted the class methods to a separate file.
|
56
|
+
* Changed the container implementation to use a Set instead of an Array to
|
57
|
+
prevent data duplication. Resolves
|
58
|
+
{#79}[https://github.com/mime-types/ruby-mime-types/issues/79].
|
59
|
+
|
60
|
+
* MIME::Types::Cache changes:
|
61
|
+
|
62
|
+
* Caching is now based on the data gem version instead of the mime-types
|
63
|
+
version.
|
64
|
+
* Caching is compatible with columnar registry stores.
|
65
|
+
|
66
|
+
* MIME::Types::Loader changes:
|
67
|
+
|
68
|
+
* MIME::Types::Loader::PATH has been removed and replaced with
|
69
|
+
MIME::Types::Data::PATH from the mime-types-data gem. The environment
|
70
|
+
variable RUBY_MIME_TYPES_DATA is still used.
|
71
|
+
* Support for the long-deprecated mime-types v1 format has been removed.
|
72
|
+
* The registry is default loaded from the columnar store by default. The
|
73
|
+
internal format of the columnar store has changed; many of the boolean
|
74
|
+
flags are now loaded from a single file. Resolves
|
75
|
+
{#85}[https://github.com/mime-types/ruby-mime-types/85].
|
76
|
+
|
1
77
|
== 2.6.2 / 2015-09-13
|
2
78
|
|
3
79
|
* Bugs:
|
data/Licence.rdoc
CHANGED
@@ -1,16 +1,8 @@
|
|
1
1
|
== Licence
|
2
2
|
|
3
|
-
|
4
|
-
your option, a later version), the Perl Artistic License, or the MIT License.
|
5
|
-
The licence preferred by me is the MIT licence.
|
3
|
+
* Copyright 2003–2015 Austin Ziegler.
|
6
4
|
|
7
|
-
The
|
8
|
-
Artistic Licence and the GNU GPL ("the same terms as Perl itself") and given
|
9
|
-
that the Ruby implementation originally hewed pretty closely to the Perl
|
10
|
-
version, I chose to maintain the additional licensing terms.
|
11
|
-
|
12
|
-
* Copyright 2003–2015 Austin Ziegler.
|
13
|
-
* Adapted from MIME::Types (Perl) by Mark Overmeer.
|
5
|
+
The software in this repository is made available under the MIT license.
|
14
6
|
|
15
7
|
=== MIT License
|
16
8
|
|
@@ -31,9 +23,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
23
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
32
24
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
33
25
|
SOFTWARE.
|
34
|
-
|
35
|
-
=== Perl Artistic License (version 2)
|
36
|
-
See the file docs/artistic.txt in the main distribution.
|
37
|
-
|
38
|
-
=== GNU GPL version 2
|
39
|
-
See the file docs/COPYING.txt in the main distribution.
|
data/Manifest.txt
CHANGED
@@ -2,44 +2,31 @@
|
|
2
2
|
.gemtest
|
3
3
|
.gitignore
|
4
4
|
.hoerc
|
5
|
+
Code-of-Conduct.rdoc
|
5
6
|
Contributing.rdoc
|
6
|
-
History-Types.rdoc
|
7
7
|
History.rdoc
|
8
8
|
Licence.rdoc
|
9
9
|
Manifest.txt
|
10
10
|
README.rdoc
|
11
11
|
Rakefile
|
12
|
-
data/mime-types.json
|
13
|
-
data/mime.content_type.column
|
14
|
-
data/mime.docs.column
|
15
|
-
data/mime.encoding.column
|
16
|
-
data/mime.friendly.column
|
17
|
-
data/mime.obsolete.column
|
18
|
-
data/mime.references.column
|
19
|
-
data/mime.registered.column
|
20
|
-
data/mime.signature.column
|
21
|
-
data/mime.system.column
|
22
|
-
data/mime.use_instead.column
|
23
|
-
data/mime.xrefs.column
|
24
|
-
docs/COPYING.txt
|
25
|
-
docs/artistic.txt
|
26
12
|
lib/mime-types.rb
|
27
13
|
lib/mime/type.rb
|
28
14
|
lib/mime/type/columnar.rb
|
29
15
|
lib/mime/types.rb
|
30
16
|
lib/mime/types/cache.rb
|
31
17
|
lib/mime/types/columnar.rb
|
18
|
+
lib/mime/types/container.rb
|
32
19
|
lib/mime/types/deprecations.rb
|
20
|
+
lib/mime/types/full.rb
|
33
21
|
lib/mime/types/loader.rb
|
34
|
-
lib/mime/types/loader_path.rb
|
35
22
|
lib/mime/types/logger.rb
|
36
|
-
|
23
|
+
lib/mime/types/registry.rb
|
37
24
|
support/benchmarks/load.rb
|
38
25
|
support/benchmarks/load_allocations.rb
|
39
26
|
support/benchmarks/object_counts.rb
|
40
|
-
support/
|
41
|
-
support/
|
42
|
-
support/
|
27
|
+
support/profile/columnar.rb
|
28
|
+
support/profile/columnar_full.rb
|
29
|
+
support/profile/full.rb
|
43
30
|
test/bad-fixtures/malformed
|
44
31
|
test/fixture/json.json
|
45
32
|
test/fixture/old-data
|
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= mime-types
|
1
|
+
= mime-types for Ruby
|
2
2
|
|
3
3
|
home :: https://github.com/mime-types/ruby-mime-types/
|
4
4
|
code :: https://github.com/mime-types/ruby-mime-types/
|
@@ -14,6 +14,16 @@ MIME content type definitions. It can be used to determine defined filename
|
|
14
14
|
extensions for MIME types, or to use filename extensions to look up the likely
|
15
15
|
MIME type definitions.
|
16
16
|
|
17
|
+
Version 3.0 is a major release that requires Ruby 2.0 compatibility and removes
|
18
|
+
deprecated functions. The columnar registry format introduced in 2.6 has been
|
19
|
+
made the primary format; the registry data has been extracted from this library
|
20
|
+
and put into {mime-types-data}[https://github.com/mime-types/mime-types-data].
|
21
|
+
Additionally, mime-types is now licensed exclusively under the MIT licence and
|
22
|
+
there is a code of conduct in effect. There are a number of other smaller
|
23
|
+
changes described in the History file.
|
24
|
+
|
25
|
+
=== About MIME Media Types
|
26
|
+
|
17
27
|
MIME content types are used in MIME-compliant communications, as in e-mail or
|
18
28
|
HTTP traffic, to indicate the type of content which is transmitted. The
|
19
29
|
mime-types library provides the ability for detailed information about MIME
|
@@ -25,51 +35,20 @@ recommendations, the {IANA Media Types
|
|
25
35
|
registry}[https://www.iana.org/assignments/media-types/media-types.xhtml], and
|
26
36
|
user contributions. It conforms to RFCs 2045 and 2231.
|
27
37
|
|
28
|
-
This is release 2.6 with two new experimental features. The first new feature
|
29
|
-
is a new default registry storage format that greatly reduces the initial
|
30
|
-
memory use of the mime-types library. This feature is enabled by requiring
|
31
|
-
+mime/types/columnar+ instead of +mime/types+ with a small performance cost and
|
32
|
-
no change in *total* memory use if certain methods are called (see {Columnar
|
33
|
-
Store}[#label-Columnar+Store]). The second new feature is a logger interface
|
34
|
-
that conforms to the expectations of an ActiveSupport::Logger so that warnings
|
35
|
-
can be written to an application's log rather than the default location for
|
36
|
-
+warn+. This interface may be used for other logging purposes in the future.
|
37
|
-
|
38
|
-
mime-types 2.6 is the last planned version of mime-types 2.x, so deprecation
|
39
|
-
warnings are no longer cached but provided every time the method is called.
|
40
|
-
mime-types 2.6 supports Ruby 1.9.2 or later.
|
41
|
-
|
42
38
|
=== mime-types 1.x End of Life
|
43
39
|
|
44
|
-
mime-types
|
45
|
-
no reported security issues for mime-types 1.x. With the release of mime-types
|
46
|
-
2.5, I set the formal End of Life for mime-types 1.x for 2015-10-27 (the second
|
47
|
-
anniversary of the release of mime-types 2.0). After this date, absolutely no
|
48
|
-
pull requests for mime-types 1.x will be accepted.
|
49
|
-
|
50
|
-
=== mime-types Future
|
51
|
-
|
52
|
-
There are a number of issues open that make clear to me that there are some
|
53
|
-
fundamental changes that need to happen to both the data representation and the
|
54
|
-
API provided by mime-types. This cannot happen under the current release, so
|
55
|
-
all new development is focussing on an upcoming 3.0 release. The target for the
|
56
|
-
release is on or before the beginning of RubyConf 2015 (2015-11-15).
|
40
|
+
mime-types 1.x is no longer supported as of 2015-10-27.
|
57
41
|
|
58
|
-
|
59
|
-
registry for two years following the release. It will also receive security
|
60
|
-
updates, if needed, for the same period. There will be no further feature
|
61
|
-
development on mime-types 2.x following the 3.0 release.
|
42
|
+
=== mime-types 2.x End of Life
|
62
43
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
still present, the will continue to work. The quarterly updates will be against
|
67
|
-
2.99.x.
|
44
|
+
mime-types 2.x is supported as 2.99.x receiving quarterly updates of the IANA
|
45
|
+
registry and security updates for two years. It will reach full end of life on
|
46
|
+
2017-11-21.
|
68
47
|
|
69
|
-
|
70
|
-
dependency appropriately:
|
48
|
+
=== mime-types 3.x
|
71
49
|
|
72
|
-
|
50
|
+
Users are encouraged to upgrade to mime-types 3.x as soon as is practical.
|
51
|
+
mime-types 3.x requires Ruby 2.0 compatibility and a simpler licensing scheme.
|
73
52
|
|
74
53
|
== Synopsis
|
75
54
|
|
@@ -111,9 +90,9 @@ files). A MIME::Type stores the known information about one MIME type.
|
|
111
90
|
puts text.like?(MIME::Type.new('x-text/x-plain')) # => true
|
112
91
|
|
113
92
|
puts text.xrefs.inspect # => { "rfc" => [ "rfc2046", "rfc3676", "rfc5147" ] }
|
114
|
-
puts text.
|
115
|
-
|
116
|
-
|
93
|
+
puts text.xref_urls # => [ "http://www.iana.org/go/rfc2046",
|
94
|
+
# "http://www.iana.org/go/rfc3676",
|
95
|
+
# "http://www.iana.org/go/rfc5147" ]
|
117
96
|
|
118
97
|
xtext = MIME::Type.new('x-text/x-plain')
|
119
98
|
puts xtext.media_type # => 'text'
|
@@ -136,50 +115,57 @@ files). A MIME::Type stores the known information about one MIME type.
|
|
136
115
|
|
137
116
|
=== Columnar Store
|
138
117
|
|
139
|
-
mime-types
|
140
|
-
default memory footprint.
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
118
|
+
mime-types uses as its primary registry storage format a columnar storage
|
119
|
+
format reducing the default memory footprint. This is done by selectively
|
120
|
+
loading the data on a per-attribute basis. When the registry is first loaded
|
121
|
+
from the columnar store, only the canonical MIME content type and known
|
122
|
+
extensions and the MIME type will be connected to its loading registry. When
|
123
|
+
other data about the type is required (including +preferred_extension+,
|
124
|
+
<tt>obsolete?</tt>, and <tt>registered?</tt>) that data is loaded from its own
|
125
|
+
column file for all types in the registry.
|
147
126
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
127
|
+
The load of any column data is performed with a Mutex to ensure that types are
|
128
|
+
updated safely in a multithreaded environment. Benchmarks show that while
|
129
|
+
columnar data loading is slower than the JSON store, it cuts the memory use by
|
130
|
+
a third over the JSON store.
|
152
131
|
|
153
|
-
|
132
|
+
If you prefer to load all the data at once, this can be specified in your
|
133
|
+
application Gemfile as:
|
154
134
|
|
155
|
-
|
156
|
-
behaviour to applications are encouraged to require this directly, but only if
|
157
|
-
you specify a dependency on mime-types 2.6.
|
135
|
+
gem 'mime-types', require: 'mime/types/full'
|
158
136
|
|
159
|
-
|
137
|
+
Projects that do not use Bundler should +require+ the same:
|
138
|
+
|
139
|
+
require 'mime/types/full'
|
140
|
+
|
141
|
+
Libraries that use mime-types are discouraged from choosing the JSON store.
|
160
142
|
|
161
|
-
|
162
|
-
through at least
|
143
|
+
For applications and clients that used mime-types 2.6 when the columnar store
|
144
|
+
was introduced, the require used previously will still work through at least
|
145
|
+
{version
|
163
146
|
4}[https://github.com/mime-types/ruby-mime-types/pull/96#issuecomment-100725400]
|
164
|
-
and possibly beyond.
|
147
|
+
and possibly beyond; it is effectively an empty operation. You are recommended
|
148
|
+
to change your Gemfile as soon as is practical.
|
165
149
|
|
166
|
-
|
167
|
-
|
168
|
-
MIME::Type and MIME::Types
|
169
|
-
|
170
|
-
|
150
|
+
require 'mime/types/columnar'
|
151
|
+
|
152
|
+
Note that MIME::Type::Columnar and MIME::Types::Columnar are considered private
|
153
|
+
variant implementations of MIME::Type and MIME::Types and the specific
|
154
|
+
implementation should not be relied upon by consumers of the mime-types
|
155
|
+
library. Instead, depend on the public implementations (MIME::Type and
|
156
|
+
MIME::Types) only.
|
171
157
|
|
172
158
|
=== Cached Storage
|
173
159
|
|
174
|
-
|
175
|
-
|
176
|
-
|
160
|
+
mime-types supports a cache of MIME types using <tt>Marshal.dump</tt>. The
|
161
|
+
cache is invalidated for each version of the mime-types-data gem so that data
|
162
|
+
version 3.2015.1201 will not be reused with data version 3.2016.0101. If the
|
177
163
|
environment variable +RUBY_MIME_TYPES_CACHE+ is set to a cache file, mime-types
|
178
164
|
will attempt to load the MIME type registry from the cache file. If it cannot,
|
179
165
|
it will load the types normally and then saves the registry to the cache file.
|
180
166
|
|
181
|
-
The
|
182
|
-
|
167
|
+
The caching works with both full stores and columnar stores. Only the data that
|
168
|
+
has been loaded prior to saving the cache will be stored.
|
183
169
|
|
184
170
|
== mime-types Modified Semantic Versioning
|
185
171
|
|
@@ -211,6 +197,8 @@ indicate when new API features have been added, but all minor versions of
|
|
211
197
|
mime-types 2.x will be backwards compatible; the interfaces marked deprecated
|
212
198
|
will be removed in mime-types 3.x.
|
213
199
|
|
200
|
+
:include: Code-of-Conduct.rdoc
|
201
|
+
|
214
202
|
:include: Contributing.rdoc
|
215
203
|
|
216
204
|
:include: Licence.rdoc
|