jsonapi_compliable 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/docs/Jsonapi.html +1 -1
  3. data/docs/Jsonapi/ResourceGenerator.html +1 -1
  4. data/docs/JsonapiCompliable.html +1 -1
  5. data/docs/JsonapiCompliable/Adapters.html +1 -1
  6. data/docs/JsonapiCompliable/Adapters/Abstract.html +1 -1
  7. data/docs/JsonapiCompliable/Adapters/ActiveRecord.html +1 -1
  8. data/docs/JsonapiCompliable/Adapters/ActiveRecordSideloading.html +1 -1
  9. data/docs/JsonapiCompliable/Adapters/Null.html +1 -1
  10. data/docs/JsonapiCompliable/Base.html +1 -1
  11. data/docs/JsonapiCompliable/Deserializer.html +1 -1
  12. data/docs/JsonapiCompliable/Errors.html +1 -1
  13. data/docs/JsonapiCompliable/Errors/BadFilter.html +1 -1
  14. data/docs/JsonapiCompliable/Errors/StatNotFound.html +1 -1
  15. data/docs/JsonapiCompliable/Errors/UnsupportedPageSize.html +1 -1
  16. data/docs/JsonapiCompliable/Errors/ValidationError.html +1 -1
  17. data/docs/JsonapiCompliable/Extensions.html +1 -1
  18. data/docs/JsonapiCompliable/Extensions/BooleanAttribute.html +1 -1
  19. data/docs/JsonapiCompliable/Extensions/BooleanAttribute/ClassMethods.html +1 -1
  20. data/docs/JsonapiCompliable/Extensions/ExtraAttribute.html +1 -1
  21. data/docs/JsonapiCompliable/Extensions/ExtraAttribute/ClassMethods.html +1 -1
  22. data/docs/JsonapiCompliable/Query.html +1 -1
  23. data/docs/JsonapiCompliable/Rails.html +1 -1
  24. data/docs/JsonapiCompliable/Resource.html +1 -1
  25. data/docs/JsonapiCompliable/Scope.html +1 -1
  26. data/docs/JsonapiCompliable/Scoping.html +1 -1
  27. data/docs/JsonapiCompliable/Scoping/Base.html +1 -1
  28. data/docs/JsonapiCompliable/Scoping/DefaultFilter.html +1 -1
  29. data/docs/JsonapiCompliable/Scoping/ExtraFields.html +1 -1
  30. data/docs/JsonapiCompliable/Scoping/Filter.html +1 -1
  31. data/docs/JsonapiCompliable/Scoping/Filterable.html +1 -1
  32. data/docs/JsonapiCompliable/Scoping/Paginate.html +1 -1
  33. data/docs/JsonapiCompliable/Scoping/Sort.html +1 -1
  34. data/docs/JsonapiCompliable/SerializableTempId.html +1 -1
  35. data/docs/JsonapiCompliable/Sideload.html +28 -26
  36. data/docs/JsonapiCompliable/Stats.html +1 -1
  37. data/docs/JsonapiCompliable/Stats/DSL.html +1 -1
  38. data/docs/JsonapiCompliable/Stats/Payload.html +1 -1
  39. data/docs/JsonapiCompliable/Util.html +1 -1
  40. data/docs/JsonapiCompliable/Util/FieldParams.html +1 -1
  41. data/docs/JsonapiCompliable/Util/Hash.html +1 -1
  42. data/docs/JsonapiCompliable/Util/IncludeParams.html +1 -1
  43. data/docs/JsonapiCompliable/Util/Persistence.html +1 -1
  44. data/docs/JsonapiCompliable/Util/RelationshipPayload.html +1 -1
  45. data/docs/JsonapiCompliable/Util/RenderOptions.html +1 -1
  46. data/docs/JsonapiCompliable/Util/ValidationResponse.html +1 -1
  47. data/docs/_index.html +1 -1
  48. data/docs/file.README.html +1 -1
  49. data/docs/index.html +1 -1
  50. data/docs/method_list.html +2 -2
  51. data/docs/top-level-namespace.html +1 -1
  52. data/lib/jsonapi_compliable/sideload.rb +11 -10
  53. data/lib/jsonapi_compliable/version.rb +1 -1
  54. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cd350205232651cd443c93c7132eae74fd0ef8a
