rockdove 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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: Rockdove::Dovetie
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 (D)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Rockdove.html" title="Rockdove (module)">Rockdove</a></span></span>
36
+ &raquo;
37
+ <span class="title">Dovetie</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: Rockdove::Dovetie
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">Rockdove::Dovetie</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/rockdove/dovetie.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 Wed Jul 11 11:40:24 2012 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.8.2.1 (ruby-1.9.2).
120
+ </div>
121
+
122
+ </body>
123
+ </html>
@@ -0,0 +1,377 @@
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: Rockdove::EmailParser
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 (E)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Rockdove.html" title="Rockdove (module)">Rockdove</a></span></span>
36
+ &raquo;
37
+ <span class="title">EmailParser</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: Rockdove::EmailParser
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">Rockdove::EmailParser</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/rockdove/email_parser.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+
103
+ <h2>Constant Summary</h2>
104
+
105
+ <dl class="constants">
106
+
107
+ <dt id="HTML_REGEXP-constant" class="">HTML_REGEXP =
108
+
109
+ </dt>
110
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>&lt;\/?[^&gt;]*&gt;</span><span class='regexp_end'>/</span></span></pre></dd>
111
+
112
+ <dt id="FWD_REGEXP-constant" class="">FWD_REGEXP =
113
+
114
+ </dt>
115
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(On(.+)wrote:.+\z)$</span><span class='regexp_end'>/inm</span></span></pre></dd>
116
+
117
+ <dt id="SIGNATURE_REGEXP-constant" class="">SIGNATURE_REGEXP =
118
+
119
+ </dt>
120
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(Thanks(.+)Regards.+\z)$</span><span class='regexp_end'>/inm</span></span></pre></dd>
121
+
122
+ <dt id="REPLY_REGEXP-constant" class="">REPLY_REGEXP =
123
+
124
+ </dt>
125
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(From:(.+)Sent:.+\z)$</span><span class='regexp_end'>/inm</span></span></pre></dd>
126
+
127
+ <dt id="SENT_VIA-constant" class="">SENT_VIA =
128
+
129
+ </dt>
130
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(Sent(.+)Via.+\z)$</span><span class='regexp_end'>/inm</span></span></pre></dd>
131
+
132
+ <dt id="DASHES-constant" class="">DASHES =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>________________________________________</span><span class='tstring_end'>&quot;</span></span></pre></dd>
136
+
137
+ </dl>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <h2>
148
+ Class Method Summary
149
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
150
+ </h2>
151
+
152
+ <ul class="summary">
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#parse_mail-class_method" title="parse_mail (class method)">+ (Object) <strong>parse_mail</strong>(mail, body_type) </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'></div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+ <h2>
179
+ Instance Method Summary
180
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
181
+ </h2>
182
+
183
+ <ul class="summary">
184
+
185
+ <li class="public ">
186
+ <span class="summary_signature">
187
+
188
+ <a href="#choose_and_parse-instance_method" title="#choose_and_parse (instance method)">- (Object) <strong>choose_and_parse</strong>(content) </a>
189
+
190
+
191
+
192
+ </span>
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'></div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#parse_email_tags-instance_method" title="#parse_email_tags (instance method)">- (Object) <strong>parse_email_tags</strong>(mail, body_type) </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'></div></span>
225
+
226
+ </li>
227
+
228
+
229
+ </ul>
230
+
231
+
232
+
233
+
234
+ <div id="class_method_details" class="method_details_list">
235
+ <h2>Class Method Details</h2>
236
+
237
+
238
+ <div class="method_details first">
239
+ <h3 class="signature first" id="parse_mail-class_method">
240
+
241
+ + (<tt>Object</tt>) <strong>parse_mail</strong>(mail, body_type)
242
+
243
+
244
+
245
+
246
+
247
+ </h3><table class="source_code">
248
+ <tr>
249
+ <td>
250
+ <pre class="lines">
251
+
252
+
253
+ 10
254
+ 11
255
+ 12</pre>
256
+ </td>
257
+ <td>
258
+ <pre class="code"><span class="info file"># File 'lib/rockdove/email_parser.rb', line 10</span>
259
+
260
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_mail'>parse_mail</span><span class='lparen'>(</span><span class='id identifier rubyid_mail'>mail</span><span class='comma'>,</span> <span class='id identifier rubyid_body_type'>body_type</span><span class='rparen'>)</span>
261
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parse_email_tags'>parse_email_tags</span><span class='lparen'>(</span><span class='id identifier rubyid_mail'>mail</span><span class='comma'>,</span><span class='id identifier rubyid_body_type'>body_type</span><span class='rparen'>)</span>
262
+ <span class='kw'>end</span></pre>
263
+ </td>
264
+ </tr>
265
+ </table>
266
+ </div>
267
+
268
+ </div>
269
+
270
+ <div id="instance_method_details" class="method_details_list">
271
+ <h2>Instance Method Details</h2>
272
+
273
+
274
+ <div class="method_details first">
275
+ <h3 class="signature first" id="choose_and_parse-instance_method">
276
+
277
+ - (<tt>Object</tt>) <strong>choose_and_parse</strong>(content)
278
+
279
+
280
+
281
+
282
+
283
+ </h3><table class="source_code">
284
+ <tr>
285
+ <td>
286
+ <pre class="lines">
287
+
288
+
289
+ 22
290
+ 23
291
+ 24
292
+ 25
293
+ 26
294
+ 27
295
+ 28
296
+ 29
297
+ 30
298
+ 31
299
+ 32
300
+ 33
301
+ 34
302
+ 35
303
+ 36</pre>
304
+ </td>
305
+ <td>
306
+ <pre class="code"><span class="info file"># File 'lib/rockdove/email_parser.rb', line 22</span>
307
+
308
+ <span class='kw'>def</span> <span class='id identifier rubyid_choose_and_parse'>choose_and_parse</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span>
309
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='const'>DASHES</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
310
+ <span class='kw'>case</span> <span class='id identifier rubyid_content'>content</span>
311
+ <span class='kw'>when</span> <span class='const'>SENT_VIA</span>
312
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='const'>SENT_VIA</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span>
313
+ <span class='kw'>when</span> <span class='const'>SIGNATURE_REGEXP</span>
314
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='const'>SIGNATURE_REGEXP</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span>
315
+ <span class='kw'>when</span> <span class='const'>REPLY_REGEXP</span>
316
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='const'>REPLY_REGEXP</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span>
317
+ <span class='kw'>when</span> <span class='const'>FWD_REGEXP</span>
318
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='const'>FWD_REGEXP</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span>
319
+ <span class='kw'>else</span>
320
+ <span class='id identifier rubyid_content'>content</span>
321
+ <span class='kw'>end</span>
322
+ <span class='kw'>end</span></pre>
323
+ </td>
324
+ </tr>
325
+ </table>
326
+ </div>
327
+
328
+ <div class="method_details ">
329
+ <h3 class="signature " id="parse_email_tags-instance_method">
330
+
331
+ - (<tt>Object</tt>) <strong>parse_email_tags</strong>(mail, body_type)
332
+
333
+
334
+
335
+
336
+
337
+ </h3><table class="source_code">
338
+ <tr>
339
+ <td>
340
+ <pre class="lines">
341
+
342
+
343
+ 14
344
+ 15
345
+ 16
346
+ 17
347
+ 18
348
+ 19
349
+ 20</pre>
350
+ </td>
351
+ <td>
352
+ <pre class="code"><span class="info file"># File 'lib/rockdove/email_parser.rb', line 14</span>
353
+
354
+ <span class='kw'>def</span> <span class='id identifier rubyid_parse_email_tags'>parse_email_tags</span><span class='lparen'>(</span><span class='id identifier rubyid_mail'>mail</span><span class='comma'>,</span><span class='id identifier rubyid_body_type'>body_type</span><span class='rparen'>)</span>
355
+ <span class='const'>Rockdove</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Rockdove is parsing the mail content now...</span><span class='tstring_end'>&quot;</span></span>
356
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_mail'>mail</span>
357
+ <span class='id identifier rubyid_mail'>mail</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='const'>HTML_REGEXP</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span> <span class='kw'>if</span> <span class='id identifier rubyid_body_type'>body_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HTML</span><span class='tstring_end'>&quot;</span></span>
358
+ <span class='id identifier rubyid_parsed_content'>parsed_content</span> <span class='op'>=</span> <span class='const'>EmailReplyParser</span><span class='period'>.</span><span class='id identifier rubyid_parse_reply'>parse_reply</span><span class='lparen'>(</span><span class='id identifier rubyid_mail'>mail</span><span class='rparen'>)</span>
359
+ <span class='id identifier rubyid_choose_and_parse'>choose_and_parse</span><span class='lparen'>(</span><span class='id identifier rubyid_parsed_content'>parsed_content</span><span class='rparen'>)</span>
360
+ <span class='kw'>end</span></pre>
361
+ </td>
362
+ </tr>
363
+ </table>
364
+ </div>
365
+
366
+ </div>
367
+
368
+ </div>
369
+
370
+ <div id="footer">
371
+ Generated on Wed Jul 11 11:40:24 2012 by
372
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
373
+ 0.8.2.1 (ruby-1.9.2).
374
+ </div>
375
+
376
+ </body>
377
+ </html>