mime-types 3.3.1 → 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 +413 -0
- data/CODE_OF_CONDUCT.md +128 -0
- data/CONTRIBUTING.md +93 -0
- data/CONTRIBUTORS.md +52 -0
- data/{Licence.md → LICENCE.md} +11 -12
- data/Manifest.txt +8 -5
- data/README.md +200 -0
- data/Rakefile +118 -201
- data/SECURITY.md +7 -0
- data/lib/mime/type/columnar.rb +17 -4
- data/lib/mime/type.rb +293 -134
- data/lib/mime/types/_columnar.rb +72 -24
- data/lib/mime/types/cache.rb +8 -12
- data/lib/mime/types/columnar.rb +1 -1
- data/lib/mime/types/container.rb +49 -19
- data/lib/mime/types/deprecations.rb +51 -27
- data/lib/mime/types/full.rb +2 -2
- data/lib/mime/types/loader.rb +29 -16
- data/lib/mime/types/logger.rb +38 -9
- data/lib/mime/types/registry.rb +10 -8
- data/lib/mime/types/version.rb +14 -0
- data/lib/mime/types.rb +45 -33
- data/lib/mime-types.rb +1 -1
- data/test/minitest_helper.rb +6 -9
- data/test/test_mime_type.rb +337 -288
- data/test/test_mime_types.rb +79 -75
- data/test/test_mime_types_cache.rb +38 -38
- data/test/test_mime_types_class.rb +70 -59
- data/test/test_mime_types_lazy.rb +16 -16
- data/test/test_mime_types_loader.rb +14 -14
- metadata +54 -122
- data/Code-of-Conduct.md +0 -73
- data/Contributing.md +0 -143
- data/History.md +0 -240
- data/README.rdoc +0 -193
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require "mime/types"
|
|
4
|
+
require "minitest_helper"
|
|
5
5
|
|
|
6
|
-
describe MIME::Types,
|
|
6
|
+
describe MIME::Types, "lazy loading" do
|
|
7
7
|
def setup
|
|
8
|
-
ENV[
|
|
8
|
+
ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = "true"
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def teardown
|
|
12
12
|
reset_mime_types
|
|
13
|
-
ENV.delete(
|
|
13
|
+
ENV.delete("RUBY_MIME_TYPES_LAZY_LOAD")
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def reset_mime_types
|
|
@@ -18,32 +18,32 @@ describe MIME::Types, 'lazy loading' do
|
|
|
18
18
|
MIME::Types.send(:load_default_mime_types)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
describe
|
|
22
|
-
it
|
|
23
|
-
assert_output
|
|
21
|
+
describe ".lazy_load?" do
|
|
22
|
+
it "is true when RUBY_MIME_TYPES_LAZY_LOAD is set" do
|
|
23
|
+
assert_output "", /RUBY_MIME_TYPES_LAZY_LOAD/ do
|
|
24
24
|
assert_equal true, MIME::Types.send(:lazy_load?)
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
it
|
|
29
|
-
ENV[
|
|
30
|
-
assert_output
|
|
28
|
+
it "is nil when RUBY_MIME_TYPES_LAZY_LOAD is unset" do
|
|
29
|
+
ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = nil
|
|
30
|
+
assert_output "", "" do
|
|
31
31
|
assert_nil MIME::Types.send(:lazy_load?)
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
it
|
|
36
|
-
ENV[
|
|
37
|
-
assert_output
|
|
35
|
+
it "is false when RUBY_MIME_TYPES_LAZY_LOAD is false" do
|
|
36
|
+
ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = "false"
|
|
37
|
+
assert_output "", /RUBY_MIME_TYPES_LAZY_LOAD/ do
|
|
38
38
|
assert_equal false, MIME::Types.send(:lazy_load?)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
it
|
|
43
|
+
it "loads lazily when RUBY_MIME_TYPES_LAZY_LOAD is set" do
|
|
44
44
|
MIME::Types.instance_variable_set(:@__types__, nil)
|
|
45
45
|
assert_nil MIME::Types.instance_variable_get(:@__types__)
|
|
46
|
-
refute_nil MIME::Types[
|
|
46
|
+
refute_nil MIME::Types["text/html"].first
|
|
47
47
|
refute_nil MIME::Types.instance_variable_get(:@__types__)
|
|
48
48
|
end
|
|
49
49
|
end
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require "mime/types"
|
|
4
|
+
require "minitest_helper"
|
|
5
5
|
|
|
6
6
|
describe MIME::Types::Loader do
|
|
7
7
|
def setup
|
|
8
|
-
@path
|
|
9
|
-
@loader
|
|
10
|
-
@bad_path = File.expand_path(
|
|
8
|
+
@path = File.expand_path("../fixture", __FILE__)
|
|
9
|
+
@loader = MIME::Types::Loader.new(@path)
|
|
10
|
+
@bad_path = File.expand_path("../bad-fixtures", __FILE__)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def assert_correctly_loaded(types)
|
|
14
|
-
assert_includes(types,
|
|
15
|
-
assert_equal(%w
|
|
16
|
-
refute(types[
|
|
14
|
+
assert_includes(types, "application/1d-interleaved-parityfec")
|
|
15
|
+
assert_equal(%w[webm], types["audio/webm"].first.extensions)
|
|
16
|
+
refute(types["audio/webm"].first.registered?)
|
|
17
17
|
|
|
18
|
-
assert_equal(
|
|
19
|
-
|
|
18
|
+
assert_equal("Fixes a bug with IE6 and progressive JPEGs",
|
|
19
|
+
types["image/pjpeg"].first.docs)
|
|
20
20
|
|
|
21
|
-
assert(types[
|
|
22
|
-
assert_equal(
|
|
21
|
+
assert(types["audio/vnd.qcelp"].first.obsolete?)
|
|
22
|
+
assert_equal("audio/QCELP", types["audio/vnd.qcelp"].first.use_instead)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
it
|
|
25
|
+
it "loads YAML files correctly" do
|
|
26
26
|
assert_correctly_loaded @loader.load_yaml
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
it
|
|
29
|
+
it "loads JSON files correctly" do
|
|
30
30
|
assert_correctly_loaded @loader.load_json
|
|
31
31
|
end
|
|
32
32
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mime-types
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Austin Ziegler
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2025-05-07 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: mime-types-data
|
|
@@ -16,70 +15,62 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '3.
|
|
18
|
+
version: '3.2025'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 3.2025.0507
|
|
20
22
|
type: :runtime
|
|
21
23
|
prerelease: false
|
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
25
|
requirements:
|
|
24
26
|
- - "~>"
|
|
25
27
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '3.
|
|
27
|
-
-
|
|
28
|
-
name: minitest
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '5.13'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
28
|
+
version: '3.2025'
|
|
29
|
+
- - ">="
|
|
39
30
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
31
|
+
version: 3.2025.0507
|
|
41
32
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
33
|
+
name: logger
|
|
43
34
|
requirement: !ruby/object:Gem::Requirement
|
|
44
35
|
requirements:
|
|
45
|
-
- - "
|
|
36
|
+
- - ">="
|
|
46
37
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
48
|
-
type: :
|
|
38
|
+
version: '0'
|
|
39
|
+
type: :runtime
|
|
49
40
|
prerelease: false
|
|
50
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
42
|
requirements:
|
|
52
|
-
- - "
|
|
43
|
+
- - ">="
|
|
53
44
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
45
|
+
version: '0'
|
|
55
46
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: hoe
|
|
47
|
+
name: hoe
|
|
57
48
|
requirement: !ruby/object:Gem::Requirement
|
|
58
49
|
requirements:
|
|
59
50
|
- - "~>"
|
|
60
51
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
52
|
+
version: '4.0'
|
|
62
53
|
type: :development
|
|
63
54
|
prerelease: false
|
|
64
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
56
|
requirements:
|
|
66
57
|
- - "~>"
|
|
67
58
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
59
|
+
version: '4.0'
|
|
69
60
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: hoe-
|
|
61
|
+
name: hoe-halostatue
|
|
71
62
|
requirement: !ruby/object:Gem::Requirement
|
|
72
63
|
requirements:
|
|
73
64
|
- - "~>"
|
|
74
65
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
66
|
+
version: '2.0'
|
|
76
67
|
type: :development
|
|
77
68
|
prerelease: false
|
|
78
69
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
70
|
requirements:
|
|
80
71
|
- - "~>"
|
|
81
72
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
73
|
+
version: '2.0'
|
|
83
74
|
- !ruby/object:Gem::Dependency
|
|
84
75
|
name: hoe-rubygems
|
|
85
76
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -95,19 +86,19 @@ dependencies:
|
|
|
95
86
|
- !ruby/object:Gem::Version
|
|
96
87
|
version: '1.0'
|
|
97
88
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
89
|
+
name: minitest
|
|
99
90
|
requirement: !ruby/object:Gem::Requirement
|
|
100
91
|
requirements:
|
|
101
92
|
- - "~>"
|
|
102
93
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
94
|
+
version: '5.0'
|
|
104
95
|
type: :development
|
|
105
96
|
prerelease: false
|
|
106
97
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
98
|
requirements:
|
|
108
99
|
- - "~>"
|
|
109
100
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
101
|
+
version: '5.0'
|
|
111
102
|
- !ruby/object:Gem::Dependency
|
|
112
103
|
name: minitest-autotest
|
|
113
104
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -136,20 +127,6 @@ dependencies:
|
|
|
136
127
|
- - "~>"
|
|
137
128
|
- !ruby/object:Gem::Version
|
|
138
129
|
version: '1.0'
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: minitest-bonus-assertions
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - "~>"
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: '3.0'
|
|
146
|
-
type: :development
|
|
147
|
-
prerelease: false
|
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
-
requirements:
|
|
150
|
-
- - "~>"
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: '3.0'
|
|
153
130
|
- !ruby/object:Gem::Dependency
|
|
154
131
|
name: minitest-hooks
|
|
155
132
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -173,7 +150,7 @@ dependencies:
|
|
|
173
150
|
version: '10.0'
|
|
174
151
|
- - "<"
|
|
175
152
|
- !ruby/object:Gem::Version
|
|
176
|
-
version: '
|
|
153
|
+
version: '14'
|
|
177
154
|
type: :development
|
|
178
155
|
prerelease: false
|
|
179
156
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -183,83 +160,35 @@ dependencies:
|
|
|
183
160
|
version: '10.0'
|
|
184
161
|
- - "<"
|
|
185
162
|
- !ruby/object:Gem::Version
|
|
186
|
-
version: '
|
|
187
|
-
- !ruby/object:Gem::Dependency
|
|
188
|
-
name: fivemat
|
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
|
190
|
-
requirements:
|
|
191
|
-
- - "~>"
|
|
192
|
-
- !ruby/object:Gem::Version
|
|
193
|
-
version: '1.3'
|
|
194
|
-
type: :development
|
|
195
|
-
prerelease: false
|
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
197
|
-
requirements:
|
|
198
|
-
- - "~>"
|
|
199
|
-
- !ruby/object:Gem::Version
|
|
200
|
-
version: '1.3'
|
|
201
|
-
- !ruby/object:Gem::Dependency
|
|
202
|
-
name: minitest-rg
|
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
|
204
|
-
requirements:
|
|
205
|
-
- - "~>"
|
|
206
|
-
- !ruby/object:Gem::Version
|
|
207
|
-
version: '5.2'
|
|
208
|
-
type: :development
|
|
209
|
-
prerelease: false
|
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
211
|
-
requirements:
|
|
212
|
-
- - "~>"
|
|
213
|
-
- !ruby/object:Gem::Version
|
|
214
|
-
version: '5.2'
|
|
215
|
-
- !ruby/object:Gem::Dependency
|
|
216
|
-
name: simplecov
|
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
|
218
|
-
requirements:
|
|
219
|
-
- - "~>"
|
|
220
|
-
- !ruby/object:Gem::Version
|
|
221
|
-
version: '0.7'
|
|
222
|
-
type: :development
|
|
223
|
-
prerelease: false
|
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
225
|
-
requirements:
|
|
226
|
-
- - "~>"
|
|
227
|
-
- !ruby/object:Gem::Version
|
|
228
|
-
version: '0.7'
|
|
163
|
+
version: '14'
|
|
229
164
|
- !ruby/object:Gem::Dependency
|
|
230
165
|
name: rdoc
|
|
231
166
|
requirement: !ruby/object:Gem::Requirement
|
|
232
167
|
requirements:
|
|
233
168
|
- - ">="
|
|
234
169
|
- !ruby/object:Gem::Version
|
|
235
|
-
version: '
|
|
236
|
-
- - "<"
|
|
237
|
-
- !ruby/object:Gem::Version
|
|
238
|
-
version: '7'
|
|
170
|
+
version: '0.0'
|
|
239
171
|
type: :development
|
|
240
172
|
prerelease: false
|
|
241
173
|
version_requirements: !ruby/object:Gem::Requirement
|
|
242
174
|
requirements:
|
|
243
175
|
- - ">="
|
|
244
176
|
- !ruby/object:Gem::Version
|
|
245
|
-
version: '
|
|
246
|
-
- - "<"
|
|
247
|
-
- !ruby/object:Gem::Version
|
|
248
|
-
version: '7'
|
|
177
|
+
version: '0.0'
|
|
249
178
|
- !ruby/object:Gem::Dependency
|
|
250
|
-
name:
|
|
179
|
+
name: standard
|
|
251
180
|
requirement: !ruby/object:Gem::Requirement
|
|
252
181
|
requirements:
|
|
253
182
|
- - "~>"
|
|
254
183
|
- !ruby/object:Gem::Version
|
|
255
|
-
version: '
|
|
184
|
+
version: '1.0'
|
|
256
185
|
type: :development
|
|
257
186
|
prerelease: false
|
|
258
187
|
version_requirements: !ruby/object:Gem::Requirement
|
|
259
188
|
requirements:
|
|
260
189
|
- - "~>"
|
|
261
190
|
- !ruby/object:Gem::Version
|
|
262
|
-
version: '
|
|
191
|
+
version: '1.0'
|
|
263
192
|
description: |-
|
|
264
193
|
The mime-types library provides a library and registry for information about
|
|
265
194
|
MIME content type definitions. It can be used to determine defined filename
|
|
@@ -269,29 +198,32 @@ description: |-
|
|
|
269
198
|
Version 3.0 is a major release that requires Ruby 2.0 compatibility and removes
|
|
270
199
|
deprecated functions. The columnar registry format introduced in 2.6 has been
|
|
271
200
|
made the primary format; the registry data has been extracted from this library
|
|
272
|
-
and put into
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
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.
|
|
276
204
|
email:
|
|
277
205
|
- halostatue@gmail.com
|
|
278
206
|
executables: []
|
|
279
207
|
extensions: []
|
|
280
208
|
extra_rdoc_files:
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
209
|
+
- CHANGELOG.md
|
|
210
|
+
- CODE_OF_CONDUCT.md
|
|
211
|
+
- CONTRIBUTING.md
|
|
212
|
+
- CONTRIBUTORS.md
|
|
213
|
+
- LICENCE.md
|
|
285
214
|
- Manifest.txt
|
|
286
|
-
- README.
|
|
215
|
+
- README.md
|
|
216
|
+
- SECURITY.md
|
|
287
217
|
files:
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
218
|
+
- CHANGELOG.md
|
|
219
|
+
- CODE_OF_CONDUCT.md
|
|
220
|
+
- CONTRIBUTING.md
|
|
221
|
+
- CONTRIBUTORS.md
|
|
222
|
+
- LICENCE.md
|
|
292
223
|
- Manifest.txt
|
|
293
|
-
- README.
|
|
224
|
+
- README.md
|
|
294
225
|
- Rakefile
|
|
226
|
+
- SECURITY.md
|
|
295
227
|
- lib/mime-types.rb
|
|
296
228
|
- lib/mime/type.rb
|
|
297
229
|
- lib/mime/type/columnar.rb
|
|
@@ -305,6 +237,7 @@ files:
|
|
|
305
237
|
- lib/mime/types/loader.rb
|
|
306
238
|
- lib/mime/types/logger.rb
|
|
307
239
|
- lib/mime/types/registry.rb
|
|
240
|
+
- lib/mime/types/version.rb
|
|
308
241
|
- test/bad-fixtures/malformed
|
|
309
242
|
- test/fixture/json.json
|
|
310
243
|
- test/fixture/old-data
|
|
@@ -321,13 +254,13 @@ licenses:
|
|
|
321
254
|
- MIT
|
|
322
255
|
metadata:
|
|
323
256
|
homepage_uri: https://github.com/mime-types/ruby-mime-types/
|
|
324
|
-
source_code_uri: https://github.com/mime-types/ruby-mime-types/
|
|
325
257
|
bug_tracker_uri: https://github.com/mime-types/ruby-mime-types/issues
|
|
326
|
-
|
|
327
|
-
|
|
258
|
+
source_code_uri: https://github.com/mime-types/ruby-mime-types/
|
|
259
|
+
changelog_uri: https://github.com/mime-types/ruby-mime-types/blob/main/CHANGELOG.md
|
|
260
|
+
rubygems_mfa_required: 'true'
|
|
328
261
|
rdoc_options:
|
|
329
262
|
- "--main"
|
|
330
|
-
- README.
|
|
263
|
+
- README.md
|
|
331
264
|
require_paths:
|
|
332
265
|
- lib
|
|
333
266
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
@@ -341,8 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
341
274
|
- !ruby/object:Gem::Version
|
|
342
275
|
version: '0'
|
|
343
276
|
requirements: []
|
|
344
|
-
rubygems_version: 3.
|
|
345
|
-
signing_key:
|
|
277
|
+
rubygems_version: 3.6.6
|
|
346
278
|
specification_version: 4
|
|
347
279
|
summary: The mime-types library provides a library and registry for information about
|
|
348
280
|
MIME content type definitions
|
data/Code-of-Conduct.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
-
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
-
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
|
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
72
|
-
|
|
73
|
-
[homepage]: https://www.contributor-covenant.org
|
data/Contributing.md
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
## Contributing
|
|
2
|
-
|
|
3
|
-
I value any contribution to mime-types you can provide: a bug report, a feature
|
|
4
|
-
request, or code contributions.
|
|
5
|
-
|
|
6
|
-
There are a few guidelines for contributing to mime-types:
|
|
7
|
-
|
|
8
|
-
* Code changes *will* *not* be accepted without tests. The test suite is
|
|
9
|
-
written with [minitest][].
|
|
10
|
-
* Match my coding style.
|
|
11
|
-
* Use a thoughtfully-named topic branch that contains your change. Rebase your
|
|
12
|
-
commits into logical chunks as necessary.
|
|
13
|
-
* Use [quality commit messages][].
|
|
14
|
-
* Do not change the version number; when your patch is accepted and a release
|
|
15
|
-
is made, the version will be updated at that point.
|
|
16
|
-
* Submit a GitHub pull request with your changes.
|
|
17
|
-
* New or changed behaviours require new or updated documentation.
|
|
18
|
-
|
|
19
|
-
### Adding or Modifying MIME Types
|
|
20
|
-
|
|
21
|
-
The mime-types registry is no longer contained in mime-types, but in
|
|
22
|
-
[mime-types-data][]. Please see that project for contributions there.
|
|
23
|
-
|
|
24
|
-
### Test Dependencies
|
|
25
|
-
|
|
26
|
-
mime-types uses Ryan Davis’s [Hoe][] to manage the release process, and it adds
|
|
27
|
-
a number of rake tasks. You will mostly be interested in:
|
|
28
|
-
|
|
29
|
-
$ rake
|
|
30
|
-
|
|
31
|
-
which runs the tests the same way that:
|
|
32
|
-
|
|
33
|
-
$ rake test
|
|
34
|
-
$ rake travis
|
|
35
|
-
|
|
36
|
-
will do.
|
|
37
|
-
|
|
38
|
-
To assist with the installation of the development dependencies for mime-types,
|
|
39
|
-
I have provided the simplest possible Gemfile pointing to the (generated)
|
|
40
|
-
`mime-types.gemspec` file. This will permit you to do:
|
|
41
|
-
|
|
42
|
-
$ bundle install
|
|
43
|
-
|
|
44
|
-
to get the development dependencies. If you aleady have +hoe+ installed, you
|
|
45
|
-
can accomplish the same thing with:
|
|
46
|
-
|
|
47
|
-
$ rake newb
|
|
48
|
-
|
|
49
|
-
This task will install any missing dependencies, run the tests/specs, and
|
|
50
|
-
generate the RDoc.
|
|
51
|
-
|
|
52
|
-
You can run tests with code coverage analysis by running:
|
|
53
|
-
|
|
54
|
-
$ rake test:coverage
|
|
55
|
-
|
|
56
|
-
### Benchmarks
|
|
57
|
-
|
|
58
|
-
mime-types offers several benchmark tasks to measure different measures of
|
|
59
|
-
performance.
|
|
60
|
-
|
|
61
|
-
There is a repeated load test, measuring how long it takes to start and load
|
|
62
|
-
mime-types with its full registry. By default, it runs fifty loops and uses the
|
|
63
|
-
built-in benchmark library.
|
|
64
|
-
|
|
65
|
-
$ rake benchmark:load
|
|
66
|
-
|
|
67
|
-
There are two allocation tracing benchmarks (for normal and columnar loads).
|
|
68
|
-
These can only be run on Ruby 2.1 or better and requires the
|
|
69
|
-
[allocation\_tracer][] gem (not installed by default).
|
|
70
|
-
|
|
71
|
-
$ rake benchmark:allocations
|
|
72
|
-
$ rake benchmark:allocations:columnar
|
|
73
|
-
|
|
74
|
-
There are two loaded object count benchmarks (for normal and columnar loads).
|
|
75
|
-
These use `ObjectSpace.count_objects`.
|
|
76
|
-
|
|
77
|
-
$ rake benchmark:objects
|
|
78
|
-
$ rake benchmark:objects:columnar
|
|
79
|
-
|
|
80
|
-
### Workflow
|
|
81
|
-
|
|
82
|
-
Here's the most direct way to get your work merged into the project:
|
|
83
|
-
|
|
84
|
-
* Fork the project.
|
|
85
|
-
* Clone down your fork (`git clone git://github.com/<username>/ruby-mime-types.git`).
|
|
86
|
-
* Create a topic branch to contain your change (`git checkout -b my_awesome_feature`).
|
|
87
|
-
* Hack away, add tests. Not necessarily in that order.
|
|
88
|
-
* Make sure everything still passes by running `rake`.
|
|
89
|
-
* If necessary, rebase your commits into logical chunks, without errors.
|
|
90
|
-
* Push the branch up (`git push origin my_awesome_feature`).
|
|
91
|
-
* Create a pull request against mime-types/ruby-mime-types and describe what
|
|
92
|
-
your change does and the why you think it should be merged.
|
|
93
|
-
|
|
94
|
-
### Contributors
|
|
95
|
-
|
|
96
|
-
* Austin Ziegler created mime-types.
|
|
97
|
-
|
|
98
|
-
Thanks to everyone else who has contributed to mime-types over the years:
|
|
99
|
-
|
|
100
|
-
* Aaron Patterson
|
|
101
|
-
* Aggelos Avgerinos
|
|
102
|
-
* Al Snow
|
|
103
|
-
* Andre Pankratz
|
|
104
|
-
* Andy Brody
|
|
105
|
-
* Arnaud Meuret
|
|
106
|
-
* Brandon Galbraith
|
|
107
|
-
* Burke Libbey
|
|
108
|
-
* Chris Gat
|
|
109
|
-
* David Genord
|
|
110
|
-
* Dillon Welch
|
|
111
|
-
* Eric Marden
|
|
112
|
-
* Edward Betts
|
|
113
|
-
* Garret Alfert
|
|
114
|
-
* Godfrey Chan
|
|
115
|
-
* Greg Brockman
|
|
116
|
-
* Hans de Graaff
|
|
117
|
-
* Henrik Hodne
|
|
118
|
-
* Janko Marohnić
|
|
119
|
-
* Jean Boussier
|
|
120
|
-
* Jeremy Evans
|
|
121
|
-
* Juanito Fatas
|
|
122
|
-
* Jun Aruga
|
|
123
|
-
* Łukasz Śliwa
|
|
124
|
-
* Keerthi Siva
|
|
125
|
-
* Ken Ip
|
|
126
|
-
* Martin d'Allens
|
|
127
|
-
* Mauricio Linhares
|
|
128
|
-
* Nicolas Leger
|
|
129
|
-
* Nicholas La Roux
|
|
130
|
-
* nycvotes-dev
|
|
131
|
-
* Olle Jonsson
|
|
132
|
-
* Postmodern
|
|
133
|
-
* Richard Hirner
|
|
134
|
-
* Richard Hurt
|
|
135
|
-
* Richard Schneeman
|
|
136
|
-
* Tibor Szolár
|
|
137
|
-
* Todd Carrico
|
|
138
|
-
|
|
139
|
-
[minitest]: https://github.com/seattlerb/minitest
|
|
140
|
-
[quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
|
141
|
-
[mime-types-data]: https://github.com/mime-types/mime-types-data
|
|
142
|
-
[Hoe]: https://github.com/seattlerb/hoe
|
|
143
|
-
[allocation\_tracer]: https://github.com/ko1/allocation_tracer
|