4
- data.tar.gz: d21cba71a88f65a67ded935e60579519a1f65d7d
3
+ metadata.gz: c9dd72c00d3d5d34b9e9fcb08d50f2de080fa946
4
+ data.tar.gz: 400b4efaee1e97539071b4a3d012c82cdaeb1ea9
5
5
  SHA512:
6
- metadata.gz: 22b19b78097fb3e93363f0508e4533a31cf1c81a6595ab14aeb66edf17ccbc83dd7cc3746b75589dc5c171a30c942d8d1be824cdf936926dd431a7d91ac5de92
7
- data.tar.gz: 49b7f6ff42cb6f9072bfb96cac20c33f89df900055d0943327d92e36f5635f222309036730ec61a01baadff71dc0f5662828c8057b4482fa325095f9d0fa86ed
6
+ metadata.gz: 7cedb5c66e07b42a8fe61339a3e70d777b4a1e881f0b7af09a2d0828c3f13aba1bb557e5bd4d40f5cfaab22b37951e4681dab989ecb3b04cc9bffb2ec2417e83
7
+ data.tar.gz: b448f3a7cf6d67e6219ec5f8edfe73f69195bfe1da280686fe4481d02d246cd4f83f001a2e81e4e8164e7e5e663250a97beb10bd6f260263f81468056c71223a
data/docs/Jsonapi.html CHANGED
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Thu Sep 28 17:28:10 2017 by
108
+ Generated on Mon Oct 2 09:38:50 2017 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.9 (ruby-2.3.0).
111
111
  </div>
@@ -205,7 +205,7 @@
205
205
  </div>
206
206
 
207
207
  <div id="footer">
208
- Generated on Thu Sep 28 17:28:11 2017 by
208
+ Generated on Mon Oct 2 09:38:51 2017 by
209
209
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
210
210
  0.9.9 (ruby-2.3.0).
211
211
  </div>
@@ -399,7 +399,7 @@
399
399
  </div>
400
400
 
401
401
  <div id="footer">
402
- Generated on Thu Sep 28 17:28:09 2017 by
402
+ Generated on Mon Oct 2 09:38:49 2017 by
403
403
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
404
404
  0.9.9 (ruby-2.3.0).
405
405
  </div>
@@ -109,7 +109,7 @@
109
109
  </div>
110
110
 
111
111
  <div id="footer">
112
- Generated on Thu Sep 28 17:28:10 2017 by
112
+ Generated on Mon Oct 2 09:38:50 2017 by
113
113
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
114
  0.9.9 (ruby-2.3.0).
115
115
  </div>
@@ -2451,7 +2451,7 @@ This method should roll back the transaction if an error is raised.</p>
2451
2451
  </div>
2452
2452
 
2453
2453
  <div id="footer">
2454
- Generated on Thu Sep 28 17:28:11 2017 by
2454
+ Generated on Mon Oct 2 09:38:51 2017 by
2455
2455
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2456
2456
  0.9.9 (ruby-2.3.0).
2457
2457
  </div>
@@ -2233,7 +2233,7 @@ Sideload#allow_sideload</p>
2233
2233
  </div>
2234
2234
 
2235
2235
  <div id="footer">
2236
- Generated on Thu Sep 28 17:28:11 2017 by
2236
+ Generated on Mon Oct 2 09:38:52 2017 by
2237
2237
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2238
2238
  0.9.9 (ruby-2.3.0).
2239
2239
  </div>
@@ -572,7 +572,7 @@
572
572
  </div>
573
573
 
574
574
  <div id="footer">
575
- Generated on Thu Sep 28 17:28:10 2017 by
575
+ Generated on Mon Oct 2 09:38:50 2017 by
576
576
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
577
577
  0.9.9 (ruby-2.3.0).
578
578
  </div>
@@ -1672,7 +1672,7 @@ an HTTP call, etc.</p>
1672
1672
  </div>
1673
1673
 
1674
1674
  <div id="footer">
1675
- Generated on Thu Sep 28 17:28:11 2017 by
1675
+ Generated on Mon Oct 2 09:38:51 2017 by
1676
1676
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1677
1677
  0.9.9 (ruby-2.3.0).
1678
1678
  </div>
@@ -1381,7 +1381,7 @@ Helpful for easy-access to things like the current user.</p>
1381
1381
  </div>
1382
1382
 
1383
1383
  <div id="footer">
