kermit 1.0.0

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 (70) hide show
  1. data/Gemfile +18 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.md +54 -0
  4. data/Rakefile +31 -0
  5. data/VERSION +1 -0
  6. data/bin/kermit +24 -0
  7. data/config/config.example.yml +24 -0
  8. data/doc/Adapter.html +533 -0
  9. data/doc/Converter.html +348 -0
  10. data/doc/DAO.html +1047 -0
  11. data/doc/KermitPFC.html +927 -0
  12. data/doc/Link.html +667 -0
  13. data/doc/Logging.html +401 -0
  14. data/doc/Logging/Settings.html +170 -0
  15. data/doc/RandomAdapter.html +501 -0
  16. data/doc/RandomConverter.html +359 -0
  17. data/doc/RandomPhraseGenerator.html +317 -0
  18. data/doc/ToUser.html +815 -0
  19. data/doc/TwitterAdapter.html +550 -0
  20. data/doc/TwitterConverter.html +598 -0
  21. data/doc/USMF.html +2188 -0
  22. data/doc/User.html +1407 -0
  23. data/doc/WebSocketClient.html +316 -0
  24. data/doc/WebSocketServer.html +427 -0
  25. data/doc/_index.html +270 -0
  26. data/doc/class_list.html +53 -0
  27. data/doc/css/common.css +1 -0
  28. data/doc/css/full_list.css +57 -0
  29. data/doc/css/style.css +328 -0
  30. data/doc/file.LICENSE.html +73 -0
  31. data/doc/file.README.html +123 -0
  32. data/doc/file_list.html +58 -0
  33. data/doc/frames.html +28 -0
  34. data/doc/index.html +123 -0
  35. data/doc/js/app.js +214 -0
  36. data/doc/js/full_list.js +173 -0
  37. data/doc/js/jquery.js +4 -0
  38. data/doc/method_list.html +764 -0
  39. data/doc/top-level-namespace.html +138 -0
  40. data/lib/business/adapter/adapter.rb +39 -0
  41. data/lib/business/adapter/random_adapter.rb +50 -0
  42. data/lib/business/adapter/twitter_adapter.rb +75 -0
  43. data/lib/business/converter/converter.rb +24 -0
  44. data/lib/business/converter/random_converter.rb +42 -0
  45. data/lib/business/converter/twitter_converter.rb +164 -0
  46. data/lib/business/random_phrase_generator.rb +39 -0
  47. data/lib/helper/DAO.rb +94 -0
  48. data/lib/helper/settings.rb +11 -0
  49. data/lib/helper/websocket_client.rb +37 -0
  50. data/lib/helper/websocket_server.rb +65 -0
  51. data/lib/kermitpfc.rb +164 -0
  52. data/lib/logging.rb +31 -0
  53. data/lib/model/USMF/USMF.rb +98 -0
  54. data/lib/model/USMF/link.rb +30 -0
  55. data/lib/model/USMF/to_user.rb +32 -0
  56. data/lib/model/USMF/user.rb +41 -0
  57. data/lib/model/templates/USMF +56 -0
  58. data/lib/model/templates/atom.xml +74 -0
  59. data/lib/model/templates/example +59 -0
  60. data/lib/model/templates/rss.xml +68 -0
  61. data/lib/model/templates/template +49 -0
  62. data/lib/model/templates/tweet +116 -0
  63. data/spec/DAO_spec.rb +64 -0
  64. data/spec/random_adapter_spec.rb +24 -0
  65. data/spec/random_converter_spec.rb +115 -0
  66. data/spec/random_phrase_generator_spec.rb +15 -0
  67. data/spec/twitter_adapter_spec.rb +24 -0
  68. data/spec/twitter_converter_spec.rb +132 -0
  69. data/websocket_client.html +20 -0
  70. metadata +253 -0
