kinetic_sdk 5.0.22 → 5.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/Contributing.md +15 -14
  4. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/History.md +89 -23
  5. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/Manifest.txt +1 -0
  6. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/README.rdoc +1 -1
  7. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/Rakefile +12 -53
  8. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/type.rb +28 -2
  9. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/cache.rb +3 -7
  10. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/deprecations.rb +12 -12
  11. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/logger.rb +1 -1
  12. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/registry.rb +1 -1
  13. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types.rb +9 -9
  14. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/minitest_helper.rb +0 -1
  15. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/test_mime_type.rb +47 -11
  16. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/test_mime_types.rb +4 -0
  17. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/test_mime_types_cache.rb +1 -1
  18. data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/test_mime_types_class.rb +5 -0
  19. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/Contributing.md +3 -0
  20. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/History.md +94 -34
  21. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/Manifest.txt +0 -1
  22. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/Rakefile +34 -19
  23. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/content_type_mime.db +3 -0
  24. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/ext_mime.db +6 -2
  25. data/gems/mime-types-data-3.2023.1205/data/mime-types.json +1 -0
  26. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.content_type.column +149 -4
  27. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.docs.column +145 -0
  28. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.encoding.column +145 -0
  29. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.flags.column +152 -7
  30. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.friendly.column +145 -0
  31. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.pext.column +145 -0
  32. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.use_instead.column +148 -3
  33. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/data/mime.xrefs.column +230 -85
  34. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/lib/mime/types/data.rb +1 -1
  35. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/application.yaml +1291 -85
  36. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/audio.yaml +14 -5
  37. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/image.yaml +81 -20
  38. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/message.yaml +38 -2
  39. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/model.yaml +66 -6
  40. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/multipart.yaml +2 -2
  41. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/text.yaml +99 -8
  42. data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/video.yaml +28 -1
  43. data/lib/kinetic_sdk/core/lib/form_types.rb +7 -7
  44. data/lib/kinetic_sdk/core/lib/submissions.rb +10 -0
  45. data/lib/kinetic_sdk/version.rb +1 -1
  46. metadata +67 -68
  47. data/gems/mime-types-data-3.2022.0105/data/mime-types.json +0 -1
  48. data/gems/mime-types-data-3.2022.0105/types/provisional-standard-types.yaml +0 -145
  49. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/Code-of-Conduct.md +0 -0
  50. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/Licence.md +0 -0
  51. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/type/columnar.rb +0 -0
  52. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/_columnar.rb +0 -0
  53. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/columnar.rb +0 -0
  54. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/container.rb +0 -0
  55. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/full.rb +0 -0
  56. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime/types/loader.rb +0 -0
  57. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/lib/mime-types.rb +0 -0
  58. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/bad-fixtures/malformed +0 -0
  59. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/fixture/json.json +0 -0
  60. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/fixture/old-data +0 -0
  61. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/fixture/yaml.yaml +0 -0
  62. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/test_mime_types_lazy.rb +0 -0
  63. /data/gems/{mime-types-3.4.1 → mime-types-3.5.2}/test/test_mime_types_loader.rb +0 -0
  64. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/Code-of-Conduct.md +0 -0
  65. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/Licence.md +0 -0
  66. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/README.md +0 -0
  67. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/lib/mime-types-data.rb +0 -0
  68. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/chemical.yaml +0 -0
  69. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/conference.yaml +0 -0
  70. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/drawing.yaml +0 -0
  71. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/font.yaml +0 -0
  72. /data/gems/{mime-types-data-3.2022.0105 → mime-types-data-3.2023.1205}/types/world.yaml +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b17c766fc56a33bded34c6f5bdae883e79ffd9348ed9afd78fc6b43401f84640
4
- data.tar.gz: 3eb7e0ec3f5cd65e45d00528e950a2c16cd3acf7b53bb264c8edb2fd7ed41df1
3
+ metadata.gz: c15fffa0069dff0dc689708a7cb458c1b6a45de45315da762da5c9f66dc82138
4
+ data.tar.gz: 30a1bfde1cd8ca25042767a4c203ae21a657b7ba4b106e2f58fd9bcbcd22f827
5
5
  SHA512:
6
- metadata.gz: 1a3b3db31c8cd917681b38a07c9fb37e6ee4339d7e772059c3452f6843284d74d28d9808ad726a05554d662f5e0ad469ab7caf8b9777b8b917cd9a11b5238f80
7
- data.tar.gz: b101040d5f1fc3fecdced915cecb4886b140d8eb71d5638132d6a016c047311a6d98e7383357f15bca53a323cdefe39354ca9502618bee274040d32a69533380
6
+ metadata.gz: ec6bef24ff2087cb4e883af2f9f5ae20dc58f9b94de49c2f45c365d67527d319f88ab9b46c67cf64cd14627c284727e66cce50287a6d38f64b60646a143529ef
7
+ data.tar.gz: 692912114b3628e490861a2e042ded9e6496ddc68c60e167d378434fcd0efb7aa7211669790cffaa35950a2852888524178309d9c82eb8b1ee01202bdf8e4e00
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [5.0.23](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.23) (2024-01-31)
4
+
5
+ **Implemented enhancements:**
6
+
7
+ - Add `CoreSdk#delete_submission` method
8
+ - Fixed a bug in several of the form type methods
9
+
3
10
  ## [5.0.22](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.22) (2023-08-24)
4
11
 
5
12
  **Implemented enhancements:**
@@ -6,11 +6,11 @@ request, or code contributions.
6
6
  There are a few guidelines for contributing to mime-types:
7
7
 
8
8
  - Code changes _will_ _not_ be accepted without tests. The test suite is
9
- written with [minitest].
9
+ written with [minitest][].
10
10
  - Match my coding style.
11
11
  - Use a thoughtfully-named topic branch that contains your change. Rebase your
12
12
  commits into logical chunks as necessary.
13
- - Use [quality commit messages].
13
+ - Use [quality commit messages][].
14
14
  - Do not change the version number; when your patch is accepted and a release
15
15
  is made, the version will be updated at that point.
16
16
  - Submit a GitHub pull request with your changes.
@@ -19,25 +19,23 @@ There are a few guidelines for contributing to mime-types:
19
19
  ## Adding or Modifying MIME Types
20
20
 
21
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.
22
+ [mime-types-data][]. Please see that project for contributions there.
23
23
 
24
24
  ### Test Dependencies
25
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 `rake`, which runs
28
- the tests the same way that `rake test` or `rake travis` will do.
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 `rake`, which runs the
28
+ tests the same way that `rake test` will do.
29
29
 
30
30
  To assist with the installation of the development dependencies for
31
31
  mime-types, I have provided the simplest possible Gemfile pointing to the
32
- (generated) `mime-types.gemspec` file. This will permit you to do `bundle
33
- install` to get the development dependencies. If you aleady have `hoe`
32
+ (generated) `mime-types.gemspec` file. This will permit you to do `bundle install` to get the development dependencies. If you already have `hoe`
34
33
  installed, you can accomplish the same thing with `rake newb`.
35
34
 
36
35
  This task will install any missing dependencies, run the tests/specs, and
37
36
  generate the RDoc.
38
37
 
39
- You can run tests with code coverage analysis by running `rake
40
- test:coverage`.
38
+ You can run tests with code coverage analysis by running `rake test:coverage`.
41
39
 
42
40
  ## Benchmarks
43
41
 
@@ -52,7 +50,7 @@ built-in benchmark library:
52
50
 
53
51
  There are two allocation tracing benchmarks (for normal and columnar loads).
54
52
  These can only be run on Ruby 2.1 or better and requires the
55
- [allocation\_tracer] gem (not installed by default).
53
+ [allocation\_tracer][] gem (not installed by default).
56
54
 
57
55
  - `rake benchmark:allocations`
58
56
  - `rake benchmark:allocations:columnar`
@@ -86,6 +84,7 @@ Thanks to everyone else who has contributed to mime-types over the years:
86
84
  - Aaron Patterson
87
85
  - Aggelos Avgerinos
88
86
  - Al Snow
87
+ - Alex Vondrak
89
88
  - Andre Pankratz
90
89
  - Andy Brody
91
90
  - Arnaud Meuret
@@ -94,8 +93,8 @@ Thanks to everyone else who has contributed to mime-types over the years:
94
93
  - Chris Gat
95
94
  - David Genord
96
95
  - Dillon Welch
97
- - Eric Marden
98
96
  - Edward Betts