1384
- Generated on Thu Sep 28 17:28:10 2017 by
1384
+ Generated on Mon Oct 2 09:38:50 2017 by
1385
1385
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1386
1386
  0.9.9 (ruby-2.3.0).
1387
1387
  </div>
@@ -892,7 +892,7 @@ create/update/destroy/disassociate. Based on the request env or the
892
892
  </div>
893
893
 
894
894
  <div id="footer">
895
- Generated on Thu Sep 28 17:28:11 2017 by
895
+ Generated on Mon Oct 2 09:38:51 2017 by
896
896
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
897
897
  0.9.9 (ruby-2.3.0).
898
898
  </div>
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Thu Sep 28 17:28:10 2017 by
108
+ Generated on Mon Oct 2 09:38:50 2017 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.9 (ruby-2.3.0).
111
111
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Thu Sep 28 17:28:10 2017 by
117
+ Generated on Mon Oct 2 09:38:50 2017 by
118
118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.9 (ruby-2.3.0).
120
120
  </div>
@@ -256,7 +256,7 @@
256
256
  </div>
257
257
 
258
258
  <div id="footer">
259
- Generated on Thu Sep 28 17:28:10 2017 by
259
+ Generated on Mon Oct 2 09:38:50 2017 by
260
260
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
261
261
  0.9.9 (ruby-2.3.0).
262
262
  </div>
@@ -254,7 +254,7 @@
254
254
  </div>
255
255
 
256
256
  <div id="footer">
257
- Generated on Thu Sep 28 17:28:10 2017 by
257
+ Generated on Mon Oct 2 09:38:50 2017 by
258
258
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
259
259
  0.9.9 (ruby-2.3.0).
260
260
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Thu Sep 28 17:28:10 2017 by
117
+ Generated on Mon Oct 2 09:38:50 2017 by
118
118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.9 (ruby-2.3.0).
120
120
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu Sep 28 17:28:10 2017 by
110
+ Generated on Mon Oct 2 09:38:50 2017 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.9 (ruby-2.3.0).
113
113
  </div>
@@ -202,7 +202,7 @@
202
202
  </div>
203
203
 
204
204
  <div id="footer">
205
- Generated on Thu Sep 28 17:28:10 2017 by
205
+ Generated on Mon Oct 2 09:38:50 2017 by
206
206
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
207
207
  0.9.9 (ruby-2.3.0).
208
208
  </div>
@@ -219,7 +219,7 @@
219
219
  </div>
220
220
 
221
221
  <div id="footer">
222
- Generated on Thu Sep 28 17:28:10 2017 by
222
+ Generated on Mon Oct 2 09:38:50 2017 by
223
223
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
224
224
  0.9.9 (ruby-2.3.0).
225
225
  </div>
@@ -232,7 +232,7 @@ extra attribute. See (Resource.extra_field).</p>
232
232
  </div>
233
233
 
234
234
  <div id="footer">
235
- Generated on Thu Sep 28 17:28:10 2017 by
235
+ Generated on Mon Oct 2 09:38:50 2017 by
236
236
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
237
237
  0.9.9 (ruby-2.3.0).
238
238
  </div>
@@ -227,7 +227,7 @@
227
227
  </div>
228
228
 
229
229
  <div id="footer">
230
- Generated on Thu Sep 28 17:28:10 2017 by
230
+ Generated on Mon Oct 2 09:38:50 2017 by
231
231
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
232
232
  0.9.9 (ruby-2.3.0).
233
233
  </div>
@@ -1091,7 +1091,7 @@ get, say, the total count without the overhead of fetching actual records.</p>
1091
1091
  </div>
1092
1092
 
1093
1093
  <div id="footer">
1094
- Generated on Thu Sep 28 17:28:10 2017 by
1094
+ Generated on Mon Oct 2 09:38:50 2017 by
1095
1095
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1096
1096
  0.9.9 (ruby-2.3.0).
1097
1097
  </div>
@@ -201,7 +201,7 @@
201
201
  </div>
202
202
 
203
203
  <div id="footer">
204
- Generated on Thu Sep 28 17:28:10 2017 by
204
+ Generated on Mon Oct 2 09:38:50 2017 by
205
205
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
206
206
  0.9.9 (ruby-2.3.0).
207
207
  </div>
@@ -5474,7 +5474,7 @@ Rails controller context</p>
5474
5474
  </div>
5475
5475
 
5476
5476
  <div id="footer">
