media_types-serialization 1.4.0 → 2.0.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/.github/workflows/ci.yml +32 -32
- data/.github/workflows/publish-bookworm.yml +33 -0
- data/.github/workflows/publish-sid.yml +33 -0
- data/.gitignore +22 -14
- data/.idea/.rakeTasks +7 -7
- data/.idea/dictionaries/Derk_Jan.xml +6 -6
- data/.idea/encodings.xml +3 -3
- data/.idea/inspectionProfiles/Project_Default.xml +5 -5
- data/.idea/media_types-serialization.iml +76 -76
- data/.idea/misc.xml +6 -6
- data/.idea/modules.xml +7 -7
- data/.idea/runConfigurations/test.xml +19 -19
- data/.idea/vcs.xml +5 -5
- data/CHANGELOG.md +190 -182
- data/CODE_OF_CONDUCT.md +74 -74
- data/Gemfile +4 -4
- data/LICENSE.txt +21 -21
- data/README.md +1048 -1048
- data/Rakefile +10 -10
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/lib/media_types/problem.rb +67 -67
- data/lib/media_types/serialization/base.rb +269 -216
- data/lib/media_types/serialization/error.rb +193 -193
- data/lib/media_types/serialization/fake_validator.rb +53 -53
- data/lib/media_types/serialization/serialization_dsl.rb +135 -135
- data/lib/media_types/serialization/serialization_registration.rb +245 -245
- data/lib/media_types/serialization/serializers/api_viewer.rb +383 -136
- data/lib/media_types/serialization/serializers/common_css.rb +212 -168
- data/lib/media_types/serialization/serializers/endpoint_description_serializer.rb +80 -80
- data/lib/media_types/serialization/serializers/fallback_not_acceptable_serializer.rb +85 -85
- data/lib/media_types/serialization/serializers/fallback_unsupported_media_type_serializer.rb +58 -58
- data/lib/media_types/serialization/serializers/input_validation_error_serializer.rb +93 -93
- data/lib/media_types/serialization/serializers/problem_serializer.rb +111 -111
- data/lib/media_types/serialization/utils/accept_header.rb +77 -77
- data/lib/media_types/serialization/utils/accept_language_header.rb +82 -82
- data/lib/media_types/serialization/version.rb +7 -7
- data/lib/media_types/serialization.rb +682 -675
- data/media_types-serialization.gemspec +48 -48
- metadata +9 -8
- data/Gemfile.lock +0 -167
@@ -1,48 +1,48 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'media_types/serialization/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'media_types-serialization'
|
8
|
-
spec.version = MediaTypes::Serialization::VERSION
|
9
|
-
spec.authors = ['Derk-Jan Karrenbeld', 'Max Maton']
|
10
|
-
spec.email = ['derk-jan@xpbytes.com', 'max@delftsolutions.nl']
|
11
|
-
|
12
|
-
spec.summary = 'Add media types supported serialization using your favourite serializer'
|
13
|
-
spec.homepage = 'https://github.com/XPBytes/media_types-serialization'
|
14
|
-
spec.license = 'MIT'
|
15
|
-
|
16
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
-
if spec.respond_to?(:metadata)
|
19
|
-
# spec.metadata['allowed_push_host'] = 'TODO: Set to 'http://mygemserver.com''
|
20
|
-
|
21
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
22
|
-
spec.metadata['source_code_uri'] = spec.homepage
|
23
|
-
spec.metadata['changelog_uri'] = spec.homepage + '/blob/master/CHANGELOG.md'
|
24
|
-
else
|
25
|
-
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
26
|
-
'public gem pushes.'
|
27
|
-
end
|
28
|
-
|
29
|
-
# Specify which files should be added to the gem when it is released.
|
30
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
32
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
-
end
|
34
|
-
spec.bindir = 'exe'
|
35
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
|
-
spec.require_paths = ['lib']
|
37
|
-
|
38
|
-
spec.add_dependency 'actionpack', '>= 6.0.0'
|
39
|
-
spec.add_dependency 'activesupport', '>= 6.0.0'
|
40
|
-
spec.add_dependency 'media_types', '>= 2.2.0', '< 3.0.0'
|
41
|
-
|
42
|
-
spec.add_development_dependency 'awesome_print'
|
43
|
-
spec.add_development_dependency 'bundler'
|
44
|
-
spec.add_development_dependency 'rails', '~> 6.0'
|
45
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
46
|
-
spec.add_development_dependency 'minitest', '~> 5.0'
|
47
|
-
spec.add_development_dependency 'oj'
|
48
|
-
end
|
1
|
+
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'media_types/serialization/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'media_types-serialization'
|
8
|
+
spec.version = MediaTypes::Serialization::VERSION
|
9
|
+
spec.authors = ['Derk-Jan Karrenbeld', 'Max Maton']
|
10
|
+
spec.email = ['derk-jan@xpbytes.com', 'max@delftsolutions.nl']
|
11
|
+
|
12
|
+
spec.summary = 'Add media types supported serialization using your favourite serializer'
|
13
|
+
spec.homepage = 'https://github.com/XPBytes/media_types-serialization'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata['allowed_push_host'] = 'TODO: Set to 'http://mygemserver.com''
|
20
|
+
|
21
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
22
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
23
|
+
spec.metadata['changelog_uri'] = spec.homepage + '/blob/master/CHANGELOG.md'
|
24
|
+
else
|
25
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
26
|
+
'public gem pushes.'
|
27
|
+
end
|
28
|
+
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
+
end
|
34
|
+
spec.bindir = 'exe'
|
35
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
|
+
spec.require_paths = ['lib']
|
37
|
+
|
38
|
+
spec.add_dependency 'actionpack', '>= 6.0.0'
|
39
|
+
spec.add_dependency 'activesupport', '>= 6.0.0'
|
40
|
+
spec.add_dependency 'media_types', '>= 2.2.0', '< 3.0.0'
|
41
|
+
|
42
|
+
spec.add_development_dependency 'awesome_print'
|
43
|
+
spec.add_development_dependency 'bundler'
|
44
|
+
spec.add_development_dependency 'rails', '~> 6.0'
|
45
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
46
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
47
|
+
spec.add_development_dependency 'oj'
|
48
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: media_types-serialization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derk-Jan Karrenbeld
|
8
8
|
- Max Maton
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-08-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -143,7 +143,7 @@ dependencies:
|
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
|
-
description:
|
146
|
+
description:
|
147
147
|
email:
|
148
148
|
- derk-jan@xpbytes.com
|
149
149
|
- max@delftsolutions.nl
|
@@ -152,6 +152,8 @@ extensions: []
|
|
152
152
|
extra_rdoc_files: []
|
153
153
|
files:
|
154
154
|
- ".github/workflows/ci.yml"
|
155
|
+
- ".github/workflows/publish-bookworm.yml"
|
156
|
+
- ".github/workflows/publish-sid.yml"
|
155
157
|
- ".gitignore"
|
156
158
|
- ".idea/.rakeTasks"
|
157
159
|
- ".idea/dictionaries/Derk_Jan.xml"
|
@@ -166,7 +168,6 @@ files:
|
|
166
168
|
- CHANGELOG.md
|
167
169
|
- CODE_OF_CONDUCT.md
|
168
170
|
- Gemfile
|
169
|
-
- Gemfile.lock
|
170
171
|
- LICENSE.txt
|
171
172
|
- README.md
|
172
173
|
- Rakefile
|
@@ -198,7 +199,7 @@ metadata:
|
|
198
199
|
homepage_uri: https://github.com/XPBytes/media_types-serialization
|
199
200
|
source_code_uri: https://github.com/XPBytes/media_types-serialization
|
200
201
|
changelog_uri: https://github.com/XPBytes/media_types-serialization/blob/master/CHANGELOG.md
|
201
|
-
post_install_message:
|
202
|
+
post_install_message:
|
202
203
|
rdoc_options: []
|
203
204
|
require_paths:
|
204
205
|
- lib
|
@@ -213,8 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
214
|
- !ruby/object:Gem::Version
|
214
215
|
version: '0'
|
215
216
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
217
|
-
signing_key:
|
217
|
+
rubygems_version: 3.2.5
|
218
|
+
signing_key:
|
218
219
|
specification_version: 4
|
219
220
|
summary: Add media types supported serialization using your favourite serializer
|
220
221
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,167 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
media_types-serialization (1.4.0)
|
5
|
-
actionpack (>= 6.0.0)
|
6
|
-
activesupport (>= 6.0.0)
|
7
|
-
media_types (>= 2.2.0, < 3.0.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actioncable (6.1.7.3)
|
13
|
-
actionpack (= 6.1.7.3)
|
14
|
-
activesupport (= 6.1.7.3)
|
15
|
-
nio4r (~> 2.0)
|
16
|
-
websocket-driver (>= 0.6.1)
|
17
|
-
actionmailbox (6.1.7.3)
|
18
|
-
actionpack (= 6.1.7.3)
|
19
|
-
activejob (= 6.1.7.3)
|
20
|
-
activerecord (= 6.1.7.3)
|
21
|
-
activestorage (= 6.1.7.3)
|
22
|
-
activesupport (= 6.1.7.3)
|
23
|
-
mail (>= 2.7.1)
|
24
|
-
actionmailer (6.1.7.3)
|
25
|
-
actionpack (= 6.1.7.3)
|
26
|
-
actionview (= 6.1.7.3)
|
27
|
-
activejob (= 6.1.7.3)
|
28
|
-
activesupport (= 6.1.7.3)
|
29
|
-
mail (~> 2.5, >= 2.5.4)
|
30
|
-
rails-dom-testing (~> 2.0)
|
31
|
-
actionpack (6.1.7.3)
|
32
|
-
actionview (= 6.1.7.3)
|
33
|
-
activesupport (= 6.1.7.3)
|
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.3)
|
39
|
-
actionpack (= 6.1.7.3)
|
40
|
-
activerecord (= 6.1.7.3)
|
41
|
-
activestorage (= 6.1.7.3)
|
42
|
-
activesupport (= 6.1.7.3)
|
43
|
-
nokogiri (>= 1.8.5)
|
44
|
-
actionview (6.1.7.3)
|
45
|
-
activesupport (= 6.1.7.3)
|
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.3)
|
51
|
-
activesupport (= 6.1.7.3)
|
52
|
-
globalid (>= 0.3.6)
|
53
|
-
activemodel (6.1.7.3)
|
54
|
-
activesupport (= 6.1.7.3)
|
55
|
-
activerecord (6.1.7.3)
|
56
|
-
activemodel (= 6.1.7.3)
|
57
|
-
activesupport (= 6.1.7.3)
|
58
|
-
activestorage (6.1.7.3)
|
59
|
-
actionpack (= 6.1.7.3)
|
60
|
-
activejob (= 6.1.7.3)
|
61
|
-
activerecord (= 6.1.7.3)
|
62
|
-
activesupport (= 6.1.7.3)
|
63
|
-
marcel (~> 1.0)
|
64
|
-
mini_mime (>= 1.1.0)
|
65
|
-
activesupport (6.1.7.3)
|
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
|
-
builder (3.2.4)
|
73
|
-
concurrent-ruby (1.2.2)
|
74
|
-
crass (1.0.6)
|
75
|
-
date (3.3.3)
|
76
|
-
erubi (1.12.0)
|
77
|
-
globalid (1.1.0)
|
78
|
-
activesupport (>= 5.0)
|
79
|
-
i18n (1.12.0)
|
80
|
-
concurrent-ruby (~> 1.0)
|
81
|
-
loofah (2.19.1)
|
82
|
-
crass (~> 1.0.2)
|
83
|
-
nokogiri (>= 1.5.9)
|
84
|
-
mail (2.8.1)
|
85
|
-
mini_mime (>= 0.1.1)
|
86
|
-
net-imap
|
87
|
-
net-pop
|
88
|
-
net-smtp
|
89
|
-
marcel (1.0.2)
|
90
|
-
media_types (2.2.0)
|
91
|
-
method_source (1.0.0)
|
92
|
-
mini_mime (1.1.2)
|
93
|
-
minitest (5.18.0)
|
94
|
-
net-imap (0.3.4)
|
95
|
-
date
|
96
|
-
net-protocol
|
97
|
-
net-pop (0.1.2)
|
98
|
-
net-protocol
|
99
|
-
net-protocol (0.2.1)
|
100
|
-
timeout
|
101
|
-
net-smtp (0.3.3)
|
102
|
-
net-protocol
|
103
|
-
nio4r (2.5.8)
|
104
|
-
nokogiri (1.14.2-x64-mingw32)
|
105
|
-
racc (~> 1.4)
|
106
|
-
oj (3.14.2)
|
107
|
-
racc (1.6.2)
|
108
|
-
rack (2.2.6.4)
|
109
|
-
rack-test (2.1.0)
|
110
|
-
rack (>= 1.3)
|
111
|
-
rails (6.1.7.3)
|
112
|
-
actioncable (= 6.1.7.3)
|
113
|
-
actionmailbox (= 6.1.7.3)
|
114
|
-
actionmailer (= 6.1.7.3)
|
115
|
-
actionpack (= 6.1.7.3)
|
116
|
-
actiontext (= 6.1.7.3)
|
117
|
-
actionview (= 6.1.7.3)
|
118
|
-
activejob (= 6.1.7.3)
|
119
|
-
activemodel (= 6.1.7.3)
|
120
|
-
activerecord (= 6.1.7.3)
|
121
|
-
activestorage (= 6.1.7.3)
|
122
|
-
activesupport (= 6.1.7.3)
|
123
|
-
bundler (>= 1.15.0)
|
124
|
-
railties (= 6.1.7.3)
|
125
|
-
sprockets-rails (>= 2.0.0)
|
126
|
-
rails-dom-testing (2.0.3)
|
127
|
-
activesupport (>= 4.2.0)
|
128
|
-
nokogiri (>= 1.6)
|
129
|
-
rails-html-sanitizer (1.5.0)
|
130
|
-
loofah (~> 2.19, >= 2.19.1)
|
131
|
-
railties (6.1.7.3)
|
132
|
-
actionpack (= 6.1.7.3)
|
133
|
-
activesupport (= 6.1.7.3)
|
134
|
-
method_source
|
135
|
-
rake (>= 12.2)
|
136
|
-
thor (~> 1.0)
|
137
|
-
rake (13.0.6)
|
138
|
-
sprockets (4.2.0)
|
139
|
-
concurrent-ruby (~> 1.0)
|
140
|
-
rack (>= 2.2.4, < 4)
|
141
|
-
sprockets-rails (3.4.2)
|
142
|
-
actionpack (>= 5.2)
|
143
|
-
activesupport (>= 5.2)
|
144
|
-
sprockets (>= 3.0.0)
|
145
|
-
thor (1.2.1)
|
146
|
-
timeout (0.3.2)
|
147
|
-
tzinfo (2.0.6)
|
148
|
-
concurrent-ruby (~> 1.0)
|
149
|
-
websocket-driver (0.7.5)
|
150
|
-
websocket-extensions (>= 0.1.0)
|
151
|
-
websocket-extensions (0.1.5)
|
152
|
-
zeitwerk (2.6.7)
|
153
|
-
|
154
|
-
PLATFORMS
|
155
|
-
x64-mingw32
|
156
|
-
|
157
|
-
DEPENDENCIES
|
158
|
-
awesome_print
|
159
|
-
bundler
|
160
|
-
media_types-serialization!
|
161
|
-
minitest (~> 5.0)
|
162
|
-
oj
|
163
|
-
rails (~> 6.0)
|
164
|
-
rake (~> 13.0)
|
165
|
-
|
166
|
-
BUNDLED WITH
|
167
|
-
2.1.4
|