auto_response 0.1.8 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile +2 -15
  4. data/Gemfile.lock +34 -17
  5. data/Rakefile +23 -0
  6. data/auto_response.gemspec +29 -0
  7. data/bin/{ar → auto_resp} +0 -0
  8. data/lib/ar/proxy_server.rb +23 -10
  9. data/lib/ar/rule_manager.rb +2 -7
  10. data/lib/ar/version.rb +1 -1
  11. data/lib/ar/viewer/components/jquery/.gitignore +1 -0
  12. data/lib/auto_response.rb +42 -14
  13. data/rdoc/AutoResp.html +124 -0
  14. data/rdoc/AutoResp/AutoResponder.html +487 -0
  15. data/rdoc/AutoResp/Parser.html +230 -0
  16. data/rdoc/AutoResp/ProxyServer.html +327 -0
  17. data/rdoc/AutoResp/RuleDSL.html +230 -0
  18. data/rdoc/AutoResp/RuleManager.html +332 -0
  19. data/rdoc/created.rid +7 -0
  20. data/rdoc/images/add.png +0 -0
  21. data/rdoc/images/brick.png +0 -0
  22. data/rdoc/images/brick_link.png +0 -0
  23. data/rdoc/images/bug.png +0 -0
  24. data/rdoc/images/bullet_black.png +0 -0
  25. data/rdoc/images/bullet_toggle_minus.png +0 -0
  26. data/rdoc/images/bullet_toggle_plus.png +0 -0
  27. data/rdoc/images/date.png +0 -0
  28. data/rdoc/images/delete.png +0 -0
  29. data/rdoc/images/find.png +0 -0
  30. data/rdoc/images/loadingAnimation.gif +0 -0
  31. data/rdoc/images/macFFBgHack.png +0 -0
  32. data/rdoc/images/package.png +0 -0
  33. data/rdoc/images/page_green.png +0 -0
  34. data/rdoc/images/page_white_text.png +0 -0
  35. data/rdoc/images/page_white_width.png +0 -0
  36. data/rdoc/images/plugin.png +0 -0
  37. data/rdoc/images/ruby.png +0 -0
  38. data/rdoc/images/tag_blue.png +0 -0
  39. data/rdoc/images/tag_green.png +0 -0
  40. data/rdoc/images/transparent.png +0 -0
  41. data/rdoc/images/wrench.png +0 -0
  42. data/rdoc/images/wrench_orange.png +0 -0
  43. data/rdoc/images/zoom.png +0 -0
  44. data/rdoc/index.html +79 -0
  45. data/rdoc/js/darkfish.js +153 -0
  46. data/rdoc/js/jquery.js +18 -0
  47. data/rdoc/js/navigation.js +142 -0
  48. data/rdoc/js/search.js +94 -0
  49. data/rdoc/js/search_index.js +1 -0
  50. data/rdoc/js/searcher.js +228 -0
  51. data/rdoc/rdoc.css +543 -0
  52. data/rdoc/table_of_contents.html +107 -0
  53. data/readme.md +12 -3
  54. metadata +384 -341
