infinum_json_api_setup 0.0.7 → 0.1.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +45 -0
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +1 -1
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +50 -12
  7. data/Gemfile +1 -0
  8. data/Gemfile.lock +1 -0
  9. data/README.md +8 -0
  10. data/Rakefile +3 -0
  11. data/base.gemfile +14 -0
  12. data/infinum_json_api_setup.gemspec +11 -16
  13. data/lib/generators/infinum_json_api_setup/templates/config/locales/json_api.en.yml +1 -0
  14. data/lib/infinum_json_api_setup/json_api/content_negotiation.rb +2 -2
  15. data/lib/infinum_json_api_setup/json_api/locale_negotiation.rb +45 -0
  16. data/lib/infinum_json_api_setup/json_api/serializer_options.rb +1 -1
  17. data/lib/infinum_json_api_setup/rspec/helpers/response_helper.rb +4 -4
  18. data/lib/infinum_json_api_setup/rspec/matchers/have_empty_data.rb +1 -1
  19. data/lib/infinum_json_api_setup/rspec/matchers/have_error_pointer.rb +1 -1
  20. data/lib/infinum_json_api_setup/rspec/matchers/have_resource_count_of.rb +1 -1
  21. data/lib/infinum_json_api_setup/version.rb +1 -1
  22. data/lib/infinum_json_api_setup.rb +3 -0
  23. data/rails.7.1.gemfile +8 -0
  24. data/rails.7.1.gemfile.lock +361 -0
  25. data/rails.8.0.gemfile +7 -0
  26. data/rails.8.0.gemfile.lock +380 -0
  27. data/spec/dummy/app/controllers/api/v1/base_controller.rb +1 -0
  28. data/spec/dummy/app/controllers/api/v1/hello_controller.rb +11 -0
  29. data/spec/dummy/app/controllers/api/v1/locations_controller.rb +7 -13
  30. data/spec/dummy/app/models/location.rb +1 -1
  31. data/spec/dummy/config/database.yml +3 -0
  32. data/spec/dummy/config/environments/production.rb +1 -1
  33. data/spec/dummy/config/initializers/i18n.rb +3 -0
  34. data/spec/dummy/config/locales/de.yml +2 -0
  35. data/spec/dummy/config/locales/json_api.de.yml +22 -0
  36. data/spec/dummy/config/locales/json_api.en.yml +1 -0
  37. data/spec/dummy/config/routes.rb +1 -0
  38. data/spec/infinum_json_api_setup/rspec/helpers/response_helper_spec.rb +234 -0
  39. data/spec/infinum_json_api_setup/rspec/matchers/have_empty_data_spec.rb +3 -2
  40. data/spec/rails_helper.rb +2 -6
  41. data/spec/requests/api/v1/content_negotiation_spec.rb +10 -2
  42. data/spec/requests/api/v1/error_handling_spec.rb +37 -19
  43. data/spec/requests/api/v1/locale_negotiation_spec.rb +66 -0
  44. data/spec/requests/api/v1/responder_spec.rb +1 -1
  45. data/spec/requests/api/v1/serializer_options_spec.rb +1 -1
  46. metadata +46 -99
  47. data/Gemfile +0 -10
  48. data/Gemfile.lock +0 -268
