easy-jsonapi 1.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.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/publish-gem.yml +60 -0
  3. data/.github/workflows/rake.yml +35 -0
  4. data/.rspec +3 -0
  5. data/.ruby-version +1 -0
  6. data/CHANGELOG.md +5 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +5 -0
  9. data/Gemfile.lock +106 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +209 -0
  12. data/Rakefile +20 -0
  13. data/UsingTheRequestObject.md +74 -0
  14. data/UsingUserConfigurations.md +95 -0
  15. data/bin/bundle +114 -0
  16. data/bin/console +15 -0
  17. data/bin/htmldiff +29 -0
  18. data/bin/kramdown +29 -0
  19. data/bin/ldiff +29 -0
  20. data/bin/license_finder +29 -0
  21. data/bin/license_finder_pip.py +29 -0
  22. data/bin/maruku +29 -0
  23. data/bin/marutex +29 -0
  24. data/bin/nokogiri +29 -0
  25. data/bin/racc +29 -0
  26. data/bin/rackup +29 -0
  27. data/bin/rake +29 -0
  28. data/bin/redcarpet +29 -0
  29. data/bin/reverse_markdown +29 -0
  30. data/bin/rspec +29 -0
  31. data/bin/rubocop +29 -0
  32. data/bin/ruby-parse +29 -0
  33. data/bin/ruby-rewrite +29 -0
  34. data/bin/setup +8 -0
  35. data/bin/solargraph +29 -0
  36. data/bin/thor +29 -0
  37. data/bin/tilt +29 -0
  38. data/bin/yard +29 -0
  39. data/bin/yardoc +29 -0
  40. data/bin/yri +29 -0
  41. data/easy-jsonapi.gemspec +39 -0
  42. data/lib/easy/jsonapi.rb +12 -0
  43. data/lib/easy/jsonapi/collection.rb +144 -0
  44. data/lib/easy/jsonapi/config_manager.rb +144 -0
  45. data/lib/easy/jsonapi/config_manager/config.rb +49 -0
  46. data/lib/easy/jsonapi/document.rb +71 -0
  47. data/lib/easy/jsonapi/document/error.rb +48 -0
  48. data/lib/easy/jsonapi/document/error/error_member.rb +15 -0
  49. data/lib/easy/jsonapi/document/jsonapi.rb +26 -0
  50. data/lib/easy/jsonapi/document/jsonapi/jsonapi_member.rb +15 -0
  51. data/lib/easy/jsonapi/document/links.rb +36 -0
  52. data/lib/easy/jsonapi/document/links/link.rb +15 -0
  53. data/lib/easy/jsonapi/document/meta.rb +26 -0
  54. data/lib/easy/jsonapi/document/meta/meta_member.rb +14 -0
  55. data/lib/easy/jsonapi/document/resource.rb +56 -0
  56. data/lib/easy/jsonapi/document/resource/attributes.rb +37 -0
  57. data/lib/easy/jsonapi/document/resource/attributes/attribute.rb +29 -0
  58. data/lib/easy/jsonapi/document/resource/relationships.rb +40 -0
  59. data/lib/easy/jsonapi/document/resource/relationships/relationship.rb +50 -0
  60. data/lib/easy/jsonapi/document/resource_id.rb +28 -0
  61. data/lib/easy/jsonapi/exceptions.rb +27 -0
  62. data/lib/easy/jsonapi/exceptions/document_exceptions.rb +619 -0
  63. data/lib/easy/jsonapi/exceptions/headers_exceptions.rb +156 -0
  64. data/lib/easy/jsonapi/exceptions/naming_exceptions.rb +36 -0
  65. data/lib/easy/jsonapi/exceptions/query_params_exceptions.rb +67 -0
  66. data/lib/easy/jsonapi/exceptions/user_defined_exceptions.rb +253 -0
  67. data/lib/easy/jsonapi/field.rb +43 -0
  68. data/lib/easy/jsonapi/header_collection.rb +38 -0
  69. data/lib/easy/jsonapi/header_collection/header.rb +11 -0
  70. data/lib/easy/jsonapi/item.rb +88 -0
  71. data/lib/easy/jsonapi/middleware.rb +158 -0
  72. data/lib/easy/jsonapi/name_value_pair.rb +72 -0
  73. data/lib/easy/jsonapi/name_value_pair_collection.rb +78 -0
  74. data/lib/easy/jsonapi/parser.rb +38 -0
  75. data/lib/easy/jsonapi/parser/document_parser.rb +196 -0
  76. data/lib/easy/jsonapi/parser/headers_parser.rb +33 -0
  77. data/lib/easy/jsonapi/parser/rack_req_params_parser.rb +117 -0
  78. data/lib/easy/jsonapi/request.rb +40 -0
  79. data/lib/easy/jsonapi/request/query_param_collection.rb +56 -0
  80. data/lib/easy/jsonapi/request/query_param_collection/fields_param.rb +32 -0
  81. data/lib/easy/jsonapi/request/query_param_collection/fields_param/fieldset.rb +34 -0
  82. data/lib/easy/jsonapi/request/query_param_collection/filter_param.rb +28 -0
  83. data/lib/easy/jsonapi/request/query_param_collection/filter_param/filter.rb +34 -0
  84. data/lib/easy/jsonapi/request/query_param_collection/include_param.rb +119 -0
  85. data/lib/easy/jsonapi/request/query_param_collection/page_param.rb +55 -0
  86. data/lib/easy/jsonapi/request/query_param_collection/query_param.rb +47 -0
  87. data/lib/easy/jsonapi/request/query_param_collection/sort_param.rb +25 -0
  88. data/lib/easy/jsonapi/response.rb +22 -0
  89. data/lib/easy/jsonapi/utility.rb +158 -0
  90. data/lib/easy/jsonapi/version.rb +8 -0
  91. metadata +248 -0
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module JSONAPI
4
+ # Gem version stored in Gemspec file
5
+
6
+ # The highest JSON:API specification version the gem adheres to.
7
+ JSONAPI_SPEC_VERSION = '1.0'
8
+ end
metadata ADDED
@@ -0,0 +1,248 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: easy-jsonapi
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Joshua DeMoss, Joe Viscomi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: license_finder
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '6.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '6.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.2'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: redcarpet
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.5'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.5'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.11'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.11'
97
+ - !ruby/object:Gem::Dependency
98
+ name: solargraph
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.39'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.39'
111
+ - !ruby/object:Gem::Dependency
112
+ name: oj
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '3.10'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '3.10'
125
+ description: Middleware to screen non-JSONAPI-compliant requests, a parser to provide
126
+ Object Oriented access to requests, and a validator for validating JSONAPI Serialized
127
+ responses.
128
+ email:
129
+ - demoss.joshua@gmail.com
130
+ executables: []
131
+ extensions: []
132
+ extra_rdoc_files: []
133
+ files:
134
+ - ".github/workflows/publish-gem.yml"
135
+ - ".github/workflows/rake.yml"
136
+ - ".rspec"
137
+ - ".ruby-version"
138
+ - CHANGELOG.md
139
+ - CODE_OF_CONDUCT.md
140
+ - Gemfile
141
+ - Gemfile.lock
142
+ - LICENSE.txt
143
+ - README.md
144
+ - Rakefile
145
+ - UsingTheRequestObject.md
146
+ - UsingUserConfigurations.md
147
+ - bin/bundle
148
+ - bin/console
149
+ - bin/htmldiff
150
+ - bin/kramdown
151
+ - bin/ldiff
152
+ - bin/license_finder
153
+ - bin/license_finder_pip.py
154
+ - bin/maruku
155
+ - bin/marutex
156
+ - bin/nokogiri
157
+ - bin/racc
158
+ - bin/rackup
159
+ - bin/rake
160
+ - bin/redcarpet
161
+ - bin/reverse_markdown
162
+ - bin/rspec
163
+ - bin/rubocop
164
+ - bin/ruby-parse
165
+ - bin/ruby-rewrite
166
+ - bin/setup
167
+ - bin/solargraph
168
+ - bin/thor
169
+ - bin/tilt
170
+ - bin/yard
171
+ - bin/yardoc
172
+ - bin/yri
173
+ - easy-jsonapi.gemspec
174
+ - lib/easy/jsonapi.rb
175
+ - lib/easy/jsonapi/collection.rb
176
+ - lib/easy/jsonapi/config_manager.rb
177
+ - lib/easy/jsonapi/config_manager/config.rb
178
+ - lib/easy/jsonapi/document.rb
179
+ - lib/easy/jsonapi/document/error.rb
180
+ - lib/easy/jsonapi/document/error/error_member.rb
181
+ - lib/easy/jsonapi/document/jsonapi.rb
182
+ - lib/easy/jsonapi/document/jsonapi/jsonapi_member.rb
183
+ - lib/easy/jsonapi/document/links.rb
184
+ - lib/easy/jsonapi/document/links/link.rb
185
+ - lib/easy/jsonapi/document/meta.rb
186
+ - lib/easy/jsonapi/document/meta/meta_member.rb
187
+ - lib/easy/jsonapi/document/resource.rb
188
+ - lib/easy/jsonapi/document/resource/attributes.rb
189
+ - lib/easy/jsonapi/document/resource/attributes/attribute.rb
190
+ - lib/easy/jsonapi/document/resource/relationships.rb
191
+ - lib/easy/jsonapi/document/resource/relationships/relationship.rb
192
+ - lib/easy/jsonapi/document/resource_id.rb
193
+ - lib/easy/jsonapi/exceptions.rb
194
+ - lib/easy/jsonapi/exceptions/document_exceptions.rb
195
+ - lib/easy/jsonapi/exceptions/headers_exceptions.rb
196
+ - lib/easy/jsonapi/exceptions/naming_exceptions.rb
197
+ - lib/easy/jsonapi/exceptions/query_params_exceptions.rb
198
+ - lib/easy/jsonapi/exceptions/user_defined_exceptions.rb
199
+ - lib/easy/jsonapi/field.rb
200
+ - lib/easy/jsonapi/header_collection.rb
201
+ - lib/easy/jsonapi/header_collection/header.rb
202
+ - lib/easy/jsonapi/item.rb
203
+ - lib/easy/jsonapi/middleware.rb
204
+ - lib/easy/jsonapi/name_value_pair.rb
205
+ - lib/easy/jsonapi/name_value_pair_collection.rb
206
+ - lib/easy/jsonapi/parser.rb
207
+ - lib/easy/jsonapi/parser/document_parser.rb
208
+ - lib/easy/jsonapi/parser/headers_parser.rb
209
+ - lib/easy/jsonapi/parser/rack_req_params_parser.rb
210
+ - lib/easy/jsonapi/request.rb
211
+ - lib/easy/jsonapi/request/query_param_collection.rb
212
+ - lib/easy/jsonapi/request/query_param_collection/fields_param.rb
213
+ - lib/easy/jsonapi/request/query_param_collection/fields_param/fieldset.rb
214
+ - lib/easy/jsonapi/request/query_param_collection/filter_param.rb
215
+ - lib/easy/jsonapi/request/query_param_collection/filter_param/filter.rb
216
+ - lib/easy/jsonapi/request/query_param_collection/include_param.rb
217
+ - lib/easy/jsonapi/request/query_param_collection/page_param.rb
218
+ - lib/easy/jsonapi/request/query_param_collection/query_param.rb
219
+ - lib/easy/jsonapi/request/query_param_collection/sort_param.rb
220
+ - lib/easy/jsonapi/response.rb
221
+ - lib/easy/jsonapi/utility.rb
222
+ - lib/easy/jsonapi/version.rb
223
+ homepage: https://rubygems.org/gems/easy-jsonapi
224
+ licenses:
225
+ - MIT
226
+ metadata:
227
+ source_code_uri: https://github.com/Curatess/easy-jsonapi
228
+ changelog_uri: https://github.com/Curatess/easy-jsonapi/CHANGELOG.mg
229
+ post_install_message:
230
+ rdoc_options: []
231
+ require_paths:
232
+ - lib
233
+ required_ruby_version: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '2.7'
238
+ required_rubygems_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ requirements: []
244
+ rubygems_version: 3.2.3
245
+ signing_key:
246
+ specification_version: 4
247
+ summary: Middleware, Parser, and Validator for JSONAPI requests and serialized resopnses
248
+ test_files: []