ovto 0.4.1 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.gitmodules +3 -0
  4. data/CHANGELOG.md +15 -2
  5. data/Gemfile +2 -2
  6. data/Gemfile.lock +23 -27
  7. data/README.md +2 -2
  8. data/book/SUMMARY.md +3 -1
  9. data/book/api/actions.md +1 -1
  10. data/book/api/fetch.md +3 -3
  11. data/book/api/middleware.md +99 -0
  12. data/book/api/pure_component.md +30 -0
  13. data/book/guides/install.md +76 -0
  14. data/book/guides/tutorial.md +3 -3
  15. data/book/ovtologo.png +0 -0
  16. data/docs/api/Array.html +190 -0
  17. data/docs/api/Hash.html +196 -0
  18. data/docs/api/Ovto/Actions.html +132 -40
  19. data/docs/api/Ovto/App.html +254 -40
  20. data/docs/api/Ovto/Component/MoreThanOneNode.html +6 -6
  21. data/docs/api/Ovto/Component.html +102 -27
  22. data/docs/api/Ovto/Middleware/Actions.html +428 -0
  23. data/docs/api/Ovto/Middleware/Base.html +606 -0
  24. data/docs/api/Ovto/Middleware/Component.html +355 -0
  25. data/docs/api/Ovto/Middleware.html +288 -0
  26. data/docs/api/Ovto/PureComponent/StateIsNotAvailable.html +124 -0
  27. data/docs/api/Ovto/PureComponent.html +368 -0
  28. data/docs/api/Ovto/Runtime.html +7 -7
  29. data/docs/api/Ovto/State/MissingValue.html +6 -6
  30. data/docs/api/Ovto/State/{UnknownKey.html → UnknownStateKey.html} +11 -11
  31. data/docs/api/Ovto/State.html +59 -43
  32. data/docs/api/Ovto/WiredActionSet.html +636 -0
  33. data/docs/api/Ovto/WiredActions.html +78 -35
  34. data/docs/api/Ovto.html +226 -29
  35. data/docs/api/_index.html +99 -11
  36. data/docs/api/actions.html +36 -10
  37. data/docs/api/app.html +35 -9
  38. data/docs/api/class_list.html +3 -3
  39. data/docs/api/component.html +37 -11
  40. data/docs/api/css/style.css +2 -2
  41. data/docs/api/fetch.html +40 -14
  42. data/docs/api/file.README.html +8 -8
  43. data/docs/api/file_list.html +2 -2
  44. data/docs/api/frames.html +2 -2
  45. data/docs/api/index.html +8 -8
  46. data/docs/api/js/app.js +14 -3
  47. data/docs/api/method_list.html +318 -22
  48. data/docs/api/middleware.html +498 -0
  49. data/docs/api/pure_component.html +428 -0
  50. data/docs/api/state.html +35 -9
  51. data/docs/api/top-level-namespace.html +9 -7
  52. data/docs/gitbook/gitbook.js +2 -2
  53. data/docs/gitbook/theme.js +1 -1
  54. data/docs/guides/debugging.html +35 -9
  55. data/docs/guides/development.html +35 -9
  56. data/docs/guides/install.html +452 -0
  57. data/docs/guides/tutorial.html +101 -66
  58. data/docs/index.html +37 -17
  59. data/docs/ovtologo.png +0 -0
  60. data/docs/search_index.json +1 -1
  61. data/examples/sinatra/Gemfile +2 -0
  62. data/examples/sinatra/Gemfile.lock +33 -31
  63. data/examples/sinatra/app.rb +1 -4
  64. data/examples/sinatra/config.ru +6 -6
  65. data/examples/static/Gemfile.lock +10 -14
  66. data/lib/ovto/actions.rb +11 -0
  67. data/lib/ovto/app.rb +37 -13
  68. data/lib/ovto/component.rb +149 -73
  69. data/lib/ovto/fetch.rb +1 -1
  70. data/lib/ovto/middleware.rb +121 -0
  71. data/lib/ovto/pure_component.rb +22 -0
  72. data/lib/ovto/state.rb +13 -5
  73. data/lib/ovto/version.rb +1 -1
  74. data/lib/ovto/wired_action_set.rb +40 -0
  75. data/lib/ovto/wired_actions.rb +49 -11
  76. data/lib/ovto.rb +27 -0
  77. data/ovto.gemspec +1 -1
  78. metadata +35 -9
