jsonapi_compliable 0.11.6 → 0.11.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) 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 +1 -1
  10. data/docs/JsonapiCompliable/Configuration.html +100 -7
  11. data/docs/JsonapiCompliable/Deserializer.html +1 -1
  12. data/docs/JsonapiCompliable/Errors/BadFilter.html +1 -1
  13. data/docs/JsonapiCompliable/Errors/InvalidInclude.html +1 -1
  14. data/docs/JsonapiCompliable/Errors/RecordNotFound.html +1 -1
  15. data/docs/JsonapiCompliable/Errors/StatNotFound.html +1 -1
  16. data/docs/JsonapiCompliable/Errors/UnsupportedPageSize.html +1 -1
  17. data/docs/JsonapiCompliable/Errors/ValidationError.html +1 -1
  18. data/docs/JsonapiCompliable/Errors.html +1 -1
  19. data/docs/JsonapiCompliable/Extensions/BooleanAttribute/ClassMethods.html +1 -1
  20. data/docs/JsonapiCompliable/Extensions/BooleanAttribute.html +1 -1
  21. data/docs/JsonapiCompliable/Extensions/ExtraAttribute/ClassMethods.html +1 -1
  22. data/docs/JsonapiCompliable/Extensions/ExtraAttribute.html +1 -1
  23. data/docs/JsonapiCompliable/Extensions.html +1 -1
  24. data/docs/JsonapiCompliable/Query.html +1 -1
  25. data/docs/JsonapiCompliable/Rails.html +1 -1
  26. data/docs/JsonapiCompliable/Resource.html +1 -1
  27. data/docs/JsonapiCompliable/Scope.html +1 -1
  28. data/docs/JsonapiCompliable/Scoping/Base.html +1 -1
  29. data/docs/JsonapiCompliable/Scoping/DefaultFilter.html +1 -1
  30. data/docs/JsonapiCompliable/Scoping/ExtraFields.html +1 -1
  31. data/docs/JsonapiCompliable/Scoping/Filter.html +1 -1
  32. data/docs/JsonapiCompliable/Scoping/Filterable.html +1 -1
  33. data/docs/JsonapiCompliable/Scoping/Paginate.html +1 -1
  34. data/docs/JsonapiCompliable/Scoping/Sort.html +1 -1
  35. data/docs/JsonapiCompliable/Scoping.html +1 -1
  36. data/docs/JsonapiCompliable/SerializableTempId.html +1 -1
  37. data/docs/JsonapiCompliable/Sideload.html +1 -1
  38. data/docs/JsonapiCompliable/Stats/DSL.html +1 -1
  39. data/docs/JsonapiCompliable/Stats/Payload.html +1 -1
  40. data/docs/JsonapiCompliable/Stats.html +1 -1
  41. data/docs/JsonapiCompliable/Util/FieldParams.html +1 -1
  42. data/docs/JsonapiCompliable/Util/Hash.html +1 -1
  43. data/docs/JsonapiCompliable/Util/IncludeParams.html +1 -1
  44. data/docs/JsonapiCompliable/Util/Persistence.html +1 -1
  45. data/docs/JsonapiCompliable/Util/RelationshipPayload.html +1 -1
  46. data/docs/JsonapiCompliable/Util/RenderOptions.html +20 -4
  47. data/docs/JsonapiCompliable/Util/Sideload.html +1 -1
  48. data/docs/JsonapiCompliable/Util/ValidationResponse.html +1 -1
  49. data/docs/JsonapiCompliable/Util.html +1 -1
  50. data/docs/JsonapiCompliable.html +2 -2
  51. data/docs/_index.html +1 -1
  52. data/docs/file.README.html +1 -1
  53. data/docs/index.html +1 -1
  54. data/docs/method_list.html +266 -258
  55. data/docs/top-level-namespace.html +1 -1
  56. data/lib/jsonapi_compliable/configuration.rb +11 -0
  57. data/lib/jsonapi_compliable/scope.rb +22 -1
  58. data/lib/jsonapi_compliable/util/render_options.rb +1 -0
  59. data/lib/jsonapi_compliable/version.rb +1 -1
  60. metadata +2 -2
@@ -213,7 +213,15 @@
213
213
  28
214
214
  29
215
215
  30
216
- 31</pre>
216
+ 31
217
+ 32
218
+ 33
219
+ 34
220
+ 35
221
+ 36
222
+ 37
223
+ 38
224
+ 39</pre>
217
225
  </td>
218
226
  <td>
219
227
  <pre class="code"><span class="info file"># File 'lib/jsonapi_compliable/util/render_options.rb', line 6</span>
@@ -227,15 +235,23 @@
227
235
  <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_names'>names</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serializable</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_klass'>klass</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>::</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_safe_constantize'>safe_constantize</span>
228
236
  <span class='kw'>end</span>
229
237
 