@@ -0,0 +1,230 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>module AutoResp::RuleDSL - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/ar/rule_dsl.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+
60
+
61
+ <!-- Method Quickref -->
62
+ <nav id="method-list-section" class="section">
63
+ <h3 class="section-header">Methods</h3>
64
+
65
+ <ul class="link-list">
66
+
67
+ <li><a href="#method-i-goto">#goto</a>
68
+
69
+ <li><a href="#method-i-r">#r</a>
70
+
71
+ <li><a href="#method-i-url">#url</a>
72
+
73
+ </ul>
74
+ </nav>
75
+
76
+ </div>
77
+
78
+ <div id="project-metadata">
79
+
80
+ <nav id="classindex-section" class="section project-section">
81
+ <h3 class="section-header">Class and Module Index</h3>
82
+
83
+ <ul class="link-list">
84
+
85
+ <li><a href="../AutoResp.html">AutoResp</a>
86
+
87
+ <li><a href="../AutoResp/AutoResponder.html">AutoResp::AutoResponder</a>
88
+
89
+ <li><a href="../AutoResp/Parser.html">AutoResp::Parser</a>
90
+
91
+ <li><a href="../AutoResp/ProxyServer.html">AutoResp::ProxyServer</a>
92
+
93
+ <li><a href="../AutoResp/RuleDSL.html">AutoResp::RuleDSL</a>
94
+
95
+ <li><a href="../AutoResp/RuleManager.html">AutoResp::RuleManager</a>
96
+
97
+ </ul>
98
+ </nav>
99
+
100
+ </div>
101
+ </nav>
102
+
103
+ <div id="documentation">
104
+ <h1 class="module">module AutoResp::RuleDSL</h1>
105
+
106
+ <div id="description" class="description">
107
+
108
+ </div><!-- description -->
109
+
110
+
111
+
112
+
113
+ <section id="5Buntitled-5D" class="documentation-section">
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <!-- Methods -->
123
+
124
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
125
+ <h3 class="section-header">Public Instance Methods</h3>
126
+
127
+
128
+ <div id="method-i-goto" class="method-detail ">
129
+
130
+ <div class="method-heading">
131
+ <span class="method-name">goto</span><span
132
+ class="method-args">(url)</span>
133
+ <span class="method-click-advice">click to toggle source</span>
134
+ </div>
135
+
136
+
137
+ <div class="method-description">
138
+
139
+
140
+
141
+
142
+
143
+ <div class="method-source-code" id="goto-source">
144
+ <pre><span class="ruby-comment"># File lib/ar/rule_dsl.rb, line 12</span>
145
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">goto</span>(<span class="ruby-identifier">url</span>)
146
+ <span class="ruby-identifier">add_handler</span> <span class="ruby-string">'=GOTO=&gt; '</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">url</span>
147
+ <span class="ruby-keyword">end</span></pre>
148
+ </div><!-- goto-source -->
149
+
150
+ </div>
151
+
152
+
153
+
154
+
155
+ </div><!-- goto-method -->
156
+
157
+
158
+ <div id="method-i-r" class="method-detail ">
159
+
160
+ <div class="method-heading">
161
+ <span class="method-name">r</span><span
162
+ class="method-args">(resp)</span>
163
+ <span class="method-click-advice">click to toggle source</span>
164
+ </div>
165
+
166
+
167
+ <div class="method-description">
168
+
169
+
170
+
171
+
172
+
173
+ <div class="method-source-code" id="r-source">
174
+ <pre><span class="ruby-comment"># File lib/ar/rule_dsl.rb, line 8</span>
175
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">r</span>(<span class="ruby-identifier">resp</span>)
176
+ <span class="ruby-identifier">add_handler</span>( <span class="ruby-identifier">resp</span> )
177
+ <span class="ruby-keyword">end</span></pre>
178
+ </div><!-- r-source -->
179
+
180
+ </div>
181
+
182
+
183
+
184
+
185
+ </div><!-- r-method -->
186
+
187
+
188
+ <div id="method-i-url" class="method-detail ">
189
+
190
+ <div class="method-heading">
191
+ <span class="method-name">url</span><span
192
+ class="method-args">(target, &block)</span>
193
+ <span class="method-click-advice">click to toggle source</span>
194
+ </div>
195
+
196
+
197
+ <div class="method-description">
198
+
199
+
200
+
201
+
202
+
203
+ <div class="method-source-code" id="url-source">
204
+ <pre><span class="ruby-comment"># File lib/ar/rule_dsl.rb, line 4</span>
205
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">url</span>(<span class="ruby-identifier">target</span>, &amp;<span class="ruby-identifier">block</span>)
206
+ <span class="ruby-identifier">add_rule</span>(<span class="ruby-identifier">target</span>, &amp;<span class="ruby-identifier">block</span>);
207
+ <span class="ruby-keyword">end</span></pre>
208
+ </div><!-- url-source -->
209
+
210
+ </div>
211
+
212
+
213
+
214
+
215
+ </div><!-- url-method -->
216
+
217
+
218
+ </section><!-- public-instance-method-details -->
219
+
220
+ </section><!-- 5Buntitled-5D -->
221
+
222
+ </div><!-- documentation -->
223
+
224
+
225
+ <footer id="validator-badges">
226
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
227
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
228
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
229
+ </footer>
230
+
@@ -0,0 +1,332 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class AutoResp::RuleManager - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/ar/rule_manager.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Object
63
+
64
+ </nav>
65
+
66
+ <!-- Included Modules -->
67
+ <nav id="includes-section" class="section">
68
+ <h3 class="section-header">Included Modules</h3>
69
+
70
+ <ul class="link-list">
71
+
72
+
73
+ <li><a class="include" href="RuleDSL.html">AutoResp::RuleDSL</a>
74
+
75
+
76
+ </ul>
77
+ </nav>
78
+
79
+ <!-- Method Quickref -->
80
+ <nav id="method-list-section" class="section">
81
+ <h3 class="section-header">Methods</h3>
82
+
83
+ <ul class="link-list">
84
+
85
+ <li><a href="#method-c-new">::new</a>
86
+
87
+ <li><a href="#method-i-add_handler">#add_handler</a>
88
+
89
+ <li><a href="#method-i-add_rule">#add_rule</a>
90
+
91
+ <li><a href="#method-i-clear">#clear</a>
92
+
93
+ <li><a href="#method-i-rules">#rules</a>
94
+
95
+ </ul>
96
+ </nav>
97
+
98
+ </div>
99
+
100
+ <div id="project-metadata">
101
+
102
+ <nav id="classindex-section" class="section project-section">
103
+ <h3 class="section-header">Class and Module Index</h3>
104
+
105
+ <ul class="link-list">
106
+
107
+ <li><a href="../AutoResp.html">AutoResp</a>
108
+
109
+ <li><a href="../AutoResp/AutoResponder.html">AutoResp::AutoResponder</a>
110
+
111
+ <li><a href="../AutoResp/Parser.html">AutoResp::Parser</a>
112
+
113
+ <li><a href="../AutoResp/ProxyServer.html">AutoResp::ProxyServer</a>
114
+
115
+ <li><a href="../AutoResp/RuleDSL.html">AutoResp::RuleDSL</a>
116
+
117
+ <li><a href="../AutoResp/RuleManager.html">AutoResp::RuleManager</a>
118
+
119
+ </ul>
120
+ </nav>
121
+
122
+ </div>
123
+ </nav>
124
+
125
+ <div id="documentation">
126
+ <h1 class="class">class AutoResp::RuleManager</h1>
127
+
128
+ <div id="description" class="description">
129
+
130
+ </div><!-- description -->
131
+
132
+
133
+
134
+
135
+ <section id="5Buntitled-5D" class="documentation-section">
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <!-- Methods -->
145
+
146
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
147
+ <h3 class="section-header">Public Class Methods</h3>
148
+
149
+
150
+ <div id="method-c-new" class="method-detail ">
151
+
152
+ <div class="method-heading">
153
+ <span class="method-name">new</span><span
154
+ class="method-args">()</span>
155
+ <span class="method-click-advice">click to toggle source</span>
156
+ </div>
157
+
158
+
159
+ <div class="method-description">
160
+
161
+
162
+
163
+
164
+
165
+ <div class="method-source-code" id="new-source">
166
+ <pre><span class="ruby-comment"># File lib/ar/rule_manager.rb, line 9</span>
167
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
168
+ <span class="ruby-keyword">end</span></pre>
169
+ </div><!-- new-source -->
170
+
171
+ </div>
172
+
173
+
174
+
175
+
176
+ </div><!-- new-method -->
177
+
178
+
179
+ </section><!-- public-class-method-details -->
180
+
181
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
182
+ <h3 class="section-header">Public Instance Methods</h3>
183
+
184
+
185
+ <div id="method-i-add_handler" class="method-detail ">
186
+
187
+ <div class="method-heading">
188
+ <span class="method-name">add_handler</span><span
189
+ class="method-args">( handler )</span>
190
+ <span class="method-click-advice">click to toggle source</span>
191
+ </div>
192
+
193
+
194
+ <div class="method-description">
195
+
196
+
197
+
198
+
199
+
200
+ <div class="method-source-code" id="add_handler-source">
201
+ <pre><span class="ruby-comment"># File lib/ar/rule_manager.rb, line 20</span>
202
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">add_handler</span>( <span class="ruby-identifier">handler</span> )
203
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_rule</span>
204
+ <span class="ruby-identifier">rules</span>[<span class="ruby-ivar">@last_rule</span>] = <span class="ruby-identifier">handler</span>
205
+ <span class="ruby-keyword">end</span>
206
+ <span class="ruby-keyword">end</span></pre>
207
+ </div><!-- add_handler-source -->
208
+
209
+ </div>
210
+
211
+
212
+
213
+
214
+ </div><!-- add_handler-method -->
215
+
216
+
217
+ <div id="method-i-add_rule" class="method-detail ">
218
+
219
+ <div class="method-heading">
220
+ <span class="method-name">add_rule</span><span
221
+ class="method-args">(*args, &block)</span>
222
+ <span class="method-click-advice">click to toggle source</span>
223
+ </div>
224
+
225
+
226
+ <div class="method-description">
227
+
228
+
229
+
230
+
231
+
232
+ <div class="method-source-code" id="add_rule-source">
233
+ <pre><span class="ruby-comment"># File lib/ar/rule_manager.rb, line 26</span>
234
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">add_rule</span>(*<span class="ruby-identifier">args</span>, &amp;<span class="ruby-identifier">block</span>)
235
+ <span class="ruby-ivar">@last_rule</span> = <span class="ruby-identifier">target</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>
236
+ <span class="ruby-keyword">case</span> <span class="ruby-identifier">target</span>
237
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">Hash</span>
238
+ <span class="ruby-ivar">@last_rule</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">first</span>
239
+ <span class="ruby-identifier">rules</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">target</span>
240
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>
241
+ <span class="ruby-identifier">rules</span>[<span class="ruby-identifier">target</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>]
242
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">Regexp</span>
243
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
244
+ <span class="ruby-identifier">rules</span>[<span class="ruby-identifier">target</span>] = <span class="ruby-identifier">block</span>
245
+ <span class="ruby-keyword">else</span>
246
+ <span class="ruby-identifier">rules</span>[<span class="ruby-identifier">target</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>]
247
+ <span class="ruby-keyword">end</span>
248
+ <span class="ruby-keyword">end</span>
249
+ <span class="ruby-keyword">end</span></pre>
250
+ </div><!-- add_rule-source -->
251
+
252
+ </div>
253
+
254
+
255
+
256
+
257
+ </div><!-- add_rule-method -->
258
+
259
+
260
+ <div id="method-i-clear" class="method-detail ">
261
+
262
+ <div class="method-heading">
263
+ <span class="method-name">clear</span><span
264
+ class="method-args">()</span>
265
+ <span class="method-click-advice">click to toggle source</span>
266
+ </div>
267
+
268
+
269
+ <div class="method-description">
270
+
271
+
272
+
273
+
274
+
275
+ <div class="method-source-code" id="clear-source">
276
+ <pre><span class="ruby-comment"># File lib/ar/rule_manager.rb, line 16</span>
277
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">clear</span>
278
+ <span class="ruby-ivar">@rules</span>.<span class="ruby-identifier">clear</span>
279
+ <span class="ruby-keyword">end</span></pre>
280
+ </div><!-- clear-source -->
281
+
282
+ </div>
283
+
284
+
285
+
286
+
287
+ </div><!-- clear-method -->
288
+
289
+
290
+ <div id="method-i-rules" class="method-detail ">
291
+
292
+ <div class="method-heading">
293
+ <span class="method-name">rules</span><span
294
+ class="method-args">()</span>
295
+ <span class="method-click-advice">click to toggle source</span>
296
+ </div>
297
+
298
+
299
+ <div class="method-description">
300
+
301
+
302
+
303
+
304
+
305
+ <div class="method-source-code" id="rules-source">
306
+ <pre><span class="ruby-comment"># File lib/ar/rule_manager.rb, line 12</span>
307
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">rules</span>
308
+ <span class="ruby-ivar">@rules</span> <span class="ruby-operator">||=</span> {}
309
+ <span class="ruby-keyword">end</span></pre>
310
+ </div><!-- rules-source -->
311
+
312
+ </div>
313
+
314
+
315
+
316
+
317
+ </div><!-- rules-method -->
318
+
319
+
320
+ </section><!-- public-instance-method-details -->
321
+
322
+ </section><!-- 5Buntitled-5D -->
323
+
324
+ </div><!-- documentation -->
325
+
326
+
327
+ <footer id="validator-badges">
328
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
329
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
330
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
331
+ </footer>
332
+