@@ -0,0 +1,401 @@
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: Logging
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
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
+
36
+
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: 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="Adapter.html" title="Adapter (class)">Adapter</a></span>, <span class='object_link'><a href="Converter.html" title="Converter (class)">Converter</a></span>, <span class='object_link'><a href="DAO.html" title="DAO (class)">DAO</a></span>, <span class='object_link'><a href="RandomAdapter.html" title="RandomAdapter (class)">RandomAdapter</a></span>, <span class='object_link'><a href="RandomConverter.html" title="RandomConverter (class)">RandomConverter</a></span>, <span class='object_link'><a href="TwitterAdapter.html" title="TwitterAdapter (class)">TwitterAdapter</a></span>, <span class='object_link'><a href="TwitterConverter.html" title="TwitterConverter (class)">TwitterConverter</a></span>, <span class='object_link'><a href="USMF.html" title="USMF (class)">USMF</a></span>, <span class='object_link'><a href="WebSocketClient.html" title="WebSocketClient (class)">WebSocketClient</a></span>, <span class='object_link'><a href="WebSocketServer.html" title="WebSocketServer (class)">WebSocketServer</a></span></dd>
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/logging.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <p>
94
+ Loads the config file, the logger and the KermitPFC masterclass
95
+ </p>
96
+
97
+
98
+ </div>
99
+ </div>
100
+ <div class="tags">
101
+
102
+ <p class="tag_title">Author:</p>
103
+ <ul class="author">
104
+
105
+ <li>
106
+
107
+
108
+
109
+
110
+
111
+ <div class='inline'><p>
112
+ Daniel Machado Fernandez
113
+ </p>
114
+ </div>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+ <p class="tag_title">Version:</p>
120
+ <ul class="version">
121
+
122
+ <li>
123
+
124
+
125
+
126
+
127
+
128
+ <div class='inline'><p>
129
+ 1.0
130
+ </p>
131
+ </div>
132
+
133
+ </li>
134
+
135
+ </ul>
136
+
137
+ </div><h2>Defined Under Namespace</h2>
138
+ <p class="children">
139
+
140
+
141
+
142
+
143
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Logging/Settings.html" title="Logging::Settings (class)">Settings</a></span>
144
+
145
+
146
+ </p>
147
+
148
+ <h2>Constant Summary</h2>
149
+
150
+ <dl class="constants">
151
+
152
+ <dt id="KermitPFC-constant" class="">KermitPFC =
153
+ <div class="docstring">
154
+ <div class="discussion">
155
+ <p>
156
+ its neccessary to build the gem and make it run
157
+ </p>
158
+
159
+
160
+ </div>
161
+ </div>
162
+ <div class="tags">
163
+
164
+
165
+ </div>
166
+ </dt>
167
+ <dd><pre class="code"><span class='op'>::</span><span class='const'>KermitPFC</span></pre></dd>
168
+
169
+ </dl>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <h2>
180
+ Class Method Summary
181
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
182
+ </h2>
183
+
184
+ <ul class="summary">
185
+
186
+ <li class="public ">
187
+ <span class="summary_signature">
188
+
189
+ <a href="#logger-class_method" title="logger (class method)">+ (Logger) <strong>logger</strong> </a>
190
+
191
+
192
+
193
+ </span>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+ <span class="summary_desc"><div class='inline'><p>
204
+ solve the problem with path controversia in the log file.
205
+ </p>
206
+ </div></span>
207
+
208
+ </li>
209
+
210
+
211
+ </ul>
212
+
213
+ <h2>
214
+ Instance Method Summary
215
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
216
+ </h2>
217
+
218
+ <ul class="summary">
219
+
220
+ <li class="public ">
221
+ <span class="summary_signature">
222
+
223
+ <a href="#logger-instance_method" title="#logger (instance method)">- (Logger) <strong>logger</strong> </a>
224
+
225
+
226
+
227
+ </span>
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'><p>
238
+ offers the logger to the app.
239
+ </p>
240
+ </div></span>
241
+
242
+ </li>
243
+
244
+
245
+ </ul>
246
+
247
+
248
+
249
+
250
+ <div id="class_method_details" class="method_details_list">
251
+ <h2>Class Method Details</h2>
252
+
253
+
254
+ <div class="method_details first">
255
+ <h3 class="signature first" id="logger-class_method">
256
+
257
+ + (<tt>Logger</tt>) <strong>logger</strong>
258
+
259
+
260
+
261
+
262
+
263
+ </h3><div class="docstring">
264
+ <div class="discussion">
265
+ <p>
266
+ solve the problem with path controversia in the log file
267
+ </p>
268
+
269
+
270
+ </div>
271
+ </div>
272
+ <div class="tags">
273
+
274
+ <p class="tag_title">Returns:</p>
275
+ <ul class="return">
276
+
277
+ <li>
278
+
279
+
280
+ <span class='type'>(<tt>Logger</tt>)</span>
281
+
282
+
283
+
284
+ &mdash;
285
+ <div class='inline'><p>
286
+ the logger with the correct path of log.txt
287
+ </p>
288
+ </div>
289
+
290
+ </li>
291
+
292
+ </ul>
293
+
294
+ </div><table class="source_code">
295
+ <tr>
296
+ <td>
297
+ <pre class="lines">
298
+
299
+
300
+ 23
301
+ 24
302
+ 25
303
+ 26
304
+ 27
305
+ 28
306
+ 29</pre>
307
+ </td>
308
+ <td>
309
+ <pre class="code"><span class="info file"># File 'lib/logging.rb', line 23</span>
310
+
311
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
312
+ <span class='kw'>begin</span>
313
+ <span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>../log/log.txt</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>monthly</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
314
+ <span class='kw'>rescue</span>
315
+ <span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>./log/log.txt</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>monthly</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
316
+ <span class='kw'>end</span>
317
+ <span class='kw'>end</span></pre>
318
+ </td>
319
+ </tr>
320
+ </table>
321
+ </div>
322
+
323
+ </div>
324
+
325
+ <div id="instance_method_details" class="method_details_list">
326
+ <h2>Instance Method Details</h2>
327
+
328
+
329
+ <div class="method_details first">
330
+ <h3 class="signature first" id="logger-instance_method">
331
+
332
+ - (<tt>Logger</tt>) <strong>logger</strong>
333
+
334
+
335
+
336
+
337
+
338
+ </h3><div class="docstring">
339
+ <div class="discussion">
340
+ <p>
341
+ offers the logger to the app
342
+ </p>
343
+
344
+
345
+ </div>
346
+ </div>
347
+ <div class="tags">
348
+
349
+ <p class="tag_title">Returns:</p>
350
+ <ul class="return">
351
+
352
+ <li>
353
+
354
+
355
+ <span class='type'>(<tt>Logger</tt>)</span>
356
+
357
+
358
+
359
+ &mdash;
360
+ <div class='inline'><p>
361
+ the logger
362
+ </p>
363
+ </div>
364
+
365
+ </li>
366
+
367
+ </ul>
368
+
369
+ </div><table class="source_code">
370
+ <tr>
371
+ <td>
372
+ <pre class="lines">
373
+
374
+
375
+ 17
376
+ 18
377
+ 19</pre>
378
+ </td>
379
+ <td>
380
+ <pre class="code"><span class="info file"># File 'lib/logging.rb', line 17</span>
381
+
382
+ <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
383
+ <span class='const'>Logging</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
384
+ <span class='kw'>end</span></pre>
385
+ </td>
386
+ </tr>
387
+ </table>
388
+ </div>
389
+
390
+ </div>
391
+
392
+ </div>
393
+
394
+ <div id="footer">
395
+ Generated on Sat Aug 18 16:24:07 2012 by
396
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
397
+ 0.8.2.1 (ruby-1.9.2).
398
+ </div>
399
+
400
+ </body>
401
+ </html>
@@ -0,0 +1,170 @@
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: Logging::Settings
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
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 (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Logging.html" title="Logging (module)">Logging</a></span></span>
36
+ &raquo;
37
+ <span class="title">Settings</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: Logging::Settings
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">Settingslogic</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Settingslogic</li>
82
+
83
+ <li class="next">Logging::Settings</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/helper/settings.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+ <p>
107
+ Implements the SettingsLogic gem Class to load the properties defined in
108
+ the config.yml file
109
+ </p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+ <p class="tag_title">Author:</p>
117
+ <ul class="author">
118
+
119
+ <li>
120
+
121
+
122
+
123
+
124
+
125
+ <div class='inline'><p>
126
+ Daniel Machado Fernandez
127
+ </p>
128
+ </div>
129
+
130
+ </li>
131
+
132
+ </ul>
133
+ <p class="tag_title">Version:</p>
134
+ <ul class="version">
135
+
136
+ <li>
137
+
138
+
139
+
140
+
141
+
142
+ <div class='inline'><p>
143
+ 1.0
144
+ </p>
145
+ </div>
146
+
147
+ </li>
148
+
149
+ </ul>
150
+
151
+ </div>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ </div>
162
+
163
+ <div id="footer">
164
+ Generated on Sat Aug 18 16:24:08 2012 by
165
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
166
+ 0.8.2.1 (ruby-1.9.2).
167
+ </div>
168
+
169
+ </body>
170
+ </html>