5477
- Generated on Thu Sep 28 17:28:10 2017 by
5477
+ Generated on Mon Oct 2 09:38:50 2017 by
5478
5478
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
5479
5479
  0.9.9 (ruby-2.3.0).
5480
5480
  </div>
@@ -693,7 +693,7 @@ sideload</p>
693
693
  </div>
694
694
 
695
695
  <div id="footer">
696
- Generated on Thu Sep 28 17:28:10 2017 by
696
+ Generated on Mon Oct 2 09:38:50 2017 by
697
697
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
698
698
  0.9.9 (ruby-2.3.0).
699
699
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu Sep 28 17:28:10 2017 by
110
+ Generated on Mon Oct 2 09:38:50 2017 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.9 (ruby-2.3.0).
113
113
  </div>
@@ -833,7 +833,7 @@ a default in certain contexts.</p>
833
833
  </div>
834
834
 
835
835
  <div id="footer">
836
- Generated on Thu Sep 28 17:28:11 2017 by
836
+ Generated on Mon Oct 2 09:38:51 2017 by
837
837
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
838
838
  0.9.9 (ruby-2.3.0).
839
839
  </div>
@@ -308,7 +308,7 @@ filter, and apply the default proc unless an explicit override is requested</p>
308
308
  </div>
309
309
 
310
310
  <div id="footer">
311
- Generated on Thu Sep 28 17:28:11 2017 by
311
+ Generated on Mon Oct 2 09:38:52 2017 by
312
312
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
313
313
  0.9.9 (ruby-2.3.0).
314
314
  </div>
@@ -291,7 +291,7 @@ for that field, run it. Otherwise, do nothing.</p>
291
291
  </div>
292
292
 
293
293
  <div id="footer">
294
- Generated on Thu Sep 28 17:28:11 2017 by
294
+ Generated on Mon Oct 2 09:38:51 2017 by
295
295
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
296
296
  0.9.9 (ruby-2.3.0).
297
297
  </div>
@@ -303,7 +303,7 @@ aliases. If valid, call either the default or custom filtering logic.</p>
303
303
  </div>
304
304
 
305
305
  <div id="footer">
306
- Generated on Thu Sep 28 17:28:11 2017 by
306
+ Generated on Mon Oct 2 09:38:51 2017 by
307
307
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
308
308
  0.9.9 (ruby-2.3.0).
309
309
  </div>
@@ -354,7 +354,7 @@
354
354
  </div>
355
355
 
356
356
  <div id="footer">
357
- Generated on Thu Sep 28 17:28:10 2017 by
357
+ Generated on Mon Oct 2 09:38:50 2017 by
358
358
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
359
359
  0.9.9 (ruby-2.3.0).
360
360
  </div>
@@ -603,7 +603,7 @@ explicitly specified in the request.</p>
603
603
  </div>
604
604
 
605
605
  <div id="footer">
606
- Generated on Thu Sep 28 17:28:11 2017 by
606
+ Generated on Mon Oct 2 09:38:51 2017 by
607
607
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
608
608
  0.9.9 (ruby-2.3.0).
609
609
  </div>
@@ -444,7 +444,7 @@ proc:</p>
444
444
  </div>
445
445
 
446
446
  <div id="footer">
447
- Generated on Thu Sep 28 17:28:11 2017 by
447
+ Generated on Mon Oct 2 09:38:51 2017 by
448
448
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
449
449
  0.9.9 (ruby-2.3.0).
450
450
  </div>
@@ -206,7 +206,7 @@ reference it directly.</p>
206
206
  </div>
207
207
 
208
208
  <div id="footer">
209
- Generated on Thu Sep 28 17:28:10 2017 by
209
+ Generated on Mon Oct 2 09:38:50 2017 by
210
210
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
211
211
  0.9.9 (ruby-2.3.0).
212
212
  </div>
@@ -482,7 +482,7 @@ key.</p>
482
482
  <li class="public ">
483
483
  <span class="summary_signature">
484
484
 
485
- <a href="#max_depth-class_method" title="max_depth (class method)">.<strong>max_depth</strong> &#x21d2; Object </a>
485
+ <a href="#max_recursion-class_method" title="max_recursion (class method)">.<strong>max_recursion</strong> &#x21d2; Object </a>
486
486
 
487
487
 
488
488
 
@@ -504,7 +504,7 @@ key.</p>
504
504
  <li class="public ">
505
505
  <span class="summary_signature">
506
506
 
