apes 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.rubocop.yml +82 -0
  4. data/.travis-gemfile +15 -0
  5. data/.travis.yml +15 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +3 -0
  8. data/Gemfile +22 -0
  9. data/README.md +177 -0
  10. data/Rakefile +44 -0
  11. data/apes.gemspec +34 -0
  12. data/doc/Apes.html +130 -0
  13. data/doc/Apes/Concerns.html +127 -0
  14. data/doc/Apes/Concerns/Errors.html +1089 -0
  15. data/doc/Apes/Concerns/Pagination.html +636 -0
  16. data/doc/Apes/Concerns/Request.html +766 -0
  17. data/doc/Apes/Concerns/Response.html +940 -0
  18. data/doc/Apes/Controller.html +1100 -0
  19. data/doc/Apes/Errors.html +125 -0
  20. data/doc/Apes/Errors/AuthenticationError.html +133 -0
  21. data/doc/Apes/Errors/BadRequestError.html +157 -0
  22. data/doc/Apes/Errors/BaseError.html +320 -0
  23. data/doc/Apes/Errors/InvalidDataError.html +157 -0
  24. data/doc/Apes/Errors/MissingDataError.html +157 -0
  25. data/doc/Apes/Model.html +378 -0
  26. data/doc/Apes/PaginationCursor.html +2138 -0
  27. data/doc/Apes/RuntimeConfiguration.html +909 -0
  28. data/doc/Apes/Serializers.html +125 -0
  29. data/doc/Apes/Serializers/JSON.html +389 -0
  30. data/doc/Apes/Serializers/JWT.html +452 -0
  31. data/doc/Apes/Serializers/List.html +347 -0
  32. data/doc/Apes/UrlsParser.html +1432 -0
  33. data/doc/Apes/Validators.html +125 -0
  34. data/doc/Apes/Validators/BaseValidator.html +278 -0
  35. data/doc/Apes/Validators/BooleanValidator.html +494 -0
  36. data/doc/Apes/Validators/EmailValidator.html +350 -0
  37. data/doc/Apes/Validators/PhoneValidator.html +375 -0
  38. data/doc/Apes/Validators/ReferenceValidator.html +372 -0
  39. data/doc/Apes/Validators/TimestampValidator.html +640 -0
  40. data/doc/Apes/Validators/UuidValidator.html +372 -0
  41. data/doc/Apes/Validators/ZipCodeValidator.html +372 -0
  42. data/doc/Apes/Version.html +189 -0
  43. data/doc/ApplicationController.html +547 -0
  44. data/doc/Concerns.html +128 -0
  45. data/doc/Concerns/ErrorHandling.html +826 -0
  46. data/doc/Concerns/PaginationHandling.html +463 -0
  47. data/doc/Concerns/RequestHandling.html +512 -0
  48. data/doc/Concerns/ResponseHandling.html +579 -0
  49. data/doc/Errors.html +126 -0
  50. data/doc/Errors/AuthenticationError.html +123 -0
  51. data/doc/Errors/BadRequestError.html +147 -0
  52. data/doc/Errors/BaseError.html +289 -0
  53. data/doc/Errors/InvalidDataError.html +147 -0
  54. data/doc/Errors/MissingDataError.html +147 -0
  55. data/doc/Model.html +315 -0
  56. data/doc/PaginationCursor.html +764 -0
  57. data/doc/Serializers.html +126 -0
  58. data/doc/Serializers/JSON.html +253 -0
  59. data/doc/Serializers/JWT.html +253 -0
  60. data/doc/Serializers/List.html +245 -0
  61. data/doc/Validators.html +126 -0
  62. data/doc/Validators/BaseValidator.html +209 -0
  63. data/doc/Validators/BooleanValidator.html +391 -0
  64. data/doc/Validators/EmailValidator.html +298 -0
  65. data/doc/Validators/PhoneValidator.html +313 -0
  66. data/doc/Validators/ReferenceValidator.html +284 -0
  67. data/doc/Validators/TimestampValidator.html +476 -0
  68. data/doc/Validators/UuidValidator.html +310 -0
  69. data/doc/Validators/ZipCodeValidator.html +310 -0
  70. data/doc/_index.html +435 -0
  71. data/doc/class_list.html +58 -0
  72. data/doc/css/common.css +1 -0
  73. data/doc/css/full_list.css +57 -0
  74. data/doc/css/style.css +339 -0
  75. data/doc/file.README.html +252 -0
  76. data/doc/file_list.html +60 -0
  77. data/doc/frames.html +26 -0
  78. data/doc/index.html +252 -0
  79. data/doc/js/app.js +219 -0
  80. data/doc/js/full_list.js +181 -0
  81. data/doc/js/jquery.js +4 -0
  82. data/doc/method_list.html +615 -0
  83. data/doc/top-level-namespace.html +112 -0
  84. data/lib/apes.rb +40 -0
  85. data/lib/apes/concerns/errors.rb +111 -0
  86. data/lib/apes/concerns/pagination.rb +81 -0
  87. data/lib/apes/concerns/request.rb +237 -0
  88. data/lib/apes/concerns/response.rb +74 -0
  89. data/lib/apes/controller.rb +77 -0
  90. data/lib/apes/errors.rb +38 -0
  91. data/lib/apes/model.rb +94 -0
  92. data/lib/apes/pagination_cursor.rb +152 -0
  93. data/lib/apes/runtime_configuration.rb +80 -0
  94. data/lib/apes/serializers.rb +88 -0
  95. data/lib/apes/urls_parser.rb +233 -0
  96. data/lib/apes/validators.rb +234 -0
  97. data/lib/apes/version.rb +24 -0
  98. data/spec/apes/concerns/errors_spec.rb +141 -0
  99. data/spec/apes/concerns/pagination_spec.rb +114 -0
  100. data/spec/apes/concerns/request_spec.rb +244 -0
  101. data/spec/apes/concerns/response_spec.rb +79 -0
  102. data/spec/apes/controller_spec.rb +54 -0
  103. data/spec/apes/errors_spec.rb +14 -0
  104. data/spec/apes/models_spec.rb +148 -0
  105. data/spec/apes/pagination_cursor_spec.rb +113 -0
  106. data/spec/apes/runtime_configuration_spec.rb +100 -0
  107. data/spec/apes/serializers_spec.rb +70 -0
  108. data/spec/apes/urls_parser_spec.rb +150 -0
  109. data/spec/apes/validators_spec.rb +237 -0
  110. data/spec/spec_helper.rb +30 -0
  111. data/views/_included.json.jbuilder +9 -0
  112. data/views/_pagination.json.jbuilder +9 -0
  113. data/views/collection.json.jbuilder +4 -0
  114. data/views/errors/400.json.jbuilder +9 -0
  115. data/views/errors/403.json.jbuilder +7 -0
  116. data/views/errors/404.json.jbuilder +6 -0
  117. data/views/errors/422.json.jbuilder +19 -0
  118. data/views/errors/500.json.jbuilder +12 -0
  119. data/views/errors/501.json.jbuilder +7 -0
  120. data/views/layouts/general.json.jbuilder +36 -0
  121. data/views/object.json.jbuilder +4 -0
  122. metadata +262 -0
