jsonapi_compliable 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/docs/Jsonapi/ResourceGenerator.html +1 -1
  3. data/docs/Jsonapi.html +1 -1
  4. data/docs/JsonapiCompliable/Adapters/Abstract.html +1 -1
  5. data/docs/JsonapiCompliable/Adapters/ActiveRecord.html +1 -1
  6. data/docs/JsonapiCompliable/Adapters/ActiveRecordSideloading.html +1 -1
  7. data/docs/JsonapiCompliable/Adapters/Null.html +1 -1
  8. data/docs/JsonapiCompliable/Adapters.html +1 -1
  9. data/docs/JsonapiCompliable/Base.html +389 -62
  10. data/docs/JsonapiCompliable/Deserializer.html +1 -1
  11. data/docs/JsonapiCompliable/Errors/BadFilter.html +1 -1
  12. data/docs/JsonapiCompliable/Errors/StatNotFound.html +1 -1
  13. data/docs/JsonapiCompliable/Errors/UnsupportedPageSize.html +1 -1
  14. data/docs/JsonapiCompliable/Errors/ValidationError.html +1 -1
  15. data/docs/JsonapiCompliable/Errors.html +1 -1
  16. data/docs/JsonapiCompliable/Extensions/BooleanAttribute/ClassMethods.html +1 -1
  17. data/docs/JsonapiCompliable/Extensions/BooleanAttribute.html +1 -1
  18. data/docs/JsonapiCompliable/Extensions/ExtraAttribute/ClassMethods.html +1 -1
  19. data/docs/JsonapiCompliable/Extensions/ExtraAttribute.html +1 -1
  20. data/docs/JsonapiCompliable/Extensions.html +1 -1
  21. data/docs/JsonapiCompliable/Query.html +27 -21
  22. data/docs/JsonapiCompliable/Rails.html +1 -1
  23. data/docs/JsonapiCompliable/Resource.html +189 -572
  24. data/docs/JsonapiCompliable/Scope.html +1 -1
  25. data/docs/JsonapiCompliable/Scoping/Base.html +1 -1
  26. data/docs/JsonapiCompliable/Scoping/DefaultFilter.html +1 -1
  27. data/docs/JsonapiCompliable/Scoping/ExtraFields.html +1 -1
  28. data/docs/JsonapiCompliable/Scoping/Filter.html +1 -1
  29. data/docs/JsonapiCompliable/Scoping/Filterable.html +1 -1
  30. data/docs/JsonapiCompliable/Scoping/Paginate.html +1 -1
  31. data/docs/JsonapiCompliable/Scoping/Sort.html +1 -1
  32. data/docs/JsonapiCompliable/Scoping.html +1 -1
  33. data/docs/JsonapiCompliable/SerializableTempId.html +1 -1
  34. data/docs/JsonapiCompliable/Sideload.html +164 -384
  35. data/docs/JsonapiCompliable/Stats/DSL.html +1 -1
  36. data/docs/JsonapiCompliable/Stats/Payload.html +1 -1
  37. data/docs/JsonapiCompliable/Stats.html +1 -1
  38. data/docs/JsonapiCompliable/Util/FieldParams.html +1 -1
  39. data/docs/JsonapiCompliable/Util/Hash.html +1 -1
  40. data/docs/JsonapiCompliable/Util/IncludeParams.html +1 -1
  41. data/docs/JsonapiCompliable/Util/Persistence.html +1 -1
  42. data/docs/JsonapiCompliable/Util/RelationshipPayload.html +1 -1
  43. data/docs/JsonapiCompliable/Util/RenderOptions.html +1 -1
  44. data/docs/JsonapiCompliable/Util/ValidationResponse.html +1 -1
  45. data/docs/JsonapiCompliable/Util.html +1 -1
  46. data/docs/JsonapiCompliable.html +2 -2
  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 +191 -215
  51. data/docs/top-level-namespace.html +1 -1
  52. data/lib/jsonapi_compliable/base.rb +43 -1
  53. data/lib/jsonapi_compliable/query.rb +8 -5
  54. data/lib/jsonapi_compliable/resource.rb +2 -90
  55. data/lib/jsonapi_compliable/scope.rb +2 -4
  56. data/lib/jsonapi_compliable/sideload.rb +7 -59
  57. data/lib/jsonapi_compliable/version.rb +1 -1
  58. metadata +2 -2
