safubot 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.md +19 -0
  4. data/README.md +43 -0
  5. data/Rakefile +1 -0
  6. data/doc/Gemfile.html +119 -0
  7. data/doc/Object.html +171 -0
  8. data/doc/Rakefile.html +117 -0
  9. data/doc/Safubot.html +173 -0
  10. data/doc/Safubot/Bot.html +827 -0
  11. data/doc/Safubot/Evented.html +346 -0
  12. data/doc/Safubot/KnownUser.html +344 -0
  13. data/doc/Safubot/Log.html +254 -0
  14. data/doc/Safubot/Query.html +217 -0
  15. data/doc/Safubot/Request.html +201 -0
  16. data/doc/Safubot/Response.html +174 -0
  17. data/doc/Safubot/Test.html +244 -0
  18. data/doc/Safubot/Twitter.html +153 -0
  19. data/doc/Safubot/Twitter/Bot.html +591 -0
  20. data/doc/Safubot/Twitter/DirectMessage.html +327 -0
  21. data/doc/Safubot/Twitter/Tweet.html +522 -0
  22. data/doc/Safubot/XMPP.html +153 -0
  23. data/doc/Safubot/XMPP/Bot.html +403 -0
  24. data/doc/Safubot/XMPP/Message.html +298 -0
  25. data/doc/created.rid +14 -0
  26. data/doc/foo_rb.html +115 -0
  27. data/doc/images/add.png +0 -0
  28. data/doc/images/brick.png +0 -0
  29. data/doc/images/brick_link.png +0 -0
  30. data/doc/images/bug.png +0 -0
  31. data/doc/images/bullet_black.png +0 -0
  32. data/doc/images/bullet_toggle_minus.png +0 -0
  33. data/doc/images/bullet_toggle_plus.png +0 -0
  34. data/doc/images/date.png +0 -0
  35. data/doc/images/delete.png +0 -0
  36. data/doc/images/find.png +0 -0
  37. data/doc/images/loadingAnimation.gif +0 -0
  38. data/doc/images/macFFBgHack.png +0 -0
  39. data/doc/images/package.png +0 -0
  40. data/doc/images/page_green.png +0 -0
  41. data/doc/images/page_white_text.png +0 -0
  42. data/doc/images/page_white_width.png +0 -0
  43. data/doc/images/plugin.png +0 -0
  44. data/doc/images/ruby.png +0 -0
  45. data/doc/images/tag_blue.png +0 -0
  46. data/doc/images/tag_green.png +0 -0
  47. data/doc/images/transparent.png +0 -0
  48. data/doc/images/wrench.png +0 -0
  49. data/doc/images/wrench_orange.png +0 -0
  50. data/doc/images/zoom.png +0 -0
  51. data/doc/index.html +112 -0
  52. data/doc/js/darkfish.js +153 -0
  53. data/doc/js/jquery.js +18 -0
  54. data/doc/js/navigation.js +142 -0
  55. data/doc/js/search.js +94 -0
  56. data/doc/js/search_index.js +1 -0
  57. data/doc/js/searcher.js +228 -0
  58. data/doc/lib/safubot/bot_rb.html +115 -0
  59. data/doc/lib/safubot/evented_rb.html +115 -0
  60. data/doc/lib/safubot/known_user_rb.html +115 -0
  61. data/doc/lib/safubot/log_rb.html +115 -0
  62. data/doc/lib/safubot/safubot_rb.html +115 -0
  63. data/doc/lib/safubot/spec/bot_spec_rb.html +115 -0
  64. data/doc/lib/safubot/spec/twitter_spec_rb.html +137 -0
  65. data/doc/lib/safubot/test_helper_rb.html +115 -0
  66. data/doc/lib/safubot/twitter_rb.html +115 -0
  67. data/doc/lib/safubot/version_rb.html +115 -0
  68. data/doc/lib/safubot/xmpp_rb.html +115 -0
  69. data/doc/lib/safubot_rb.html +115 -0
  70. data/doc/rdoc.css +543 -0
  71. data/doc/table_of_contents.html +224 -0
  72. data/lib/safubot.rb +20 -0
  73. data/lib/safubot/bot.rb +177 -0
  74. data/lib/safubot/evented.rb +52 -0
  75. data/lib/safubot/known_user.rb +27 -0
  76. data/lib/safubot/log.rb +21 -0
  77. data/lib/safubot/test_helper.rb +62 -0
  78. data/lib/safubot/twitter.rb +279 -0
  79. data/lib/safubot/version.rb +3 -0
  80. data/lib/safubot/xmpp.rb +144 -0
  81. data/safubot.gemspec +32 -0
  82. data/spec/fixtures/twitter/direct_message +1 -0
  83. data/spec/fixtures/twitter/tweet +1 -0
  84. data/spec/fixtures/xmpp/message +3 -0
  85. data/spec/helper.rb +12 -0
  86. data/spec/safubot/bot_spec.rb +41 -0
  87. data/spec/safubot/evented_spec.rb +45 -0
  88. data/spec/safubot/known_user_spec.rb +22 -0
  89. data/spec/safubot/twitter_spec.rb +60 -0
  90. data/spec/safubot/xmpp_spec.rb +35 -0
  91. metadata +260 -0
