isimud 0.5.2

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 +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.yardoc/checksums +15 -0
  6. data/.yardoc/object_types +0 -0
  7. data/.yardoc/objects/root.dat +0 -0
  8. data/.yardoc/proxy_types +0 -0
  9. data/Gemfile +23 -0
  10. data/Gemfile.lock +123 -0
  11. data/README.md +218 -0
  12. data/Rakefile +2 -0
  13. data/config.ru +7 -0
  14. data/config/tddium.yml +11 -0
  15. data/doc/Isimud.html +1696 -0
  16. data/doc/Isimud/BunnyClient.html +1004 -0
  17. data/doc/Isimud/Client.html +812 -0
  18. data/doc/Isimud/Event.html +1500 -0
  19. data/doc/Isimud/EventListener.html +1217 -0
  20. data/doc/Isimud/EventObserver.html +367 -0
  21. data/doc/Isimud/EventObserver/ClassMethods.html +292 -0
  22. data/doc/Isimud/Generators.html +117 -0
  23. data/doc/Isimud/Generators/ConfigGenerator.html +192 -0
  24. data/doc/Isimud/Generators/InitializerGenerator.html +192 -0
  25. data/doc/Isimud/Logging.html +230 -0
  26. data/doc/Isimud/ModelWatcher.html +312 -0
  27. data/doc/Isimud/ModelWatcher/ClassMethods.html +511 -0
  28. data/doc/Isimud/Railtie.html +123 -0
  29. data/doc/Isimud/TestClient.html +1003 -0
  30. data/doc/Isimud/TestClient/Queue.html +556 -0
  31. data/doc/_index.html +290 -0
  32. data/doc/class_list.html +58 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +57 -0
  35. data/doc/css/style.css +339 -0
  36. data/doc/file.README.html +338 -0
  37. data/doc/file_list.html +60 -0
  38. data/doc/frames.html +26 -0
  39. data/doc/index.html +338 -0
  40. data/doc/js/app.js +219 -0
  41. data/doc/js/full_list.js +181 -0
  42. data/doc/js/jquery.js +4 -0
  43. data/doc/method_list.html +711 -0
  44. data/doc/top-level-namespace.html +112 -0
  45. data/isimud.gemspec +25 -0
  46. data/lib/isimud.rb +91 -0
  47. data/lib/isimud/bunny_client.rb +95 -0
  48. data/lib/isimud/client.rb +48 -0
  49. data/lib/isimud/event.rb +112 -0
  50. data/lib/isimud/event_listener.rb +200 -0
  51. data/lib/isimud/event_observer.rb +81 -0
  52. data/lib/isimud/logging.rb +11 -0
  53. data/lib/isimud/model_watcher.rb +144 -0
  54. data/lib/isimud/railtie.rb +9 -0
  55. data/lib/isimud/tasks.rb +20 -0
  56. data/lib/isimud/test_client.rb +89 -0
  57. data/lib/isimud/version.rb +3 -0
  58. data/lib/rails/generators/isimud/config_generator.rb +12 -0
  59. data/lib/rails/generators/isimud/initializer_generator.rb +12 -0
  60. data/lib/rails/generators/isimud/templates/initializer.rb +17 -0
  61. data/lib/rails/generators/isimud/templates/isimud.yml +20 -0
  62. data/spec/internal/app/models/admin.rb +2 -0
  63. data/spec/internal/app/models/company.rb +34 -0
  64. data/spec/internal/app/models/user.rb +27 -0
  65. data/spec/internal/config/database.yml +3 -0
  66. data/spec/internal/config/routes.rb +3 -0
  67. data/spec/internal/db/schema.rb +22 -0
  68. data/spec/internal/log/.gitignore +1 -0
  69. data/spec/internal/public/favicon.ico +0 -0
  70. data/spec/isimud/bunny_client_spec.rb +125 -0
  71. data/spec/isimud/event_listener_spec.rb +86 -0
  72. data/spec/isimud/event_observer_spec.rb +32 -0
  73. data/spec/isimud/event_spec.rb +74 -0
  74. data/spec/isimud/model_watcher_spec.rb +189 -0
  75. data/spec/isimud/test_client_spec.rb +28 -0
  76. data/spec/isimud_spec.rb +49 -0
  77. data/spec/spec_helper.rb +55 -0
  78. metadata +195 -0
