tango-etl 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/{changelog.md → CHANGELOG.md} +5 -1
  3. data/{readme.md → README.md} +1 -1
  4. data/doc/Multidb/Balancer.html +202 -0
  5. data/doc/Multidb.html +184 -0
  6. data/doc/Tango/AbstractModel.html +608 -0
  7. data/doc/Tango/App.html +1334 -0
  8. data/doc/Tango/DatabaseLocker.html +541 -0
  9. data/doc/Tango/ETL/Dispatcher.html +465 -0
  10. data/doc/Tango/ETL/HandlerInterface.html +639 -0
  11. data/doc/Tango/ETL/OperatorInterface.html +494 -0
  12. data/doc/Tango/ETL.html +117 -0
  13. data/doc/Tango/Kernel.html +432 -0
  14. data/doc/Tango/LinkStack.html +737 -0
  15. data/doc/Tango/Resource/Buffer.html +565 -0
  16. data/doc/Tango/Resource/Cache.html +834 -0
  17. data/doc/Tango/Resource.html +117 -0
  18. data/doc/Tango.html +131 -0
  19. data/doc/_index.html +297 -0
  20. data/doc/class_list.html +54 -0
  21. data/doc/css/common.css +1 -0
  22. data/doc/css/full_list.css +57 -0
  23. data/doc/css/style.css +339 -0
  24. data/doc/file.README.html +80 -0
  25. data/doc/file_list.html +56 -0
  26. data/doc/frames.html +26 -0
  27. data/doc/index.html +80 -0
  28. data/doc/js/app.js +219 -0
  29. data/doc/js/full_list.js +178 -0
  30. data/doc/js/jquery.js +4 -0
  31. data/doc/method_list.html +365 -0
  32. data/doc/top-level-namespace.html +112 -0
  33. data/lib/tango/abstract_model.rb +1 -0
  34. data/lib/tango/app.rb +4 -7
  35. data/lib/tango/database_locker.rb +23 -2
  36. data/lib/tango/etl/handler_interface.rb +12 -6
  37. data/lib/tango/resource/buffer.rb +7 -7
  38. data/lib/tango/resource/cache.rb +18 -13
  39. data/lib/tango/version.rb +1 -1
  40. data/test/support/lib/simple_handler.rb +5 -14
  41. data/test/unit/etl/test_dispatcher.rb +21 -5
  42. metadata +33 -6
  43. data/config/app.yml.sample +0 -6
  44. data/config/database.yml.sample +0 -27
