mime-types-data 3.2024.1203 → 3.2025.0220
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/{History.md → CHANGELOG.md} +81 -39
- data/CONTRIBUTING.md +150 -0
- data/CONTRIBUTORS.md +54 -0
- data/{Licence.md → LICENCE.md} +1 -1
- data/Manifest.txt +5 -19
- data/README.md +31 -30
- data/Rakefile +42 -116
- data/SECURITY.md +1 -1
- data/data/mime-types.json +1 -1
- data/data/mime.content_type.column +13 -0
- data/data/mime.docs.column +13 -0
- data/data/mime.encoding.column +13 -0
- data/data/mime.flags.column +13 -0
- data/data/mime.friendly.column +13 -0
- data/data/mime.pext.column +13 -0
- data/data/mime.use_instead.column +13 -0
- data/data/mime.xrefs.column +49 -36
- data/lib/mime/types/data.rb +1 -1
- metadata +20 -91
- data/Contributing.md +0 -203
- data/types/application.yaml +0 -19098
- data/types/audio.yaml +0 -1753
- data/types/chemical.yaml +0 -71
- data/types/conference.yaml +0 -9
- data/types/drawing.yaml +0 -15
- data/types/example.yaml +0 -1
- data/types/font.yaml +0 -65
- data/types/haptics.yaml +0 -28
- data/types/image.yaml +0 -1329
- data/types/message.yaml +0 -247
- data/types/model.yaml +0 -454
- data/types/multipart.yaml +0 -187
- data/types/text.yaml +0 -1281
- data/types/video.yaml +0 -1158
- data/types/world.yaml +0 -8
- /data/{Code-of-Conduct.md → CODE_OF_CONDUCT.md} +0 -0
data/Rakefile
CHANGED
@@ -4,51 +4,37 @@ require "rubygems"
|
|
4
4
|
require "hoe"
|
5
5
|
require "rake/clean"
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
Hoe.plugin :
|
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.
|
16
|
-
self.readme_file = "README.md"
|
17
|
-
|
18
|
-
license "MIT"
|
20
|
+
self.trusted_release = ENV["rubygems_release_gem"] == "true"
|
19
21
|
|
20
22
|
require_ruby_version ">= 2.0"
|
21
23
|
|
22
|
-
|
24
|
+
license "MIT"
|
25
|
+
|
26
|
+
spec_extras[:metadata] = ->(val) {
|
27
|
+
val.merge!({"rubygems_mfa_required" => "true"})
|
28
|
+
}
|
23
29
|
|
24
30
|
extra_dev_deps << ["hoe", "~> 4.0"]
|
25
|
-
extra_dev_deps << ["hoe-
|
26
|
-
extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
|
27
|
-
extra_dev_deps << ["hoe-git2", "~> 1.7"]
|
28
|
-
extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
|
31
|
+
extra_dev_deps << ["hoe-halostatue", "~> 2.0"]
|
29
32
|
extra_dev_deps << ["mime-types", ">= 3.4.0", "< 4"]
|
30
33
|
extra_dev_deps << ["nokogiri", "~> 1.6"]
|
31
34
|
extra_dev_deps << ["rake", ">= 10.0", "< 14"]
|
32
35
|
extra_dev_deps << ["standard", "~> 1.0"]
|
33
36
|
end
|
34
37
|
|
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
38
|
namespace :mime do
|
53
39
|
desc "Download the current MIME type registrations from IANA."
|
54
40
|
task :iana, [:destination] do |_, args|
|
@@ -63,105 +49,45 @@ namespace :mime do
|
|
63
49
|
end
|
64
50
|
end
|
65
51
|
|
52
|
+
task :version do
|
53
|
+
require "mime/types/data"
|
54
|
+
puts MIME::Types::Data::VERSION
|
55
|
+
end
|
56
|
+
|
66
57
|
namespace :release do
|
67
|
-
|
68
|
-
task
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
58
|
+
desc "Prepare a new release"
|
59
|
+
task :prepare do
|
60
|
+
require "prepare_release"
|
61
|
+
|
62
|
+
PrepareRelease.new
|
63
|
+
.download_and_convert
|
64
|
+
.write_updated_version
|
65
|
+
.write_updated_history
|
66
|
+
.rake_git_manifest
|
67
|
+
.rake_gemspec
|
76
68
|
end
|
77
69
|
|
78
70
|
desc "Prepare a new release for use with GitHub Actions"
|
79
71
|
task :gha do
|
80
72
|
require "prepare_release"
|
81
73
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
74
|
+
PrepareRelease.new
|
75
|
+
.download_and_convert
|
76
|
+
.write_updated_version
|
77
|
+
.write_updated_history
|
78
|
+
.rake_git_manifest
|
79
|
+
.rake_gemspec
|
80
|
+
.as_gha_vars
|
100
81
|
end
|
101
82
|
end
|
102
83
|
|
103
|
-
|
104
|
-
|
105
|
-
|
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)
|
84
|
+
desc "Default conversion from YAML to JSON and Columnar"
|
85
|
+
task :convert do
|
86
|
+
require "prepare_release"
|
156
87
|
|
157
|
-
|
158
|
-
end
|
159
|
-
end
|
88
|
+
PrepareRelease.new.convert_types
|
160
89
|
end
|
161
90
|
|
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
91
|
Rake::Task["gem"].prerequisites.unshift("convert")
|
166
92
|
Rake::Task["gem"].prerequisites.unshift("git:manifest")
|
167
93
|
Rake::Task["gem"].prerequisites.unshift("gemspec")
|
data/SECURITY.md
CHANGED