isimud 0.7.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec +1 -2
- data/.ruby-version +1 -1
- data/.yardoc/checksums +10 -10
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +63 -73
- data/LICENSE.txt +19 -0
- data/README.md +51 -3
- data/Rakefile +5 -0
- data/doc/Isimud/BunnyClient.html +882 -179
- data/doc/Isimud/Client.html +236 -18
- data/doc/Isimud/Event.html +211 -95
- data/doc/Isimud/EventListener.html +325 -307
- data/doc/Isimud/EventObserver/ClassMethods.html +14 -14
- data/doc/Isimud/EventObserver.html +418 -36
- data/doc/Isimud/Generators/ConfigGenerator.html +2 -2
- data/doc/Isimud/Generators/InitializerGenerator.html +2 -2
- data/doc/Isimud/Generators.html +2 -2
- data/doc/Isimud/Logging.html +3 -3
- data/doc/Isimud/ModelWatcher/ClassMethods.html +3 -3
- data/doc/Isimud/ModelWatcher.html +2 -2
- data/doc/Isimud/Railtie.html +2 -2
- data/doc/Isimud/TestClient/Queue.html +374 -71
- data/doc/Isimud/TestClient.html +169 -161
- data/doc/Isimud.html +80 -76
- data/doc/_index.html +5 -2
- data/doc/file.LICENSE.html +73 -0
- data/doc/file.README.html +131 -7
- data/doc/file_list.html +3 -0
- data/doc/index.html +131 -7
- data/doc/method_list.html +183 -105
- data/doc/top-level-namespace.html +2 -2
- data/isimud.gemspec +18 -16
- data/lib/isimud/bunny_client.rb +85 -32
- data/lib/isimud/client.rb +23 -7
- data/lib/isimud/event.rb +11 -14
- data/lib/isimud/event_listener.rb +123 -65
- data/lib/isimud/event_observer.rb +70 -10
- data/lib/isimud/model_watcher.rb +1 -1
- data/lib/isimud/test_client.rb +54 -26
- data/lib/isimud/version.rb +1 -1
- data/lib/isimud.rb +1 -1
- data/spec/internal/app/models/company.rb +8 -10
- data/spec/internal/app/models/user.rb +11 -1
- data/spec/internal/db/schema.rb +5 -0
- data/spec/isimud/bunny_client_spec.rb +21 -9
- data/spec/isimud/client_spec.rb +40 -0
- data/spec/isimud/event_listener_spec.rb +50 -22
- data/spec/isimud/event_observer_spec.rb +107 -16
- data/spec/isimud/model_watcher_spec.rb +18 -23
- data/spec/isimud/test_client_spec.rb +43 -8
- data/spec/isimud_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -0
- metadata +19 -35
- checksums.yaml.gz.sig +0 -0
- data/certs/gfeil.pem +0 -21
- data/release +0 -31
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -2
data/doc/Isimud/Client.html
CHANGED
@@ -250,7 +250,7 @@
|
|
250
250
|
<li class="public ">
|
251
251
|
<span class="summary_signature">
|
252
252
|
|
253
|
-
<a href="#create_queue-instance_method" title="#create_queue (instance method)">- (Object) <strong>create_queue</strong>(queue_name, exchange_name, options = {}
|
253
|
+
<a href="#create_queue-instance_method" title="#create_queue (instance method)">- (Object) <strong>create_queue</strong>(queue_name, exchange_name, options = {}) </a>
|
254
254
|
|
255
255
|
|
256
256
|
|
@@ -294,7 +294,7 @@
|
|
294
294
|
<li class="public ">
|
295
295
|
<span class="summary_signature">
|
296
296
|
|
297
|
-
<a href="#
|
297
|
+
<a href="#find_queue-instance_method" title="#find_queue (instance method)">- (Object) <strong>find_queue</strong>(queue_name, options = {}) </a>
|
298
298
|
|
299
299
|
|
300
300
|
|
@@ -336,6 +336,31 @@
|
|
336
336
|
<p>A new instance of Client.</p>
|
337
337
|
</div></span>
|
338
338
|
|
339
|
+
</li>
|
340
|
+
|
341
|
+
|
342
|
+
<li class="public ">
|
343
|
+
<span class="summary_signature">
|
344
|
+
|
345
|
+
<a href="#on_exception-instance_method" title="#on_exception (instance method)">- (Object) <strong>on_exception</strong> {|e| ... }</a>
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
</span>
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
<span class="summary_desc"><div class='inline'>
|
360
|
+
<p>Declare a proc to be run whenever an uncaught exception is raised within a
|
361
|
+
message processing block.</p>
|
362
|
+
</div></span>
|
363
|
+
|
339
364
|
</li>
|
340
365
|
|
341
366
|
|
@@ -400,6 +425,52 @@
|
|
400
425
|
|
401
426
|
|
402
427
|
|
428
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
429
|
+
|
430
|
+
</li>
|
431
|
+
|
432
|
+
|
433
|
+
<li class="public ">
|
434
|
+
<span class="summary_signature">
|
435
|
+
|
436
|
+
<a href="#run_exception_handlers-instance_method" title="#run_exception_handlers (instance method)">- (Object) <strong>run_exception_handlers</strong>(exception) </a>
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
</span>
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
<span class="summary_desc"><div class='inline'>
|
451
|
+
<p>Call each of the exception handlers declared by #on_exception.</p>
|
452
|
+
</div></span>
|
453
|
+
|
454
|
+
</li>
|
455
|
+
|
456
|
+
|
457
|
+
<li class="public ">
|
458
|
+
<span class="summary_signature">
|
459
|
+
|
460
|
+
<a href="#subscribe-instance_method" title="#subscribe (instance method)">- (Object) <strong>subscribe</strong>(queue, options = {}, &block) </a>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
</span>
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
403
474
|
<span class="summary_desc"><div class='inline'></div></span>
|
404
475
|
|
405
476
|
</li>
|
@@ -633,7 +704,7 @@
|
|
633
704
|
<div class="method_details ">
|
634
705
|
<h3 class="signature " id="create_queue-instance_method">
|
635
706
|
|
636
|
-
- (<tt>Object</tt>) <strong>create_queue</strong>(queue_name, exchange_name, options = {}
|
707
|
+
- (<tt>Object</tt>) <strong>create_queue</strong>(queue_name, exchange_name, options = {})
|
637
708
|
|
638
709
|
|
639
710
|
|
@@ -651,7 +722,7 @@
|
|
651
722
|
<td>
|
652
723
|
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 24</span>
|
653
724
|
|
654
|
-
<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='
|
725
|
+
<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='rparen'>)</span>
|
655
726
|
<span class='kw'>end</span></pre>
|
656
727
|
</td>
|
657
728
|
</tr>
|
@@ -687,9 +758,9 @@
|
|
687
758
|
</div>
|
688
759
|
|
689
760
|
<div class="method_details ">
|
690
|
-
<h3 class="signature " id="
|
761
|
+
<h3 class="signature " id="find_queue-instance_method">
|
691
762
|
|
692
|
-
- (<tt>Object</tt>) <strong>
|
763
|
+
- (<tt>Object</tt>) <strong>find_queue</strong>(queue_name, options = {})
|
693
764
|
|
694
765
|
|
695
766
|
|
@@ -707,7 +778,70 @@
|
|
707
778
|
<td>
|
708
779
|
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 30</span>
|
709
780
|
|
710
|
-
<span class='kw'>def</span> <span class='id identifier
|
781
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_find_queue'>find_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_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
782
|
+
<span class='kw'>end</span></pre>
|
783
|
+
</td>
|
784
|
+
</tr>
|
785
|
+
</table>
|
786
|
+
</div>
|
787
|
+
|
788
|
+
<div class="method_details ">
|
789
|
+
<h3 class="signature " id="on_exception-instance_method">
|
790
|
+
|
791
|
+
- (<tt>Object</tt>) <strong>on_exception</strong> {|e| ... }
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
</h3><div class="docstring">
|
798
|
+
<div class="discussion">
|
799
|
+
|
800
|
+
<p>Declare a proc to be run whenever an uncaught exception is raised within a
|
801
|
+
message processing block. This is useful for logging or monitoring errors,
|
802
|
+
for instance.</p>
|
803
|
+
|
804
|
+
|
805
|
+
</div>
|
806
|
+
</div>
|
807
|
+
<div class="tags">
|
808
|
+
|
809
|
+
<p class="tag_title">Yield Parameters:</p>
|
810
|
+
<ul class="yieldparam">
|
811
|
+
|
812
|
+
<li>
|
813
|
+
|
814
|
+
<span class='name'>e</span>
|
815
|
+
|
816
|
+
|
817
|
+
<span class='type'>(<tt>Exception</tt>)</span>
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
—
|
822
|
+
<div class='inline'>
|
823
|
+
<p>exception raised</p>
|
824
|
+
</div>
|
825
|
+
|
826
|
+
</li>
|
827
|
+
|
828
|
+
</ul>
|
829
|
+
|
830
|
+
</div><table class="source_code">
|
831
|
+
<tr>
|
832
|
+
<td>
|
833
|
+
<pre class="lines">
|
834
|
+
|
835
|
+
|
836
|
+
36
|
837
|
+
37
|
838
|
+
38</pre>
|
839
|
+
</td>
|
840
|
+
<td>
|
841
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 36</span>
|
842
|
+
|
843
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_exception'>on_exception</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
844
|
+
<span class='id identifier rubyid_exception_handlers'>exception_handlers</span> <span class='op'><<</span> <span class='id identifier rubyid_block'>block</span>
|
711
845
|
<span class='kw'>end</span></pre>
|
712
846
|
</td>
|
713
847
|
</tr>
|
@@ -729,11 +863,11 @@
|
|
729
863
|
<pre class="lines">
|
730
864
|
|
731
865
|
|
732
|
-
|
733
|
-
|
866
|
+
46
|
867
|
+
47</pre>
|
734
868
|
</td>
|
735
869
|
<td>
|
736
|
-
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line
|
870
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 46</span>
|
737
871
|
|
738
872
|
<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>
|
739
873
|
<span class='kw'>end</span></pre>
|
@@ -757,11 +891,11 @@
|
|
757
891
|
<pre class="lines">
|
758
892
|
|
759
893
|
|
760
|
-
|
761
|
-
|
894
|
+
49
|
895
|
+
50</pre>
|
762
896
|
</td>
|
763
897
|
<td>
|
764
|
-
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line
|
898
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 49</span>
|
765
899
|
|
766
900
|
<span class='kw'>def</span> <span class='id identifier rubyid_reconnect'>reconnect</span>
|
767
901
|
<span class='kw'>end</span></pre>
|
@@ -785,17 +919,101 @@
|
|
785
919
|
<pre class="lines">
|
786
920
|
|
787
921
|
|
788
|
-
|
789
|
-
|
922
|
+
52
|
923
|
+
53</pre>
|
790
924
|
</td>
|
791
925
|
<td>
|
792
|
-
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line
|
926
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 52</span>
|
793
927
|
|
794
928
|
<span class='kw'>def</span> <span class='id identifier rubyid_reset'>reset</span>
|
795
929
|
<span class='kw'>end</span></pre>
|
796
930
|
</td>
|
797
931
|
</tr>
|
798
932
|
</table>
|
933
|
+
</div>
|
934
|
+
|
935
|
+
<div class="method_details ">
|
936
|
+
<h3 class="signature " id="run_exception_handlers-instance_method">
|
937
|
+
|
938
|
+
- (<tt>Object</tt>) <strong>run_exception_handlers</strong>(exception)
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
</h3><div class="docstring">
|
945
|
+
<div class="discussion">
|
946
|
+
|
947
|
+
<p>Call each of the exception handlers declared by #on_exception.</p>
|
948
|
+
|
949
|
+
|
950
|
+
</div>
|
951
|
+
</div>
|
952
|
+
<div class="tags">
|
953
|
+
<p class="tag_title">Parameters:</p>
|
954
|
+
<ul class="param">
|
955
|
+
|
956
|
+
<li>
|
957
|
+
|
958
|
+
<span class='name'>exception</span>
|
959
|
+
|
960
|
+
|
961
|
+
<span class='type'>(<tt>Exception</tt>)</span>
|
962
|
+
|
963
|
+
|
964
|
+
|
965
|
+
</li>
|
966
|
+
|
967
|
+
</ul>
|
968
|
+
|
969
|
+
|
970
|
+
</div><table class="source_code">
|
971
|
+
<tr>
|
972
|
+
<td>
|
973
|
+
<pre class="lines">
|
974
|
+
|
975
|
+
|
976
|
+
42
|
977
|
+
43
|
978
|
+
44</pre>
|
979
|
+
</td>
|
980
|
+
<td>
|
981
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 42</span>
|
982
|
+
|
983
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run_exception_handlers'>run_exception_handlers</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
984
|
+
<span class='id identifier rubyid_exception_handlers'>exception_handlers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_handler'>handler</span><span class='op'>|</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
985
|
+
<span class='kw'>end</span></pre>
|
986
|
+
</td>
|
987
|
+
</tr>
|
988
|
+
</table>
|
989
|
+
</div>
|
990
|
+
|
991
|
+
<div class="method_details ">
|
992
|
+
<h3 class="signature " id="subscribe-instance_method">
|
993
|
+
|
994
|
+
- (<tt>Object</tt>) <strong>subscribe</strong>(queue, options = {}, &block)
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
</h3><table class="source_code">
|
1001
|
+
<tr>
|
1002
|
+
<td>
|
1003
|
+
<pre class="lines">
|
1004
|
+
|
1005
|
+
|
1006
|
+
55
|
1007
|
+
56</pre>
|
1008
|
+
</td>
|
1009
|
+
<td>
|
1010
|
+
<pre class="code"><span class="info file"># File 'lib/isimud/client.rb', line 55</span>
|
1011
|
+
|
1012
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_subscribe'>subscribe</span><span class='lparen'>(</span><span class='id identifier rubyid_queue'>queue</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'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1013
|
+
<span class='kw'>end</span></pre>
|
1014
|
+
</td>
|
1015
|
+
</tr>
|
1016
|
+
</table>
|
799
1017
|
</div>
|
800
1018
|
|
801
1019
|
</div>
|
@@ -803,9 +1021,9 @@
|
|
803
1021
|
</div>
|
804
1022
|
|
805
1023
|
<div id="footer">
|
806
|
-
Generated on
|
1024
|
+
Generated on Wed Jan 13 16:27:29 2016 by
|
807
1025
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
808
|
-
0.8.7.6 (ruby-2.2.
|
1026
|
+
0.8.7.6 (ruby-2.2.3).
|
809
1027
|
</div>
|
810
1028
|
|
811
1029
|
</body>
|