media_types-serialization 2.1.0 → 2.2.1

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 +216 -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 +415 -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
@@ -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.3', '< 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.1.7.10'
39
+ spec.add_dependency 'activesupport', '>= 6.1.7.10'
40
+ spec.add_dependency 'media_types', '>= 2.2.3', '< 3.0.0'
41
+
42
+ spec.add_development_dependency 'awesome_print'
43
+ spec.add_development_dependency 'bundler'
44
+ spec.add_development_dependency 'rails', '~> 6.1.7.10'
45
+ spec.add_development_dependency 'rake', '~> 13.0'
46
+ spec.add_development_dependency 'minitest', '~> 5.17'
47
+ spec.add_development_dependency 'oj'
48
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: media_types-serialization
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-05-13 00:00:00.000000000 Z
12
+ date: 2025-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 6.0.0
20
+ version: 6.1.7.10
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 6.0.0
27
+ version: 6.1.7.10
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 6.0.0
34
+ version: 6.1.7.10
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 6.0.0
41
+ version: 6.1.7.10
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: media_types
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -93,14 +93,14 @@ dependencies:
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '6.0'
96
+ version: 6.1.7.10
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '6.0'
103
+ version: 6.1.7.10
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: rake
106
106
  requirement: !ruby/object:Gem::Requirement
@@ -121,14 +121,14 @@ dependencies:
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '5.0'
124
+ version: '5.17'
125
125
  type: :development
126
126
  prerelease: false
127
127
  version_requirements: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '5.0'
131
+ version: '5.17'
132
132
  - !ruby/object:Gem::Dependency
133
133
  name: oj
134
134
  requirement: !ruby/object:Gem::Requirement
@@ -154,6 +154,7 @@ files:
154
154
  - ".github/workflows/ci.yml"
155
155
  - ".github/workflows/publish-bookworm.yml"
156
156
  - ".github/workflows/publish-sid.yml"
157
+ - ".github/workflows/publish-trixie.yml"
157
158
  - ".gitignore"
158
159
  - ".idea/.rakeTasks"
159
160
  - ".idea/dictionaries/Derk_Jan.xml"
@@ -165,6 +166,7 @@ files:
165
166
  - ".idea/runConfigurations/test.xml"
166
167
  - ".idea/vcs.xml"
167
168
  - ".prettierrc"
169
+ - ".vscode/settings.json"
168
170
  - CHANGELOG.md
169
171
  - CODE_OF_CONDUCT.md
170
172
  - Gemfile
@@ -215,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
217
  - !ruby/object:Gem::Version
216
218
  version: '0'
217
219
  requirements: []
218
- rubygems_version: 3.3.15
220
+ rubygems_version: 3.5.4
219
221
  signing_key:
220
222
  specification_version: 4
221
223
  summary: Add media types supported serialization using your favourite serializer