jsonapi-realizer 6.0.0.rc3 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +440 -0
  3. data/README.md +15 -24
  4. data/Rakefile +1 -0
  5. data/lib/jsonapi/realizer/action.rb +80 -74
  6. data/lib/jsonapi/realizer/adapter/active_record.rb +11 -9
  7. data/lib/jsonapi/realizer/adapter.rb +7 -7
  8. data/lib/jsonapi/realizer/adapter_spec.rb +2 -4
  9. data/lib/jsonapi/realizer/configuration.rb +2 -0
  10. data/lib/jsonapi/realizer/context.rb +2 -0
  11. data/lib/jsonapi/realizer/controller.rb +22 -5
  12. data/lib/jsonapi/realizer/error/include_without_data_property.rb +2 -1
  13. data/lib/jsonapi/realizer/error/invalid_content_type_header.rb +2 -0
  14. data/lib/jsonapi/realizer/error/invalid_data_type_property.rb +2 -0
  15. data/lib/jsonapi/realizer/error/invalid_root_property.rb +2 -0
  16. data/lib/jsonapi/realizer/error/missing_content_type_header.rb +2 -1
  17. data/lib/jsonapi/realizer/error/missing_data_type_property.rb +2 -1
  18. data/lib/jsonapi/realizer/error/missing_root_property.rb +2 -1
  19. data/lib/jsonapi/realizer/error/resource_attribute_not_found.rb +2 -0
  20. data/lib/jsonapi/realizer/error/resource_relationship_not_found.rb +2 -0
  21. data/lib/jsonapi/realizer/error.rb +2 -0
  22. data/lib/jsonapi/realizer/resource/attribute.rb +2 -0
  23. data/lib/jsonapi/realizer/resource/configuration.rb +2 -0
  24. data/lib/jsonapi/realizer/resource/relation.rb +2 -0
  25. data/lib/jsonapi/realizer/resource.rb +181 -182
  26. data/lib/jsonapi/realizer/resource_spec.rb +50 -9
  27. data/lib/jsonapi/realizer/version.rb +3 -1
  28. data/lib/jsonapi/realizer.rb +7 -5
  29. data/lib/jsonapi/realizer_spec.rb +2 -28
  30. data/lib/jsonapi-realizer.rb +2 -0
  31. metadata +24 -204
  32. data/lib/jsonapi/realizer/version_spec.rb +0 -7
metadata CHANGED
@@ -1,237 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-realizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.rc3
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene
8
- autorequire:
9
- bindir: exe
8
+ autorequire:
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-04 00:00:00.000000000 Z
11
+ date: 2023-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rubocop
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- type: :development
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.16'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.16'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.7'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.7'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '12.2'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '12.2'
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.11'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.11'
83
- - !ruby/object:Gem::Dependency
84
- name: sqlite3
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.3'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.3'
97
- - !ruby/object:Gem::Dependency
98
- name: activemodel
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: 4.0.0
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- version: '4.2'
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- version: 5.0.0
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '5.1'
113
- type: :development
114
- prerelease: false
115
- version_requirements: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: 4.0.0
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: '4.2'
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: 5.0.0
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- version: '5.1'
129
- - !ruby/object:Gem::Dependency
130
- name: activerecord
131
- requirement: !ruby/object:Gem::Requirement
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- version: 4.0.0
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '4.2'
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- version: 5.0.0
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- version: '5.1'
145
- type: :development
146
- prerelease: false
147
- version_requirements: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- version: 4.0.0
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- version: '4.2'
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- version: 5.0.0
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: '5.1'
161
- - !ruby/object:Gem::Dependency
162
- name: pry-doc
163
- requirement: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - "~>"
166
- - !ruby/object:Gem::Version
167
- version: '0.11'
168
- type: :development
169
- prerelease: false
170
- version_requirements: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - "~>"
173
- - !ruby/object:Gem::Version
174
- version: '0.11'
175
27
  - !ruby/object:Gem::Dependency
176
28
  name: addressable
