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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e25ed719cc7aaa5bebf7b6a4c701a9269aee07a7826d57f51b0e304c3cef489e
4
- data.tar.gz: c7c7df7e30a4a6e03b60a4c3d19009a18a8cc4a263a9bc0e9d7317c1fa22868c
3
+ metadata.gz: ab73da0cc6bf48c9f8406807103d5e80aeba86c2b019b056143356899a5db481
4
+ data.tar.gz: 78cd6d48759acffabc96ce33160fe19715bb4730cc5bf6bd693dfb07e99c26a4
5
5
  SHA512:
6
- metadata.gz: 5f45853a6237e1773122595b9055112b053743daf726d209bbeabadda70dfb3248120db2a45807246739e87961efaebc35bedfd1e0418820f7c511fddc906633
7
- data.tar.gz: 0da2dad77c9d62eb54bbbd5a830593d6e1e392c1c1f4b141aa242b9cff512f3918504baf29b2cbb4f18f90a9103cf024b1a85b834557a0430fb84ddce46e88ba
6
+ metadata.gz: acbf4c390f33a56481c0b9100a83eaea8816a530d2dbd2e4617ceeaebe97bdb3734ea5d6af898a6d6ae32829116c514208121c8c0bd7ccbe38826bd6223b1200
7
+ data.tar.gz: 7fd36208270f89ebf99dd70905dae556c4652c461009b72fb3975c7bb9e49c78acfc564bd034309fe967685cab95118cd8ef56fc970d750b8df8ed3a79975bbe
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 3.7.0.pre2 / YYYY-MM-DD
3
+ ## 3.7.0 / 2025-05-07
4
4
 
5
5
  - Deprecated `MIME::Type#priority_compare`. In a future release, this will be
6
6
  will be renamed to `MIME::Type#<=>`. This method is used in tight loops, so
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
- {<img src="https://github.com/mime-types/ruby-mime-types/actions/workflows/ci.yml/badge.svg" alt="Build Status" />}[https://github.com/mime-types/ruby-mime-types/actions/workflows/ci.yml]
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 {mime-types-data}[https://github.com/mime-types/mime-types-data].
25
- Additionally, mime-types is now licensed exclusively under the MIT licence and
26
- there is a code of conduct in effect. There are a number of other smaller
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 {IANA Media Types
39
- registry}[https://www.iana.org/assignments/media-types/media-types.xhtml], and
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.0506.pre2"]
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"]
@@ -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
 
@@ -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, (pool[line] ||= line))
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
  {}
@@ -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: false})
82
+ def load(options = {columnar: true})
83
83
  if options[:columnar] && !Dir[columnar_path].empty?
84
84
  load_columnar
85
85
  else
@@ -4,7 +4,7 @@
4
4
  module MIME
5
5
  class Types
6
6
  # The released version of the mime-types library.
7
- VERSION = "3.7.0.pre2"
7
+ VERSION = "3.7.0"
8
8
  end
9
9
 
10
10
  class Type
data/lib/mime/types.rb CHANGED
@@ -130,7 +130,6 @@ class MIME::Types
130
130
  @type_variants[MIME::Type.simplified(type_id)]
131
131
  end
132
132
 
133
- # prune_matches(matches, complete, registered).sort { |a, b| a.priority_compare(b) }
134
133
  prune_matches(matches, complete, registered).sort
135
134
  end
136
135
 
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.pre2
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-04-07 00:00:00.000000000 Z
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.0506.pre2
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.0506.pre2
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 {mime-types-data}[https://github.com/mime-types/mime-types-data].
202
- Additionally, mime-types is now licensed exclusively under the MIT licence and
203
- there is a code of conduct in effect. There are a number of other smaller
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: []