@@ -0,0 +1,123 @@
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: Isimud::Railtie
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#!Isimud/Railtie.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="../Isimud.html" title="Isimud (module)">Isimud</a></span></span>
36
+ &raquo;
37
+ <span class="title">Railtie</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: Isimud::Railtie
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">Rails::Railtie</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Rails::Railtie</li>
82
+
83
+ <li class="next">Isimud::Railtie</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/isimud/railtie.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ </div>
115
+
116
+ <div id="footer">
117
+ Generated on Fri Apr 3 09:28:08 2015 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.8.7.6 (ruby-2.2.1).
120
+ </div>
121
+
122
+ </body>
123
+ </html>
@@ -0,0 +1,1003 @@
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: Isimud::TestClient
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#!Isimud/TestClient.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 (T)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Isimud.html" title="Isimud (module)">Isimud</a></span></span>
36
+ &raquo;
37
+ <span class="title">TestClient</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: Isimud::TestClient
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"><span class='object_link'><a href="Client.html" title="Isimud::Client (class)">Client</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Client.html" title="Isimud::Client (class)">Client</a></span></li>
82
+
83
+ <li class="next">Isimud::TestClient</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/isimud/test_client.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Defined Under Namespace</h2>
105
+ <p class="children">
106
+
107
+
108
+
109
+
110
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="TestClient/Queue.html" title="Isimud::TestClient::Queue (class)">Queue</a></span>
111
+
112
+
113
+ </p>
114
+
115
+
116
+
117
+
118
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#exception_handler-instance_method" title="#exception_handler (instance method)">- (Object) <strong>exception_handler</strong>(&amp;block) </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+ <span class="note title readonly">readonly</span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'>
144
+ <p>Returns the value of attribute exception_handler.</p>
145
+ </div></span>
146
+
147
+ </li>
148
+
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#queues-instance_method" title="#queues (instance method)">- (Object) <strong>queues</strong> </a>
154
+
155
+
156
+
157
+ </span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+ <span class="summary_desc"><div class='inline'>
171
+ <p>Returns the value of attribute queues.</p>
172
+ </div></span>
173
+
174
+ </li>
175
+
176
+
177
+ </ul>
178
+
179
+
180
+
181
+
182
+
183
+ <h2>
184
+ Instance Method Summary
185
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
186
+ </h2>
187
+
188
+ <ul class="summary">
189
+
190
+ <li class="public ">
191
+ <span class="summary_signature">
192
+
193
+ <a href="#bind-instance_method" title="#bind (instance method)">- (Object) <strong>bind</strong>(queue_name, exchange_name, *keys, &amp;method) </a>
194
+
195
+
196
+
197
+ </span>
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'></div></span>
208
+
209
+ </li>
210
+
211
+
212
+ <li class="public ">
213
+ <span class="summary_signature">
214
+
215
+ <a href="#channel-instance_method" title="#channel (instance method)">- (Object) <strong>channel</strong> </a>
216
+
217
+
218
+
219
+ </span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+ <span class="summary_desc"><div class='inline'></div></span>
230
+
231
+ </li>
232
+
233
+
234
+ <li class="public ">
235
+ <span class="summary_signature">
236
+
237
+ <a href="#close-instance_method" title="#close (instance method)">- (Object) <strong>close</strong> </a>
238
+
239
+
240
+
241
+ </span>
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ <span class="summary_desc"><div class='inline'></div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#connect-instance_method" title="#connect (instance method)">- (Object) <strong>connect</strong> </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <span class="summary_desc"><div class='inline'></div></span>
274
+
275
+ </li>
276
+
277
+
278
+ <li class="public ">
279
+ <span class="summary_signature">
280
+
281
+ <a href="#connected%3F-instance_method" title="#connected? (instance method)">- (Boolean) <strong>connected?</strong> </a>
282
+
283
+
284
+
285
+ </span>
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+ <span class="summary_desc"><div class='inline'></div></span>
296
+
297
+ </li>
298
+
299
+
300
+ <li class="public ">
301
+ <span class="summary_signature">
302
+
303
+ <a href="#create_queue-instance_method" title="#create_queue (instance method)">- (Object) <strong>create_queue</strong>(queue_name, exchange_name, options = {}, &amp;method) </a>
304
+
305
+
306
+
307
+ </span>
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+ <span class="summary_desc"><div class='inline'></div></span>
318
+
319
+ </li>
320
+
321
+
322
+ <li class="public ">
323
+ <span class="summary_signature">
324
+
325
+ <a href="#delete_queue-instance_method" title="#delete_queue (instance method)">- (Object) <strong>delete_queue</strong>(queue_name) </a>
326
+
327
+
328
+
329
+ </span>
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+ <span class="summary_desc"><div class='inline'></div></span>
340
+
341
+ </li>
342
+
343
+
344
+ <li class="public ">
345
+ <span class="summary_signature">
346
+
347
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (TestClient) <strong>initialize</strong>(connection = nil, options = nil) </a>
348
+
349
+
350
+
351
+ </span>
352
+
353
+
354
+ <span class="note title constructor">constructor</span>
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+ <span class="summary_desc"><div class='inline'>
364
+ <p>A new instance of TestClient.</p>
365
+ </div></span>
366
+
367
+ </li>
368
+
369
+
370
+ <li class="public ">
371
+ <span class="summary_signature">
372
+
373
+ <a href="#logger-instance_method" title="#logger (instance method)">- (Object) <strong>logger</strong> </a>
374
+
375
+
376
+
377
+ </span>
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+ <span class="summary_desc"><div class='inline'></div></span>
388
+
389
+ </li>
390
+
391
+
392
+ <li class="public ">
393
+ <span class="summary_signature">
394
+
395
+ <a href="#publish-instance_method" title="#publish (instance method)">- (Object) <strong>publish</strong>(exchange, routing_key, payload) </a>
396
+
397
+
398
+
399
+ </span>
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+ <span class="summary_desc"><div class='inline'></div></span>
410
+
411
+ </li>
412
+
413
+
414
+ <li class="public ">
415
+ <span class="summary_signature">
416
+
417
+ <a href="#reconnect-instance_method" title="#reconnect (instance method)">- (Object) <strong>reconnect</strong> </a>
418
+
419
+
420
+
421
+ </span>
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+ <span class="summary_desc"><div class='inline'></div></span>
432
+
433
+ </li>
434
+
435
+
436
+ <li class="public ">
437
+ <span class="summary_signature">
438
+
439
+ <a href="#reset-instance_method" title="#reset (instance method)">- (Object) <strong>reset</strong> </a>
440
+
441
+
442
+
443
+ </span>
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+ <span class="summary_desc"><div class='inline'></div></span>
454
+
455
+ </li>
456
+
457
+
458
+ </ul>
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Logging.html" title="Isimud::Logging (module)">Logging</a></span></h3>
477
+ <p class="inherited"><span class='object_link'><a href="Logging.html#log-instance_method" title="Isimud::Logging#log (method)">#log</a></span></p>
478
+ <div id="constructor_details" class="method_details_list">
479
+ <h2>Constructor Details</h2>
480
+
481
+ <div class="method_details first">
482
+ <h3 class="signature first" id="initialize-instance_method">
483
+
484
+ - (<tt><span class='object_link'><a href="" title="Isimud::TestClient (class)">TestClient</a></span></tt>) <strong>initialize</strong>(connection = nil, options = nil)
485
+
486
+
487
+
488
+
489
+
490
+ </h3><div class="docstring">
491
+ <div class="discussion">
492
+
493
+ <p>Returns a new instance of TestClient</p>
494
+
495
+
496
+ </div>
497
+ </div>
498
+ <div class="tags">
499
+
500
+
501
+ </div><table class="source_code">
502
+ <tr>
503
+ <td>
504
+ <pre class="lines">
505
+
506
+
507
+ 34
508
+ 35
509
+ 36</pre>
510
+ </td>
511
+ <td>
512
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 34</span>
513
+
514
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
515
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_queues'>queues</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
516
+ <span class='kw'>end</span></pre>
517
+ </td>
518
+ </tr>
519
+ </table>
520
+ </div>
521
+
522
+ </div>
523
+
524
+ <div id="instance_attr_details" class="attr_details">
525
+ <h2>Instance Attribute Details</h2>
526
+
527
+
528
+ <span id=""></span>
529
+ <div class="method_details first">
530
+ <h3 class="signature first" id="exception_handler-instance_method">
531
+
532
+ - (<tt>Object</tt>) <strong>exception_handler</strong>(&amp;block) <span class="extras">(readonly)</span>
533
+
534
+
535
+
536
+
537
+
538
+ </h3><div class="docstring">
539
+ <div class="discussion">
540
+
541
+ <p>Returns the value of attribute exception_handler</p>
542
+
543
+
544
+ </div>
545
+ </div>
546
+ <div class="tags">
547
+
548
+
549
+ </div><table class="source_code">
550
+ <tr>
551
+ <td>
552
+ <pre class="lines">
553
+
554
+
555
+ 4
556
+ 5
557
+ 6</pre>
558
+ </td>
559
+ <td>
560
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 4</span>
561
+
562
+ <span class='kw'>def</span> <span class='id identifier rubyid_exception_handler'>exception_handler</span>
563
+ <span class='ivar'>@exception_handler</span>
564
+ <span class='kw'>end</span></pre>
565
+ </td>
566
+ </tr>
567
+ </table>
568
+ </div>
569
+
570
+
571
+ <span id="queues=-instance_method"></span>
572
+ <div class="method_details ">
573
+ <h3 class="signature " id="queues-instance_method">
574
+
575
+ - (<tt>Object</tt>) <strong>queues</strong>
576
+
577
+
578
+
579
+
580
+
581
+ </h3><div class="docstring">
582
+ <div class="discussion">
583
+
584
+ <p>Returns the value of attribute queues</p>
585
+
586
+
587
+ </div>
588
+ </div>
589
+ <div class="tags">
590
+
591
+
592
+ </div><table class="source_code">
593
+ <tr>
594
+ <td>
595
+ <pre class="lines">
596
+
597
+
598
+ 3
599
+ 4
600
+ 5</pre>
601
+ </td>
602
+ <td>
603
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 3</span>
604
+
605
+ <span class='kw'>def</span> <span class='id identifier rubyid_queues'>queues</span>
606
+ <span class='ivar'>@queues</span>
607
+ <span class='kw'>end</span></pre>
608
+ </td>
609
+ </tr>
610
+ </table>
611
+ </div>
612
+
613
+ </div>
614
+
615
+
616
+ <div id="instance_method_details" class="method_details_list">
617
+ <h2>Instance Method Details</h2>
618
+
619
+
620
+ <div class="method_details first">
621
+ <h3 class="signature first" id="bind-instance_method">
622
+
623
+ - (<tt>Object</tt>) <strong>bind</strong>(queue_name, exchange_name, *keys, &amp;method)
624
+
625
+
626
+
627
+
628
+
629
+ </h3><table class="source_code">
630
+ <tr>
631
+ <td>
632
+ <pre class="lines">
633
+
634
+
635
+ 57
636
+ 58
637
+ 59</pre>
638
+ </td>
639
+ <td>
640
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 57</span>
641
+
642
+ <span class='kw'>def</span> <span class='id identifier rubyid_bind'>bind</span><span class='lparen'>(</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='comma'>,</span> <span class='id identifier rubyid_exchange_name'>exchange_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
643
+ <span class='id identifier rubyid_create_queue'>create_queue</span><span class='lparen'>(</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='comma'>,</span> <span class='id identifier rubyid_exchange_name'>exchange_name</span><span class='comma'>,</span> <span class='label'>routing_keys:</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
644
+ <span class='kw'>end</span></pre>
645
+ </td>
646
+ </tr>
647
+ </table>
648
+ </div>
649
+
650
+ <div class="method_details ">
651
+ <h3 class="signature " id="channel-instance_method">
652
+
653
+ - (<tt>Object</tt>) <strong>channel</strong>
654
+
655
+
656
+
657
+
658
+
659
+ </h3><table class="source_code">
660
+ <tr>
661
+ <td>
662
+ <pre class="lines">
663
+
664
+
665
+ 42
666
+ 43
667
+ 44</pre>
668
+ </td>
669
+ <td>
670
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 42</span>
671
+
672
+ <span class='kw'>def</span> <span class='id identifier rubyid_channel'>channel</span>
673
+ <span class='kw'>self</span>
674
+ <span class='kw'>end</span></pre>
675
+ </td>
676
+ </tr>
677
+ </table>
678
+ </div>
679
+
680
+ <div class="method_details ">
681
+ <h3 class="signature " id="close-instance_method">
682
+
683
+ - (<tt>Object</tt>) <strong>close</strong>
684
+
685
+
686
+
687
+
688
+
689
+ </h3><table class="source_code">
690
+ <tr>
691
+ <td>
692
+ <pre class="lines">
693
+
694
+
695
+ 50
696
+ 51</pre>
697
+ </td>
698
+ <td>
699
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 50</span>
700
+
701
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
702
+ <span class='kw'>end</span></pre>
703
+ </td>
704
+ </tr>
705
+ </table>
706
+ </div>
707
+
708
+ <div class="method_details ">
709
+ <h3 class="signature " id="connect-instance_method">
710
+
711
+ - (<tt>Object</tt>) <strong>connect</strong>
712
+
713
+
714
+
715
+
716
+
717
+ </h3><table class="source_code">
718
+ <tr>
719
+ <td>
720
+ <pre class="lines">
721
+
722
+
723
+ 38
724
+ 39
725
+ 40</pre>
726
+ </td>
727
+ <td>
728
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 38</span>
729
+
730
+ <span class='kw'>def</span> <span class='id identifier rubyid_connect'>connect</span>
731
+ <span class='kw'>self</span>
732
+ <span class='kw'>end</span></pre>
733
+ </td>
734
+ </tr>
735
+ </table>
736
+ </div>
737
+
738
+ <div class="method_details ">
739
+ <h3 class="signature " id="connected?-instance_method">
740
+
741
+ - (<tt>Boolean</tt>) <strong>connected?</strong>
742
+
743
+
744
+
745
+
746
+
747
+ </h3><div class="docstring">
748
+ <div class="discussion">
749
+
750
+
751
+ </div>
752
+ </div>
753
+ <div class="tags">
754
+
755
+ <p class="tag_title">Returns:</p>
756
+ <ul class="return">
757
+
758
+ <li>
759
+
760
+
761
+ <span class='type'>(<tt>Boolean</tt>)</span>
762
+
763
+
764
+
765
+ </li>
766
+
767
+ </ul>
768
+
769
+ </div><table class="source_code">
770
+ <tr>
771
+ <td>
772
+ <pre class="lines">
773
+
774
+
775
+ 46
776
+ 47
777
+ 48</pre>
778
+ </td>
779
+ <td>
780
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 46</span>
781
+
782
+ <span class='kw'>def</span> <span class='id identifier rubyid_connected?'>connected?</span>
783
+ <span class='kw'>true</span>
784
+ <span class='kw'>end</span></pre>
785
+ </td>
786
+ </tr>
787
+ </table>
788
+ </div>
789
+
790
+ <div class="method_details ">
791
+ <h3 class="signature " id="create_queue-instance_method">
792
+
793
+ - (<tt>Object</tt>) <strong>create_queue</strong>(queue_name, exchange_name, options = {}, &amp;method)
794
+
795
+
796
+
797
+
798
+
799
+ </h3><table class="source_code">
800
+ <tr>
801
+ <td>
802
+ <pre class="lines">
803
+
804
+
805
+ 61
806
+ 62
807
+ 63
808
+ 64
809
+ 65
810
+ 66
811
+ 67
812
+ 68
813
+ 69</pre>
814
+ </td>
815
+ <td>
816
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 61</span>
817
+
818
+ <span class='kw'>def</span> <span class='id identifier rubyid_create_queue'>create_queue</span><span class='lparen'>(</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='comma'>,</span> <span class='id identifier rubyid_exchange_name'>exchange_name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
819
+ <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:routing_keys</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
820
+ <span class='id identifier rubyid_log'>log</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Isimud::TestClient: Binding queue </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='embexpr_end'>}</span><span class='tstring_content'> for keys </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
821
+ <span class='id identifier rubyid_queue'>queue</span> <span class='op'>=</span> <span class='id identifier rubyid_queues'>queues</span><span class='lbracket'>[</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='const'>Queue</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
822
+ <span class='id identifier rubyid_keys'>keys</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_k'>k</span><span class='op'>|</span>
823
+ <span class='id identifier rubyid_queue'>queue</span><span class='period'>.</span><span class='id identifier rubyid_bind'>bind</span><span class='lparen'>(</span><span class='id identifier rubyid_exchange_name'>exchange_name</span><span class='comma'>,</span> <span class='label'>routing_key:</span> <span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
824
+ <span class='kw'>end</span>
825
+ <span class='id identifier rubyid_queue'>queue</span>
826
+ <span class='kw'>end</span></pre>
827
+ </td>
828
+ </tr>
829
+ </table>
830
+ </div>
831
+
832
+ <div class="method_details ">
833
+ <h3 class="signature " id="delete_queue-instance_method">
834
+
835
+ - (<tt>Object</tt>) <strong>delete_queue</strong>(queue_name)
836
+
837
+
838
+
839
+
840
+
841
+ </h3><table class="source_code">
842
+ <tr>
843
+ <td>
844
+ <pre class="lines">
845
+
846
+
847
+ 53
848
+ 54
849
+ 55</pre>
850
+ </td>
851
+ <td>
852
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 53</span>
853
+
854
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete_queue'>delete_queue</span><span class='lparen'>(</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='rparen'>)</span>
855
+ <span class='id identifier rubyid_queues'>queues</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_queue_name'>queue_name</span><span class='rparen'>)</span>
856
+ <span class='kw'>end</span></pre>
857
+ </td>
858
+ </tr>
859
+ </table>
860
+ </div>
861
+
862
+ <div class="method_details ">
863
+ <h3 class="signature " id="logger-instance_method">
864
+
865
+ - (<tt>Object</tt>) <strong>logger</strong>
866
+
867
+
868
+
869
+
870
+
871
+ </h3><table class="source_code">
872
+ <tr>
873
+ <td>
874
+ <pre class="lines">
875
+
876
+
877
+ 92
878
+ 93
879
+ 94</pre>
880
+ </td>
881
+ <td>
882
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 92</span>
883
+
884
+ <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
885
+ <span class='const'>Isimud</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
886
+ <span class='kw'>end</span></pre>
887
+ </td>
888
+ </tr>
889
+ </table>
890
+ </div>
891
+
892
+ <div class="method_details ">
893
+ <h3 class="signature " id="publish-instance_method">
894
+
895
+ - (<tt>Object</tt>) <strong>publish</strong>(exchange, routing_key, payload)
896
+
897
+
898
+
899
+
900
+
901
+ </h3><table class="source_code">
902
+ <tr>
903
+ <td>
904
+ <pre class="lines">
905
+
906
+
907
+ 71
908
+ 72
909
+ 73
910
+ 74
911
+ 75
912
+ 76
913
+ 77
914
+ 78</pre>
915
+ </td>
916
+ <td>
917
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 71</span>
918
+
919
+ <span class='kw'>def</span> <span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span><span class='id identifier rubyid_exchange'>exchange</span><span class='comma'>,</span> <span class='id identifier rubyid_routing_key'>routing_key</span><span class='comma'>,</span> <span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
920
+ <span class='id identifier rubyid_log'>log</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Isimud::TestClient: Delivering message key: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_routing_key'>routing_key</span><span class='embexpr_end'>}</span><span class='tstring_content'> payload: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_payload'>payload</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
921
+ <span class='id identifier rubyid_call_queues'>call_queues</span> <span class='op'>=</span> <span class='id identifier rubyid_queues'>queues</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_queue'>queue</span><span class='op'>|</span> <span class='id identifier rubyid_queue'>queue</span><span class='period'>.</span><span class='id identifier rubyid_has_matching_key?'>has_matching_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_routing_key'>routing_key</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
922
+ <span class='id identifier rubyid_call_queues'>call_queues</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_queue'>queue</span><span class='op'>|</span>
923
+ <span class='id identifier rubyid_log'>log</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Isimud::TestClient: Queue </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_queue'>queue</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> matches routing key </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_routing_key'>routing_key</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
924
+ <span class='id identifier rubyid_queue'>queue</span><span class='period'>.</span><span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span><span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
925
+ <span class='kw'>end</span>
926
+ <span class='kw'>end</span></pre>
927
+ </td>
928
+ </tr>
929
+ </table>
930
+ </div>
931
+
932
+ <div class="method_details ">
933
+ <h3 class="signature " id="reconnect-instance_method">
934
+
935
+ - (<tt>Object</tt>) <strong>reconnect</strong>
936
+
937
+
938
+
939
+
940
+
941
+ </h3><table class="source_code">
942
+ <tr>
943
+ <td>
944
+ <pre class="lines">
945
+
946
+
947
+ 88
948
+ 89
949
+ 90</pre>
950
+ </td>
951
+ <td>
952
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 88</span>
953
+
954
+ <span class='kw'>def</span> <span class='id identifier rubyid_reconnect'>reconnect</span>
955
+ <span class='kw'>self</span>
956
+ <span class='kw'>end</span></pre>
957
+ </td>
958
+ </tr>
959
+ </table>
960
+ </div>
961
+
962
+ <div class="method_details ">
963
+ <h3 class="signature " id="reset-instance_method">
964
+
965
+ - (<tt>Object</tt>) <strong>reset</strong>
966
+
967
+
968
+
969
+
970
+
971
+ </h3><table class="source_code">
972
+ <tr>
973
+ <td>
974
+ <pre class="lines">
975
+
976
+
977
+ 84
978
+ 85
979
+ 86</pre>
980
+ </td>
981
+ <td>
982
+ <pre class="code"><span class="info file"># File 'lib/isimud/test_client.rb', line 84</span>
983
+
984
+ <span class='kw'>def</span> <span class='id identifier rubyid_reset'>reset</span>
985
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_queues'>queues</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
986
+ <span class='kw'>end</span></pre>
987
+ </td>
988
+ </tr>
989
+ </table>
990
+ </div>
991
+
992
+ </div>
993
+
994
+ </div>
995
+
996
+ <div id="footer">
997
+ Generated on Fri Apr 3 09:28:08 2015 by
998
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
999
+ 0.8.7.6 (ruby-2.2.1).
1000
+ </div>
1001
+
1002
+ </body>
1003
+ </html>