mime-types 3.7.0.pre2 → 3.7.0
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/CHANGELOG.md +1 -1
- data/README.md +12 -11
- data/Rakefile +1 -1
- data/lib/mime/type/columnar.rb +0 -2
- data/lib/mime/types/_columnar.rb +1 -9
- data/lib/mime/types/loader.rb +1 -1
- data/lib/mime/types/version.rb +1 -1
- data/lib/mime/types.rb +0 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab73da0cc6bf48c9f8406807103d5e80aeba86c2b019b056143356899a5db481
|
4
|
+
data.tar.gz: 78cd6d48759acffabc96ce33160fe19715bb4730cc5bf6bd693dfb07e99c26a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acbf4c390f33a56481c0b9100a83eaea8816a530d2dbd2e4617ceeaebe97bdb3734ea5d6af898a6d6ae32829116c514208121c8c0bd7ccbe38826bd6223b1200
|
7
|
+
data.tar.gz: 7fd36208270f89ebf99dd70905dae556c4652c461009b72fb3975c7bb9e49c78acfc564bd034309fe967685cab95118cd8ef56fc970d750b8df8ed3a79975bbe
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -6,10 +6,8 @@
|
|
6
6
|
- rdoc :: http://rdoc.info/gems/mime-types/
|
7
7
|
- changelog ::
|
8
8
|
https://github.com/mime-types/ruby-mime-types/blob/main/CHANGELOG.md
|
9
|
-
- continuous integration ::
|
10
|
-
|
11
|
-
- test coverage ::
|
12
|
-
{<img src="https://coveralls.io/repos/mime-types/ruby-mime-types/badge.svg?branch=master&service=github" alt="Coverage Status" />}[https://coveralls.io/github/mime-types/ruby-mime-types?branch=master]
|
9
|
+
- continuous integration :: [![Build Status][ci-badge]][ci-workflow]
|
10
|
+
- test coverage :: [![Coverage][coveralls-badge]][coveralls]
|
13
11
|
|
14
12
|
## Description
|
15
13
|
|
@@ -21,10 +19,9 @@ MIME type definitions.
|
|
21
19
|
Version 3.0 is a major release that requires Ruby 2.0 compatibility and removes
|
22
20
|
deprecated functions. The columnar registry format introduced in 2.6 has been
|
23
21
|
made the primary format; the registry data has been extracted from this library
|
24
|
-
and put into
|
25
|
-
|
26
|
-
|
27
|
-
changes described in the History file.
|
22
|
+
and put into [mime-types-data][data]. Additionally, mime-types is now licensed
|
23
|
+
exclusively under the MIT licence and there is a code of conduct in effect.
|
24
|
+
There are a number of other smaller changes described in the History file.
|
28
25
|
|
29
26
|
### About MIME Media Types
|
30
27
|
|
@@ -35,9 +32,8 @@ entities (provided as an enumerable collection of MIME::Type objects) to be
|
|
35
32
|
determined and used. There are many types defined by RFCs and vendors, so the
|
36
33
|
list is long but by definition incomplete; don't hesitate to add additional type
|
37
34
|
definitions. MIME type definitions found in mime-types are from RFCs, W3C
|
38
|
-
recommendations, the
|
39
|
-
|
40
|
-
user contributions. It conforms to RFCs 2045 and 2231.
|
35
|
+
recommendations, the [IANA Media Types registry][registry], and user
|
36
|
+
contributions. It conforms to RFCs 2045 and 2231.
|
41
37
|
|
42
38
|
### mime-types 3.x
|
43
39
|
|
@@ -197,3 +193,8 @@ removed until mime-types 4.x or possibly later.
|
|
197
193
|
[pull-96-comment]: https://github.com/mime-types/ruby-mime-types/pull/96#issuecomment-100725400
|
198
194
|
[semver]: https://semver.org
|
199
195
|
[data]: https://github.com/mime-types/mime-types-data
|
196
|
+
[ci-badge]: https://github.com/mime-types/ruby-mime-types/actions/workflows/ci.yml/badge.svg
|
197
|
+
[ci-workflow]: https://github.com/mime-types/ruby-mime-types/actions/workflows/ci.yml
|
198
|
+
[coveralls-badge]: https://coveralls.io/repos/mime-types/ruby-mime-types/badge.svg?branch=main&service=github
|
199
|
+
[coveralls]: https://coveralls.io/github/mime-types/ruby-mime-types?branch=main
|
200
|
+
[registry]: https://www.iana.org/assignments/media-types/media-types.xhtml
|
data/Rakefile
CHANGED
@@ -26,7 +26,7 @@ spec = Hoe.spec "mime-types" do
|
|
26
26
|
val.merge!({"rubygems_mfa_required" => "true"})
|
27
27
|
}
|
28
28
|
|
29
|
-
extra_deps << ["mime-types-data", "~> 3.2025", ">= 3.2025.
|
29
|
+
extra_deps << ["mime-types-data", "~> 3.2025", ">= 3.2025.0507"]
|
30
30
|
extra_deps << ["logger", ">= 0"]
|
31
31
|
|
32
32
|
extra_dev_deps << ["hoe", "~> 4.0"]
|
data/lib/mime/type/columnar.rb
CHANGED
@@ -41,7 +41,6 @@ class MIME::Type::Columnar < MIME::Type
|
|
41
41
|
:signature?, :provisional, :provisional=, :provisional?, file: "flags"
|
42
42
|
column :xrefs, :xrefs=, :xref_urls
|
43
43
|
column :use_instead, :use_instead=
|
44
|
-
column :extension_priorities, :extension_priorities=
|
45
44
|
|
46
45
|
def encode_with(coder) # :nodoc:
|
47
46
|
@container.send(:load_friendly)
|
@@ -51,7 +50,6 @@ class MIME::Type::Columnar < MIME::Type
|
|
51
50
|
@container.send(:load_use_instead)
|
52
51
|
@container.send(:load_xrefs)
|
53
52
|
@container.send(:load_preferred_extension)
|
54
|
-
@container.send(:load_extension_priorities)
|
55
53
|
super
|
56
54
|
end
|
57
55
|
|
data/lib/mime/types/_columnar.rb
CHANGED
@@ -89,7 +89,7 @@ module MIME::Types::Columnar
|
|
89
89
|
def load_encoding
|
90
90
|
each_file_line("encoding") do |type, line|
|
91
91
|
pool ||= {}
|
92
|
-
type.instance_variable_set(:@encoding,
|
92
|
+
type.instance_variable_set(:@encoding, pool[line] ||= line)
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
@@ -133,14 +133,6 @@ module MIME::Types::Columnar
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
-
def load_extension_priorities
|
137
|
-
each_file_line("extpri") do |type, line|
|
138
|
-
type.instance_variable_set(:@extension_priorities, dict(line, transform: :extension_priority))
|
139
|
-
end
|
140
|
-
rescue
|
141
|
-
# This path preserves backwards compatibility.
|
142
|
-
end
|
143
|
-
|
144
136
|
def dict(line, transform: nil)
|
145
137
|
if line == "-"
|
146
138
|
{}
|
data/lib/mime/types/loader.rb
CHANGED
@@ -79,7 +79,7 @@ class MIME::Types::Loader
|
|
79
79
|
#
|
80
80
|
# This will load from columnar files (#load_columnar) if <tt>columnar:
|
81
81
|
# true</tt> is provided in +options+ and there are columnar files in +path+.
|
82
|
-
def load(options = {columnar:
|
82
|
+
def load(options = {columnar: true})
|
83
83
|
if options[:columnar] && !Dir[columnar_path].empty?
|
84
84
|
load_columnar
|
85
85
|
else
|
data/lib/mime/types/version.rb
CHANGED
data/lib/mime/types.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mime-types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.0
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Ziegler
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-07 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: mime-types-data
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
version: '3.2025'
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2025.
|
21
|
+
version: 3.2025.0507
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
version: '3.2025'
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: 3.2025.
|
31
|
+
version: 3.2025.0507
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: logger
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,10 +198,9 @@ description: |-
|
|
198
198
|
Version 3.0 is a major release that requires Ruby 2.0 compatibility and removes
|
199
199
|
deprecated functions. The columnar registry format introduced in 2.6 has been
|
200
200
|
made the primary format; the registry data has been extracted from this library
|
201
|
-
and put into
|
202
|
-
|
203
|
-
|
204
|
-
changes described in the History file.
|
201
|
+
and put into [mime-types-data][data]. Additionally, mime-types is now licensed
|
202
|
+
exclusively under the MIT licence and there is a code of conduct in effect.
|
203
|
+
There are a number of other smaller changes described in the History file.
|
205
204
|
email:
|
206
205
|
- halostatue@gmail.com
|
207
206
|
executables: []
|