@@ -219,7 +219,7 @@
219
219
  </div>
220
220
 
221
221
  <div id="footer">
222
- Generated on Mon Oct 2 09:38:50 2017 by
222
+ Generated on Tue Oct 3 09:22:25 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>
@@ -202,7 +202,7 @@
202
202
  </div>
203
203
 
204
204
  <div id="footer">
205
- Generated on Mon Oct 2 09:38:50 2017 by
205
+ Generated on Tue Oct 3 09:22:25 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>
@@ -227,7 +227,7 @@
227
227
  </div>
228
228
 
229
229
  <div id="footer">
230
- Generated on Mon Oct 2 09:38:50 2017 by
230
+ Generated on Tue Oct 3 09:22:25 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>
@@ -232,7 +232,7 @@ extra attribute. See (Resource.extra_field).</p>
232
232
  </div>
233
233
 
234
234
  <div id="footer">
235
- Generated on Mon Oct 2 09:38:50 2017 by
235
+ Generated on Tue Oct 3 09:22:25 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>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Mon Oct 2 09:38:50 2017 by
110
+ Generated on Tue Oct 3 09:22:25 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>
@@ -651,12 +651,12 @@ get, say, the total count without the overhead of fetching actual records.</p>
651
651
  <pre class="lines">
652
652
 
653
653
 
654
- 72
655
- 73
656
- 74</pre>
654
+ 75
655
+ 76
656
+ 77</pre>
657
657
  </td>
658
658
  <td>
659
- <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 72</span>
659
+ <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 75</span>
660
660
 
661
661
  <span class='kw'>def</span> <span class='id identifier rubyid_association_names'>association_names</span>
662
662
  <span class='ivar'>@association_names</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="Util.html" title="JsonapiCompliable::Util (module)">Util</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Util/Hash.html" title="JsonapiCompliable::Util::Hash (class)">Hash</a></span></span><span class='period'>.</span><span class='id identifier rubyid_keys'><span class='object_link'><a href="Util/Hash.html#keys-class_method" title="JsonapiCompliable::Util::Hash.keys (method)">keys</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_include_hash'>include_hash</span><span class='rparen'>)</span>
@@ -798,19 +798,25 @@ get, say, the total count without the overhead of fetching actual records.</p>
798
798
  56
799
799
  57
800
800
  58
801
- 59</pre>
801
+ 59
802
+ 60
803
+ 61
804
+ 62</pre>
802
805
  </td>
803
806
  <td>
804
807
  <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 50</span>
805
808
 
806
809
  <span class='kw'>def</span> <span class='id identifier rubyid_include_hash'>include_hash</span>
807
810
  <span class='ivar'>@include_hash</span> <span class='op'>||=</span> <span class='kw'>begin</span>
808
- <span class='id identifier rubyid_requested'>requested</span> <span class='op'>=</span> <span class='id identifier rubyid_include_directive'>include_directive</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span>
809
- <span class='id identifier rubyid_all_allowed'>all_allowed</span> <span class='op'>=</span> <span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_sideloading'>sideloading</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span><span class='lbracket'>[</span><span class='symbol'>:base</span><span class='rbracket'>]</span>
810
- <span class='id identifier rubyid_whitelist'>whitelist</span> <span class='op'>=</span> <span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_sideload_whitelist'>sideload_whitelist</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lparen'>(</span><span class='symbol'>:merge</span><span class='rparen'>)</span>
811
- <span class='id identifier rubyid_allowed'>allowed</span> <span class='op'>=</span> <span class='id identifier rubyid_whitelist'>whitelist</span> <span class='op'>?</span> <span class='const'><span class='object_link'><a href="Util.html" title="JsonapiCompliable::Util (module)">Util</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Util/IncludeParams.html" title="JsonapiCompliable::Util::IncludeParams (class)">IncludeParams</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scrub'><span class='object_link'><a href="Util/IncludeParams.html#scrub-class_method" title="JsonapiCompliable::Util::IncludeParams.scrub (method)">scrub</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_all_allowed'>all_allowed</span><span class='comma'>,</span> <span class='id identifier rubyid_whitelist'>whitelist</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_all_allowed'>all_allowed</span>
811
+ <span class='id identifier rubyid_requested'>requested</span> <span class='op'>=</span> <span class='id identifier rubyid_include_directive'>include_directive</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span>
812
812
 
