safubot 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +9 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/README.md +52 -1
- data/doc/Safubot/Bot.html +1287 -652
- data/doc/Safubot/Evented.html +409 -276
- data/doc/Safubot/KnownUser.html +476 -254
- data/doc/Safubot/Log.html +184 -192
- data/doc/Safubot/Query.html +131 -164
- data/doc/Safubot/Request.html +158 -147
- data/doc/Safubot/Response.html +92 -135
- data/doc/Safubot/Test.html +166 -187
- data/doc/Safubot/Twitter/Bot.html +1005 -455
- data/doc/Safubot/Twitter/DirectMessage.html +417 -238
- data/doc/Safubot/Twitter/Tweet.html +725 -398
- data/doc/Safubot/Twitter.html +69 -116
- data/doc/Safubot/XMPP/Bot.html +625 -303
- data/doc/Safubot/XMPP/Message.html +372 -217
- data/doc/Safubot/XMPP.html +69 -116
- data/doc/Safubot.html +155 -126
- data/doc/_index.html +294 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +140 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +129 -101
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +167 -0
- data/doc/js/jquery.js +3 -5
- data/doc/method_list.html +638 -0
- data/doc/top-level-namespace.html +103 -0
- data/lib/safubot/bot.rb +22 -20
- data/lib/safubot/known_user.rb +2 -0
- data/lib/safubot/twitter.rb +30 -26
- data/lib/safubot/version.rb +1 -1
- data/lib/safubot/xmpp.rb +20 -14
- data/safubot.gemspec +1 -0
- metadata +50 -71
- data/doc/Gemfile.html +0 -119
- data/doc/Object.html +0 -171
- data/doc/Rakefile.html +0 -117
- data/doc/created.rid +0 -14
- data/doc/foo_rb.html +0 -115
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/js/darkfish.js +0 -153
- data/doc/js/navigation.js +0 -142
- data/doc/js/search.js +0 -94
- data/doc/js/search_index.js +0 -1
- data/doc/js/searcher.js +0 -228
- data/doc/lib/safubot/bot_rb.html +0 -115
- data/doc/lib/safubot/evented_rb.html +0 -115
- data/doc/lib/safubot/known_user_rb.html +0 -115
- data/doc/lib/safubot/log_rb.html +0 -115
- data/doc/lib/safubot/safubot_rb.html +0 -115
- data/doc/lib/safubot/spec/bot_spec_rb.html +0 -115
- data/doc/lib/safubot/spec/twitter_spec_rb.html +0 -137
- data/doc/lib/safubot/test_helper_rb.html +0 -115
- data/doc/lib/safubot/twitter_rb.html +0 -115
- data/doc/lib/safubot/version_rb.html +0 -115
- data/doc/lib/safubot/xmpp_rb.html +0 -115
- data/doc/lib/safubot_rb.html +0 -115
- data/doc/rdoc.css +0 -543
- data/doc/table_of_contents.html +0 -224
data/doc/Safubot/Test.html
CHANGED
@@ -1,244 +1,223 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=
|
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: Safubot::Test
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.3
|
10
|
+
|
11
|
+
</title>
|
6
12
|
|
7
|
-
<
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
14
|
|
9
|
-
<link type="text/css" media="screen"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
16
|
|
11
|
-
<script type="text/javascript">
|
12
|
-
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
13
20
|
</script>
|
14
21
|
|
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
|
-
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
45
23
|
|
46
|
-
<
|
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>
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
53
25
|
|
54
|
-
|
55
|
-
</div>
|
56
26
|
|
57
|
-
|
58
|
-
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
59
32
|
|
60
|
-
|
61
|
-
|
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-clean_environment">::clean_environment</a>
|
68
|
-
|
69
|
-
<li><a href="#method-c-request">::request</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>
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
81
35
|
|
82
|
-
<
|
36
|
+
<a href="../_index.html">Index (T)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Safubot.html" title="Safubot (module)">Safubot</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Test</span>
|
83
40
|
|
84
|
-
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
85
41
|
|
86
|
-
</
|
87
|
-
</
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
88
44
|
|
89
|
-
|
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>
|
45
|
+
<div id="search">
|
95
46
|
|
96
|
-
<
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
97
48
|
|
98
|
-
<
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
99
50
|
|
100
|
-
<
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
101
52
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<
|
107
|
-
|
108
|
-
<
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Module: Safubot::Test
|
109
60
|
|
110
|
-
<li><a href="../Safubot/Test.html">Safubot::Test</a>
|
111
61
|
|
112
|
-
<li><a href="../Safubot/Twitter.html">Safubot::Twitter</a>
|
113
62
|
|
114
|
-
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
115
66
|
|
116
|
-
<li><a href="../Safubot/Twitter/DirectMessage.html">Safubot::Twitter::DirectMessage</a>
|
117
67
|
|
118
|
-
|
68
|
+
|
119
69
|
|
120
|
-
|
70
|
+
|
121
71
|
|
122
|
-
<li><a href="../Safubot/XMPP/Bot.html">Safubot::XMPP::Bot</a>
|
123
72
|
|
124
|
-
<li><a href="../Safubot/XMPP/Message.html">Safubot::XMPP::Message</a>
|
125
73
|
|
126
|
-
<
|
74
|
+
<dt class="r1 last">Defined in:</dt>
|
75
|
+
<dd class="r1 last">lib/safubot/test_helper.rb</dd>
|
127
76
|
|
128
|
-
|
129
|
-
|
77
|
+
</dl>
|
78
|
+
<div class="clear"></div>
|
79
|
+
|
80
|
+
|
130
81
|
|
131
|
-
</div>
|
132
|
-
</nav>
|
133
82
|
|
134
|
-
<div id="documentation">
|
135
|
-
<h1 class="module">module Safubot::Test</h1>
|
136
83
|
|
137
|
-
<div id="description" class="description">
|
138
|
-
|
139
|
-
</div><!-- description -->
|
140
84
|
|
141
85
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
86
|
+
<h2>
|
87
|
+
Class Method Summary
|
88
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
89
|
+
</h2>
|
146
90
|
|
91
|
+
<ul class="summary">
|
92
|
+
|
93
|
+
<li class="public ">
|
94
|
+
<span class="summary_signature">
|
147
95
|
|
148
|
-
|
96
|
+
<a href="#clean_environment-class_method" title="clean_environment (class method)">+ (Object) <strong>clean_environment</strong> </a>
|
149
97
|
|
150
98
|
|
151
99
|
|
100
|
+
</span>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
152
107
|
|
153
|
-
|
108
|
+
|
109
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
110
|
+
|
111
|
+
</li>
|
112
|
+
|
113
|
+
|
114
|
+
<li class="public ">
|
115
|
+
<span class="summary_signature">
|
116
|
+
|
117
|
+
<a href="#request-class_method" title="request (class method)">+ (Object) <strong>request</strong>(text) </a>
|
154
118
|
|
155
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
156
|
-
<h3 class="section-header">Public Class Methods</h3>
|
157
119
|
|
158
120
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
121
|
+
</span>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
167
128
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
129
|
+
|
130
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
131
|
+
|
132
|
+
</li>
|
172
133
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">clean_environment</span>
|
177
|
-
<span class="ruby-constant">MongoMapper</span>.<span class="ruby-identifier">database</span> = <span class="ruby-string">"safubot_testing"</span>
|
178
|
-
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">destroy_all</span>
|
179
|
-
<span class="ruby-constant">Query</span>.<span class="ruby-identifier">destroy_all</span>
|
180
|
-
<span class="ruby-constant">Response</span>.<span class="ruby-identifier">destroy_all</span>
|
181
|
-
<span class="ruby-identifier">$bot</span> = <span class="ruby-constant">Safubot</span>.<span class="ruby-identifier">new</span>({
|
182
|
-
<span class="ruby-value">:database</span> =<span class="ruby-operator">></span> <span class="ruby-string">"safubot_testing"</span>,
|
183
|
-
<span class="ruby-value">:twitter_opts</span> =<span class="ruby-operator">></span> {
|
184
|
-
<span class="ruby-value">:username</span> =<span class="ruby-operator">></span> <span class="ruby-string">"safubot"</span>,
|
185
|
-
<span class="ruby-value">:consumer_key</span> =<span class="ruby-operator">></span> <span class="ruby-string">"JgUdmeA1Q8GNm6o7iM6A"</span>,
|
186
|
-
<span class="ruby-value">:consumer_secret</span> =<span class="ruby-operator">></span> <span class="ruby-string">"wo7VKq4AGohHc4RgQEuWs1unjy7dtnKJn3Ojd4jPaA"</span>,
|
187
|
-
<span class="ruby-value">:oauth_token</span> =<span class="ruby-operator">></span> <span class="ruby-string">"391202224-jrdXljH8LxXdU1uz7QbSyRAU8VQId4p4soVJ3NWG"</span>,
|
188
|
-
<span class="ruby-value">:oauth_token_secret</span> =<span class="ruby-operator">></span> <span class="ruby-string">"j44x8UgMZfooPXrhm9XiuCDkWwqO0zHOsWgn8NoXw0"</span>
|
189
|
-
},
|
190
|
-
})
|
191
|
-
<span class="ruby-keyword">end</span></pre>
|
192
|
-
</div><!-- clean_environment-source -->
|
193
|
-
|
194
|
-
</div>
|
134
|
+
|
135
|
+
</ul>
|
136
|
+
|
195
137
|
|
196
|
-
|
197
138
|
|
198
|
-
|
199
|
-
</div><!-- clean_environment-method -->
|
200
139
|
|
140
|
+
<div id="class_method_details" class="method_details_list">
|
141
|
+
<h2>Class Method Details</h2>
|
201
142
|
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
</div>
|
209
|
-
|
210
|
-
|
211
|
-
<div class="method-description">
|
212
|
-
|
213
|
-
|
214
|
-
|
143
|
+
|
144
|
+
<div class="method_details first">
|
145
|
+
<p class="signature first" id="clean_environment-class_method">
|
146
|
+
|
147
|
+
+ (<tt>Object</tt>) <strong>clean_environment</strong>
|
148
|
+
|
215
149
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
<
|
220
|
-
<
|
221
|
-
<span class="ruby-keyword">end</span></pre>
|
222
|
-
</div><!-- request-source -->
|
223
|
-
|
224
|
-
</div>
|
150
|
+
|
151
|
+
</p><table class="source_code">
|
152
|
+
<tr>
|
153
|
+
<td>
|
154
|
+
<pre class="lines">
|
225
155
|
|
226
|
-
|
227
156
|
|
228
|
-
|
229
|
-
|
157
|
+
20
|
158
|
+
21
|
159
|
+
22
|
160
|
+
23
|
161
|
+
24
|
162
|
+
25
|
163
|
+
26
|
164
|
+
27
|
165
|
+
28</pre>
|
166
|
+
</td>
|
167
|
+
<td>
|
168
|
+
<pre class="code"><span class="info file"># File 'lib/safubot/test_helper.rb', line 20</span>
|
230
169
|
|
170
|
+
<span class='kw'>def</span> <span class='id clean_environment'>clean_environment</span>
|
171
|
+
<span class='const'>MongoMapper</span><span class='period'>.</span><span class='id database'>database</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>safubot_testing</span><span class='tstring_end'>"</span></span>
|
172
|
+
<span class='const'>Request</span><span class='period'>.</span><span class='id destroy_all'>destroy_all</span>
|
173
|
+
<span class='const'>Query</span><span class='period'>.</span><span class='id destroy_all'>destroy_all</span>
|
174
|
+
<span class='const'>Response</span><span class='period'>.</span><span class='id destroy_all'>destroy_all</span>
|
175
|
+
<span class='const'>KnownUser</span><span class='period'>.</span><span class='id destroy_all'>destroy_all</span>
|
176
|
+
<span class='const'>Safubot</span><span class='op'>::</span><span class='id mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:testing</span>
|
177
|
+
<span class='gvar'>$bot</span> <span class='op'>=</span> <span class='const'>Safubot</span><span class='op'>::</span><span class='const'>Bot</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='symbol'>:database</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>safubot_testing</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
178
|
+
<span class='kw'>end</span></pre>
|
179
|
+
</td>
|
180
|
+
</tr>
|
181
|
+
</table>
|
182
|
+
</div>
|
231
183
|
|
232
|
-
|
184
|
+
<div class="method_details ">
|
185
|
+
<p class="signature " id="request-class_method">
|
186
|
+
|
187
|
+
+ (<tt>Object</tt>) <strong>request</strong>(text)
|
188
|
+
|
189
|
+
|
233
190
|
|
234
|
-
|
191
|
+
</p><table class="source_code">
|
192
|
+
<tr>
|
193
|
+
<td>
|
194
|
+
<pre class="lines">
|
235
195
|
|
236
|
-
</div><!-- documentation -->
|
237
196
|
|
197
|
+
30
|
198
|
+
31
|
199
|
+
32</pre>
|
200
|
+
</td>
|
201
|
+
<td>
|
202
|
+
<pre class="code"><span class="info file"># File 'lib/safubot/test_helper.rb', line 30</span>
|
238
203
|
|
239
|
-
<
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
</
|
204
|
+
<span class='kw'>def</span> <span class='id request'>request</span><span class='lparen'>(</span><span class='id text'>text</span><span class='rparen'>)</span>
|
205
|
+
<span class='const'>Query</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='symbol'>:user</span> <span class='op'>=></span> <span class='const'>KnownUser</span><span class='period'>.</span><span class='id by_name'>by_name</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>testing</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:text</span> <span class='op'>=></span> <span class='id text'>text</span><span class='rparen'>)</span><span class='period'>.</span><span class='id make_request'>make_request</span>
|
206
|
+
<span class='kw'>end</span></pre>
|
207
|
+
</td>
|
208
|
+
</tr>
|
209
|
+
</table>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<div id="footer">
|
217
|
+
Generated on Mon Nov 28 20:20:04 2011 by
|
218
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
219
|
+
0.7.3 (ruby-1.9.2).
|
220
|
+
</div>
|
244
221
|
|
222
|
+
</body>
|
223
|
+
</html>
|