mime-types-data 3.2024.1203 → 3.2025.0107

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 194a6ab82a7dcc01105cc713335d21c302408686401d62e1f3f72639ec8eb3a8
4
- data.tar.gz: f8a358b8ba3d7612698b4f7e06dd258fb0cd852e3d0a691f6194f26015b05c2b
3
+ metadata.gz: 229d5d91e22284486fbeb71852e3ef452f3d0b4d877a0a3c7b845f4e5e49c63c
4
+ data.tar.gz: 2bc93a84c9ec78aa965f68543cf3695fe465e5c1008004652733851436b910ba
5
5
  SHA512:
6
- metadata.gz: 5821e06aca5a7cf1a73874f786ff05c60d3e34a1db8231a9e4da0539b2865e2d3803ed5581034eb93436d67ee86db136f83f533144bcd5fbd953aa5974d0d080
7
- data.tar.gz: 32dbb4179ef8c8958c27108b0b120a05cea87f7f59be2b1cf5c47cab32caeb803b574b0959779d0ddab73835ee398acb0853b08b8de4f2115472a70b5937304e
6
+ metadata.gz: f030825ca967f02c10157881239d60948aec1f62fedffe42aee21d9ab9589c0e8bd8f59e5eca22da793e1a9349ccde8b424de4795b421d4178dfbd3db3a01f64
7
+ data.tar.gz: 673ae24984555c01b7c76cd28d77bb1776c5bb8b5f7dc93264d0873a0217944f1a0e2a2f851decc6f56448b34adfa16a8b1197595b584bdfebec073d5fe817a8
@@ -2,6 +2,23 @@
2
2
 
3
3
  <!-- automatic-release -->
4
4
 
5
+ ## 3.2025.0107 / 2025-01-07
6
+
7
+ - Updated the Apache and IANA media registry entries as of release date
8
+ - Restructured documentation for how I prefer to manage Hoe projects now.
9
+ - Reworked the Rakefile because all data updates are now managed by GitHub
10
+ Actions and should not be managed manually any longer.
11
+
12
+ - `rake release:prepare` now does the same work as `rake release:gha`, but
13
+ does not commit or create a pull request.
14
+
15
+ - `rake convert` no longer has any subtasks.
16
+
17
+ - `rake update` has been removed with no replacement.
18
+
19
+ - Updated `.hoerc` to properly exclude `support/` and `types/` from the
20
+ manifest.
21
+
5
22
  ## 3.2024.1203 / 2024-12-03
6
23
 
7
24
  - Updated the Apache and IANA media registry entries as of release date
@@ -137,7 +137,7 @@ a final step of checking for IANA updates should be performed.
137
137
  category.)
138
138
  6. `bundle exec rake convert`
139
139
  7. `bundle exec rake update:version`
140
- 8. Write up the changes in `History.md`. If any PRs have been merged, these
140
+ 8. Write up the changes in `CHANGELOG.md`. If any PRs have been merged, these
141
141
  should be noted specifically and contributions should be added in
142
142
  `Contributing.md`.
143
143
  9. Commit the changes and push to GitHub.
@@ -145,59 +145,6 @@ a final step of checking for IANA updates should be performed.
145
145
 