238
+ <span class='id identifier rubyid_fields'>fields</span> <span class='op'>=</span> <span class='id identifier rubyid_query_hash'>query_hash</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
239
+ <span class='id identifier rubyid_extra_fields'>extra_fields</span> <span class='op'>=</span> <span class='id identifier rubyid_query_hash'>query_hash</span><span class='lbracket'>[</span><span class='symbol'>:extra_fields</span><span class='rbracket'>]</span>
240
+
241
+ <span class='comment'># Ensure fields doesnt clobber extra fields
242
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_extra_fields'>extra_fields</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
243
+ <span class='id identifier rubyid_extra_fields'>extra_fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_fields'>fields</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_fields'>fields</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span> <span class='op'>+</span> <span class='id identifier rubyid_v'>v</span> <span class='rbrace'>}</span>
244
+ <span class='kw'>end</span>
245
+
230
246
  <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
231
247
  <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:class</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_inferrer'>inferrer</span>
232
248
  <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:include</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_query_hash'>query_hash</span><span class='lbracket'>[</span><span class='symbol'>:include</span><span class='rbracket'>]</span>
233
249
  <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:jsonapi</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_resolved'>resolved</span>
234
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_query_hash'>query_hash</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span>
250
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_fields'>fields</span>
235
251
  <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_overrides'>overrides</span><span class='rparen'>)</span>
236
252
  <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:meta</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
237
253
  <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:expose</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
238
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:expose</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:extra_fields</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_query_hash'>query_hash</span><span class='lbracket'>[</span><span class='symbol'>:extra_fields</span><span class='rbracket'>]</span>
254
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:expose</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:extra_fields</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_extra_fields'>extra_fields</span>
239
255
 
240
256
  <span class='kw'>if</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:resolve_stats</span><span class='rparen'>)</span>
241
257
  <span class='id identifier rubyid_stats'>stats</span> <span class='op'>=</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_resolve_stats'>resolve_stats</span>
@@ -254,7 +270,7 @@
254
270
  </div>
255
271
 
256
272
  <div id="footer">
257
- Generated on Thu May 3 15:52:19 2018 by
273
+ Generated on Mon May 7 09:24:13 2018 by
258
274
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
259
275
  0.9.9 (ruby-2.3.0).
260
276
  </div>
@@ -234,7 +234,7 @@ second will be “children.children” and so forth.</p>
234
234
  </div>
235
235
 
236
236
  <div id="footer">
237
- Generated on Thu May 3 15:52:18 2018 by
237
+ Generated on Mon May 7 09:24:12 2018 by
238
238
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
239
239
  0.9.9 (ruby-2.3.0).
240
240
  </div>
@@ -522,7 +522,7 @@ errors.</p>
522
522
  </div>
523
523
 
524
524
  <div id="footer">
525
- Generated on Thu May 3 15:52:19 2018 by
525
+ Generated on Mon May 7 09:24:13 2018 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>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu May 3 15:52:17 2018 by
110
+ Generated on Mon May 7 09:24:11 2018 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>
@@ -116,7 +116,7 @@ href="https://robots.thoughtbot.com/mygem-configure-block">robots.thoughtbot.com
116
116
  <dt id="VERSION-constant" class="">VERSION =
117
117
 
118
118
  </dt>
119
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.11.4</span><span class='tstring_end'>&quot;</span></span></pre></dd>
119
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.11.6</span><span class='tstring_end'>&quot;</span></span></pre></dd>
120
120
 
121
121
  </dl>
122
122
 
@@ -554,7 +554,7 @@ href="https://robots.thoughtbot.com/mygem-configure-block">robots.thoughtbot.com
554
554
  </div>
555
555
 
556
556
  <div id="footer">
557
- Generated on Thu May 3 15:52:17 2018 by
557
+ Generated on Mon May 7 09:24:11 2018 by
558
558
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
559
559
  0.9.9 (ruby-2.3.0).
560
560
  </div>
data/docs/_index.html CHANGED
@@ -557,7 +557,7 @@
557
557
  </div>
558
558
 
559
559
  <div id="footer">
560
- Generated on Thu May 3 15:52:17 2018 by
560
+ Generated on Mon May 7 09:24:11 2018 by
561
561
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
562
562
  0.9.9 (ruby-2.3.0).
563
563
  </div>
@@ -128,7 +128,7 @@ $ yard server
128
128
  </div></div>
129
129
 
130
130
  <div id="footer">
131
- Generated on Thu May 3 15:52:17 2018 by
131
+ Generated on Mon May 7 09:24:11 2018 by
132
132
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
133
133
  0.9.9 (ruby-2.3.0).
134
134
  </div>
data/docs/index.html CHANGED
@@ -128,7 +128,7 @@ $ yard server
128
128
  </div></div>
129
129
 
130
130
  <div id="footer">
131
- Generated on Thu May 3 15:52:17 2018 by
131
+ Generated on Mon May 7 09:24:11 2018 by
132
132
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
133
133
  0.9.9 (ruby-2.3.0).
134
134
  </div>