@@ -0,0 +1,254 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Module: Safubot::Log</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/safubot/log.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-c-method_missing">::method_missing</a>
68
+
69
+ <li><a href="#method-c-path-3D">::path=</a>
70
+
71
+ </ul>
72
+ </nav>
73
+
74
+ </div>
75
+
76
+ <div id="project-metadata">
77
+ <nav id="fileindex-section" class="section project-section">
78
+ <h3 class="section-header">Pages</h3>
79
+
80
+ <ul>
81
+
82
+ <li class="file"><a href="../Gemfile.html">Gemfile</a>
83
+
84
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
85
+
86
+ </ul>
87
+ </nav>
88
+
89
+ <nav id="classindex-section" class="section project-section">
90
+ <h3 class="section-header">Class and Module Index</h3>
91
+
92
+ <ul class="link-list">
93
+
94
+ <li><a href="../Safubot.html">Safubot</a>
95
+
96
+ <li><a href="../Safubot/Bot.html">Safubot::Bot</a>
97
+
98
+ <li><a href="../Safubot/Evented.html">Safubot::Evented</a>
99
+
100
+ <li><a href="../Safubot/KnownUser.html">Safubot::KnownUser</a>
101
+
102
+ <li><a href="../Safubot/Log.html">Safubot::Log</a>
103
+
104
+ <li><a href="../Safubot/Query.html">Safubot::Query</a>
105
+
106
+ <li><a href="../Safubot/Request.html">Safubot::Request</a>
107
+
108
+ <li><a href="../Safubot/Response.html">Safubot::Response</a>
109
+
110
+ <li><a href="../Safubot/Test.html">Safubot::Test</a>
111
+
112
+ <li><a href="../Safubot/Twitter.html">Safubot::Twitter</a>
113
+
114
+ <li><a href="../Safubot/Twitter/Bot.html">Safubot::Twitter::Bot</a>
115
+
116
+ <li><a href="../Safubot/Twitter/DirectMessage.html">Safubot::Twitter::DirectMessage</a>
117
+
118
+ <li><a href="../Safubot/Twitter/Tweet.html">Safubot::Twitter::Tweet</a>
119
+
120
+ <li><a href="../Safubot/XMPP.html">Safubot::XMPP</a>
121
+
122
+ <li><a href="../Safubot/XMPP/Bot.html">Safubot::XMPP::Bot</a>
123
+
124
+ <li><a href="../Safubot/XMPP/Message.html">Safubot::XMPP::Message</a>
125
+
126
+ <li><a href="../Object.html">Object</a>
127
+
128
+ </ul>
129
+ </nav>
130
+
131
+ </div>
132
+ </nav>
133
+
134
+ <div id="documentation">
135
+ <h1 class="module">module Safubot::Log</h1>
136
+
137
+ <div id="description" class="description">
138
+
139
+ </div><!-- description -->
140
+
141
+
142
+
143
+
144
+ <section id="5Buntitled-5D" class="documentation-section">
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <!-- Attributes -->
153
+ <section id="attribute-method-details" class="method-section section">
154
+ <h3 class="section-header">Attributes</h3>
155
+
156
+
157
+ <div id="attribute-c-path" class="method-detail">
158
+ <div class="method-heading attribute-method-heading">
159
+ <span class="method-name">path</span><span
160
+ class="attribute-access-type">[R]</span>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+
165
+
166
+
167
+ </div>
168
+ </div>
169
+
170
+ </section><!-- attribute-method-details -->
171
+
172
+
173
+ <!-- Methods -->
174
+
175
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
176
+ <h3 class="section-header">Public Class Methods</h3>
177
+
178
+
179
+ <div id="method-c-method_missing" class="method-detail ">
180
+
181
+ <div class="method-heading">
182
+ <span class="method-name">method_missing</span><span
183
+ class="method-args">(method, *args)</span>
184
+ <span class="method-click-advice">click to toggle source</span>
185
+ </div>
186
+
187
+
188
+ <div class="method-description">
189
+
190
+
191
+
192
+
193
+
194
+ <div class="method-source-code" id="method_missing-source">
195
+ <pre><span class="ruby-comment"># File lib/safubot/log.rb, line 12</span>
196
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>, *<span class="ruby-identifier">args</span>)
197
+ <span class="ruby-ivar">@stdlog</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">STDOUT</span>)
198
+ <span class="ruby-ivar">@stdlog</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>, *<span class="ruby-identifier">args</span>)
199
+ <span class="ruby-ivar">@filelog</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>, *<span class="ruby-identifier">args</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@filelog</span>
200
+ <span class="ruby-keyword">end</span></pre>
201
+ </div><!-- method_missing-source -->
202
+
203
+ </div>
204
+
205
+
206
+
207
+
208
+ </div><!-- method_missing-method -->
209
+
210
+
211
+ <div id="method-c-path-3D" class="method-detail ">
212
+
213
+ <div class="method-heading">
214
+ <span class="method-name">path=</span><span
215
+ class="method-args">(str)</span>
216
+ <span class="method-click-advice">click to toggle source</span>
217
+ </div>
218
+
219
+
220
+ <div class="method-description">
221
+
222
+ <p>Commence logging to the specified file path.</p>
223
+
224
+
225
+
226
+ <div class="method-source-code" id="path-3D-source">
227
+ <pre><span class="ruby-comment"># File lib/safubot/log.rb, line 7</span>
228
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">path=</span>(<span class="ruby-identifier">str</span>)
229
+ <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">str</span>
230
+ <span class="ruby-ivar">@filelog</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>)
231
+ <span class="ruby-keyword">end</span></pre>
232
+ </div><!-- path-3D-source -->
233
+
234
+ </div>
235
+
236
+
237
+
238
+
239
+ </div><!-- path-3D-method -->
240
+
241
+
242
+ </section><!-- public-class-method-details -->
243
+
244
+ </section><!-- 5Buntitled-5D -->
245
+
246
+ </div><!-- documentation -->
247
+
248
+
249
+ <footer id="validator-badges">
250
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
251
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
252
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
253
+ </footer>
254
+
@@ -0,0 +1,217 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Class: Safubot::Query</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/safubot/test_helper.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"><a href="../Object.html">Object</a>
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><span class="include">MongoMapper::Document</span>
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-i-make_request">#make_request</a>
86
+
87
+ </ul>
88
+ </nav>
89
+
90
+ </div>
91
+
92
+ <div id="project-metadata">
93
+ <nav id="fileindex-section" class="section project-section">
94
+ <h3 class="section-header">Pages</h3>
95
+
96
+ <ul>
97
+
98
+ <li class="file"><a href="../Gemfile.html">Gemfile</a>
99
+
100
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
101
+
102
+ </ul>
103
+ </nav>
104
+
105
+ <nav id="classindex-section" class="section project-section">
106
+ <h3 class="section-header">Class and Module Index</h3>
107
+
108
+ <ul class="link-list">
109
+
110
+ <li><a href="../Safubot.html">Safubot</a>
111
+
112
+ <li><a href="../Safubot/Bot.html">Safubot::Bot</a>
113
+
114
+ <li><a href="../Safubot/Evented.html">Safubot::Evented</a>
115
+
116
+ <li><a href="../Safubot/KnownUser.html">Safubot::KnownUser</a>
117
+
118
+ <li><a href="../Safubot/Log.html">Safubot::Log</a>
119
+
120
+ <li><a href="../Safubot/Query.html">Safubot::Query</a>
121
+
122
+ <li><a href="../Safubot/Request.html">Safubot::Request</a>
123
+
124
+ <li><a href="../Safubot/Response.html">Safubot::Response</a>
125
+
126
+ <li><a href="../Safubot/Test.html">Safubot::Test</a>
127
+
128
+ <li><a href="../Safubot/Twitter.html">Safubot::Twitter</a>
129
+
130
+ <li><a href="../Safubot/Twitter/Bot.html">Safubot::Twitter::Bot</a>
131
+
132
+ <li><a href="../Safubot/Twitter/DirectMessage.html">Safubot::Twitter::DirectMessage</a>
133
+
134
+ <li><a href="../Safubot/Twitter/Tweet.html">Safubot::Twitter::Tweet</a>
135
+
136
+ <li><a href="../Safubot/XMPP.html">Safubot::XMPP</a>
137
+
138
+ <li><a href="../Safubot/XMPP/Bot.html">Safubot::XMPP::Bot</a>
139
+
140
+ <li><a href="../Safubot/XMPP/Message.html">Safubot::XMPP::Message</a>
141
+
142
+ <li><a href="../Object.html">Object</a>
143
+
144
+ </ul>
145
+ </nav>
146
+
147
+ </div>
148
+ </nav>
149
+
150
+ <div id="documentation">
151
+ <h1 class="class">class Safubot::Query</h1>
152
+
153
+ <div id="description" class="description">
154
+
155
+ </div><!-- description -->
156
+
157
+
158
+
159
+
160
+ <section id="5Buntitled-5D" class="documentation-section">
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <!-- Methods -->
170
+
171
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
172
+ <h3 class="section-header">Public Instance Methods</h3>
173
+
174
+
175
+ <div id="method-i-make_request" class="method-detail ">
176
+
177
+ <div class="method-heading">
178
+ <span class="method-name">make_request</span><span
179
+ class="method-args">()</span>
180
+ <span class="method-click-advice">click to toggle source</span>
181
+ </div>
182
+
183
+
184
+ <div class="method-description">
185
+
186
+
187
+
188
+
189
+
190
+ <div class="method-source-code" id="make_request-source">
191
+ <pre><span class="ruby-comment"># File lib/safubot/test_helper.rb, line 40</span>
192
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">make_request</span>
193
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">request</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Request</span>.<span class="ruby-identifier">create</span>(<span class="ruby-value">:user</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">user</span>, <span class="ruby-value">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">text</span>, <span class="ruby-value">:source</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>)
194
+ <span class="ruby-keyword">end</span></pre>
195
+ </div><!-- make_request-source -->
196
+
197
+ </div>
198
+
199
+
200
+
201
+
202
+ </div><!-- make_request-method -->
203
+
204
+
205
+ </section><!-- public-instance-method-details -->
206
+
207
+ </section><!-- 5Buntitled-5D -->
208
+
209
+ </div><!-- documentation -->
210
+
211
+
212
+ <footer id="validator-badges">
213
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
214
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
215
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
216
+ </footer>
217
+