media_types-serialization 2.1.0 → 2.2.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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +32 -32
  3. data/.github/workflows/publish-bookworm.yml +34 -34
  4. data/.github/workflows/publish-sid.yml +34 -34
  5. data/.github/workflows/publish-trixie.yml +34 -0
  6. data/.gitignore +22 -22
  7. data/.idea/.rakeTasks +7 -7
  8. data/.idea/dictionaries/Derk_Jan.xml +6 -6
  9. data/.idea/encodings.xml +3 -3
  10. data/.idea/inspectionProfiles/Project_Default.xml +5 -5
  11. data/.idea/media_types-serialization.iml +76 -76
  12. data/.idea/misc.xml +6 -6
  13. data/.idea/modules.xml +7 -7
  14. data/.idea/runConfigurations/test.xml +19 -19
  15. data/.idea/vcs.xml +5 -5
  16. data/.vscode/settings.json +11 -0
  17. data/CHANGELOG.md +212 -207
  18. data/CODE_OF_CONDUCT.md +74 -74
  19. data/Gemfile +4 -4
  20. data/Gemfile.lock +182 -176
  21. data/LICENSE.txt +21 -21
  22. data/README.md +1058 -1058
  23. data/Rakefile +10 -10
  24. data/bin/console +14 -14
  25. data/bin/setup +8 -8
  26. data/lib/media_types/problem.rb +67 -67
  27. data/lib/media_types/serialization/base.rb +269 -269
  28. data/lib/media_types/serialization/error.rb +193 -193
  29. data/lib/media_types/serialization/fake_validator.rb +53 -53
  30. data/lib/media_types/serialization/serialization_dsl.rb +139 -139
  31. data/lib/media_types/serialization/serialization_registration.rb +245 -245
  32. data/lib/media_types/serialization/serializers/api_viewer.rb +413 -383
  33. data/lib/media_types/serialization/serializers/common_css.rb +212 -212
  34. data/lib/media_types/serialization/serializers/endpoint_description_serializer.rb +80 -80
  35. data/lib/media_types/serialization/serializers/fallback_not_acceptable_serializer.rb +85 -85
  36. data/lib/media_types/serialization/serializers/fallback_unsupported_media_type_serializer.rb +58 -58
  37. data/lib/media_types/serialization/serializers/input_validation_error_serializer.rb +95 -95
  38. data/lib/media_types/serialization/serializers/problem_serializer.rb +111 -111
  39. data/lib/media_types/serialization/utils/accept_header.rb +77 -77
  40. data/lib/media_types/serialization/utils/accept_language_header.rb +82 -82
  41. data/lib/media_types/serialization/version.rb +7 -7
  42. data/lib/media_types/serialization.rb +689 -689
  43. data/media_types-serialization.gemspec +48 -48
  44. metadata +13 -11