507
- <a href="#max_depth=-class_method" title="max_depth= (class method)">.<strong>max_depth=</strong>(val) &#x21d2; Object </a>
507
+ <a href="#max_recursion=-class_method" title="max_recursion= (class method)">.<strong>max_recursion=</strong>(val) &#x21d2; Object </a>
508
508
 
509
509
 
510
510
 
@@ -921,7 +921,7 @@ will be further chained with filtering/sorting/etc.</p>
921
921
  <li class="public ">
922
922
  <span class="summary_signature">
923
923
 
924
- <a href="#to_hash-instance_method" title="#to_hash (instance method)">#<strong>to_hash</strong>(depth_chain = [], parent = nil) &#x21d2; Hash </a>
924
+ <a href="#to_hash-instance_method" title="#to_hash (instance method)">#<strong>to_hash</strong>(recursion_chain = [], parent = nil) &#x21d2; Hash </a>
925
925
 
926
926
 
927
927
 
@@ -1749,9 +1749,9 @@ key.</p>
1749
1749
 
1750
1750
 
1751
1751
  <div class="method_details first">
1752
- <h3 class="signature first" id="max_depth-class_method">
1752
+ <h3 class="signature first" id="max_recursion-class_method">
1753
1753
 
1754
- .<strong>max_depth</strong> &#x21d2; <tt>Object</tt>
1754
+ .<strong>max_recursion</strong> &#x21d2; <tt>Object</tt>
1755
1755
 
1756
1756
 
1757
1757
 
@@ -1783,8 +1783,8 @@ key.</p>
1783
1783
  <td>
1784
1784
  <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 47</span>
1785
1785
 
1786
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max_depth'>max_depth</span>
1787
- <span class='ivar'>@max_depth</span> <span class='op'>||</span> <span class='int'>2</span>
1786
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max_recursion'>max_recursion</span>
1787
+ <span class='ivar'>@max_recursion</span> <span class='op'>||</span> <span class='int'>2</span>
1788
1788
  <span class='kw'>end</span></pre>
1789
1789
  </td>
1790
1790
  </tr>
@@ -1792,9 +1792,9 @@ key.</p>
1792
1792
  </div>
1793
1793
 
1794
1794
  <div class="method_details ">
1795
- <h3 class="signature " id="max_depth=-class_method">
1795
+ <h3 class="signature " id="max_recursion=-class_method">
1796
1796
 
1797
- .<strong>max_depth=</strong>(val) &#x21d2; <tt>Object</tt>
1797
+ .<strong>max_recursion=</strong>(val) &#x21d2; <tt>Object</tt>
1798
1798
 
1799
1799
 
1800
1800
 
@@ -1807,7 +1807,7 @@ key.</p>
1807
1807
  one level /authors?comments.authors.comments.authors would be two levels
1808
1808
  etc</p>
1809
1809
 
1810
- <p>Default max depth is 2</p>
1810
+ <p>Default max recursion is 2</p>
1811
1811
 
1812
1812
 
1813
1813
  </div>
@@ -1828,8 +1828,8 @@ etc</p>
1828
1828
  <td>
1829
1829
  <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 57</span>
1830
1830
 
1831
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max_depth='>max_depth=</span><span class='lparen'>(</span><span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
1832
- <span class='ivar'>@max_depth</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span>
1831
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max_recursion='>max_recursion=</span><span class='lparen'>(</span><span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
1832
+ <span class='ivar'>@max_recursion</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span>
1833
1833
  <span class='kw'>end</span></pre>
1834
1834
  </td>
1835
1835
  </tr>
@@ -2369,17 +2369,17 @@ in your resource directly.</p>
2369
2369
  <pre class="lines">
2370
2370
 
2371
2371
 
2372
- 408
2373
2372
  409
2374
2373
  410
2375
2374
  411
2376
2375
  412
2377
2376
  413
2378
2377
  414
2379
- 415</pre>
2378
+ 415
2379
+ 416</pre>
2380
2380
  </td>
2381
2381
  <td>
2382
- <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 408</span>
2382
+ <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 409</span>
2383
2383
 
2384
2384
  <span class='kw'>def</span> <span class='id identifier rubyid_fire_hooks!'>fire_hooks!</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='comma'>,</span> <span class='id identifier rubyid_objects'>objects</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
2385
2385
  <span class='kw'>return</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hooks'>hooks</span>