813
- <span class='const'><span class='object_link'><a href="Util.html" title="JsonapiCompliable::Util (module)">Util</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Util/IncludeParams.html" title="JsonapiCompliable::Util::IncludeParams (class)">IncludeParams</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scrub'><span class='object_link'><a href="Util/IncludeParams.html#scrub-class_method" title="JsonapiCompliable::Util::IncludeParams.scrub (method)">scrub</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_requested'>requested</span><span class='comma'>,</span> <span class='id identifier rubyid_allowed'>allowed</span><span class='rparen'>)</span>
813
+ <span class='id identifier rubyid_whitelist'>whitelist</span> <span class='op'>=</span> <span class='kw'>nil</span>
814
+ <span class='kw'>if</span> <span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_context'>context</span>
815
+ <span class='id identifier rubyid_whitelist'>whitelist</span> <span class='op'>=</span> <span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_sideload_whitelist'>sideload_whitelist</span>
816
+ <span class='id identifier rubyid_whitelist'>whitelist</span> <span class='op'>=</span> <span class='id identifier rubyid_whitelist'>whitelist</span><span class='lbracket'>[</span><span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_context_namespace'>context_namespace</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_whitelist'>whitelist</span>
817
+ <span class='kw'>end</span>
818
+
819
+ <span class='id identifier rubyid_whitelist'>whitelist</span> <span class='op'>?</span> <span class='const'><span class='object_link'><a href="Util.html" title="JsonapiCompliable::Util (module)">Util</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Util/IncludeParams.html" title="JsonapiCompliable::Util::IncludeParams (class)">IncludeParams</a></span></span><span class='period'>.</span><span class='id identifier rubyid_scrub'><span class='object_link'><a href="Util/IncludeParams.html#scrub-class_method" title="JsonapiCompliable::Util::IncludeParams.scrub (method)">scrub</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_requested'>requested</span><span class='comma'>,</span> <span class='id identifier rubyid_whitelist'>whitelist</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_requested'>requested</span>
814
820
  <span class='kw'>end</span>
815
821
  <span class='kw'>end</span></pre>
816
822
  </td>
@@ -948,9 +954,6 @@ top-level:</p>
948
954
  <pre class="lines">
949
955
 
950
956
 
951
- 121
952
- 122
953
- 123
954
957
  124
955
958
  125
956
959
  126
@@ -970,10 +973,13 @@ top-level:</p>
970
973
  140
971
974
  141
972
975
  142
973
- 143</pre>
976
+ 143
977
+ 144
978
+ 145
979
+ 146</pre>
974
980
  </td>
975
981
  <td>
976
- <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 121</span>
982
+ <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 124</span>
977
983
 
978
984
  <span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span>
979
985
  <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</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_default_hash'>default_hash</span> <span class='rbrace'>}</span>
@@ -1067,14 +1073,14 @@ get, say, the total count without the overhead of fetching actual records.</p>
1067
1073
  <pre class="lines">
1068
1074
 
1069
1075
 
1070
- 160
1071
- 161
1072
- 162
1073
1076
  163
1074
- 164</pre>
1077
+ 164
1078
+ 165
1079
+ 166
1080
+ 167</pre>
1075
1081
  </td>
1076
1082
  <td>
1077
- <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 160</span>
1083
+ <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/query.rb', line 163</span>
1078
1084
 
1079
1085
  <span class='kw'>def</span> <span class='id identifier rubyid_zero_results?'>zero_results?</span>
1080
1086
  <span class='op'>!</span><span class='ivar'>@params</span><span class='lbracket'>[</span><span class='symbol'>:page</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span>
@@ -1091,7 +1097,7 @@ get, say, the total count without the overhead of fetching actual records.</p>
1091
1097
  </div>
1092
1098
 
1093
1099
  <div id="footer">
1094
- Generated on Mon Oct 2 09:38:50 2017 by
1100
+ Generated on Tue Oct 3 09:22:25 2017 by
1095
1101
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1096
1102
  0.9.9 (ruby-2.3.0).
1097
1103
  </div>
@@ -201,7 +201,7 @@
201
201
  </div>
202
202
 
203
203
  <div id="footer">
204
- Generated on Mon Oct 2 09:38:50 2017 by
204
+ Generated on Tue Oct 3 09:22:25 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>