@@ -0,0 +1,361 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ infinum_json_api_setup (0.1.0)
5
+ accept_language (~> 2.0)
6
+ json_schemer (>= 0.2, < 3)
7
+ jsonapi-query_builder
8
+ jsonapi-serializer
9
+ jsonapi_parameters
10
+ ostruct
11
+ pagy (~> 8.0)
12
+ rails
13
+ responders
14
+
15
+ GEM
16
+ remote: https://rubygems.org/
17
+ specs:
18
+ accept_language (2.0.8)
19
+ actioncable (7.1.5.2)
20
+ actionpack (= 7.1.5.2)
21
+ activesupport (= 7.1.5.2)
22
+ nio4r (~> 2.0)
23
+ websocket-driver (>= 0.6.1)
24
+ zeitwerk (~> 2.6)
25
+ actionmailbox (7.1.5.2)
26
+ actionpack (= 7.1.5.2)
27
+ activejob (= 7.1.5.2)
28
+ activerecord (= 7.1.5.2)
29
+ activestorage (= 7.1.5.2)
30
+ activesupport (= 7.1.5.2)
31
+ mail (>= 2.7.1)
32
+ net-imap
33
+ net-pop
34
+ net-smtp
35
+ actionmailer (7.1.5.2)
36
+ actionpack (= 7.1.5.2)
37
+ actionview (= 7.1.5.2)
38
+ activejob (= 7.1.5.2)
39
+ activesupport (= 7.1.5.2)
40
+ mail (~> 2.5, >= 2.5.4)
41
+ net-imap
42
+ net-pop
43
+ net-smtp
44
+ rails-dom-testing (~> 2.2)
45
+ actionpack (7.1.5.2)
46
+ actionview (= 7.1.5.2)
47
+ activesupport (= 7.1.5.2)
48
+ nokogiri (>= 1.8.5)
49
+ racc
50
+ rack (>= 2.2.4)
51
+ rack-session (>= 1.0.1)
52
+ rack-test (>= 0.6.3)
53
+ rails-dom-testing (~> 2.2)
54
+ rails-html-sanitizer (~> 1.6)
55
+ actiontext (7.1.5.2)
56
+ actionpack (= 7.1.5.2)
57
+ activerecord (= 7.1.5.2)
58
+ activestorage (= 7.1.5.2)
59
+ activesupport (= 7.1.5.2)
60
+ globalid (>= 0.6.0)
61
+ nokogiri (>= 1.8.5)
62
+ actionview (7.1.5.2)
63
+ activesupport (= 7.1.5.2)
64
+ builder (~> 3.1)
65
+ erubi (~> 1.11)
66
+ rails-dom-testing (~> 2.2)
67
+ rails-html-sanitizer (~> 1.6)
68
+ activejob (7.1.5.2)
69
+ activesupport (= 7.1.5.2)
70
+ globalid (>= 0.3.6)
71
+ activemodel (7.1.5.2)
72
+ activesupport (= 7.1.5.2)
73
+ activerecord (7.1.5.2)
74
+ activemodel (= 7.1.5.2)
75
+ activesupport (= 7.1.5.2)
76
+ timeout (>= 0.4.0)
77
+ activestorage (7.1.5.2)
78
+ actionpack (= 7.1.5.2)
79
+ activejob (= 7.1.5.2)
80
+ activerecord (= 7.1.5.2)
81
+ activesupport (= 7.1.5.2)
82
+ marcel (~> 1.0)
83
+ activesupport (7.1.5.2)
84
+ base64
85
+ benchmark (>= 0.3)
86
+ bigdecimal
87
+ concurrent-ruby (~> 1.0, >= 1.0.2)
88
+ connection_pool (>= 2.2.5)
89
+ drb
90
+ i18n (>= 1.6, < 2)
91
+ logger (>= 1.4.2)
92
+ minitest (>= 5.1)
93
+ mutex_m
94
+ securerandom (>= 0.3)
95
+ tzinfo (~> 2.0)
96
+ ast (2.4.3)
97
+ base64 (0.3.0)
98
+ benchmark (0.4.1)
99
+ bigdecimal (3.2.3)
100
+ builder (3.3.0)
101
+ bundler-audit (0.9.1)
102
+ bundler (>= 1.2.0, < 3)
103
+ thor (~> 1.0)
104
+ childprocess (4.1.0)
105
+ coderay (1.1.3)
106
+ concurrent-ruby (1.3.5)
107
+ connection_pool (2.5.4)
108
+ crass (1.0.6)
109
+ date (3.4.1)
110
+ diff-lcs (1.6.2)
111
+ docile (1.4.0)
112
+ drb (2.2.3)
113
+ erb (5.0.2)
114
+ erubi (1.13.1)
115
+ factory_bot (6.2.1)
116
+ activesupport (>= 5.0.0)
117
+ faker (2.23.0)
118
+ i18n (>= 1.8.11, < 2)
119
+ gemika (1.0.0)
120
+ globalid (1.2.1)
121
+ activesupport (>= 6.1)
122
+ hana (1.3.7)
123
+ i18n (1.14.7)
124
+ concurrent-ruby (~> 1.0)
125
+ iniparse (1.5.0)
126
+ io-console (0.8.1)
127
+ irb (1.15.2)
128
+ pp (>= 0.6.0)
129
+ rdoc (>= 4.0.0)
130
+ reline (>= 0.4.2)
131
+ json (2.13.2)
132
+ json_schemer (2.4.0)
133
+ bigdecimal
134
+ hana (~> 1.3)
135
+ regexp_parser (~> 2.0)
136
+ simpleidn (~> 0.2)
137
+ jsonapi-query_builder (0.3.0)
138
+ activerecord (>= 5)
139
+ pagy (>= 3.5)
140
+ jsonapi-serializer (2.2.0)
141
+ activesupport (>= 4.2)
142
+ jsonapi_parameters (2.3.0)
143
+ actionpack (>= 4.1.8)
144
+ activesupport (>= 4.1.8)
145
+ language_server-protocol (3.17.0.5)
146
+ lint_roller (1.1.0)
147
+ logger (1.7.0)
148
+ loofah (2.24.1)
149
+ crass (~> 1.0.2)
150
+ nokogiri (>= 1.12.0)
151
+ mail (2.8.1)
152
+ mini_mime (>= 0.1.1)
153
+ net-imap
154
+ net-pop
155
+ net-smtp
156
+ marcel (1.0.4)
157
+ method_source (1.1.0)
158
+ mini_mime (1.1.5)
159
+ mini_portile2 (2.8.9)
160
+ minitest (5.25.5)
161
+ mutex_m (0.3.0)
162
+ net-imap (0.5.10)
163
+ date
164
+ net-protocol
165
+ net-pop (0.1.2)
166
+ net-protocol
167
+ net-protocol (0.2.2)
168
+ timeout
169
+ net-smtp (0.5.1)
170
+ net-protocol
171
+ nio4r (2.7.4)
172
+ nokogiri (1.18.9)
173
+ mini_portile2 (~> 2.8.2)
174
+ racc (~> 1.4)
175
+ nokogiri (1.18.9-arm64-darwin)
176
+ racc (~> 1.4)
177
+ observer (0.1.2)
178
+ ostruct (0.6.3)
179
+ overcommit (0.59.1)
180
+ childprocess (>= 0.6.3, < 5)
181
+ iniparse (~> 1.4)
182
+ rexml (~> 3.2)
183
+ pagy (8.6.3)
184
+ parallel (1.27.0)
185
+ parser (3.3.9.0)
186
+ ast (~> 2.4.1)
187
+ racc
188
+ pg (1.4.4)
189
+ pp (0.6.2)
190
+ prettyprint
191
+ prettyprint (0.2.0)
192
+ prism (1.4.0)
193
+ pry (0.14.1)
194
+ coderay (~> 1.1)
195
+ method_source (~> 1.0)
196
+ pry-rails (0.3.9)
197
+ pry (>= 0.10.4)
198
+ psych (5.2.6)
199
+ date
200
+ stringio
201
+ pundit (2.2.0)
202
+ activesupport (>= 3.0.0)
203
+ racc (1.8.1)
204
+ rack (3.2.4)
205
+ rack-session (2.1.1)
206
+ base64 (>= 0.1.0)
207
+ rack (>= 3.0.0)
208
+ rack-test (2.2.0)
209
+ rack (>= 1.3)
210
+ rackup (2.2.1)
211
+ rack (>= 3)
212
+ rails (7.1.5.2)
213
+ actioncable (= 7.1.5.2)
214
+ actionmailbox (= 7.1.5.2)
215
+ actionmailer (= 7.1.5.2)
216
+ actionpack (= 7.1.5.2)
217
+ actiontext (= 7.1.5.2)
218
+ actionview (= 7.1.5.2)
219
+ activejob (= 7.1.5.2)
220
+ activemodel (= 7.1.5.2)
221
+ activerecord (= 7.1.5.2)
222
+ activestorage (= 7.1.5.2)
223
+ activesupport (= 7.1.5.2)
224
+ bundler (>= 1.15.0)
225
+ railties (= 7.1.5.2)
226
+ rails-dom-testing (2.3.0)
227
+ activesupport (>= 5.0.0)
228
+ minitest
229
+ nokogiri (>= 1.6)
230
+ rails-html-sanitizer (1.6.2)
231
+ loofah (~> 2.21)
232
+ 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)
233
+ railties (7.1.5.2)
234
+ actionpack (= 7.1.5.2)
235
+ activesupport (= 7.1.5.2)
236
+ irb
237
+ rackup (>= 1.0.0)
238
+ rake (>= 12.2)
239
+ thor (~> 1.0, >= 1.2.2)
240
+ zeitwerk (~> 2.6)
241
+ rainbow (3.1.1)
242
+ rake (13.3.0)
243
+ rdoc (6.14.2)
244
+ erb
245
+ psych (>= 4.0.0)
246
+ regexp_parser (2.11.2)
247
+ reline (0.6.2)
248
+ io-console (~> 0.5)
249
+ responders (3.0.1)
250
+ actionpack (>= 5.0)
251
+ railties (>= 5.0)
252
+ rexml (3.4.3)
253
+ rspec-core (3.13.5)
254
+ rspec-support (~> 3.13.0)
255
+ rspec-expectations (3.13.5)
256
+ diff-lcs (>= 1.2.0, < 2.0)
257
+ rspec-support (~> 3.13.0)
258
+ rspec-mocks (3.13.5)
259
+ diff-lcs (>= 1.2.0, < 2.0)
260
+ rspec-support (~> 3.13.0)
261
+ rspec-rails (7.1.1)
262
+ actionpack (>= 7.0)
263
+ activesupport (>= 7.0)
264
+ railties (>= 7.0)
265
+ rspec-core (~> 3.13)
266
+ rspec-expectations (~> 3.13)
267
+ rspec-mocks (~> 3.13)
268
+ rspec-support (~> 3.13)
269
+ rspec-support (3.13.5)
270
+ rubocop (1.80.2)
271
+ json (~> 2.3)
272
+ language_server-protocol (~> 3.17.0.2)
273
+ lint_roller (~> 1.1.0)
274
+ parallel (~> 1.10)
275
+ parser (>= 3.3.0.2)
276
+ rainbow (>= 2.2.2, < 4.0)
277
+ regexp_parser (>= 2.9.3, < 3.0)
278
+ rubocop-ast (>= 1.46.0, < 2.0)
279
+ ruby-progressbar (~> 1.7)
280
+ unicode-display_width (>= 2.4.0, < 4.0)
281
+ rubocop-ast (1.46.0)
282
+ parser (>= 3.3.7.2)
283
+ prism (~> 1.4)
284
+ rubocop-factory_bot (2.27.1)
285
+ lint_roller (~> 1.1)
286
+ rubocop (~> 1.72, >= 1.72.1)
287
+ rubocop-infinum (1.0.0)
288
+ lint_roller
289
+ rubocop (>= 1.72.1)
290
+ rubocop-factory_bot (>= 2.27.1)
291
+ rubocop-performance (>= 1.24.0)
292
+ rubocop-rails (>= 2.30.0)
293
+ rubocop-rspec (>= 3.5.0)
294
+ rubocop-rspec_rails (>= 2.31.0)
295
+ rubocop-performance (1.26.0)
296
+ lint_roller (~> 1.1)
297
+ rubocop (>= 1.75.0, < 2.0)
298
+ rubocop-ast (>= 1.44.0, < 2.0)
299
+ rubocop-rails (2.33.3)
300
+ activesupport (>= 4.2.0)
301
+ lint_roller (~> 1.1)
302
+ rack (>= 1.1)
303
+ rubocop (>= 1.75.0, < 2.0)
304
+ rubocop-ast (>= 1.44.0, < 2.0)
305
+ rubocop-rake (0.6.0)
306
+ rubocop (~> 1.0)
307
+ rubocop-rspec (3.7.0)
308
+ lint_roller (~> 1.1)
309
+ rubocop (~> 1.72, >= 1.72.1)
310
+ rubocop-rspec_rails (2.31.0)
311
+ lint_roller (~> 1.1)
312
+ rubocop (~> 1.72, >= 1.72.1)
313
+ rubocop-rspec (~> 3.5)
314
+ ruby-progressbar (1.13.0)
315
+ securerandom (0.4.1)
316
+ simplecov (0.21.2)
317
+ docile (~> 1.1)
318
+ simplecov-html (~> 0.11)
319
+ simplecov_json_formatter (~> 0.1)
320
+ simplecov-html (0.12.3)
321
+ simplecov_json_formatter (0.1.4)
322
+ simpleidn (0.2.3)
323
+ stringio (3.1.7)
324
+ thor (1.4.0)
325
+ timeout (0.4.3)
326
+ tzinfo (2.0.6)
327
+ concurrent-ruby (~> 1.0)
328
+ unicode-display_width (3.1.5)
329
+ unicode-emoji (~> 4.0, >= 4.0.4)
330
+ unicode-emoji (4.0.4)
331
+ websocket-driver (0.8.0)
332
+ base64
333
+ websocket-extensions (>= 0.1.0)
334
+ websocket-extensions (0.1.5)
335
+ zeitwerk (2.7.3)
336
+
337
+ PLATFORMS
338
+ arm64-darwin-20
339
+ ruby
340
+
341
+ DEPENDENCIES
342
+ bundler-audit
343
+ factory_bot (~> 6.2)
344
+ faker (~> 2.18)
345
+ gemika
346
+ infinum_json_api_setup!
347
+ observer
348
+ overcommit (~> 0.58)
349
+ pg
350
+ pry-rails
351
+ pundit
352
+ rails (~> 7.1.0)
353
+ rake
354
+ rspec-rails (~> 7.0)
355
+ rubocop (~> 1.0)
356
+ rubocop-infinum
357
+ rubocop-rake
358
+ simplecov
359
+
360
+ BUNDLED WITH
361
+ 2.3.24
data/rails.8.0.gemfile ADDED
@@ -0,0 +1,7 @@
1
+ eval(File.read(File.expand_path('base.gemfile', __dir__))) # rubocop:disable Security/Eval
2
+
3
+ gem 'gemika'
4
+ gem 'rails', '~> 8.0.0'
5
+ gem 'rspec-rails', '~> 8.0', require: false
6
+
7
+ gemspec