97
+ - Eric Marden
99
98
  - Garret Alfert
100
99
  - Godfrey Chan
101
100
  - Greg Brockman
@@ -107,21 +106,23 @@ Thanks to everyone else who has contributed to mime-types over the years:
107
106
  - Jeremy Evans
108
107
  - Juanito Fatas
109
108
  - Jun Aruga
110
- - Łukasz Śliwa
111
109
  - Keerthi Siva
112
110
  - Ken Ip
113
111
  - Kevin Menard
114
112
  - Koichi ITO
113
+ - Łukasz Śliwa
115
114
  - Martin d'Allens
115
+ - Masato Nakamura
116
116
  - Mauricio Linhares
117
- - Nicolas Leger
118
117
  - Nicholas La Roux
118
+ - Nicolas Leger
119
119
  - nycvotes-dev
120
120
  - Olle Jonsson
121
121
  - Postmodern
122
122
  - Richard Hirner
123
123
  - Richard Hurt
124
124
  - Richard Schneeman
125
+ - Robb Shecter
125
126
  - Tibor Szolár
126
127
  - Todd Carrico
127
128
 
@@ -1,8 +1,65 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.5.2 / 2024-01-02
4
+
5
+ There are no primary code changes, but we are releasing this as an update as
6
+ there are some validation changes and updated code with formatting.
7
+
8
+ - Dependency and CI updates:
9
+
10
+ - Masato Nakamura added Ruby 3.3 to the CI workflow in [#179][].
11
+
12
+ - Fixed regressions in standard formatting in [#180][].
13
+
14
+ - Removed `minitest-bonus-assertions` because of a bundler resolution issue.
15
+ Created a better replacement in-line.
16
+
17
+ ## 3.5.1 / 2023-08-21
18
+
19
+ - 1 bug fix:
20
+
21
+ - Better handle possible line-termination strings (legal in Unix filenames)
22
+ such as `\n` in `MIME::Types.type_for`. Reported by ooooooo-q in [#177][],
23
+ resolved in [#178][].
24
+
25
+ ## 3.5.0 / 2023-08-07
26
+
27
+ - 1 minor enhancement:
28
+
29
+ - Robb Shecter changed the default log level for duplicate type variant from
30
+ `warn` to `debug` in [#170][]. This works because `MIME::Types.logger` is
31
+ intended to fit the `::Logger` interface, and the default logger
32
+ (`WarnLogger`) is a subclass of `::Logger` that passes through to
33
+ `Kernel.warn`.
34
+
35
+ - Further consideration has changed cache load messages from `warn` to
36
+ `error` and deprecation messages from `warn` to `debug`.
37
+
38
+ - 1 bug fix:
39
+
40
+ - Added a definition of `MIME::Type#hash`. Contributed by Alex Vondrak in
41
+ [#167][], fixing [#166][].
42
+
43
+ - Dependency and CI updates:
44
+
45
+ - Update the .github/workflows/ci.yml workflow to test Ruby 3.2 and more
46
+ reliably test certain combinations rather than depending on exclusions.
47
+
48
+ - Change `.standard.yml` configuration to format for Ruby 2.3 as certain files
49
+ are not properly detected with Ruby 2.0.
50
+
51
+ - Change from `hoe-git` to `hoe-git2` to support Hoe version 4.
52
+
53
+ - Apply `standardrb --fix`.
54
+
55
+ - The above changes have resulted in the Soft deprecation of Ruby versions
56
+ below 2.6. Any errors reported for Ruby versions 2.0, 2.1, 2.2, 2.3, 2.4,
57
+ and 2.5 will be resolved, but maintaining CI for these versions is
58
+ unsustainable.
59
+
3
60
  ## 3.4.1 / 2021-11-16
4
61
 
5
- - 1 bugfix:
62
+ - 1 bug fix:
6
63
 
7
64
  - Fixed a Ruby < 2.3 incompatibility introduced by the use of standardrb,
8
65
  where `<<-` heredocs were converted to `<<~` heredocs. These have been
@@ -26,7 +83,7 @@
26
83
  - Added Ruby 3.0 to the CI test matrix. Added `windows/jruby` to the
27
84
  CI exclusion list; it refuses to run successfully.
28
85
  - Removed the Travis CI configuration and changed it to Github Workflows
29
- [#150]. Removed Coveralls configuration.
86
+ [#150][]. Removed Coveralls configuration.
30
87
  - Igor Victor added TruffleRuby to the Travis CI configuration. [#149]
31
88
  - Koichi ITO loosened an excessively tight dependency. [#147]
32
89
  - Started using `standardrb` for Ruby formatting and validation.
@@ -34,7 +91,7 @@
34
91
 
35
92
  ## 3.3.1 / 2019-12-26
36
93
 
37
- - 1 minor bugfix:
94
+ - 1 minor bug fix:
38
95
 
39
96
  - Al Snow fixed a warning with MIME::Types::Logger producing a warning
40
97
  because Ruby 2.7 introduces numbered block parameters. Because of the way
@@ -44,7 +101,7 @@
44
101
 
45
102
  - Administrivia:
46
103
 
47
- - Olle Jonsson removed an outdated Travis configuration option (`sudo: false`). [#142]
104
+ - Olle Jonsson removed an outdated Travis configuration option. [#142][]
48
105
 
49
106
  ## 3.3 / 2019-09-04
50
107
 
@@ -79,8 +136,9 @@
79
136
  to be in the same family even if strict sorting would cause an
80
137
  unregistered type to be sorted first. [#132]
81
138
 
82
- - Dillon Welch contributed a change that added `frozen_string_literal: true` to files so that modern Rubies can automatically reduce duplicate
83
- string allocations. [#135]
139
+ - Dillon Welch contributed a change that added `frozen_string_literal: true`
140
+ to files so that modern Rubies can automatically reduce duplicate string
141
+ allocations. [#135]
84
142
 
85
143
  - 2 bug fixes
86
144
 
@@ -91,7 +149,7 @@
91
149
  because when Enumerable#inject isn't provided a starting value, the first
92
150
  value is used as the default value. In every case where this error was
93
151
  happening, the result was supposed to be an array containing Set objects
94
- so they can be reduced to a single Set. [#117], [#127], [#134]
152
+ so they can be reduced to a single Set. [#117][], [#127][], [#134][]
95
153
 
96
154
  - Fixed an uncontrolled growth bug in MIME::Types::Container where a key
97
155
  miss would create a new entry with an empty Set in the container. This
@@ -113,12 +171,12 @@
113
171
  - The history file has been modified to remove all history prior to 3.0.
114
172
  This history can be found in previous commits.
115
173
 
116
- - A spelling error was corrected by Edward Betts ([#129]).
174
+ - A spelling error was corrected by Edward Betts ([#129][]).
117
175
 
118
176
  - Administrivia:
119
177
 
120
178
  - CI configuration for more modern versions of Ruby were added by Nicolas
121
- Leger ([#130]), Jun Aruga ([#125]), and Austin Ziegler. Removed
179
+ Leger ([#130][]), Jun Aruga ([#125][]), and Austin Ziegler. Removed
122
180
  ruby-head-clang and rbx (Rubinius) from CI.
123
181
 
124
182
  - Fixed tests which were asserting equality against nil, which will become
@@ -129,18 +187,18 @@
129
187
  - 1 documentation change:
130
188
 
131
189
  - Tim Smith (@tas50) updated the build badges to be SVGs to improve
132
- readability on high-density (retina) screens with pull request [#112].
190
+ readability on high-density (retina) screens with pull request [#112][].
133
191
 
134
192
  - 3 bug fixes
135
193
 
136
194
  - A test for `MIME::Types::Cache` fails under Ruby 2.3 because of frozen
137
- strings, [#118]. This has been fixed.
195
+ strings, [#118][]. This has been fixed.
138
196
 
139
197
  - The JSON data has been incorrectly encoded since the release of
140
198
  mime-types 3 on the `xrefs` field, because of the switch to using a Set
141
199
  to store cross-reference information. This has been fixed.
142
200
 
143
- - A tentative fix for [#117] has been applied, removing the only circular
201
+ - A tentative fix for [#117][] has been applied, removing the only circular
144
202
  require dependencies that exist (and for which there was code to prevent,
145
203
  but the current fix is simpler). I have no way to verify this fix and
146
204
  depending on how things are loaded by `delayed_job`, this fix may not be
@@ -155,22 +213,22 @@
155
213
  - 2 governance changes
156
214
 
157
215
  - This project and the related mime-types-data project are now exclusively
158
- MIT licensed. Resolves [#95].
216
+ MIT licensed. Resolves [#95][].
159
217
 
160
218
  - All projects under the mime-types organization now have a standard code
161
- of conduct adapted from the [Contributor Covenant]. This text can be
162
- found in the [Code-of-Conduct.md] file.
219
+ of conduct adapted from the [Contributor Covenant][]. This text can be
220
+ found in the [Code-of-Conduct.md][] file.
163
221
 
164
222
  - 3 major changes
165
223
 
166
224
  - All methods deprecated in mime-types 2.x have been removed.
167
225
 
168
226
  - mime-types now requires Ruby 2.0 compatibility or later. Resolves
169
- [#97].
227
+ [#97][].
170
228
 
171
229
  - The registry data has been removed from mime-types and put into
172
230
  mime-types-data, maintained and released separately. It can be found at
173
- [mime-types-data].
231
+ [mime-types-data][].
174
232
 
175
233
  - 17 minor changes:
176
234
 
@@ -183,8 +241,9 @@
183
241
  `x-` prefixes.
184
242
 
185
243
  - Improved initialization with an Array works so that extensions do not
186
- need to be wrapped in another array. This means that `%w(text/yaml yaml yml)` works in the same way that `['text/yaml', %w(yaml yml)]` did (and
187
- still does).
244
+ need to be wrapped in another array. This means that
245
+ `%w(text/yaml yaml yml)` works in the same way that
246
+ `['text/yaml', %w(yaml yml)]` did (and still does).
188
247
 
189
248
  - Changed `priority_compare` to conform with attributes that no longer
190
249
  exist.
@@ -192,8 +251,8 @@
192
251
  - Changed the internal implementation of extensions to use a frozen Set.
193
252
 
194
253
  - When extensions are set or modified with `add_extensions`, the primary
195
- registry will be informed of a need to reindex extensions. Resolves
196
- [#84].
254
+ registry will be informed of a need to re-index extensions. Resolves
255
+ [#84][].
197
256
 
198
257
  - The preferred extension can be set explicitly. If not set, it will be
199
258
  the first extension. If the preferred extension is not in the extension
@@ -216,7 +275,7 @@
216
275
  - Extracted the class methods to a separate file.
217
276
 
218
277
  - Changed the container implementation to use a Set instead of an Array
219
- to prevent data duplication. Resolves [#79].
278
+ to prevent data duplication. Resolves [#79][].
220
279
 
221
280
  - `MIME::Types::Cache` changes:
222
281
 
@@ -235,7 +294,7 @@
235
294
 
236
295
  - The registry is default loaded from the columnar store by default. The
237
296
  internal format of the columnar store has changed; many of the boolean
238
- flags are now loaded from a single file. Resolves [#85].
297
+ flags are now loaded from a single file. Resolves [#85][].
239
298
 
240
299
  [#79]: https://github.com/mime-types/ruby-mime-types/pull/79
241
300
  [#84]: https://github.com/mime-types/ruby-mime-types/pull/84
@@ -264,6 +323,13 @@
264
323
  [#149]: https://github.com/mime-types/ruby-mime-types/pull/149
265
324
  [#150]: https://github.com/mime-types/ruby-mime-types/pull/150
266
325
  [#153]: https://github.com/mime-types/ruby-mime-types/pull/153
326
+ [#166]: https://github.com/mime-types/ruby-mime-types/issues/166
327
+ [#167]: https://github.com/mime-types/ruby-mime-types/pull/167
328
+ [#170]: https://github.com/mime-types/ruby-mime-types/pull/170
329
+ [#177]: https://github.com/mime-types/ruby-mime-types/issues/177
330
+ [#178]: https://github.com/mime-types/ruby-mime-types/pull/178
331
+ [#179]: https://github.com/mime-types/ruby-mime-types/pull/179
332
+ [#180]: https://github.com/mime-types/ruby-mime-types/pull/180
267
333
  [code-of-conduct.md]: Code-of-Conduct_md.html
268
334
  [contributor covenant]: http://contributor-covenant.org
269
335
  [mime-types-data]: https://github.com/mime-types/mime-types-data
@@ -1,3 +1,4 @@
1
+ .standard.yml
1
2
  Code-of-Conduct.md
2
3
  Contributing.md
3
4
  History.md
@@ -5,7 +5,7 @@ code :: https://github.com/mime-types/ruby-mime-types/
5
5
  bugs :: https://github.com/mime-types/ruby-mime-types/issues
6
6
  rdoc :: http://rdoc.info/gems/mime-types/
7
7
  clog :: https://github.com/mime-types/ruby-mime-types/blob/master/History.md
8
- continuous integration :: {<img src="https://travis-ci.org/mime-types/ruby-mime-types.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/mime-types/ruby-mime-types]
8
+ continuous integration :: {<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]
9
9
  test coverage :: {<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]
10
10
 
11
11
  == Description
@@ -1,78 +1,39 @@
1
- # frozen_string_literal: true
2
-
3
1
  require "rubygems"
4
2
  require "hoe"
5
3
  require "rake/clean"
6
4
 
7
- # This is required until https://github.com/seattlerb/hoe/issues/112 is fixed
8
- class Hoe
9
- def with_config
10
- config = Hoe::DEFAULT_CONFIG
11
-
12
- rc = File.expand_path("~/.hoerc")
13
- homeconfig = load_config(rc)
14
- config = config.merge(homeconfig)
15
-
16
- localconfig = load_config(File.expand_path(File.join(Dir.pwd, ".hoerc")))
17
- config = config.merge(localconfig)
18
-
19
- yield config, rc
20
- end
21
-
22
- def load_config(name)
23
- File.exist?(name) ? safe_load_yaml(name) : {}
24
- end
25
-
26
- def safe_load_yaml(name)
27
- return safe_load_yaml_file(name) if YAML.respond_to?(:safe_load_file)
28
-
29
- data = IO.binread(name)
30
- YAML.safe_load(data, permitted_classes: [Regexp])
31
- rescue
32
- YAML.safe_load(data, [Regexp])
33
- end
34
-
35
- def safe_load_yaml_file(name)
36
- YAML.safe_load_file(name, permitted_classes: [Regexp])
37
- rescue
38
- YAML.safe_load_file(name, [Regexp])
39
- end
40
- end
41
-
5
+ Hoe.plugin :cov
42
6
  Hoe.plugin :doofus
43
7
  Hoe.plugin :gemspec2
44
- Hoe.plugin :git
8
+ Hoe.plugin :git2
45
9
  Hoe.plugin :minitest
46
- Hoe.plugin :email unless ENV["CI"]
10
+ Hoe.plugin :rubygems
47
11
 
48
12
  spec = Hoe.spec "mime-types" do
49
13
  developer("Austin Ziegler", "halostatue@gmail.com")
50
- self.need_tar = true
51
-
52
- require_ruby_version ">= 2.0"
53
14
 
54
15
  self.history_file = "History.md"
55
16
  self.readme_file = "README.rdoc"
56
17
 
57
18
  license "MIT"
58
19
 
20
+ require_ruby_version ">= 2.0"
21
+
22
+ spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
23
+
59
24
  extra_deps << ["mime-types-data", "~> 3.2015"]
60
25
 
26
+ extra_dev_deps << ["hoe", ">= 3.0", "< 5"]
61
27
  extra_dev_deps << ["hoe-doofus", "~> 1.0"]
62
28
  extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
63
- extra_dev_deps << ["hoe-git", "~> 1.6"]
29
+ extra_dev_deps << ["hoe-git2", "~> 1.7"]
64
30
  extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
65
- extra_dev_deps << ["standard", "~> 1.0"]
66
- extra_dev_deps << ["minitest", "~> 5.4"]
31
+ extra_dev_deps << ["minitest", "~> 5.0"]
67
32
  extra_dev_deps << ["minitest-autotest", "~> 1.0"]
68
33
  extra_dev_deps << ["minitest-focus", "~> 1.0"]
69
- extra_dev_deps << ["minitest-bonus-assertions", "~> 3.0"]
70
34
  extra_dev_deps << ["minitest-hooks", "~> 1.4"]
71
35
  extra_dev_deps << ["rake", ">= 10.0", "< 14.0"]
72
-
73
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0")
74
- extra_dev_deps << ["simplecov", "~> 0.7"]
75
- end
36
+ extra_dev_deps << ["standard", "~> 1.0"]
76
37
  end
77
38
 
78
39
  namespace :benchmark do
@@ -235,9 +196,7 @@ namespace :convert do
235
196
 
236
197
  file mark => [rdoc, :setup] do |t|
237
198
  puts "#{rdoc} => #{mark}"
238
- File.open(t.name, "wb") { |target|
239
- target.write @doc_converter.convert(IO.read(t.prerequisites.first))
240
- }
199
+ File.binwrite(t.name, @doc_converter.convert(IO.read(t.prerequisites.first)))
241
200
  end
242
201
 
243
202
  CLEAN.add mark
@@ -93,7 +93,7 @@ class MIME::Type
93
93
  end
94
94
 
95
95
  # The released version of the mime-types library.
96
- VERSION = "3.4.1"
96
+ VERSION = "3.5.2"
97
97
 
98
98
  include Comparable
99
99
 
@@ -224,6 +224,32 @@ class MIME::Type
224
224
  other.is_a?(MIME::Type) && (self == other)
225
225
  end
226
226
 
227
+ # Returns a hash based on the #simplified value.
228
+ #
229
+ # This maintains the invariant that two #eql? instances must have the same
230
+ # #hash (although having the same #hash does *not* imply that the objects are
231
+ # #eql?).
232
+ #
233
+ # To see why, suppose a MIME::Type instance +a+ is compared to another object
234
+ # +b+, and that <code>a.eql?(b)</code> is true. By the definition of #eql?,
235
+ # we know the following:
236
+ #
237
+ # 1. +b+ is a MIME::Type instance itself.
238
+ # 2. <code>a == b</code> is true.
239
+ #
240
+ # Due to the first point, we know that +b+ should respond to the #simplified
241
+ # method. Thus, per the definition of #<=>, we know that +a.simplified+ must
242
+ # be equal to +b.simplified+, as compared by the <=> method corresponding to
243
+ # +a.simplified+.
244
+ #
245
+ # Presumably, if <code>a.simplified <=> b.simplified</code> is +0+, then
246
+ # +a.simplified+ has the same hash as +b.simplified+. So we assume it's
247
+ # suitable for #hash to delegate to #simplified in service of the #eql?
248
+ # invariant.
249
+ def hash
250
+ simplified.hash
251
+ end
252
+
227
253
  # Returns the whole MIME content-type string.
228
254
  #
229
255
  # The content type is a presentation value from the MIME type registry and
@@ -338,7 +364,7 @@ class MIME::Type
338
364
 
339
365
  # Returns the default encoding for the MIME::Type based on the media type.
340
366
  def default_encoding
341
- @media_type == "text" ? "quoted-printable" : "base64"
367
+ (@media_type == "text") ? "quoted-printable" : "base64"
342
368
  end
343
369
 
344
370
  ##
@@ -22,13 +22,13 @@ class << MIME::Types::Cache
22
22
  if cache.version == MIME::Types::Data::VERSION
23
23
  Marshal.load(cache.data)
24
24
  else
25
- MIME::Types.logger.warn <<-WARNING.chomp.strip
25
+ MIME::Types.logger.error <<-WARNING.chomp.strip
26
26
  Could not load MIME::Types cache: invalid version
27
27
  WARNING
28
28
  nil
29
29
  end
30
30
  rescue => e
31
- MIME::Types.logger.warn <<-WARNING.chomp.strip
31
+ MIME::Types.logger.error <<-WARNING.chomp.strip
32
32
  Could not load MIME::Types cache: #{e}
33
33
  WARNING
34
34
  nil
@@ -49,10 +49,6 @@ class << MIME::Types::Cache
49
49
 
50
50
  types ||= MIME::Types.send(:__types__)
51
51
 
52
- File.open(cache_file, "wb") do |f|
53
- f.write(
54
- Marshal.dump(new(MIME::Types::Data::VERSION, Marshal.dump(types)))
55
- )
56
- end
52
+ File.binwrite(cache_file, Marshal.dump(new(MIME::Types::Data::VERSION, Marshal.dump(types))))
57
53
  end
58
54
  end
@@ -10,22 +10,22 @@ module MIME
10
10
  def self.deprecated(klass, sym, message = nil, &block) # :nodoc:
11
11
  level =
12
12
  case klass
13
- when Class, Module
14
- "."
15
- else
16
- klass = klass.class
17
- "#"
13
+ when Class, Module
14
+ "."
15
+ else
16
+ klass = klass.class
17
+ "#"
18
18
  end
19
19
  message =
20
20
  case message
21
- when :private, :protected
22
- "and will be #{message}"
23
- when nil
24
- "and will be removed"
25
- else
26
- message
21
+ when :private, :protected
22
+ "and will be #{message}"
23
+ when nil
24
+ "and will be removed"
25
+ else
26
+ message
27
27
  end
28
- MIME::Types.logger.warn <<-WARNING.chomp.strip
28
+ MIME::Types.logger.debug <<-WARNING.chomp.strip
29
29
  #{caller(2..2).first}: #{klass}#{level}#{sym} is deprecated #{message}.
30
30
  WARNING
31
31
 
@@ -26,7 +26,7 @@ module MIME
26
26
  end
27
27
 
28
28
  def initialize(_one, _two = nil, _three = nil)
29
- super nil
29
+ super(nil)
30
30
  @logdev = WarnLogDevice.new
31
31
  @formatter = ->(_s, _d, _p, m) { m }
32
32
  end
@@ -45,7 +45,7 @@ class << MIME::Types
45
45
  def lazy_load?
46
46
  return unless ENV.key?("RUBY_MIME_TYPES_LAZY_LOAD")
47
47
 
48
- MIME::Types.logger.warn <<-WARNING.chomp.strip
48
+ MIME::Types.logger.debug <<-WARNING.chomp.strip
49
49
  Lazy loading ($RUBY_MIME_TYPES_LAZY_LOAD) is deprecated and will be removed.
50
50
  WARNING
51
51
 
@@ -125,12 +125,12 @@ class MIME::Types
125
125
  def [](type_id, complete: false, registered: false)
126
126
  matches =
127
127
  case type_id
128
- when MIME::Type
129
- @type_variants[type_id.simplified]
130
- when Regexp
131
- match(type_id)
132
- else
133
- @type_variants[MIME::Type.simplified(type_id)]
128
+ when MIME::Type
129
+ @type_variants[type_id.simplified]
130
+ when Regexp
131
+ match(type_id)
132
+ else
133
+ @type_variants[MIME::Type.simplified(type_id)]
134
134
  end
135
135
 
136
136
  prune_matches(matches, complete, registered).sort { |a, b|
@@ -152,7 +152,7 @@ class MIME::Types
152
152
  # => [application/xml, image/gif, text/xml]
153
153
  def type_for(filename)
154
154
  Array(filename).flat_map { |fn|
155
- @extension_index[fn.chomp.downcase[/\.?([^.]*?)$/, 1]]
155
+ @extension_index[fn.chomp.downcase[/\.?([^.]*?)\z/m, 1]]
156
156
  }.compact.inject(Set.new, :+).sort { |a, b|
157
157
  a.priority_compare(b)
158
158
  }
@@ -165,7 +165,7 @@ class MIME::Types
165
165
  # The last parameter may be the value <tt>:silent</tt> or +true+ which
166
166
  # will suppress duplicate MIME type warnings.
167
167
  def add(*types)
168
- quiet = ((types.last == :silent) || (types.last == true))
168
+ quiet = (types.last == :silent) || (types.last == true)
169
169
 
170
170
  types.each do |mime_type|
171
171
  case mime_type
@@ -187,7 +187,7 @@ class MIME::Types
187
187
  # truthy value to suppress that warning.
188
188
  def add_type(type, quiet = false)
189
189
  if !quiet && @type_variants[type.simplified].include?(type)
190
- MIME::Types.logger.warn <<-WARNING.chomp.strip
190
+ MIME::Types.logger.debug <<-WARNING.chomp.strip
191
191
  Type #{type} is already registered as a variant of #{type.simplified}.
192
192
  WARNING
193
193
  end
@@ -5,7 +5,6 @@ require "fileutils"
5
5
 
6
6
  gem "minitest"
7
7
  require "minitest/focus"
8
- require "minitest-bonus-assertions"
9
8
  require "minitest/hooks"
10
9
 
11
10
  ENV["RUBY_MIME_TYPES_LAZY_LOAD"] = "yes"