apes 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.travis-gemfile +1 -1
  4. data/.travis.yml +1 -4
  5. data/.yardopts +1 -1
  6. data/CHANGELOG.md +8 -0
  7. data/Gemfile +1 -1
  8. data/LICENSE.md +21 -0
  9. data/README.md +22 -16
  10. data/Rakefile +1 -1
  11. data/apes.gemspec +1 -1
  12. data/{doc → docs}/Apes.html +1 -1
  13. data/{doc → docs}/Apes/Concerns.html +1 -1
  14. data/{doc → docs}/Apes/Concerns/Errors.html +1 -1
  15. data/{doc → docs}/Apes/Concerns/Pagination.html +1 -1
  16. data/{doc → docs}/Apes/Concerns/Request.html +1 -1
  17. data/{doc → docs}/Apes/Concerns/Response.html +1 -1
  18. data/{doc → docs}/Apes/Controller.html +1 -1
  19. data/{doc → docs}/Apes/Errors.html +1 -1
  20. data/{doc → docs}/Apes/Errors/AuthenticationError.html +1 -1
  21. data/{doc → docs}/Apes/Errors/BadRequestError.html +1 -1
  22. data/{doc → docs}/Apes/Errors/BaseError.html +1 -1
  23. data/{doc → docs}/Apes/Errors/InvalidDataError.html +1 -1
  24. data/{doc → docs}/Apes/Errors/MissingDataError.html +1 -1
  25. data/{doc → docs}/Apes/Model.html +1 -1
  26. data/{doc → docs}/Apes/PaginationCursor.html +1 -1
  27. data/{doc → docs}/Apes/RuntimeConfiguration.html +1 -1
  28. data/{doc → docs}/Apes/Serializers.html +1 -1
  29. data/{doc → docs}/Apes/Serializers/JSON.html +1 -1
  30. data/{doc → docs}/Apes/Serializers/JWT.html +1 -1
  31. data/{doc → docs}/Apes/Serializers/List.html +1 -1
  32. data/{doc → docs}/Apes/UrlsParser.html +1 -1
  33. data/{doc → docs}/Apes/Validators.html +1 -1
  34. data/{doc → docs}/Apes/Validators/BaseValidator.html +1 -1
  35. data/{doc → docs}/Apes/Validators/BooleanValidator.html +1 -1
  36. data/{doc → docs}/Apes/Validators/EmailValidator.html +1 -1
  37. data/{doc → docs}/Apes/Validators/PhoneValidator.html +1 -1
  38. data/{doc → docs}/Apes/Validators/ReferenceValidator.html +1 -1
  39. data/{doc → docs}/Apes/Validators/TimestampValidator.html +1 -1
  40. data/{doc → docs}/Apes/Validators/UuidValidator.html +1 -1
  41. data/{doc → docs}/Apes/Validators/ZipCodeValidator.html +1 -1
  42. data/{doc → docs}/Apes/Version.html +1 -1
  43. data/{doc → docs}/_index.html +1 -1
  44. data/{doc → docs}/class_list.html +0 -0
  45. data/{doc → docs}/css/common.css +0 -0
  46. data/{doc → docs}/css/full_list.css +0 -0
  47. data/{doc → docs}/css/style.css +0 -0
  48. data/{doc → docs}/file.README.html +7 -5
  49. data/{doc → docs}/file_list.html +0 -0
  50. data/{doc → docs}/frames.html +0 -0
  51. data/{doc → docs}/index.html +7 -5
  52. data/{doc → docs}/js/app.js +0 -0
  53. data/{doc → docs}/js/full_list.js +0 -0
  54. data/{doc → docs}/js/jquery.js +0 -0
  55. data/{doc → docs}/method_list.html +0 -0
  56. data/{doc → docs}/top-level-namespace.html +1 -1
  57. data/lib/apes.rb +1 -1
  58. data/lib/apes/concerns/errors.rb +1 -1
  59. data/lib/apes/concerns/pagination.rb +1 -1
  60. data/lib/apes/concerns/request.rb +1 -1
  61. data/lib/apes/concerns/response.rb +1 -1
  62. data/lib/apes/controller.rb +1 -1
  63. data/lib/apes/errors.rb +1 -1
  64. data/lib/apes/model.rb +1 -1
  65. data/lib/apes/pagination_cursor.rb +1 -1
  66. data/lib/apes/runtime_configuration.rb +1 -1
  67. data/lib/apes/serializers.rb +1 -1
  68. data/lib/apes/urls_parser.rb +1 -1
  69. data/lib/apes/validators.rb +1 -1
  70. data/lib/apes/version.rb +2 -2
  71. data/spec/apes/controller_spec.rb +1 -1
  72. data/spec/apes/errors_spec.rb +1 -1
  73. data/spec/apes/models_spec.rb +1 -1
  74. data/spec/apes/pagination_cursor_spec.rb +1 -1
  75. data/spec/apes/runtime_configuration_spec.rb +1 -1
  76. data/spec/apes/serializers_spec.rb +1 -1
  77. data/spec/apes/urls_parser_spec.rb +1 -1
  78. data/spec/apes/validators_spec.rb +1 -1
  79. data/spec/spec_helper.rb +1 -1
  80. metadata +49 -75
  81. data/doc/ApplicationController.html +0 -547
  82. data/doc/Concerns.html +0 -128
  83. data/doc/Concerns/ErrorHandling.html +0 -826
  84. data/doc/Concerns/PaginationHandling.html +0 -463
  85. data/doc/Concerns/RequestHandling.html +0 -512
  86. data/doc/Concerns/ResponseHandling.html +0 -579
  87. data/doc/Errors.html +0 -126
  88. data/doc/Errors/AuthenticationError.html +0 -123
  89. data/doc/Errors/BadRequestError.html +0 -147
  90. data/doc/Errors/BaseError.html +0 -289
  91. data/doc/Errors/InvalidDataError.html +0 -147
  92. data/doc/Errors/MissingDataError.html +0 -147
  93. data/doc/Model.html +0 -315
  94. data/doc/PaginationCursor.html +0 -764
  95. data/doc/Serializers.html +0 -126
  96. data/doc/Serializers/JSON.html +0 -253
  97. data/doc/Serializers/JWT.html +0 -253
  98. data/doc/Serializers/List.html +0 -245
  99. data/doc/Validators.html +0 -126
  100. data/doc/Validators/BaseValidator.html +0 -209
  101. data/doc/Validators/BooleanValidator.html +0 -391
  102. data/doc/Validators/EmailValidator.html +0 -298
  103. data/doc/Validators/PhoneValidator.html +0 -313
  104. data/doc/Validators/ReferenceValidator.html +0 -284
  105. data/doc/Validators/TimestampValidator.html +0 -476
  106. data/doc/Validators/UuidValidator.html +0 -310
  107. data/doc/Validators/ZipCodeValidator.html +0 -310