177
29
  requirement: !ruby/object:Gem::Requirement
178
30
  requirements:
179
- - - "~>"
180
- - !ruby/object:Gem::Version
181
- version: '2.5'
182
- type: :runtime
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - "~>"
187
- - !ruby/object:Gem::Version
188
- version: '2.5'
189
- - !ruby/object:Gem::Dependency
190
- name: activesupport
191
- requirement: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- version: 4.0.0
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- version: '4.2'
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: 5.0.0
202
31
  - - ">="
203
32
  - !ruby/object:Gem::Version
204
- version: '5.1'
33
+ version: '0'
205
34
  type: :runtime
206
35
  prerelease: false
207
36
  version_requirements: !ruby/object:Gem::Requirement
208
37
  requirements:
209
38
  - - ">="
210
39
  - !ruby/object:Gem::Version
211
- version: 4.0.0
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- version: '4.2'
215
- - - ">="
216
- - !ruby/object:Gem::Version
217
- version: 5.0.0
218
- - - ">="
219
- - !ruby/object:Gem::Version
220
- version: '5.1'
40
+ version: '0'
221
41
  - !ruby/object:Gem::Dependency
222
42
  name: kaminari
223
43
  requirement: !ruby/object:Gem::Requirement
224
44
  requirements:
225
- - - "~>"
45
+ - - ">="
226
46
  - !ruby/object:Gem::Version
227
- version: '1.1'
47
+ version: '0'
228
48
  type: :runtime
229
49
  prerelease: false
230
50
  version_requirements: !ruby/object:Gem::Requirement
231
51
  requirements:
232
- - - "~>"
52
+ - - ">="
233
53
  - !ruby/object:Gem::Version
234
- version: '1.1'
54
+ version: '0'
235
55
  description: A way to take json:api requests and turn them into models
236
56
  email:
237
57
  - kurtis@rainbolt-greene.online
@@ -239,6 +59,7 @@ executables: []
239
59
  extensions: []
240
60
  extra_rdoc_files: []
241
61
  files:
62
+ - LICENSE
242
63
  - README.md
243
64
  - Rakefile
244
65
  - lib/jsonapi-realizer.rb
@@ -266,30 +87,29 @@ files:
266
87
  - lib/jsonapi/realizer/resource/relation.rb
267
88
  - lib/jsonapi/realizer/resource_spec.rb
268
89
  - lib/jsonapi/realizer/version.rb
269
- - lib/jsonapi/realizer/version_spec.rb
270
90
  - lib/jsonapi/realizer_spec.rb
271
- homepage: http://krainboltgreene.github.io/jsonapi-realizer
91
+ homepage: https://github.com/krainboltgreene/jsonapi-realizer.rb
272
92
  licenses:
273
- - ISC
274
- metadata: {}
275
- post_install_message:
93
+ - HL3
94
+ metadata:
95
+ rubygems_mfa_required: 'true'
96
+ post_install_message:
276
97
  rdoc_options: []
277
98
  require_paths:
278
99
  - lib
279
100
  required_ruby_version: !ruby/object:Gem::Requirement
280
101
  requirements:
281
- - - ">="
102
+ - - "~>"
282
103
  - !ruby/object:Gem::Version
283
- version: '0'
104
+ version: '3.2'
284
105
  required_rubygems_version: !ruby/object:Gem::Requirement
285
106
  requirements:
286
- - - ">"
107
+ - - ">="
287
108
  - !ruby/object:Gem::Version
288
- version: 1.3.1
109
+ version: '0'
289
110
  requirements: []
290
- rubyforge_project:
291
- rubygems_version: 2.7.7
292
- signing_key:
111
+ rubygems_version: 3.4.10
112
+ signing_key:
293
113
  specification_version: 4
294
114
  summary: A way to take json:api requests and turn them into models
295
115
  test_files: []
@@ -1,7 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe JSONAPI::Realizer::VERSION do
4
- it "should be a string" do
5
- expect(JSONAPI::Realizer::VERSION).to be_kind_of(String)
6
- end
7
- end