@@ -0,0 +1,606 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Ovto::Middleware::Base
8
+
9
+ &mdash; Documentation by YARD 0.9.24
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Ovto::Middleware::Base";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Ovto.html" title="Ovto (module)">Ovto</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Middleware.html" title="Ovto::Middleware (module)">Middleware</a></span></span>
41
+ &raquo;
42
+ <span class="title">Base</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Ovto::Middleware::Base
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Ovto::Middleware::Base</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/ovto/middleware.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Base class of a middleware class Note: this is not the direct superclass of
106
+ a middleware. `SomeMiddleware &lt; (anonymous class) &lt; Middleware::Base`</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Class Method Summary
124
+ <small><a href="#" class="summary_toggle">collapse</a></small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#_run_setup-class_method" title="_run_setup (class method)">.<strong>_run_setup</strong>(wired_action_set) &#x21d2; Object </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'></div></span>
147
+
148
+ </li>
149
+
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#middlewares-class_method" title="middlewares (class method)">.<strong>middlewares</strong> &#x21d2; Object </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>Nested middlewares.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#name-class_method" title="name (class method)">.<strong>name</strong> &#x21d2; Object </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <span class="summary_desc"><div class='inline'>
193
+ <p>Middleware name (set by Ovto.Middleware).</p>
194
+ </div></span>
195
+
196
+ </li>
197
+
198
+
199
+ <li class="public ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#use-class_method" title="use (class method)">.<strong>use</strong>(middleware_class) &#x21d2; Object </a>
203
+
204
+
205
+
206
+ </span>
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'>
217
+ <p>Install a nested middleware.</p>
218
+ </div></span>
219
+
220
+ </li>
221
+
222
+
223
+ </ul>
224
+
225
+ <h2>
226
+ Instance Method Summary
227
+ <small><a href="#" class="summary_toggle">collapse</a></small>
228
+ </h2>
229
+
230
+ <ul class="summary">
231
+
232
+ <li class="public ">
233
+ <span class="summary_signature">
234
+
235
+ <a href="#actions-instance_method" title="#actions (instance method)">#<strong>actions</strong> &#x21d2; Object </a>
236
+
237
+
238
+
239
+ </span>
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <span class="summary_desc"><div class='inline'></div></span>
250
+
251
+ </li>
252
+
253
+
254
+ <li class="public ">
255
+ <span class="summary_signature">
256
+
257
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(wired_actions) &#x21d2; Base </a>
258
+
259
+
260
+
261
+ </span>
262
+
263
+
264
+ <span class="note title constructor">constructor</span>
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <span class="summary_desc"><div class='inline'>
274
+ <p>A new instance of Base.</p>
275
+ </div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#setup-instance_method" title="#setup (instance method)">#<strong>setup</strong> &#x21d2; Object </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'>
298
+ <p>Override this if needed.</p>
299
+ </div></span>
300
+
301
+ </li>
302
+
303
+
304
+ </ul>
305
+
306
+
307
+ <div id="constructor_details" class="method_details_list">
308
+ <h2>Constructor Details</h2>
309
+
310
+ <div class="method_details first">
311
+ <h3 class="signature first" id="initialize-instance_method">
312
+
313
+ #<strong>initialize</strong>(wired_actions) &#x21d2; <tt><span class='object_link'><a href="" title="Ovto::Middleware::Base (class)">Base</a></span></tt>
314
+
315
+
316
+
317
+
318
+
319
+ </h3><div class="docstring">
320
+ <div class="discussion">
321
+
322
+ <p>Returns a new instance of Base.</p>
323
+
324
+
325
+ </div>
326
+ </div>
327
+ <div class="tags">
328
+
329
+
330
+ </div><table class="source_code">
331
+ <tr>
332
+ <td>
333
+ <pre class="lines">
334
+
335
+
336
+ 73
337
+ 74
338
+ 75</pre>
339
+ </td>
340
+ <td>
341
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 73</span>
342
+
343
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_wired_actions'>wired_actions</span><span class='rparen'>)</span>
344
+ <span class='ivar'>@wired_actions</span> <span class='op'>=</span> <span class='id identifier rubyid_wired_actions'>wired_actions</span>
345
+ <span class='kw'>end</span></pre>
346
+ </td>
347
+ </tr>
348
+ </table>
349
+ </div>
350
+
351
+ </div>
352
+
353
+
354
+ <div id="class_method_details" class="method_details_list">
355
+ <h2>Class Method Details</h2>
356
+
357
+
358
+ <div class="method_details first">
359
+ <h3 class="signature first" id="_run_setup-class_method">
360
+
361
+ .<strong>_run_setup</strong>(wired_action_set) &#x21d2; <tt>Object</tt>
362
+
363
+
364
+
365
+
366
+
367
+ </h3><table class="source_code">
368
+ <tr>
369
+ <td>
370
+ <pre class="lines">
371
+
372
+
373
+ 65
374
+ 66
375
+ 67
376
+ 68
377
+ 69
378
+ 70
379
+ 71</pre>
380
+ </td>
381
+ <td>
382
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 65</span>
383
+
384
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__run_setup'>_run_setup</span><span class='lparen'>(</span><span class='id identifier rubyid_wired_action_set'>wired_action_set</span><span class='rparen'>)</span>
385
+ <span class='id identifier rubyid_mw'>mw</span> <span class='op'>=</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_wired_action_set'>wired_action_set</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../WiredActionSet.html" title="Ovto::WiredActionSet (class)">WiredActionSet</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WiredActionSet.html#THE_MIDDLEWARE_ITSELF-constant" title="Ovto::WiredActionSet::THE_MIDDLEWARE_ITSELF (constant)">THE_MIDDLEWARE_ITSELF</a></span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
386
+ <span class='id identifier rubyid_mw'>mw</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
387
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_middlewares'>middlewares</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span>
388
+ <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid__run_setup'>_run_setup</span><span class='lparen'>(</span><span class='id identifier rubyid_wired_action_set'>wired_action_set</span><span class='lbracket'>[</span><span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
389
+ <span class='kw'>end</span>
390
+ <span class='kw'>end</span></pre>
391
+ </td>
392
+ </tr>
393
+ </table>
394
+ </div>
395
+
396
+ <div class="method_details ">
397
+ <h3 class="signature " id="middlewares-class_method">
398
+
399
+ .<strong>middlewares</strong> &#x21d2; <tt>Object</tt>
400
+
401
+
402
+
403
+
404
+
405
+ </h3><div class="docstring">
406
+ <div class="discussion">
407
+
408
+ <p>Nested middlewares</p>
409
+
410
+
411
+ </div>
412
+ </div>
413
+ <div class="tags">
414
+
415
+
416
+ </div><table class="source_code">
417
+ <tr>
418
+ <td>
419
+ <pre class="lines">
420
+
421
+
422
+ 51
423
+ 52
424
+ 53</pre>
425
+ </td>
426
+ <td>
427
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 51</span>
428
+
429
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_middlewares'>middlewares</span>
430
+ <span class='ivar'>@middlewares</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
431
+ <span class='kw'>end</span></pre>
432
+ </td>
433
+ </tr>
434
+ </table>
435
+ </div>
436
+
437
+ <div class="method_details ">
438
+ <h3 class="signature " id="name-class_method">
439
+
440
+ .<strong>name</strong> &#x21d2; <tt>Object</tt>
441
+
442
+
443
+
444
+
445
+
446
+ </h3><div class="docstring">
447
+ <div class="discussion">
448
+
449
+ <p>Middleware name (set by Ovto.Middleware)</p>
450
+
451
+
452
+ </div>
453
+ </div>
454
+ <div class="tags">
455
+
456
+
457
+ </div><table class="source_code">
458
+ <tr>
459
+ <td>
460
+ <pre class="lines">
461
+
462
+
463
+ 61
464
+ 62
465
+ 63</pre>
466
+ </td>
467
+ <td>
468
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 61</span>
469
+
470
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
471
+ <span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='symbol'>:OVTO_MIDDLEWARE_NAME</span><span class='rparen'>)</span>
472
+ <span class='kw'>end</span></pre>
473
+ </td>
474
+ </tr>
475
+ </table>
476
+ </div>
477
+
478
+ <div class="method_details ">
479
+ <h3 class="signature " id="use-class_method">
480
+
481
+ .<strong>use</strong>(middleware_class) &#x21d2; <tt>Object</tt>
482
+
483
+
484
+
485
+
486
+
487
+ </h3><div class="docstring">
488
+ <div class="discussion">
489
+
490
+ <p>Install a nested middleware</p>
491
+
492
+
493
+ </div>
494
+ </div>
495
+ <div class="tags">
496
+
497
+
498
+ </div><table class="source_code">
499
+ <tr>
500
+ <td>
501
+ <pre class="lines">
502
+
503
+
504
+ 56
505
+ 57
506
+ 58</pre>
507
+ </td>
508
+ <td>
509
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 56</span>
510
+
511
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span><span class='lparen'>(</span><span class='id identifier rubyid_middleware_class'>middleware_class</span><span class='rparen'>)</span>
512
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_middlewares'>middlewares</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_middleware_class'>middleware_class</span><span class='rparen'>)</span>
513
+ <span class='kw'>end</span></pre>
514
+ </td>
515
+ </tr>
516
+ </table>
517
+ </div>
518
+
519
+ </div>
520
+
521
+ <div id="instance_method_details" class="method_details_list">
522
+ <h2>Instance Method Details</h2>
523
+
524
+
525
+ <div class="method_details first">
526
+ <h3 class="signature first" id="actions-instance_method">
527
+
528
+ #<strong>actions</strong> &#x21d2; <tt>Object</tt>
529
+
530
+
531
+
532
+
533
+
534
+ </h3><table class="source_code">
535
+ <tr>
536
+ <td>
537
+ <pre class="lines">
538
+
539
+
540
+ 81
541
+ 82
542
+ 83</pre>
543
+ </td>
544
+ <td>
545
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 81</span>
546
+
547
+ <span class='kw'>def</span> <span class='id identifier rubyid_actions'>actions</span>
548
+ <span class='ivar'>@wired_actions</span>
549
+ <span class='kw'>end</span></pre>
550
+ </td>
551
+ </tr>
552
+ </table>
553
+ </div>
554
+
555
+ <div class="method_details ">
556
+ <h3 class="signature " id="setup-instance_method">
557
+
558
+ #<strong>setup</strong> &#x21d2; <tt>Object</tt>
559
+
560
+
561
+
562
+
563
+
564
+ </h3><div class="docstring">
565
+ <div class="discussion">
566
+
567
+ <p>Override this if needed</p>
568
+
569
+
570
+ </div>
571
+ </div>
572
+ <div class="tags">
573
+
574
+
575
+ </div><table class="source_code">
576
+ <tr>
577
+ <td>
578
+ <pre class="lines">
579
+
580
+
581
+ 78
582
+ 79</pre>
583
+ </td>
584
+ <td>
585
+ <pre class="code"><span class="info file"># File 'lib/ovto/middleware.rb', line 78</span>
586
+
587
+ <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
588
+ <span class='kw'>end</span></pre>
589
+ </td>
590
+ </tr>
591
+ </table>
592
+ </div>
593
+
594
+ </div>
595
+
596
+ </div>
597
+
598
+ <div id="footer">
599
+ Generated on Sat Feb 29 23:26:32 2020 by
600
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
601
+ 0.9.24 (ruby-2.5.5).
602
+ </div>
603
+
604
+ </div>
605
+ </body>
606
+ </html>