@@ -1,547 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: ApplicationController
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '';
20
- framesUrl = "frames.html#!ApplicationController.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="_index.html">Index (A)</a> &raquo;
35
-
36
-
37
- <span class="title">ApplicationController</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: ApplicationController
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">ActionController::API</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">ActionController::API</li>
82
-
83
- <li class="next">ApplicationController</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dt class="r2">Includes:</dt>
96
- <dd class="r2">ActionView::Layouts, Apes::Concerns::Errors, Apes::Concerns::Pagination, Apes::Concerns::Request, Apes::Concerns::Response</dd>
97
-
98
-
99
-
100
-
101
-
102
- <dt class="r1 last">Defined in:</dt>
103
- <dd class="r1 last">lib/apes/controller.rb</dd>
104
-
105
- </dl>
106
- <div class="clear"></div>
107
-
108
- <h2>Overview</h2><div class="docstring">
109
- <div class="discussion">
110
- <p>This file is part of the apes gem. Copyright (C) 2016 and above Shogun <a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#115;&#104;&#111;&#103;&#117;&#110;&#064;&#099;&#111;&#119;&#116;&#101;&#099;&#104;&#046;&#105;&#116;">&#115;&#104;&#111;&#103;&#117;&#110;&#064;&#099;&#111;&#119;&#116;&#101;&#099;&#104;&#046;&#105;&#116;</a>.
111
- Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.</p>
112
-
113
-
114
- </div>
115
- </div>
116
- <div class="tags">
117
-
118
-
119
- </div>
120
-
121
-
122
-
123
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
124
- <ul class="summary">
125
-
126
- <li class="public ">
127
- <span class="summary_signature">
128
-
129
- <a href="#current_account-instance_method" title="#current_account (instance method)">- (Object) <strong>current_account</strong> </a>
130
-
131
-
132
-
133
- </span>
134
-
135
-
136
-
137
-
138
- <span class="note title readonly">readonly</span>
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute current_account.</p>
149
- </div></span>
150
-
151
- </li>
152
-
153
-
154
- <li class="public ">
155
- <span class="summary_signature">
156
-
157
- <a href="#cursor-instance_method" title="#cursor (instance method)">- (Object) <strong>cursor</strong> </a>
158
-
159
-
160
-
161
- </span>
162
-
163
-
164
-
165
-
166
- <span class="note title readonly">readonly</span>
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute cursor.</p>
177
- </div></span>
178
-
179
- </li>
180
-
181
-
182
- <li class="public ">
183
- <span class="summary_signature">
184
-
185
- <a href="#request_cursor-instance_method" title="#request_cursor (instance method)">- (Object) <strong>request_cursor</strong> </a>
186
-
187
-
188
-
189
- </span>
190
-
191
-
192
-
193
-
194
- <span class="note title readonly">readonly</span>
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute request_cursor.</p>
205
- </div></span>
206
-
207
- </li>
208
-
209
-
210
- </ul>
211
-
212
-
213
-
214
-
215
-
216
- <h2>
217
- Instance Method Summary
218
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
219
- </h2>
220
-
221
- <ul class="summary">
222
-
223
- <li class="public ">
224
- <span class="summary_signature">
225
-
226
- <a href="#default_url_options-instance_method" title="#default_url_options (instance method)">- (Object) <strong>default_url_options</strong> </a>
227
-
228
-
229
-
230
- </span>
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
- <span class="summary_desc"><div class='inline'>
241
- </div></span>
242
-
243
- </li>
244
-
245
-
246
- <li class="public ">
247
- <span class="summary_signature">
248
-
249
- <a href="#handle_cors-instance_method" title="#handle_cors (instance method)">- (Object) <strong>handle_cors</strong> </a>
250
-
251
-
252
-
253
- </span>
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
- <span class="summary_desc"><div class='inline'>
264
- </div></span>
265
-
266
- </li>
267
-
268
-
269
- <li class="public ">
270
- <span class="summary_signature">
271
-
272
- <a href="#render_error-instance_method" title="#render_error (instance method)">- (Object) <strong>render_error</strong>(status, errors) </a>
273
-
274
-
275
-
276
- </span>
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
- <span class="summary_desc"><div class='inline'>
287
- </div></span>
288
-
289
- </li>
290
-
291
-
292
- </ul>
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
- <div id="instance_attr_details" class="attr_details">
303
- <h2>Instance Attribute Details</h2>
304
-
305
-
306
- <span id=""></span>
307
- <div class="method_details first">
308
- <h3 class="signature first" id="current_account-instance_method">
309
-
310
- - (<tt>Object</tt>) <strong>current_account</strong> <span class="extras">(readonly)</span>
311
-
312
-
313
-
314
-
315
-
316
- </h3><div class="docstring">
317
- <div class="discussion">
318
- <p>Returns the value of attribute current_account</p>
319
-
320
-
321
- </div>
322
- </div>
323
- <div class="tags">
324
-
325
-
326
- </div><table class="source_code">
327
- <tr>
328
- <td>
329
- <pre class="lines">
330
-
331
-
332
- 19
333
- 20
334
- 21</pre>
335
- </td>
336
- <td>
337
- <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 19</span>
338
-
339
- <span class='kw'>def</span> <span class='id identifier rubyid_current_account'>current_account</span>
340
- <span class='ivar'>@current_account</span>
341
- <span class='kw'>end</span></pre>
342
- </td>
343
- </tr>
344
- </table>
345
- </div>
346
-
347
-
348
- <span id=""></span>
349
- <div class="method_details ">
350
- <h3 class="signature " id="cursor-instance_method">
351
-
352
- - (<tt>Object</tt>) <strong>cursor</strong> <span class="extras">(readonly)</span>
353
-
354
-
355
-
356
-
357
-
358
- </h3><div class="docstring">
359
- <div class="discussion">
360
- <p>Returns the value of attribute cursor</p>
361
-
362
-
363
- </div>
364
- </div>
365
- <div class="tags">
366
-
367
-
368
- </div><table class="source_code">
369
- <tr>
370
- <td>
371
- <pre class="lines">
372
-
373
-
374
- 19
375
- 20
376
- 21</pre>
377
- </td>
378
- <td>
379
- <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 19</span>
380
-
381
- <span class='kw'>def</span> <span class='id identifier rubyid_cursor'>cursor</span>
382
- <span class='ivar'>@cursor</span>
383
- <span class='kw'>end</span></pre>
384
- </td>
385
- </tr>
386
- </table>
387
- </div>
388
-
389
-
390
- <span id=""></span>
391
- <div class="method_details ">
392
- <h3 class="signature " id="request_cursor-instance_method">
393
-
394
- - (<tt>Object</tt>) <strong>request_cursor</strong> <span class="extras">(readonly)</span>
395
-
396
-
397
-
398
-
399
-
400
- </h3><div class="docstring">
401
- <div class="discussion">
402
- <p>Returns the value of attribute request_cursor</p>
403
-
404
-
405
- </div>
406
- </div>
407
- <div class="tags">
408
-
409
-
410
- </div><table class="source_code">
411
- <tr>
412
- <td>
413
- <pre class="lines">
414
-
415
-
416
- 19
417
- 20
418
- 21</pre>
419
- </td>
420
- <td>
421
- <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 19</span>
422
-
423
- <span class='kw'>def</span> <span class='id identifier rubyid_request_cursor'>request_cursor</span>
424
- <span class='ivar'>@request_cursor</span>
425
- <span class='kw'>end</span></pre>
426
- </td>
427
- </tr>
428
- </table>
429
- </div>
430
-
431
- </div>
432
-
433
-
434
- <div id="instance_method_details" class="method_details_list">
435
- <h2>Instance Method Details</h2>
436
-
437
-
438
- <div class="method_details first">
439
- <h3 class="signature first" id="default_url_options-instance_method">
440
-
441
- - (<tt>Object</tt>) <strong>default_url_options</strong>
442
-
443
-
444
-
445
-
446
-
447
- </h3><table class="source_code">
448
- <tr>
449
- <td>
450
- <pre class="lines">
451
-
452
-
453
- 26
454
- 27
455
- 28
456
- 29
457
- 30</pre>
458
- </td>
459
- <td>
460
- <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 26</span>
461
-
462
- <span class='kw'>def</span> <span class='id identifier rubyid_default_url_options'>default_url_options</span>
463
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>only_path:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
464
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>host:</span> <span class='id identifier rubyid_request_source_host'>request_source_host</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_development?'>development?</span>
465
- <span class='id identifier rubyid_rv'>rv</span>
466
- <span class='kw'>end</span></pre>
467
- </td>
468
- </tr>
469
- </table>
470
- </div>
471
-
472
- <div class="method_details ">
473
- <h3 class="signature " id="handle_cors-instance_method">
474
-
475
- - (<tt>Object</tt>) <strong>handle_cors</strong>
476
-
477
-
478
-
479
-
480
-
481
- </h3><table class="source_code">
482
- <tr>
483
- <td>
484
- <pre class="lines">
485
-
486
-
487
- 32
488
- 33
489
- 34</pre>
490
- </td>
491
- <td>
492
- <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 32</span>
493
-
494
- <span class='kw'>def</span> <span class='id identifier rubyid_handle_cors'>handle_cors</span>
495
- <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>nothing:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>status:</span> <span class='symbol'>:no_content</span><span class='rparen'>)</span>
496
- <span class='kw'>end</span></pre>
497
- </td>
498
- </tr>
499
- </table>
500
- </div>
501
-
502
- <div class="method_details ">
503
- <h3 class="signature " id="render_error-instance_method">
504
-
505
- - (<tt>Object</tt>) <strong>render_error</strong>(status, errors)
506
-
507
-
508
-
509
-
510
-
511
- </h3><table class="source_code">
512
- <tr>
513
- <td>
514
- <pre class="lines">
515
-
516
-
517
- 36
518
- 37
519
- 38
520
- 39
521
- 40</pre>
522
- </td>
523
- <td>
524
- <pre class="code"><span class="info file"># File 'lib/apes/controller.rb', line 36</span>
525
-
526
- <span class='kw'>def</span> <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_errors'>errors</span><span class='rparen'>)</span>
527
- <span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span>
528
- <span class='id identifier rubyid_status_code'>status_code</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>:</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>SYMBOL_TO_STATUS_CODE</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='int'>500</span><span class='rparen'>)</span>
529
- <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>errors/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status_code'>status_code</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>status:</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
530
- <span class='kw'>end</span></pre>
531
- </td>
532
- </tr>
533
- </table>
534
- </div>
535
-
536
- </div>
537
-
538
- </div>
539
-
540
- <div id="footer">
541
- Generated on Sat May 21 10:44:46 2016 by
542
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
543
- 0.8.7.6 (ruby-2.3.0).
544
- </div>
545
-
546
- </body>
547
- </html>