@@ -2657,14 +2657,14 @@ ActiveRecord:</p>
2657
2657
  <pre class="lines">
2658
2658
 
2659
2659
 
2660
- 402
2661
2660
  403
2662
2661
  404
2663
2662
  405
2664
- 406</pre>
2663
+ 406
2664
+ 407</pre>
2665
2665
  </td>
2666
2666
  <td>
2667
- <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 402</span>
2667
+ <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 403</span>
2668
2668
 
2669
2669
  <span class='kw'>def</span> <span class='id identifier rubyid_polymorphic_child_for_type'>polymorphic_child_for_type</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
2670
2670
  <span class='id identifier rubyid_polymorphic_groups'>polymorphic_groups</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
@@ -3082,7 +3082,7 @@ in your resource directly.</p>
3082
3082
  <div class="method_details ">
3083
3083
  <h3 class="signature " id="to_hash-instance_method">
3084
3084
 
3085
- #<strong>to_hash</strong>(depth_chain = [], parent = nil) &#x21d2; <tt>Hash</tt>
3085
+ #<strong>to_hash</strong>(recursion_chain = [], parent = nil) &#x21d2; <tt>Hash</tt>
3086
3086
 
3087
3087
 
3088
3088
 
@@ -3162,22 +3162,24 @@ corresponding Resources, and returns an Include Directive hash</p>
3162
3162
  396
3163
3163
  397
3164
3164
  398
3165
- 399</pre>
3165
+ 399
3166
+ 400</pre>
3166
3167
  </td>
3167
3168
  <td>
3168
3169
  <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/sideload.rb', line 385</span>
3169
3170
 
3170
- <span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_depth_chain'>depth_chain</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
3171
- <span class='id identifier rubyid_depth'>depth</span> <span class='op'>=</span> <span class='id identifier rubyid_depth_chain'>depth_chain</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_arr'>arr</span><span class='op'>|</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>==</span> <span class='lbracket'>[</span><span class='id identifier rubyid_parent'>parent</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
3172
- <span class='kw'>return</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_depth'>depth</span> <span class='op'>&gt;=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_max_depth'>max_depth</span>
3171
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_recursion_chain'>recursion_chain</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
3172
+ <span class='id identifier rubyid_recursing'>recursing</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_arr'>arr</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>==</span> <span class='lbracket'>[</span><span class='id identifier rubyid_parent'>parent</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
3173
+ <span class='id identifier rubyid_recursions'>recursions</span> <span class='op'>=</span> <span class='id identifier rubyid_recursion_chain'>recursion_chain</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_recursing'>recursing</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
3174
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_recursions'>recursions</span> <span class='op'>&gt;=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_max_recursion'>max_recursion</span>
3173
3175
 
3174
3176
  <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_parent'>parent</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='symbol'>:base</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='symbol'>:base</span>
