mime-types-data 3.2024.1105 → 3.2026.0127

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.
data/Rakefile CHANGED
@@ -4,51 +4,36 @@ 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", "support")
8
+
9
+ Hoe.plugin :halostatue
10
+
11
+ Hoe.plugins.delete :debug
12
+ Hoe.plugins.delete :newb
13
+ Hoe.plugins.delete :publish
14
+ Hoe.plugins.delete :signing
11
15
 
12
16
  Hoe.spec "mime-types-data" do
13
17
  developer("Austin Ziegler", "halostatue@gmail.com")
14
18
 
15
- self.history_file = "History.md"
16
- self.readme_file = "README.md"
17
-
18
- license "MIT"
19
+ self.trusted_release = ENV["rubygems_release_gem"] == "true"
19
20
 
20
21
  require_ruby_version ">= 2.0"
21
22
 
22
- spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
23
+ license "MIT"
24
+
25
+ spec_extras[:metadata] = ->(val) {
26
+ val["rubygems_mfa_required"] = "true"
27
+ }
23
28
 
24
29
  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 << ["mime-types", ">= 3.4.0", "< 4"]
30
+ extra_dev_deps << ["hoe-halostatue", "~> 2.0"]
31
+ extra_dev_deps << ["mime-types", "> 3.6.2", "< 5"]
30
32
  extra_dev_deps << ["nokogiri", "~> 1.6"]
31
33
  extra_dev_deps << ["rake", ">= 10.0", "< 14"]
32
34
  extra_dev_deps << ["standard", "~> 1.0"]
33
35
  end
34
36
 
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
37
  namespace :mime do
53
38
  desc "Download the current MIME type registrations from IANA."
54
39
  task :iana, [:destination] do |_, args|
@@ -56,112 +41,63 @@ namespace :mime do
56
41
  IANARegistry.download(to: args.destination)
57
42
  end
58
43
 
59
- desc "Download the current MIME type configuration from Apache."
44
+ desc "Download the current MIME type configuration from Apache httpd."
60
45
  task :apache, [:destination] do |_, args|
61
46
  require "apache_mime_types"
62
47
  ApacheMIMETypes.download(to: args.destination)
63
48
  end
49
+
50
+ desc "Download the current MIME type configuration from Apache Tika."
51
+ task :tika, [:destination] do |_, args|
52
+ require "tika_mime_types"
53
+ TikeMIMETypes.download(to: args.destination)
54
+ end
55
+ end
56
+
57
+ task :version do
58
+ require "mime/types/data"
59
+ puts MIME::Types::Data::VERSION
64
60
  end
65
61
 
66
62
  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
- }
63
+ desc "Prepare a new release"
64
+ task :prepare do
65
+ require "prepare_release"
66
+
67
+ PrepareRelease.new
68
+ .download_and_convert
69
+ .write_updated_version
70
+ .write_updated_history
71
+ .rake_git_manifest
72
+ .rake_gemspec
76
73
  end
77
74
 
78
75
  desc "Prepare a new release for use with GitHub Actions"
79
76
  task :gha do
80
77
  require "prepare_release"
81
78
 
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
79
+ PrepareRelease.new
80
+ .download_and_convert
81
+ .write_updated_version
82
+ .write_updated_history
83
+ .rake_git_manifest
84
+ .rake_gemspec
85
+ .as_gha_vars
100
86
  end
101
87
  end
102
88
 
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
89
+ desc "Full data conversion for release"
90
+ task :convert do
91
+ require "prepare_release"
123
92
 
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
93
+ PrepareRelease.new.convert_types
131
94
  end
132
95
 
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)
156
-
157
- IO.write("History.md", updated)
158
- end
159
- end
96
+ task "convert:upgrade" do
97
+ require "convert"
98
+ Convert.from_yaml_to_yaml
160
99
  end
161
100
 
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
101
  Rake::Task["gem"].prerequisites.unshift("convert")
166
102
  Rake::Task["gem"].prerequisites.unshift("git:manifest")
167
103
  Rake::Task["gem"].prerequisites.unshift("gemspec")
data/SECURITY.md CHANGED
@@ -1,7 +1,26 @@
1
- # mime-types Security
1
+ # mime-types-data Security
2
2
 
3
- ## Security contact information
3
+ ## LLM-Generated Security Report Policy
4
4
 
5
- To report a security vulnerability, please use the
6
- [Tidelift security contact](https://tidelift.com/security). Tidelift will
7
- coordinate the fix and disclosure.
5
+ Absolutely no security reports will be accepted that have been generated by LLM
6
+ agents.
7
+
8
+ ## Supported Versions
9
+
10
+ Security reports are accepted for the most recent major release, with a limited
11
+ window of support after the initial major release.
12
+
13
+ - Bug reports will be accepted up to three months after release.
14
+ - Security reports will be accepted up to six months after release.
15
+
16
+ All issues raised must be demonstrated on the minimum supported Ruby version.
17
+
18
+ ## Reporting a Vulnerability
19
+
20
+ Report vulnerabilities via the [Tidelift security contact][tidelift]. Tidelift
21
+ will coordinate the fix and disclosure.
22
+
23
+ Alternatively, create a [private vulnerability report][advisory] with GitHub.
24
+
25
+ [advisory]: https://github.com/halostatue/mime-types-data/security/advisories/new
26
+ [tidelift]: https://tidelift.com/security