isimud 0.5.2

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.
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,230 @@
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
+ Module: Isimud::Logging
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/Logging.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 (L)</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">Logging</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>Module: Isimud::Logging
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1">Included in:</dt>
81
+ <dd class="r1"><span class='object_link'><a href="Client.html" title="Isimud::Client (class)">Client</a></span>, <span class='object_link'><a href="Event.html" title="Isimud::Event (class)">Event</a></span>, <span class='object_link'><a href="EventListener.html" title="Isimud::EventListener (class)">EventListener</a></span>, <span class='object_link'><a href="EventObserver.html" title="Isimud::EventObserver (module)">EventObserver</a></span>, <span class='object_link'><a href="ModelWatcher.html" title="Isimud::ModelWatcher (module)">ModelWatcher</a></span></dd>
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/isimud/logging.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <h2>
100
+ Instance Method Summary
101
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
102
+ </h2>
103
+
104
+ <ul class="summary">
105
+
106
+ <li class="public ">
107
+ <span class="summary_signature">
108
+
109
+ <a href="#log-instance_method" title="#log (instance method)">- (Object) <strong>log</strong>(message, level = Isimud.log_level) </a>
110
+
111
+
112
+
113
+ </span>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"><div class='inline'></div></span>
124
+
125
+ </li>
126
+
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#logger-instance_method" title="#logger (instance method)">- (Object) <strong>logger</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'></div></span>
146
+
147
+ </li>
148
+
149
+
150
+ </ul>
151
+
152
+
153
+
154
+
155
+ <div id="instance_method_details" class="method_details_list">
156
+ <h2>Instance Method Details</h2>
157
+
158
+
159
+ <div class="method_details first">
160
+ <h3 class="signature first" id="log-instance_method">
161
+
162
+ - (<tt>Object</tt>) <strong>log</strong>(message, level = Isimud.log_level)
163
+
164
+
165
+
166
+
167
+
168
+ </h3><table class="source_code">
169
+ <tr>
170
+ <td>
171
+ <pre class="lines">
172
+
173
+
174
+ 3
175
+ 4
176
+ 5</pre>
177
+ </td>
178
+ <td>
179
+ <pre class="code"><span class="info file"># File 'lib/isimud/logging.rb', line 3</span>
180
+
181
+ <span class='kw'>def</span> <span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='const'>Isimud</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='rparen'>)</span>
182
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='lparen'>(</span><span class='id identifier rubyid_level'>level</span> <span class='op'>||</span> <span class='symbol'>:debug</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span>
183
+ <span class='kw'>end</span></pre>
184
+ </td>
185
+ </tr>
186
+ </table>
187
+ </div>
188
+
189
+ <div class="method_details ">
190
+ <h3 class="signature " id="logger-instance_method">
191
+
192
+ - (<tt>Object</tt>) <strong>logger</strong>
193
+
194
+
195
+
196
+
197
+
198
+ </h3><table class="source_code">
199
+ <tr>
200
+ <td>
201
+ <pre class="lines">
202
+
203
+
204
+ 7
205
+ 8
206
+ 9</pre>
207
+ </td>
208
+ <td>
209
+ <pre class="code"><span class="info file"># File 'lib/isimud/logging.rb', line 7</span>
210
+
211
+ <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
212
+ <span class='const'>Isimud</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
213
+ <span class='kw'>end</span></pre>
214
+ </td>
215
+ </tr>
216
+ </table>
217
+ </div>
218
+
219
+ </div>
220
+
221
+ </div>
222
+
223
+ <div id="footer">
224
+ Generated on Fri Apr 3 09:28:08 2015 by
225
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
226
+ 0.8.7.6 (ruby-2.2.1).
227
+ </div>
228
+
229
+ </body>
230
+ </html>
@@ -0,0 +1,312 @@
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
+ Module: Isimud::ModelWatcher
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/ModelWatcher.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 (M)</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">ModelWatcher</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>Module: Isimud::ModelWatcher
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+ <dt class="r1">Extended by:</dt>
77
+ <dd class="r1">ActiveSupport::Concern</dd>
78
+
79
+
80
+
81
+
82
+ <dt class="r2">Includes:</dt>
83
+ <dd class="r2"><span class='object_link'><a href="Logging.html" title="Isimud::Logging (module)">Logging</a></span></dd>
84
+
85
+
86
+
87
+
88
+
89
+ <dt class="r1 last">Defined in:</dt>
90
+ <dd class="r1 last">lib/isimud/model_watcher.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+
98
+ <p>ActiveModel mixin for sending model updates to a message server.</p>
99
+
100
+
101
+ </div>
102
+ </div>
103
+ <div class="tags">
104
+
105
+
106
+ </div><h2>Defined Under Namespace</h2>
107
+ <p class="children">
108
+
109
+
110
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="ModelWatcher/ClassMethods.html" title="Isimud::ModelWatcher::ClassMethods (module)">ClassMethods</a></span>
111
+
112
+
113
+
114
+
115
+ </p>
116
+
117
+ <h2>Constant Summary</h2>
118
+
119
+ <dl class="constants">
120
+
121
+ <dt id="DEFAULT_EXCHANGE-constant" class="">DEFAULT_EXCHANGE =
122
+
123
+ </dt>
124
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>models</span><span class='tstring_end'>&#39;</span></span></pre></dd>
125
+
126
+ <dt id="IGNORED_COLUMNS-constant" class="">IGNORED_COLUMNS =
127
+
128
+ </dt>
129
+ <dd><pre class="code"><span class='qwords_beg'>%w{</span><span class='tstring_content'>id</span><span class='words_sep'>}</span></pre></dd>
130
+
131
+ </dl>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <h2>
142
+ Instance Method Summary
143
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
144
+ </h2>
145
+
146
+ <ul class="summary">
147
+
148
+ <li class="public ">
149
+ <span class="summary_signature">
150
+
151
+ <a href="#isimud_sync-instance_method" title="#isimud_sync (instance method)">- (Object) <strong>isimud_sync</strong> </a>
152
+
153
+
154
+
155
+ </span>
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ <span class="summary_desc"><div class='inline'></div></span>
166
+
167
+ </li>
168
+
169
+
170
+ <li class="public ">
171
+ <span class="summary_signature">
172
+
173
+ <a href="#isimud_synchronize%3F-instance_method" title="#isimud_synchronize? (instance method)">- (Boolean) <strong>isimud_synchronize?</strong> </a>
174
+
175
+
176
+
177
+ </span>
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>Override to set conditions for synchronizing this instance with the server
189
+ (default is always).</p>
190
+ </div></span>
191
+
192
+ </li>
193
+
194
+
195
+ </ul>
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Logging.html" title="Isimud::Logging (module)">Logging</a></span></h3>
209
+ <p class="inherited"><span class='object_link'><a href="Logging.html#log-instance_method" title="Isimud::Logging#log (method)">#log</a></span>, <span class='object_link'><a href="Logging.html#logger-instance_method" title="Isimud::Logging#logger (method)">#logger</a></span></p>
210
+
211
+
212
+ <div id="instance_method_details" class="method_details_list">
213
+ <h2>Instance Method Details</h2>
214
+
215
+
216
+ <div class="method_details first">
217
+ <h3 class="signature first" id="isimud_sync-instance_method">
218
+
219
+ - (<tt>Object</tt>) <strong>isimud_sync</strong>
220
+
221
+
222
+
223
+
224
+
225
+ </h3><table class="source_code">
226
+ <tr>
227
+ <td>
228
+ <pre class="lines">
229
+
230
+
231
+ 82
232
+ 83
233
+ 84</pre>
234
+ </td>
235
+ <td>
236
+ <pre class="code"><span class="info file"># File 'lib/isimud/model_watcher.rb', line 82</span>
237
+
238
+ <span class='kw'>def</span> <span class='id identifier rubyid_isimud_sync'>isimud_sync</span>
239
+ <span class='id identifier rubyid_isimud_send_action_message'>isimud_send_action_message</span><span class='lparen'>(</span><span class='symbol'>:update</span><span class='rparen'>)</span>
240
+ <span class='kw'>end</span></pre>
241
+ </td>
242
+ </tr>
243
+ </table>
244
+ </div>
245
+
246
+ <div class="method_details ">
247
+ <h3 class="signature " id="isimud_synchronize?-instance_method">
248
+
249
+ - (<tt>Boolean</tt>) <strong>isimud_synchronize?</strong>
250
+
251
+
252
+
253
+
254
+
255
+ </h3><div class="docstring">
256
+ <div class="discussion">
257
+
258
+ <p>Override to set conditions for synchronizing this instance with the server
259
+ (default is always)</p>
260
+
261
+
262
+ </div>
263
+ </div>
264
+ <div class="tags">
265
+
266
+ <p class="tag_title">Returns:</p>
267
+ <ul class="return">
268
+
269
+ <li>
270
+
271
+
272
+ <span class='type'>(<tt>Boolean</tt>)</span>
273
+
274
+
275
+
276
+ </li>
277
+
278
+ </ul>
279
+
280
+ </div><table class="source_code">
281
+ <tr>
282
+ <td>
283
+ <pre class="lines">
284
+
285
+
286
+ 78
287
+ 79
288
+ 80</pre>
289
+ </td>
290
+ <td>
291
+ <pre class="code"><span class="info file"># File 'lib/isimud/model_watcher.rb', line 78</span>
292
+
293
+ <span class='kw'>def</span> <span class='id identifier rubyid_isimud_synchronize?'>isimud_synchronize?</span>
294
+ <span class='kw'>true</span>
295
+ <span class='kw'>end</span></pre>
296
+ </td>
297
+ </tr>
298
+ </table>
299
+ </div>
300
+
301
+ </div>
302
+
303
+ </div>
304
+
305
+ <div id="footer">
306
+ Generated on Fri Apr 3 09:28:08 2015 by
307
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
308
+ 0.8.7.6 (ruby-2.2.1).
309
+ </div>
310
+
311
+ </body>
312
+ </html>