3175
- <span class='id identifier rubyid_depth_chain'>depth_chain</span> <span class='op'>+=</span> <span class='lbracket'>[</span><span class='lbracket'>[</span><span class='id identifier rubyid_parent'>parent</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
3177
+ <span class='id identifier rubyid_recursion_chain'>recursion_chain</span> <span class='op'>+=</span> <span class='lbracket'>[</span><span class='lbracket'>[</span><span class='id identifier rubyid_parent'>parent</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
3176
3178
  <span class='kw'>end</span>
3177
3179
 
3178
3180
  <span class='lbrace'>{</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=&gt;</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_hash'>hash</span><span class='op'>|</span>
3179
3181
  <span class='id identifier rubyid_all_sideloads'>all_sideloads</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_sl'>sl</span><span class='op'>|</span>
3180
- <span class='id identifier rubyid_sideload_hash'>sideload_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_sl'>sl</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_depth_chain'>depth_chain</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span>
3182
+ <span class='id identifier rubyid_sideload_hash'>sideload_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_sl'>sl</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_recursion_chain'>recursion_chain</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span>
3181
3183
  <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_sideload_hash'>sideload_hash</span><span class='rparen'>)</span>
3182
3184
  <span class='kw'>end</span>
3183
3185
  <span class='kw'>end</span>
@@ -3192,7 +3194,7 @@ corresponding Resources, and returns an Include Directive hash</p>
3192
3194
  </div>
3193
3195
 
3194
3196
  <div id="footer">
3195
- Generated on Thu Sep 28 17:28:11 2017 by
3197
+ Generated on Mon Oct 2 09:38:51 2017 by
3196
3198
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
3197
3199
  0.9.9 (ruby-2.3.0).
3198
3200
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu Sep 28 17:28:10 2017 by
110
+ Generated on Mon Oct 2 09:38:50 2017 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.9 (ruby-2.3.0).
113
113
  </div>
@@ -989,7 +989,7 @@ configured.</p>
989
989
  </div>
990
990
 
991
991
  <div id="footer">
992
- Generated on Thu Sep 28 17:28:11 2017 by
992
+ Generated on Mon Oct 2 09:38:51 2017 by
993
993
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
994
994
  0.9.9 (ruby-2.3.0).
995
995
  </div>
@@ -381,7 +381,7 @@ results.</p>
381
381
  </div>
382
382
 
383
383
  <div id="footer">
384
- Generated on Thu Sep 28 17:28:11 2017 by
384
+ Generated on Mon Oct 2 09:38:51 2017 by
385
385
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
386
386
  0.9.9 (ruby-2.3.0).
387
387
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu Sep 28 17:28:10 2017 by
110
+ Generated on Mon Oct 2 09:38:50 2017 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.9 (ruby-2.3.0).
113
113
  </div>
@@ -218,7 +218,7 @@
218
218
  </div>
219
219
 
220
220
  <div id="footer">
221
- Generated on Thu Sep 28 17:28:11 2017 by
221
+ Generated on Mon Oct 2 09:38:51 2017 by
222
222
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
223
223
  0.9.9 (ruby-2.3.0).
224
224
  </div>
@@ -461,7 +461,7 @@
461
461
  </div>
462
462
 
463
463
  <div id="footer">
464
- Generated on Thu Sep 28 17:28:11 2017 by
464
+ Generated on Mon Oct 2 09:38:51 2017 by
465
465
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
466
466
  0.9.9 (ruby-2.3.0).
467
467
  </div>
@@ -289,7 +289,7 @@
289
289
  </div>
290
290
 
291
291
  <div id="footer">
292
- Generated on Thu Sep 28 17:28:11 2017 by
292
+ Generated on Mon Oct 2 09:38:51 2017 by
293
293
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
294
294
  0.9.9 (ruby-2.3.0).
295
295
  </div>
@@ -435,7 +435,7 @@ know the primary key value of the parent before persisting the child.</p>
435
435
  </div>
436
436
 
437
437
  <div id="footer">
438
- Generated on Thu Sep 28 17:28:11 2017 by
438
+ Generated on Mon Oct 2 09:38:51 2017 by
439
439
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
440
440
  0.9.9 (ruby-2.3.0).
441
441
  </div>
@@ -553,7 +553,7 @@
553
553
  </div>
554
554
 
555
555
  <div id="footer">
556
- Generated on Thu Sep 28 17:28:12 2017 by
556
+ Generated on Mon Oct 2 09:38:52 2017 by
557
557
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
558
558
  0.9.9 (ruby-2.3.0).
559
559
  </div>
@@ -240,7 +240,7 @@
240
240
  </div>
241
241
 
242
242
  <div id="footer">
243
- Generated on Thu Sep 28 17:28:11 2017 by
243
+ Generated on Mon Oct 2 09:38:51 2017 by
244
244
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
245
245
  0.9.9 (ruby-2.3.0).
246
246
  </div>
@@ -522,7 +522,7 @@ errors.</p>
522
522
  </div>
523
523
 
524
524
  <div id="footer">
525
- Generated on Thu Sep 28 17:28:11 2017 by
525
+ Generated on Mon Oct 2 09:38:52 2017 by
526
526
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
527
527
  0.9.9 (ruby-2.3.0).
528
528
  </div>
data/docs/_index.html CHANGED
@@ -529,7 +529,7 @@
529
529
  </div>
530
530
 
531
531
  <div id="footer">
532
- Generated on Thu Sep 28 17:28:09 2017 by
532
+ Generated on Mon Oct 2 09:38:49 2017 by
533
533
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
534
534
  0.9.9 (ruby-2.3.0).
535
535
  </div>
@@ -88,7 +88,7 @@ $ yard server
88
88
  </div></div>
89
89
 
90
90
  <div id="footer">
91
- Generated on Thu Sep 28 17:28:09 2017 by
91
+ Generated on Mon Oct 2 09:38:49 2017 by
92
92
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
93
93
  0.9.9 (ruby-2.3.0).
94
94
  </div>
data/docs/index.html CHANGED
@@ -88,7 +88,7 @@ $ yard server
88
88
  </div></div>
89
89
 
90
90
  <div id="footer">
91
- Generated on Thu Sep 28 17:28:09 2017 by
91
+ Generated on Mon Oct 2 09:38:49 2017 by
92
92
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
93
93
  0.9.9 (ruby-2.3.0).
94
94
  </div>
@@ -1094,7 +1094,7 @@
1094
1094
 
1095
1095
  <li class="even ">
1096
1096
  <div class="item">
1097
- <span class='object_link'><a href="JsonapiCompliable/Sideload.html#max_depth-class_method" title="JsonapiCompliable::Sideload.max_depth (method)">max_depth</a></span>
1097
+ <span class='object_link'><a href="JsonapiCompliable/Sideload.html#max_recursion-class_method" title="JsonapiCompliable::Sideload.max_recursion (method)">max_recursion</a></span>
1098
1098
  <small>JsonapiCompliable::Sideload</small>
1099
1099
  </div>
1100
1100
  </li>
@@ -1102,7 +1102,7 @@
1102
1102
 
1103
1103
  <li class="odd ">
1104
1104
  <div class="item">
1105
- <span class='object_link'><a href="JsonapiCompliable/Sideload.html#max_depth=-class_method" title="JsonapiCompliable::Sideload.max_depth= (method)">max_depth=</a></span>
1105
+ <span class='object_link'><a href="JsonapiCompliable/Sideload.html#max_recursion=-class_method" title="JsonapiCompliable::Sideload.max_recursion= (method)">max_recursion=</a></span>
1106
1106
  <small>JsonapiCompliable::Sideload</small>
1107
1107
  </div>
1108
1108
  </li>
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Thu Sep 28 17:28:09 2017 by
103
+ Generated on Mon Oct 2 09:38:49 2017 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
105
  0.9.9 (ruby-2.3.0).
106
106
  </div>
@@ -44,8 +44,8 @@ module JsonapiCompliable
44
44
  end
45
45
 
46
46
  # @api private
47
- def self.max_depth
48
- @max_depth || 2
47
+ def self.max_recursion
48
+ @max_recursion || 2
49
49
  end
50
50
 
51
51
  # Set maximum levels of sideload recursion
@@ -53,9 +53,9 @@ module JsonapiCompliable
53
53
  # /authors?comments.authors.comments.authors would be two levels
54
54
  # etc
55
55
  #
56
- # Default max depth is 2
57
- def self.max_depth=(val)
58
- @max_depth = val
56
+ # Default max recursion is 2
57
+ def self.max_recursion=(val)
58
+ @max_recursion = val
59
59
  end
60
60
 
61
61
  # @see #resource_class
@@ -382,17 +382,18 @@ module JsonapiCompliable
382
382
  #
383
383
  # @return [Hash] The nested include hash
384
384
  # @api private
385
- def to_hash(depth_chain = [], parent = nil)
386
- depth = depth_chain.select { |arr| arr == [parent, self] }.length
387
- return {} if depth >= self.class.max_depth
385
+ def to_hash(recursion_chain = [], parent = nil)
386
+ recursing = ->(arr) { arr == [parent.object_id, self.object_id] }
387
+ recursions = recursion_chain.select(&recursing).length
388
+ return {} if recursions >= self.class.max_recursion
388
389
 
389
390
  unless (parent && parent.name == :base) || name == :base
390
- depth_chain += [[parent, self]]
391
+ recursion_chain += [[parent.object_id, self.object_id]]
391
392
  end
392
393
 
393
394
  { name => {} }.tap do |hash|
394
395
  all_sideloads.each_pair do |key, sl|
395
- sideload_hash = sl.to_hash(depth_chain, self)
396
+ sideload_hash = sl.to_hash(recursion_chain, self)
396
397
  hash[name].merge!(sideload_hash)
397
398
  end
398
399
  end
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-09-29 00:00:00.000000000 Z
12
+ date: 2017-10-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jsonapi-serializable
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  requirements: []
267
267
  rubyforge_project:
268
- rubygems_version: 2.6.13
268
+ rubygems_version: 2.6.11
269
269
  signing_key:
270
270
  specification_version: 4
271
271
  summary: Easily build jsonapi.org-compatible APIs