data/Gemfile.lock CHANGED
@@ -1,176 +1,182 @@
1
- PATH
2
- remote: .
3
- specs:
4
- media_types-serialization (2.1.0)
5
- actionpack (>= 6.0.0)
6
- activesupport (>= 6.0.0)
7
- media_types (>= 2.2.3, < 3.0.0)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actioncable (6.1.7.8)
13
- actionpack (= 6.1.7.8)
14
- activesupport (= 6.1.7.8)
15
- nio4r (~> 2.0)
16
- websocket-driver (>= 0.6.1)
17
- actionmailbox (6.1.7.8)
18
- actionpack (= 6.1.7.8)
19
- activejob (= 6.1.7.8)
20
- activerecord (= 6.1.7.8)
21
- activestorage (= 6.1.7.8)
22
- activesupport (= 6.1.7.8)
23
- mail (>= 2.7.1)
24
- actionmailer (6.1.7.8)
25
- actionpack (= 6.1.7.8)
26
- actionview (= 6.1.7.8)
27
- activejob (= 6.1.7.8)
28
- activesupport (= 6.1.7.8)
29
- mail (~> 2.5, >= 2.5.4)
30
- rails-dom-testing (~> 2.0)
31
- actionpack (6.1.7.8)
32
- actionview (= 6.1.7.8)
33
- activesupport (= 6.1.7.8)
34
- rack (~> 2.0, >= 2.0.9)
35
- rack-test (>= 0.6.3)
36
- rails-dom-testing (~> 2.0)
37
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (6.1.7.8)
39
- actionpack (= 6.1.7.8)
40
- activerecord (= 6.1.7.8)
41
- activestorage (= 6.1.7.8)
42
- activesupport (= 6.1.7.8)
43
- nokogiri (>= 1.8.5)
44
- actionview (6.1.7.8)
45
- activesupport (= 6.1.7.8)
46
- builder (~> 3.1)
47
- erubi (~> 1.4)
48
- rails-dom-testing (~> 2.0)
49
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.1.7.8)
51
- activesupport (= 6.1.7.8)
52
- globalid (>= 0.3.6)
53
- activemodel (6.1.7.8)
54
- activesupport (= 6.1.7.8)
55
- activerecord (6.1.7.8)
56
- activemodel (= 6.1.7.8)
57
- activesupport (= 6.1.7.8)
58
- activestorage (6.1.7.8)
59
- actionpack (= 6.1.7.8)
60
- activejob (= 6.1.7.8)
61
- activerecord (= 6.1.7.8)
62
- activesupport (= 6.1.7.8)
63
- marcel (~> 1.0)
64
- mini_mime (>= 1.1.0)
65
- activesupport (6.1.7.8)
66
- concurrent-ruby (~> 1.0, >= 1.0.2)
67
- i18n (>= 1.6, < 2)
68
- minitest (>= 5.1)
69
- tzinfo (~> 2.0)
70
- zeitwerk (~> 2.3)
71
- awesome_print (1.9.2)
72
- bigdecimal (3.1.8)
73
- builder (3.3.0)
74
- concurrent-ruby (1.3.4)
75
- crass (1.0.6)
76
- date (3.3.4)
77
- erubi (1.13.0)
78
- globalid (1.2.1)
79
- activesupport (>= 6.1)
80
- i18n (1.14.5)
81
- concurrent-ruby (~> 1.0)
82
- loofah (2.22.0)
83
- crass (~> 1.0.2)
84
- nokogiri (>= 1.12.0)
85
- mail (2.8.1)
86
- mini_mime (>= 0.1.1)
87
- net-imap
88
- net-pop
89
- net-smtp
90
- marcel (1.0.4)
91
- media_types (2.3.3.bookworm)
92
- method_source (1.1.0)
93
- mini_mime (1.1.5)
94
- minitest (5.25.1)
95
- net-imap (0.4.14)
96
- date
97
- net-protocol
98
- net-pop (0.1.2)
99
- net-protocol
100
- net-protocol (0.2.2)
101
- timeout
102
- net-smtp (0.5.0)
103
- net-protocol
104
- nio4r (2.7.3)
105
- nokogiri (1.16.7-x64-mingw32)
106
- racc (~> 1.4)
107
- nokogiri (1.16.7-x86_64-linux)
108
- racc (~> 1.4)
109
- oj (3.16.7)
110
- bigdecimal (>= 3.0)
111
- ostruct (>= 0.2)
112
- ostruct (0.6.0)
113
- racc (1.8.1)
114
- rack (2.2.9)
115
- rack-test (2.1.0)
116
- rack (>= 1.3)
117
- rails (6.1.7.8)
118
- actioncable (= 6.1.7.8)
119
- actionmailbox (= 6.1.7.8)
120
- actionmailer (= 6.1.7.8)
121
- actionpack (= 6.1.7.8)
122
- actiontext (= 6.1.7.8)
123
- actionview (= 6.1.7.8)
124
- activejob (= 6.1.7.8)
125
- activemodel (= 6.1.7.8)
126
- activerecord (= 6.1.7.8)
127
- activestorage (= 6.1.7.8)
128
- activesupport (= 6.1.7.8)
129
- bundler (>= 1.15.0)
130
- railties (= 6.1.7.8)
131
- sprockets-rails (>= 2.0.0)
132
- rails-dom-testing (2.2.0)
133
- activesupport (>= 5.0.0)
134
- minitest
135
- nokogiri (>= 1.6)
136
- rails-html-sanitizer (1.6.0)
137
- loofah (~> 2.21)
138
- nokogiri (~> 1.14)
139
- railties (6.1.7.8)
140
- actionpack (= 6.1.7.8)
141
- activesupport (= 6.1.7.8)
142
- method_source
143
- rake (>= 12.2)
144
- thor (~> 1.0)
145
- rake (13.2.1)
146
- sprockets (4.2.1)
147
- concurrent-ruby (~> 1.0)
148
- rack (>= 2.2.4, < 4)
149
- sprockets-rails (3.5.2)
150
- actionpack (>= 6.1)
151
- activesupport (>= 6.1)
152
- sprockets (>= 3.0.0)
153
- thor (1.3.1)
154
- timeout (0.4.1)
155
- tzinfo (2.0.6)
156
- concurrent-ruby (~> 1.0)
157
- websocket-driver (0.7.6)
158
- websocket-extensions (>= 0.1.0)
159
- websocket-extensions (0.1.5)
160
- zeitwerk (2.6.17)
161
-
162
- PLATFORMS
163
- x64-mingw32
164
- x86_64-linux
165
-
166
- DEPENDENCIES
167
- awesome_print
168
- bundler
169
- media_types-serialization!
170
- minitest (~> 5.0)
171
- oj
172
- rails (~> 6.0)
173
- rake (~> 13.0)
174
-
175
- BUNDLED WITH
176
- 2.3.15
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ media_types-serialization (2.1.0)
5
+ actionpack (>= 6.1.7.10)
6
+ activesupport (>= 6.1.7.10)
7
+ media_types (>= 2.2.3, < 3.0.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actioncable (6.1.7.10)
13
+ actionpack (= 6.1.7.10)
14
+ activesupport (= 6.1.7.10)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ actionmailbox (6.1.7.10)
18
+ actionpack (= 6.1.7.10)
19
+ activejob (= 6.1.7.10)
20
+ activerecord (= 6.1.7.10)
21
+ activestorage (= 6.1.7.10)
22
+ activesupport (= 6.1.7.10)
23
+ mail (>= 2.7.1)
24
+ actionmailer (6.1.7.10)
25
+ actionpack (= 6.1.7.10)
26
+ actionview (= 6.1.7.10)
27
+ activejob (= 6.1.7.10)
28
+ activesupport (= 6.1.7.10)
29
+ mail (~> 2.5, >= 2.5.4)
30
+ rails-dom-testing (~> 2.0)
31
+ actionpack (6.1.7.10)
32
+ actionview (= 6.1.7.10)
33
+ activesupport (= 6.1.7.10)
34
+ rack (~> 2.0, >= 2.0.9)
35
+ rack-test (>= 0.6.3)
36
+ rails-dom-testing (~> 2.0)
37
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
+ actiontext (6.1.7.10)
39
+ actionpack (= 6.1.7.10)
40
+ activerecord (= 6.1.7.10)
41
+ activestorage (= 6.1.7.10)
42
+ activesupport (= 6.1.7.10)
43
+ nokogiri (>= 1.8.5)
44
+ actionview (6.1.7.10)
45
+ activesupport (= 6.1.7.10)
46
+ builder (~> 3.1)
47
+ erubi (~> 1.4)
48
+ rails-dom-testing (~> 2.0)
49
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
+ activejob (6.1.7.10)
51
+ activesupport (= 6.1.7.10)
52
+ globalid (>= 0.3.6)
53
+ activemodel (6.1.7.10)
54
+ activesupport (= 6.1.7.10)
55
+ activerecord (6.1.7.10)
56
+ activemodel (= 6.1.7.10)
57
+ activesupport (= 6.1.7.10)
58
+ activestorage (6.1.7.10)
59
+ actionpack (= 6.1.7.10)
60
+ activejob (= 6.1.7.10)
61
+ activerecord (= 6.1.7.10)
62
+ activesupport (= 6.1.7.10)
63
+ marcel (~> 1.0)
64
+ mini_mime (>= 1.1.0)
65
+ activesupport (6.1.7.10)
66
+ concurrent-ruby (~> 1.0, >= 1.0.2)
67
+ i18n (>= 1.6, < 2)
68
+ minitest (>= 5.1)
69
+ tzinfo (~> 2.0)
70
+ zeitwerk (~> 2.3)
71
+ awesome_print (1.9.2)
72
+ base64 (0.3.0)
73
+ bigdecimal (3.2.2)
74
+ builder (3.3.0)
75
+ concurrent-ruby (1.3.5)
76
+ crass (1.0.6)
77
+ date (3.4.1)
78
+ erubi (1.13.1)
79
+ globalid (1.2.1)
80
+ activesupport (>= 6.1)
81
+ i18n (1.14.7)
82
+ concurrent-ruby (~> 1.0)
83
+ logger (1.7.0)
84
+ loofah (2.24.1)
85
+ crass (~> 1.0.2)
86
+ nokogiri (>= 1.12.0)
87
+ mail (2.8.1)
88
+ mini_mime (>= 0.1.1)
89
+ net-imap
90
+ net-pop
91
+ net-smtp
92
+ marcel (1.0.4)
93
+ media_types (2.3.2)
94
+ method_source (1.1.0)
95
+ mini_mime (1.1.5)
96
+ mini_portile2 (2.8.9)
97
+ minitest (5.25.5)
98
+ net-imap (0.5.9)
99
+ date
100
+ net-protocol
101
+ net-pop (0.1.2)
102
+ net-protocol
103
+ net-protocol (0.2.2)
104
+ timeout
105
+ net-smtp (0.5.1)
106
+ net-protocol
107
+ nio4r (2.7.4)
108
+ nokogiri (1.18.9)
109
+ mini_portile2 (~> 2.8.2)
110
+ racc (~> 1.4)
111
+ nokogiri (1.18.9-x64-mingw-ucrt)
112
+ racc (~> 1.4)
113
+ oj (3.16.11)
114
+ bigdecimal (>= 3.0)
115
+ ostruct (>= 0.2)
116
+ ostruct (0.6.3)
117
+ racc (1.8.1)
118
+ rack (2.2.17)
119
+ rack-test (2.2.0)
120
+ rack (>= 1.3)
121
+ rails (6.1.7.10)
122
+ actioncable (= 6.1.7.10)
123
+ actionmailbox (= 6.1.7.10)
124
+ actionmailer (= 6.1.7.10)
125
+ actionpack (= 6.1.7.10)
126
+ actiontext (= 6.1.7.10)
127
+ actionview (= 6.1.7.10)
128
+ activejob (= 6.1.7.10)
129
+ activemodel (= 6.1.7.10)
130
+ activerecord (= 6.1.7.10)
131
+ activestorage (= 6.1.7.10)
132
+ activesupport (= 6.1.7.10)
133
+ bundler (>= 1.15.0)
134
+ railties (= 6.1.7.10)
135
+ sprockets-rails (>= 2.0.0)
136
+ rails-dom-testing (2.3.0)
137
+ activesupport (>= 5.0.0)
138
+ minitest
139
+ nokogiri (>= 1.6)
140
+ rails-html-sanitizer (1.6.2)
141
+ loofah (~> 2.21)
142
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
143
+ railties (6.1.7.10)
144
+ actionpack (= 6.1.7.10)
145
+ activesupport (= 6.1.7.10)
146
+ method_source
147
+ rake (>= 12.2)
148
+ thor (~> 1.0)
149
+ rake (13.0.6)
150
+ sprockets (4.2.2)
151
+ concurrent-ruby (~> 1.0)
152
+ logger
153
+ rack (>= 2.2.4, < 4)
154
+ sprockets-rails (3.5.2)
155
+ actionpack (>= 6.1)
156
+ activesupport (>= 6.1)
157
+ sprockets (>= 3.0.0)
158
+ thor (1.4.0)
159
+ timeout (0.4.3)
160
+ tzinfo (2.0.6)
161
+ concurrent-ruby (~> 1.0)
162
+ websocket-driver (0.8.0)
163
+ base64
164
+ websocket-extensions (>= 0.1.0)
165
+ websocket-extensions (0.1.5)
166
+ zeitwerk (2.6.18)
167
+
168
+ PLATFORMS
169
+ x64-mingw-ucrt
170
+ x64-mingw32
171
+
172
+ DEPENDENCIES
173
+ awesome_print
174
+ bundler
175
+ media_types-serialization!
176
+ minitest (~> 5.17)
177
+ oj
178
+ rails (~> 6.1.7.10)
179
+ rake (~> 13.0)
180
+
181
+ BUNDLED WITH
182
+ 2.3.15
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Derk-Jan Karrenbeld
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Derk-Jan Karrenbeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.