@@ -0,0 +1,909 @@
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: Apes::RuntimeConfiguration
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#!Apes/RuntimeConfiguration.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 (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Apes.html" title="Apes (module)">Apes</a></span></span>
36
+ &raquo;
37
+ <span class="title">RuntimeConfiguration</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: Apes::RuntimeConfiguration
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">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Apes::RuntimeConfiguration</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/apes/runtime_configuration.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+ <p>Internal class to handle runtime configuration.</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h2>
121
+ Class Method Summary
122
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
123
+ </h2>
124
+
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#cors_source-class_method" title="cors_source (class method)">+ (String) <strong>cors_source</strong>(default = &quot;localhost&quot;) </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'><p>Returns the CORS source used by Apes.</p>
145
+ </div></span>
146
+
147
+ </li>
148
+
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#development%3F-class_method" title="development? (class method)">+ (Boolean) <strong>development?</strong> </a>
154
+
155
+
156
+
157
+ </span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'><p>Check if Rails is in development environment.</p>
168
+ </div></span>
169
+
170
+ </li>
171
+
172
+
173
+ <li class="public ">
174
+ <span class="summary_signature">
175
+
176
+ <a href="#environment-class_method" title="environment (class method)">+ (String) <strong>environment</strong>(default = &quot;development&quot;) </a>
177
+
178
+
179
+
180
+ </span>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+ <span class="summary_desc"><div class='inline'><p>Returns the current Rails environment.</p>
191
+ </div></span>
192
+
193
+ </li>
194
+
195
+
196
+ <li class="public ">
197
+ <span class="summary_signature">
198
+
199
+ <a href="#gems_root-class_method" title="gems_root (class method)">+ (String) <strong>gems_root</strong>(default = nil) </a>
200
+
201
+
202
+
203
+ </span>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="summary_desc"><div class='inline'><p>Returns the current RubyGems root directory.</p>
214
+ </div></span>
215
+
216
+ </li>
217
+
218
+
219
+ <li class="public ">
220
+ <span class="summary_signature">
221
+
222
+ <a href="#jwt_token-class_method" title="jwt_token (class method)">+ (String) <strong>jwt_token</strong>(default = &quot;secret&quot;) </a>
223
+
224
+
225
+
226
+ </span>
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+ <span class="summary_desc"><div class='inline'><p>Returns the JWT token used by Apes.</p>
237
+ </div></span>
238
+
239
+ </li>
240
+
241
+
242
+ <li class="public ">
243
+ <span class="summary_signature">
244
+
245
+ <a href="#rails_root-class_method" title="rails_root (class method)">+ (String) <strong>rails_root</strong>(default = nil) </a>
246
+
247
+
248
+
249
+ </span>
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <span class="summary_desc"><div class='inline'><p>Returns the current Rails root directory.</p>
260
+ </div></span>
261
+
262
+ </li>
263
+
264
+
265
+ <li class="public ">
266
+ <span class="summary_signature">
267
+
268
+ <a href="#root-class_method" title="root (class method)">+ (String) <strong>root</strong> </a>
269
+
270
+
271
+
272
+ </span>
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+ <span class="summary_desc"><div class='inline'><p>Returns the root directory of apes.</p>
283
+ </div></span>
284
+
285
+ </li>
286
+
287
+
288
+ <li class="public ">
289
+ <span class="summary_signature">
290
+
291
+ <a href="#timestamp_formats-class_method" title="timestamp_formats (class method)">+ (Hash) <strong>timestamp_formats</strong>(default = {}) </a>
292
+
293
+
294
+
295
+ </span>
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+ <span class="summary_desc"><div class='inline'><p>Returns a map where keys are tags and values are strftime compliant formats.</p>
306
+ </div></span>
307
+
308
+ </li>
309
+
310
+
311
+ </ul>
312
+
313
+
314
+
315
+
316
+ <div id="class_method_details" class="method_details_list">
317
+ <h2>Class Method Details</h2>
318
+
319
+
320
+ <div class="method_details first">
321
+ <h3 class="signature first" id="cors_source-class_method">
322
+
323
+ + (<tt>String</tt>) <strong>cors_source</strong>(default = &quot;localhost&quot;)
324
+
325
+
326
+
327
+
328
+
329
+ </h3><div class="docstring">
330
+ <div class="discussion">
331
+ <p>Returns the CORS source used by Apes. This should be defined in the Rails secrets.yml file.</p>
332
+
333
+
334
+ </div>
335
+ </div>
336
+ <div class="tags">
337
+ <p class="tag_title">Parameters:</p>
338
+ <ul class="param">
339
+
340
+ <li>
341
+
342
+ <span class='name'>default</span>
343
+
344
+
345
+ <span class='type'>(<tt>String</tt>)</span>
346
+
347
+
348
+ <em class="default">(defaults to: <tt>&quot;localhost&quot;</tt>)</em>
349
+
350
+
351
+ &mdash;
352
+ <div class='inline'><p>The fallback if no valid CORS source is found in Rails secrets file.</p>
353
+ </div>
354
+
355
+ </li>
356
+
357
+ </ul>
358
+
359
+ <p class="tag_title">Returns:</p>
360
+ <ul class="return">
361
+
362
+ <li>
363
+
364
+
365
+ <span class='type'>(<tt>String</tt>)</span>
366
+
367
+
368
+
369
+ &mdash;
370
+ <div class='inline'><p>The CORS source used by Apes.</p>
371
+ </div>
372
+
373
+ </li>
374
+
375
+ </ul>
376
+
377
+ </div><table class="source_code">
378
+ <tr>
379
+ <td>
380
+ <pre class="lines">
381
+
382
+
383
+ 59
384
+ 60
385
+ 61</pre>
386
+ </td>
387
+ <td>
388
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 59</span>
389
+
390
+ <span class='kw'>def</span> <span class='id identifier rubyid_cors_source'>cors_source</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>localhost</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
391
+ <span class='id identifier rubyid_fetch_with_fallback'>fetch_with_fallback</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_secrets'>secrets</span><span class='period'>.</span><span class='id identifier rubyid_cors_source'>cors_source</span> <span class='rbrace'>}</span>
392
+ <span class='kw'>end</span></pre>
393
+ </td>
394
+ </tr>
395
+ </table>
396
+ </div>
397
+
398
+ <div class="method_details ">
399
+ <h3 class="signature " id="development?-class_method">
400
+
401
+ + (<tt>Boolean</tt>) <strong>development?</strong>
402
+
403
+
404
+
405
+
406
+
407
+ </h3><div class="docstring">
408
+ <div class="discussion">
409
+ <p>Check if Rails is in development environment.</p>
410
+
411
+
412
+ </div>
413
+ </div>
414
+ <div class="tags">
415
+
416
+ <p class="tag_title">Returns:</p>
417
+ <ul class="return">
418
+
419
+ <li>
420
+
421
+
422
+ <span class='type'>(<tt>Boolean</tt>)</span>
423
+
424
+
425
+
426
+ &mdash;
427
+ <div class='inline'><p><code>true</code> if Rails is in <code>development</code> environment, <code>false</code> otherwise.</p>
428
+ </div>
429
+
430
+ </li>
431
+
432
+ </ul>
433
+
434
+ </div><table class="source_code">
435
+ <tr>
436
+ <td>
437
+ <pre class="lines">
438
+
439
+
440
+ 43
441
+ 44
442
+ 45</pre>
443
+ </td>
444
+ <td>
445
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 43</span>
446
+
447
+ <span class='kw'>def</span> <span class='id identifier rubyid_development?'>development?</span>
448
+ <span class='id identifier rubyid_environment'>environment</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>development</span><span class='tstring_end'>&quot;</span></span>
449
+ <span class='kw'>end</span></pre>
450
+ </td>
451
+ </tr>
452
+ </table>
453
+ </div>
454
+
455
+ <div class="method_details ">
456
+ <h3 class="signature " id="environment-class_method">
457
+
458
+ + (<tt>String</tt>) <strong>environment</strong>(default = &quot;development&quot;)
459
+
460
+
461
+
462
+
463
+
464
+ </h3><div class="docstring">
465
+ <div class="discussion">
466
+ <p>Returns the current Rails environment.</p>
467
+
468
+
469
+ </div>
470
+ </div>
471
+ <div class="tags">
472
+ <p class="tag_title">Parameters:</p>
473
+ <ul class="param">
474
+
475
+ <li>
476
+
477
+ <span class='name'>default</span>
478
+
479
+
480
+ <span class='type'>(<tt>String</tt>)</span>
481
+
482
+
483
+ <em class="default">(defaults to: <tt>&quot;development&quot;</tt>)</em>
484
+
485
+
486
+ &mdash;
487
+ <div class='inline'><p>The fallback environment if Rails configuration is invalid.</p>
488
+ </div>
489
+
490
+ </li>
491
+
492
+ </ul>
493
+
494
+ <p class="tag_title">Returns:</p>
495
+ <ul class="return">
496
+
497
+ <li>
498
+
499
+
500
+ <span class='type'>(<tt>String</tt>)</span>
501
+
502
+
503
+
504
+ &mdash;
505
+ <div class='inline'><p>The the current Rails environment.</p>
506
+ </div>
507
+
508
+ </li>
509
+
510
+ </ul>
511
+
512
+ </div><table class="source_code">
513
+ <tr>
514
+ <td>
515
+ <pre class="lines">
516
+
517
+
518
+ 36
519
+ 37
520
+ 38</pre>
521
+ </td>
522
+ <td>
523
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 36</span>
524
+
525
+ <span class='kw'>def</span> <span class='id identifier rubyid_environment'>environment</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>development</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
526
+ <span class='id identifier rubyid_fetch_with_fallback'>fetch_with_fallback</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span> <span class='rbrace'>}</span>
527
+ <span class='kw'>end</span></pre>
528
+ </td>
529
+ </tr>
530
+ </table>
531
+ </div>
532
+
533
+ <div class="method_details ">
534
+ <h3 class="signature " id="gems_root-class_method">
535
+
536
+ + (<tt>String</tt>) <strong>gems_root</strong>(default = nil)
537
+
538
+
539
+
540
+
541
+
542
+ </h3><div class="docstring">
543
+ <div class="discussion">
544
+ <p>Returns the current RubyGems root directory.</p>
545
+
546
+
547
+ </div>
548
+ </div>
549
+ <div class="tags">
550
+ <p class="tag_title">Parameters:</p>
551
+ <ul class="param">
552
+
553
+ <li>
554
+
555
+ <span class='name'>default</span>
556
+
557
+
558
+ <span class='type'>(<tt>String</tt>)</span>
559
+
560
+
561
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
562
+
563
+
564
+ &mdash;
565
+ <div class='inline'><p>The fallback if RubyGems configuration is invalid.</p>
566
+ </div>
567
+
568
+ </li>
569
+
570
+ </ul>
571
+
572
+ <p class="tag_title">Returns:</p>
573
+ <ul class="return">
574
+
575
+ <li>
576
+
577
+
578
+ <span class='type'>(<tt>String</tt>)</span>
579
+
580
+
581
+
582
+ &mdash;
583
+ <div class='inline'><p>The current RubyGems root directory.</p>
584
+ </div>
585
+
586
+ </li>
587
+
588
+ </ul>
589
+
590
+ </div><table class="source_code">
591
+ <tr>
592
+ <td>
593
+ <pre class="lines">
594
+
595
+
596
+ 28
597
+ 29
598
+ 30</pre>
599
+ </td>
600
+ <td>
601
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 28</span>
602
+
603
+ <span class='kw'>def</span> <span class='id identifier rubyid_gems_root'>gems_root</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
604
+ <span class='id identifier rubyid_fetch_with_fallback'>fetch_with_fallback</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_loaded_specs'>loaded_specs</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>lazier</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_full_gem_path'>full_gem_path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span>
605
+ <span class='kw'>end</span></pre>
606
+ </td>
607
+ </tr>
608
+ </table>
609
+ </div>
610
+
611
+ <div class="method_details ">
612
+ <h3 class="signature " id="jwt_token-class_method">
613
+
614
+ + (<tt>String</tt>) <strong>jwt_token</strong>(default = &quot;secret&quot;)
615
+
616
+
617
+
618
+
619
+
620
+ </h3><div class="docstring">
621
+ <div class="discussion">
622
+ <p>Returns the JWT token used by Apes. This should be defined in the Rails secrets.yml file.</p>
623
+
624
+
625
+ </div>
626
+ </div>
627
+ <div class="tags">
628
+ <p class="tag_title">Parameters:</p>
629
+ <ul class="param">
630
+
631
+ <li>
632
+
633
+ <span class='name'>default</span>
634
+
635
+
636
+ <span class='type'>(<tt>String</tt>)</span>
637
+
638
+
639
+ <em class="default">(defaults to: <tt>&quot;secret&quot;</tt>)</em>
640
+
641
+
642
+ &mdash;
643
+ <div class='inline'><p>The fallback if no valid secret is found in Rails secrets file.</p>
644
+ </div>
645
+
646
+ </li>
647
+
648
+ </ul>
649
+
650
+ <p class="tag_title">Returns:</p>
651
+ <ul class="return">
652
+
653
+ <li>
654
+
655
+
656
+ <span class='type'>(<tt>String</tt>)</span>
657
+
658
+
659
+
660
+ &mdash;
661
+ <div class='inline'><p>The JWT token used by Apes.</p>
662
+ </div>
663
+
664
+ </li>
665
+
666
+ </ul>
667
+
668
+ </div><table class="source_code">
669
+ <tr>
670
+ <td>
671
+ <pre class="lines">
672
+
673
+
674
+ 51
675
+ 52
676
+ 53</pre>
677
+ </td>
678
+ <td>
679
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 51</span>
680
+
681
+ <span class='kw'>def</span> <span class='id identifier rubyid_jwt_token'>jwt_token</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>secret</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
682
+ <span class='id identifier rubyid_fetch_with_fallback'>fetch_with_fallback</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_secrets'>secrets</span><span class='period'>.</span><span class='id identifier rubyid_jwt'>jwt</span> <span class='rbrace'>}</span>
683
+ <span class='kw'>end</span></pre>
684
+ </td>
685
+ </tr>
686
+ </table>
687
+ </div>
688
+
689
+ <div class="method_details ">
690
+ <h3 class="signature " id="rails_root-class_method">
691
+
692
+ + (<tt>String</tt>) <strong>rails_root</strong>(default = nil)
693
+
694
+
695
+
696
+
697
+
698
+ </h3><div class="docstring">
699
+ <div class="discussion">
700
+ <p>Returns the current Rails root directory.</p>
701
+
702
+
703
+ </div>
704
+ </div>
705
+ <div class="tags">
706
+ <p class="tag_title">Parameters:</p>
707
+ <ul class="param">
708
+
709
+ <li>
710
+
711
+ <span class='name'>default</span>
712
+
713
+
714
+ <span class='type'>(<tt>String</tt>)</span>
715
+
716
+
717
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
718
+
719
+
720
+ &mdash;
721
+ <div class='inline'><p>The fallback if Rails configuration is invalid.</p>
722
+ </div>
723
+
724
+ </li>
725
+
726
+ </ul>
727
+
728
+ <p class="tag_title">Returns:</p>
729
+ <ul class="return">
730
+
731
+ <li>
732
+
733
+
734
+ <span class='type'>(<tt>String</tt>)</span>
735
+
736
+
737
+
738
+ &mdash;
739
+ <div class='inline'><p>The current Rails root directory.</p>
740
+ </div>
741
+
742
+ </li>
743
+
744
+ </ul>
745
+
746
+ </div><table class="source_code">
747
+ <tr>
748
+ <td>
749
+ <pre class="lines">
750
+
751
+
752
+ 20
753
+ 21
754
+ 22</pre>
755
+ </td>
756
+ <td>
757
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 20</span>
758
+
759
+ <span class='kw'>def</span> <span class='id identifier rubyid_rails_root'>rails_root</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
760
+ <span class='id identifier rubyid_fetch_with_fallback'>fetch_with_fallback</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span>
761
+ <span class='kw'>end</span></pre>
762
+ </td>
763
+ </tr>
764
+ </table>
765
+ </div>
766
+
767
+ <div class="method_details ">
768
+ <h3 class="signature " id="root-class_method">
769
+
770
+ + (<tt>String</tt>) <strong>root</strong>
771
+
772
+
773
+
774
+
775
+
776
+ </h3><div class="docstring">
777
+ <div class="discussion">
778
+ <p>Returns the root directory of apes.</p>
779
+
780
+
781
+ </div>
782
+ </div>
783
+ <div class="tags">
784
+
785
+ <p class="tag_title">Returns:</p>
786
+ <ul class="return">
787
+
788
+ <li>
789
+
790
+
791
+ <span class='type'>(<tt>String</tt>)</span>
792
+
793
+
794
+
795
+ </li>
796
+
797
+ </ul>
798
+
799
+ </div><table class="source_code">
800
+ <tr>
801
+ <td>
802
+ <pre class="lines">
803
+
804
+
805
+ 12
806
+ 13
807
+ 14</pre>
808
+ </td>
809
+ <td>
810
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 12</span>
811
+
812
+ <span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span>
813
+ <span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_loaded_specs'>loaded_specs</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>apes</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_full_gem_path'>full_gem_path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
814
+ <span class='kw'>end</span></pre>
815
+ </td>
816
+ </tr>
817
+ </table>
818
+ </div>
819
+
820
+ <div class="method_details ">
821
+ <h3 class="signature " id="timestamp_formats-class_method">
822
+
823
+ + (<tt>Hash</tt>) <strong>timestamp_formats</strong>(default = {})
824
+
825
+
826
+
827
+
828
+
829
+ </h3><div class="docstring">
830
+ <div class="discussion">
831
+ <p>Returns a map where keys are tags and values are strftime compliant formats.</p>
832
+
833
+
834
+ </div>
835
+ </div>
836
+ <div class="tags">
837
+ <p class="tag_title">Parameters:</p>
838
+ <ul class="param">
839
+
840
+ <li>
841
+
842
+ <span class='name'>default</span>
843
+
844
+
845
+ <span class='type'>(<tt>String</tt>)</span>
846
+
847
+
848
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
849
+
850
+
851
+ &mdash;
852
+ <div class='inline'><p>The fallback if no valid configuration is found in Rails.</p>
853
+ </div>
854
+
855
+ </li>
856
+
857
+ </ul>
858
+
859
+ <p class="tag_title">Returns:</p>
860
+ <ul class="return">
861
+
862
+ <li>
863
+
864
+
865
+ <span class='type'>(<tt>Hash</tt>)</span>
866
+
867
+
868
+
869
+ &mdash;
870
+ <div class='inline'><p>A object describing valid timestamps formats.</p>
871
+ </div>
872
+
873
+ </li>
874
+
875
+ </ul>
876
+
877
+ </div><table class="source_code">
878
+ <tr>
879
+ <td>
880
+ <pre class="lines">
881
+
882
+
883
+ 67
884
+ 68
885
+ 69</pre>
886
+ </td>
887
+ <td>
888
+ <pre class="code"><span class="info file"># File 'lib/apes/runtime_configuration.rb', line 67</span>
889
+
890
+ <span class='kw'>def</span> <span class='id identifier rubyid_timestamp_formats'>timestamp_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
891
+ <span class='id identifier rubyid_fetch_with_fallback'>fetch_with_fallback</span><span class='lparen'>(</span><span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_timestamp_formats'>timestamp_formats</span> <span class='rbrace'>}</span>
892
+ <span class='kw'>end</span></pre>
893
+ </td>
894
+ </tr>
895
+ </table>
896
+ </div>
897
+
898
+ </div>
899
+
900
+ </div>
901
+
902
+ <div id="footer">
903
+ Generated on Sat Jun 4 12:41:54 2016 by
904
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
905
+ 0.8.7.6 (ruby-2.3.0).
906
+ </div>
907
+
908
+ </body>
909
+ </html>