@@ -0,0 +1,465 @@
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: Tango::ETL::Dispatcher
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
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#!Tango/ETL/Dispatcher.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 (D)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Tango.html" title="Tango (module)">Tango</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ETL.html" title="Tango::ETL (module)">ETL</a></span></span>
36
+ &raquo;
37
+ <span class="title">Dispatcher</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: Tango::ETL::Dispatcher
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">Tango::ETL::Dispatcher</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/tango/etl/dispatcher.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Dispatcher of handlers</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+ <p class="tag_title">Author:</p>
113
+ <ul class="author">
114
+
115
+ <li>
116
+
117
+
118
+
119
+
120
+
121
+ <div class='inline'>
122
+ <p>Mckomo</p>
123
+ </div>
124
+
125
+ </li>
126
+
127
+ </ul>
128
+
129
+ </div>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <h2>
138
+ Instance Method Summary
139
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
140
+ </h2>
141
+
142
+ <ul class="summary">
143
+
144
+ <li class="public ">
145
+ <span class="summary_signature">
146
+
147
+ <a href="#find_handler-instance_method" title="#find_handler (instance method)">- (HandlerInterface) <strong>find_handler</strong>(url) </a>
148
+
149
+
150
+
151
+ </span>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ <span class="summary_desc"><div class='inline'>
162
+ <p>Find first applicable handler.</p>
163
+ </div></span>
164
+
165
+ </li>
166
+
167
+
168
+ <li class="public ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Dispatcher) <strong>initialize</strong> </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+ <span class="note title constructor">constructor</span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>A new instance of Dispatcher.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ <li class="public ">
195
+ <span class="summary_signature">
196
+
197
+ <a href="#register-instance_method" title="#register (instance method)">- (Dispatcher) <strong>register</strong>(handler_class) </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ <span class="summary_desc"><div class='inline'>
212
+ <p>Register new handler.</p>
213
+ </div></span>
214
+
215
+ </li>
216
+
217
+
218
+ </ul>
219
+
220
+
221
+ <div id="constructor_details" class="method_details_list">
222
+ <h2>Constructor Details</h2>
223
+
224
+ <div class="method_details first">
225
+ <h3 class="signature first" id="initialize-instance_method">
226
+
227
+ - (<tt><span class='object_link'><a href="" title="Tango::ETL::Dispatcher (class)">Dispatcher</a></span></tt>) <strong>initialize</strong>
228
+
229
+
230
+
231
+
232
+
233
+ </h3><div class="docstring">
234
+ <div class="discussion">
235
+
236
+ <p>Returns a new instance of Dispatcher</p>
237
+
238
+
239
+ </div>
240
+ </div>
241
+ <div class="tags">
242
+
243
+
244
+ </div><table class="source_code">
245
+ <tr>
246
+ <td>
247
+ <pre class="lines">
248
+
249
+
250
+ 9
251
+ 10
252
+ 11</pre>
253
+ </td>
254
+ <td>
255
+ <pre class="code"><span class="info file"># File 'lib/tango/etl/dispatcher.rb', line 9</span>
256
+
257
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
258
+ <span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
259
+ <span class='kw'>end</span></pre>
260
+ </td>
261
+ </tr>
262
+ </table>
263
+ </div>
264
+
265
+ </div>
266
+
267
+
268
+ <div id="instance_method_details" class="method_details_list">
269
+ <h2>Instance Method Details</h2>
270
+
271
+
272
+ <div class="method_details first">
273
+ <h3 class="signature first" id="find_handler-instance_method">
274
+
275
+ - (<tt><span class='object_link'><a href="HandlerInterface.html" title="Tango::ETL::HandlerInterface (class)">HandlerInterface</a></span></tt>) <strong>find_handler</strong>(url)
276
+
277
+
278
+
279
+
280
+
281
+ </h3><div class="docstring">
282
+ <div class="discussion">
283
+
284
+ <p>Find first applicable handler</p>
285
+
286
+
287
+ </div>
288
+ </div>
289
+ <div class="tags">
290
+ <p class="tag_title">Parameters:</p>
291
+ <ul class="param">
292
+
293
+ <li>
294
+
295
+ <span class='name'>url</span>
296
+
297
+
298
+ <span class='type'>(<tt>String</tt>)</span>
299
+
300
+
301
+
302
+ &mdash;
303
+ <div class='inline'>
304
+ <p>URL of the page to be handled</p>
305
+ </div>
306
+
307
+ </li>
308
+
309
+ </ul>
310
+
311
+ <p class="tag_title">Returns:</p>
312
+ <ul class="return">
313
+
314
+ <li>
315
+
316
+
317
+ <span class='type'>(<tt><span class='object_link'><a href="HandlerInterface.html" title="Tango::ETL::HandlerInterface (class)">HandlerInterface</a></span></tt>)</span>
318
+
319
+
320
+
321
+ </li>
322
+
323
+ </ul>
324
+
325
+ </div><table class="source_code">
326
+ <tr>
327
+ <td>
328
+ <pre class="lines">
329
+
330
+
331
+ 35
332
+ 36
333
+ 37
334
+ 38
335
+ 39
336
+ 40
337
+ 41
338
+ 42
339
+ 43
340
+ 44</pre>
341
+ </td>
342
+ <td>
343
+ <pre class="code"><span class="info file"># File 'lib/tango/etl/dispatcher.rb', line 35</span>
344
+
345
+ <span class='kw'>def</span> <span class='id identifier rubyid_find_handler'>find_handler</span><span class='lparen'>(</span> <span class='id identifier rubyid_url'>url</span> <span class='rparen'>)</span>
346
+
347
+ <span class='comment'># Iterate handlers to find first matching handler
348
+ </span> <span class='ivar'>@handlers</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_h'>h</span><span class='op'>|</span>
349
+ <span class='kw'>return</span> <span class='id identifier rubyid_h'>h</span> <span class='kw'>if</span> <span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_applicable?'>applicable?</span><span class='lparen'>(</span> <span class='id identifier rubyid_url'>url</span> <span class='rparen'>)</span>
350
+ <span class='kw'>end</span>
351
+
352
+ <span class='kw'>nil</span>
353
+
354
+ <span class='kw'>end</span></pre>
355
+ </td>
356
+ </tr>
357
+ </table>
358
+ </div>
359
+
360
+ <div class="method_details ">
361
+ <h3 class="signature " id="register-instance_method">
362
+
363
+ - (<tt><span class='object_link'><a href="" title="Tango::ETL::Dispatcher (class)">Dispatcher</a></span></tt>) <strong>register</strong>(handler_class)
364
+
365
+
366
+
367
+
368
+
369
+ </h3><div class="docstring">
370
+ <div class="discussion">
371
+
372
+ <p>Register new handler</p>
373
+
374
+
375
+ </div>
376
+ </div>
377
+ <div class="tags">
378
+ <p class="tag_title">Parameters:</p>
379
+ <ul class="param">
380
+
381
+ <li>
382
+
383
+ <span class='name'>handler_class</span>
384
+
385
+
386
+ <span class='type'>(<tt><span class='object_link'><a href="HandlerInterface.html" title="Tango::ETL::HandlerInterface (class)">HandlerInterface</a></span></tt>)</span>
387
+
388
+
389
+
390
+ &mdash;
391
+ <div class='inline'>
392
+ <p>Class that implements HandlerInterface</p>
393
+ </div>
394
+
395
+ </li>
396
+
397
+ </ul>
398
+
399
+ <p class="tag_title">Returns:</p>
400
+ <ul class="return">
401
+
402
+ <li>
403
+
404
+
405
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Tango::ETL::Dispatcher (class)">Dispatcher</a></span></tt>)</span>
406
+
407
+
408
+
409
+ </li>
410
+
411
+ </ul>
412
+
413
+ </div><table class="source_code">
414
+ <tr>
415
+ <td>
416
+ <pre class="lines">
417
+
418
+
419
+ 17
420
+ 18
421
+ 19
422
+ 20
423
+ 21
424
+ 22
425
+ 23
426
+ 24
427
+ 25
428
+ 26
429
+ 27
430
+ 28
431
+ 29</pre>
432
+ </td>
433
+ <td>
434
+ <pre class="code"><span class="info file"># File 'lib/tango/etl/dispatcher.rb', line 17</span>
435
+
436
+ <span class='kw'>def</span> <span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span> <span class='id identifier rubyid_handler_class'>handler_class</span> <span class='rparen'>)</span>
437
+
438
+ <span class='comment'># handler must implement HandlerInterface
439
+ </span> <span class='kw'>unless</span> <span class='id identifier rubyid_handler_class'>handler_class</span><span class='period'>.</span><span class='id identifier rubyid_ancestors'>ancestors</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='const'>Tango</span><span class='op'>::</span><span class='const'>ETL</span><span class='op'>::</span><span class='const'>HandlerInterface</span>
440
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Handler must implement HandlerInterface</span><span class='tstring_end'>&quot;</span></span>
441
+ <span class='kw'>end</span>
442
+
443
+ <span class='comment'># Append handler to container
444
+ </span> <span class='ivar'>@handlers</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_handler_class'>handler_class</span>
445
+
446
+ <span class='kw'>self</span> <span class='comment'># Chainabilty!
447
+ </span>
448
+ <span class='kw'>end</span></pre>
449
+ </td>
450
+ </tr>
451
+ </table>
452
+ </div>
453
+
454
+ </div>
455
+
456
+ </div>
457
+
458
+ <div id="footer">
459
+ Generated on Tue Apr 15 02:47:42 2014 by
460
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
461
+ 0.8.7.4 (ruby-2.0.0).
462
+ </div>
463
+
464
+ </body>
465
+ </html>