146
146
  This is based on an issue [#18][#18].
147
147
 
148
- ### Contributors
149
-
150
- - Austin Ziegler created mime-types.
151
-
152
- Thanks to everyone else who has contributed to mime-types:
153
-
154
- - Aaron Patterson
155
- - Aggelos Avgerinos
156
- - Alessio Parma
157
- - Alex Balhatchet
158
- - Andre Pankratz
159
- - Andrey Eremin
160
- - Andy Brody
161
- - Arnaud Meuret
162
- - Bradley Meck
163
- - Brandon Galbraith
164
- - Chris Gat
165
- - Chris Salzberg
166
- - David Genord
167
- - Eric Marden
168
- - Garret Alfert
169
- - Godfrey Chan
170
- - Greg Brockman
171
- - Hans de Graaff
172
- - Henrik Hodne
173
- - Jeremy Evans
174
- - John Gardner
175
- - Jon Sneyers
176
- - Jonas Petersen
177
- - Juanito Fatas
178
- - Keerthi Siva
179
- - Ken Ip
180
- - Łukasz Śliwa
181
- - Lucia
182
- - Martin d'Allens
183
- - Mauricio Linhares
184
- - Mohammed Gad
185
- - Myk Klemme
186
- - nycvotes-dev
187
- - Postmodern
188
- - Richard Hirner
189
- - Richard Hurt
190
- - Richard Schneeman
191
- - Robert Buchberger
192
- - Samuel Williams
193
- - Sergio Baptista
194
- - Shane Eskritt
195
- - Tao Guo
196
- - Thomas Leese
197
- - Tibor Szolár
198
- - Todd Carrico
199
- - Yoran Brondsema
200
-
201
148
  [qcm]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
202
149
  [rmt]: https://github.com/mime-types/ruby-mime-types/
203
150
  [hoe]: https://github.com/seattlerb/hoe
data/CONTRIBUTORS.md ADDED
@@ -0,0 +1,52 @@
1
+ # Contributors
2
+
3
+ - Austin Ziegler created mime-types.
4
+
5
+ Thanks to everyone else who has contributed to mime-types:
6
+
7
+ - Aaron Patterson
8
+ - Aggelos Avgerinos
9
+ - Alessio Parma
10
+ - Alex Balhatchet
11
+ - Andre Pankratz
12
+ - Andrey Eremin
13
+ - Andy Brody
14
+ - Arnaud Meuret
15
+ - Bradley Meck
16
+ - Brandon Galbraith
17
+ - Chris Gat
18
+ - Chris Salzberg
19
+ - David Genord
20
+ - Eric Marden
21
+ - Garret Alfert
22
+ - Godfrey Chan
23
+ - Greg Brockman
24
+ - Hans de Graaff
25
+ - Henrik Hodne
26
+ - Jeremy Evans
27
+ - John Gardner
28
+ - Jon Sneyers
29
+ - Jonas Petersen
30
+ - Juanito Fatas
31
+ - Keerthi Siva
32
+ - Ken Ip
33
+ - Łukasz Śliwa
34
+ - Lucia
35
+ - Martin d'Allens
36
+ - Mauricio Linhares
37
+ - Mohammed Gad
38
+ - Myk Klemme
39
+ - nycvotes-dev
40
+ - Postmodern
41
+ - Richard Hirner
42
+ - Richard Hurt
43
+ - Richard Schneeman
44
+ - Robert Buchberger
45
+ - Samuel Williams
46
+ - Sergio Baptista
47
+ - Shane Eskritt
48
+ - Tao Guo
49
+ - Thomas Leese
50
+ - Tibor Szolár
51
+ - Todd Carrico
52
+ - Yoran Brondsema
@@ -1,6 +1,6 @@
1
1
  ## Licence
2
2
 
3
- - Copyright 2003–2024 Austin Ziegler and other contributors.
3
+ - Copyright 2003–2025 Austin Ziegler and other contributors.
4
4
 
5
5
  The software in this repository is made available under the MIT license.
6
6
 
data/Manifest.txt CHANGED
@@ -1,7 +1,8 @@
1
- Code-of-Conduct.md
2
- Contributing.md
3
- History.md
4
- Licence.md
1
+ CHANGELOG.md
2
+ CODE_OF_CONDUCT.md
3
+ CONTRIBUTING.md
4
+ CONTRIBUTORS.md
5
+ LICENCE.md
5
6
  Manifest.txt
6
7
  README.md
7
8
  Rakefile
@@ -19,18 +20,3 @@ data/mime.use_instead.column
19
20
  data/mime.xrefs.column
20
21
  lib/mime-types-data.rb
21
22
  lib/mime/types/data.rb
22
- types/application.yaml
23
- types/audio.yaml
24
- types/chemical.yaml
25
- types/conference.yaml
26
- types/drawing.yaml
27
- types/example.yaml
28
- types/font.yaml
29
- types/haptics.yaml
30
- types/image.yaml
31
- types/message.yaml
32
- types/model.yaml
33
- types/multipart.yaml
34
- types/text.yaml
35
- types/video.yaml
36
- types/world.yaml
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # mime-types-data
2
2
 
3
3
  - home :: https://github.com/mime-types/mime-types-data/
4
- - code :: https://github.com/mime-types/mime-types-data/
5
4
  - issues :: https://github.com/mime-types/mime-types-data/issues
5
+ - code :: https://github.com/mime-types/mime-types-data/
6
6
 
7
7
  ## Description
8
8
 
@@ -13,11 +13,11 @@ extensions to look up the likely MIME type definitions.
13
13
 
14
14
  ### About MIME Media Types
15
15
 
16
- MIME media types are used in MIME-compliant communications, as in e-mail or
17
- HTTP traffic, to indicate the type of content which is transmitted. The
18
- registry provided in mime-types-data contains detailed information about MIME
19
- entities. There are many types defined by RFCs and vendors, so the list is long
20
- but invariably; don't hesitate to offer additional type definitions for
16
+ MIME media types are used in MIME-compliant communications, as in e-mail or HTTP
17
+ traffic, to indicate the type of content which is transmitted. The registry
18
+ provided in mime-types-data contains detailed information about MIME entities.
19
+ There are many types defined by RFCs and vendors, so the list is long but
20
+ invariably; don't hesitate to offer additional type definitions for
21
21
  consideration. MIME type definitions found in mime-types are from RFCs, W3C
22
22
  recommendations, the [IANA Media Types registry][registry], and user
23
23
  contributions. It conforms to RFCs 2045 and 2231.
@@ -26,20 +26,20 @@ contributions. It conforms to RFCs 2045 and 2231.
26
26
 
27
27
  This registry contains the MIME media types in four formats:
28
28
 
29
- - A YAML format matching the Ruby mime-types library objects (MIME::Type).
30
- This is the primary user-editable format for developers. It is _not_
31
- shipped with the gem due to size considerations.
29
+ - A YAML format matching the Ruby mime-types library objects (MIME::Type). This
30
+ is the primary user-editable format for developers. It is _not_ shipped with
31
+ the gem due to size considerations.
32
32
  - A JSON format converted from the YAML format. Prior to Ruby mime-types 3.0,
33
33
  this was the main consumption format and is still recommended for any
34
- implementation that does not wish to implement the columnar format, which
35
- has a significant implementation effort cost.
36
- - An encoded text format splitting the data for each MIME type across
37
- multiple files. This columnar data format reduces the minimal data load
38
- substantially, resulting in a performance improvement at the cost of more
39
- complex code for loading the data on-demand. This is the default format for
40
- Ruby mime-types 3.0.
41
- - An encoded text format for use with [`mini_mime`][] (as of 3.2021.1108). This
42
- can be enabled with:
34
+ implementation that does not wish to implement the columnar format, which has
35
+ a significant implementation effort cost.
36
+ - An encoded text format splitting the data for each MIME type across multiple
37
+ files. This columnar data format reduces the minimal data load substantially,
38
+ resulting in a performance improvement at the cost of more complex code for
39
+ loading the data on-demand. This is the default format for Ruby mime-types
40
+ 3.0.
41
+ - An encoded text format for use with [`mini_mime`][minimime]. This can be
42
+ enabled with:
43
43
 
44
44
  ```ruby
45
45
  MiniMime::Configuration.ext_db_path =
@@ -50,24 +50,24 @@ This registry contains the MIME media types in four formats:
50
50
 
51
51
  ## mime-types-data Modified Semantic Versioning
52
52
 
53
- mime-types-data uses a heavily modified [Semantic Versioning][] scheme to
54
- indicate that the data formats compatibility based on a `SCHEMA` version and
55
- the date of the data update: `SCHEMA.YEAR.MONTHDAY`.
53
+ mime-types-data uses a heavily modified [Semantic Versioning][semver] scheme to
54
+ indicate that the data formats compatibility based on a `SCHEMA` version and the
55
+ date of the data update: `SCHEMA.YEAR.MONTHDAY`.
56
56
 
57
57
  1. If an incompatible data format change is made to any of the supported
58
- formts, `SCHEMA` will be incremented. The current `SCHEMA` is 3, supporting
58
+ formats, `SCHEMA` will be incremented. The current `SCHEMA` is 3, supporting
59
59
  the YAML, JSON, and columnar formats required for Ruby mime-types 3.0.
60
60
 
61
- 2. When the data is updated, the `YEAR.MONTHDAY` combination will be updated.
62
- An update on the last day of October 2015 would be written as `2015.1031`,
61
+ 2. When the data is updated, the `YEAR.MONTHDAY` combination will be updated. An
62
+ update on the last day of October 2015 would be written as `2015.1031`,
63
63
  resulting in the full version of `3.2015.1031`.
64
64
 
65
65
  3. If multiple versions of the data need to be released on the same day due to
66
- error, there will be an additional `REVISION` field incremented on the end
67
- of the version. Thus, if three revisions need to be published on October
68
- 31st, 2015, the last release would be `3.2015.1031.2` (remember that the
69
- first release has an implied `0`.)
66
+ error, there will be an additional `REVISION` field incremented on the end of
67
+ the version. Thus, if three revisions need to be published on October 31st,
68
+ 2015, the last release would be `3.2015.1031.2` (remember that the first
69
+ release has an implied `0`.)
70
70
 
71
71
  [registry]: https://www.iana.org/assignments/media-types/media-types.xhtml
72
- [semantic versioning]: http://semver.org/
73
- [`mini_mime`]: https://github.com/discourse/mini_mime
72
+ [semver]: http://semver.org/
73
+ [minimime]: https://github.com/discourse/mini_mime
data/Rakefile CHANGED
@@ -4,51 +4,35 @@ require "rubygems"
4
4
  require "hoe"
5
5
  require "rake/clean"
6
6
 
7
- Hoe.plugin :doofus
8
- Hoe.plugin :gemspec2
9
- Hoe.plugin :git2
10
- Hoe.plugin :rubygems
7
+ $LOAD_PATH.unshift("lib")
8
+ $LOAD_PATH.unshift("support")
9
+
10
+ Hoe.plugin :halostatue
11
+
12
+ Hoe.plugins.delete :debug
13
+ Hoe.plugins.delete :newb
14
+ Hoe.plugins.delete :publish
15
+ Hoe.plugins.delete :signing
11
16
 
12
17
  Hoe.spec "mime-types-data" do
13
18
  developer("Austin Ziegler", "halostatue@gmail.com")
14
19
 
15
- self.history_file = "History.md"
16
- self.readme_file = "README.md"
20
+ require_ruby_version ">= 2.0"
17
21
 
18
22
  license "MIT"
19
23
 
20
- require_ruby_version ">= 2.0"
21
-
22
- spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
24
+ spec_extras[:metadata] = ->(val) {
25
+ val.merge!({"rubygems_mfa_required" => "true"})
26
+ }
23
27
 
24
28
  extra_dev_deps << ["hoe", "~> 4.0"]
25
- extra_dev_deps << ["hoe-doofus", "~> 1.0"]
26
- extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
27
- extra_dev_deps << ["hoe-git2", "~> 1.7"]
28
- extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
29
+ extra_dev_deps << ["hoe-halostatue", "~> 1.0"]
29
30
  extra_dev_deps << ["mime-types", ">= 3.4.0", "< 4"]
30
31
  extra_dev_deps << ["nokogiri", "~> 1.6"]
31
32
  extra_dev_deps << ["rake", ">= 10.0", "< 14"]
32
33
  extra_dev_deps << ["standard", "~> 1.0"]
33
34
  end
34
35
 
35
- $LOAD_PATH.unshift "lib"
36
- $LOAD_PATH.unshift "support"
37
-
38
- def new_version
39
- version =
40
- IO.read("lib/mime/types/data.rb").scan(/VERSION = ['"](\d\.\d{4}\.\d{4}(?:\.\d+)?)['"]/).flatten.first
41
-
42
- major = Gem::Version.new(version).canonical_segments.first
43
- minor = Date.today.strftime("%Y.%m%d")
44
-
45
- "#{major}.#{minor}"
46
- end
47
-
48
- def release_header
49
- "#{new_version} / #{Date.today.strftime("%Y-%m-%d")}"
50
- end
51
-
52
36
  namespace :mime do
53
37
  desc "Download the current MIME type registrations from IANA."
54
38
  task :iana, [:destination] do |_, args|
@@ -64,104 +48,39 @@ namespace :mime do
64
48
  end
65
49
 
66
50
  namespace :release do
67
- task __pull: %w[mime:apache mime:iana convert]
68
- task __prepare: %w[update:version update:history git:manifest]
69
- task :__commit do
70
- history = IO.read("History.md")
71
- message = history.scan(%r{## (#{release_header}.+?)## \d\.\d{4}\.\d{4} /}m).flatten.first
72
-
73
- IO.popen("git commit -a -F -", "w") { |commit|
74
- commit.puts message
75
- }
51
+ desc "Prepare a new release"
52
+ task :prepare do
53
+ require "prepare_release"
54
+
55
+ PrepareRelease.new
56
+ .download_and_convert
57
+ .write_updated_version
58
+ .write_updated_history
59
+ .rake_git_manifest
60
+ .rake_gemspec
76
61
  end
77
62
 
78
63
  desc "Prepare a new release for use with GitHub Actions"
79
64
  task :gha do
80
65
  require "prepare_release"
81
66
 
82
- pr = PrepareRelease.new
83
- pr.download_and_convert
84
- pr.write_updated_version
85
- pr.write_updated_history
86
- pr.rake_git_manifest
87
- pr.rake_gemspec
88
- pr.as_gha_vars
89
- end
90
-
91
- desc "Prepare a new automatic release"
92
- task automatic: :__pull do
93
- if system("git diff --quiet --exit-code") == false
94
- Rake::Task["release:__prepare"].invoke
95
- Rake::Task["gemspec"].invoke
96
- Rake::Task["release:__commit"].invoke
97
- else
98
- warn "No changes detected."
99
- end
67
+ PrepareRelease.new
68
+ .download_and_convert
69
+ .write_updated_version
70
+ .write_updated_history
71
+ .rake_git_manifest
72
+ .rake_gemspec
73
+ .as_gha_vars
100
74
  end
101
75
  end
102
76
 
103
- namespace :convert do
104
- namespace :yaml do
105
- desc "Convert from YAML to JSON"
106
- task :json, [:source, :destination, :multiple_files] do |_, args|
107
- require "convert"
108
- Convert.from_yaml_to_json(from: args.source, to: args.destination, multiple_files: args.multiple_files)
109
- end
110
-
111
- desc "Convert from YAML to Columnar"
112
- task :columnar, [:source, :destination] do |_, args|
113
- require "convert/columnar"
114
- Convert::Columnar.from_yaml_to_columnar(from: args.source, to: args.destination)
115
- end
116
-
117
- desc "Convert from YAML to mini_mime db format"
118
- task :mini_mime, [:source, :destination] do |_, args|
119
- require "convert/mini_mime_db"
120
- Convert::MiniMimeDb.from_yaml_to_mini_mime(from: args.source, to: args.destination)
121
- end
122
- end
123
-
124
- namespace :json do
125
- desc "Convert from JSON to YAML"
126
- task :yaml, [:source, :destination, :multiple_files] do |_, args|
127
- require "convert"
128
- Convert.from_json_to_yaml(from: args.source, to: args.destination, multiple_files: args.multiple_files)
129
- end
130
- end
131
- end
132
-
133
- namespace :update do
134
- desc "Update the release version"
135
- task :version do
136
- file = IO.read("lib/mime/types/data.rb")
137
- updated = file.sub(/VERSION = ['"][.0-9]+['"]/, %(VERSION = "#{new_version}"))
138
-
139
- IO.write("lib/mime/types/data.rb", updated)
140
- end
141
-
142
- desc "Update the history file with automatic release notes"
143
- task :history do
144
- history = IO.read("History.md")
145
-
146
- if !/^## #{release_header}$/.match?(history)
147
- note = <<-NOTE
148
- <!-- automatic-release -->
149
-
150
- ## #{release_header}
151
-
152
- - Updated the Apache and IANA media registry entries as of release date.
153
- NOTE
154
-
155
- updated = history.sub("<!-- automatic-release -->\n", note)
77
+ desc "Default conversion from YAML to JSON and Columnar"
78
+ task :convert do
79
+ require "prepare_release"
156
80
 
157
- IO.write("History.md", updated)
158
- end
159
- end
81
+ PrepareRelease.new.convert_types
160
82
  end
161
83
 
162
- desc "Default conversion from YAML to JSON and Columnar"
163
- task convert: ["convert:yaml:json", "convert:yaml:columnar", "convert:yaml:mini_mime"]
164
-
165
84
  Rake::Task["gem"].prerequisites.unshift("convert")
166
85
  Rake::Task["gem"].prerequisites.unshift("git:manifest")
167
86
  Rake::Task["gem"].prerequisites.unshift("gemspec")
data/SECURITY.md CHANGED
@@ -1,4 +1,4 @@
1
- # mime-types Security
1
+ # mime-types-data Security
2
2
 
3
3
  ## Security contact information
4
4