ruby-snarl 0.0.6 → 0.0.7
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.
- data/doc/classes/AutoSnarl.html +12 -12
- data/doc/classes/TestSnarl.html +272 -0
- data/doc/created.rid +1 -1
- data/doc/files/examples/example3_rb.html +1 -1
- data/doc/files/examples/example4_rb.html +1 -1
- data/doc/files/test/test_snarl_rb.html +108 -0
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_file_index.html +1 -0
- data/doc/fr_method_index.html +8 -3
- data/doc/index.html +23 -23
- data/examples/example3.rb +1 -1
- data/examples/example4.rb +1 -1
- data/ruby-snarl.gemspec +1 -1
- data/test/test_snarl.rb +47 -0
- metadata +5 -1
data/doc/classes/AutoSnarl.html
CHANGED
@@ -80,8 +80,8 @@
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
81
81
|
|
82
82
|
<div class="name-list">
|
83
|
-
<a href="#
|
84
|
-
<a href="#
|
83
|
+
<a href="#M000018">icon</a>
|
84
|
+
<a href="#M000019">snarl</a>
|
85
85
|
</div>
|
86
86
|
</div>
|
87
87
|
|
@@ -103,19 +103,19 @@
|
|
103
103
|
<div id="methods">
|
104
104
|
<h3 class="section-bar">Public Class methods</h3>
|
105
105
|
|
106
|
-
<div id="method-
|
107
|
-
<a name="
|
106
|
+
<div id="method-M000018" class="method-detail">
|
107
|
+
<a name="M000018"></a>
|
108
108
|
|
109
109
|
<div class="method-heading">
|
110
|
-
<a href="#
|
110
|
+
<a href="#M000018" class="method-signature">
|
111
111
|
<span class="method-name">icon</span><span class="method-args">()</span>
|
112
112
|
</a>
|
113
113
|
</div>
|
114
114
|
|
115
115
|
<div class="method-description">
|
116
116
|
<p><a class="source-toggle" href="#"
|
117
|
-
onclick="toggleCode('
|
118
|
-
<div class="method-source-code" id="
|
117
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
118
|
+
<div class="method-source-code" id="M000018-source">
|
119
119
|
<pre>
|
120
120
|
<span class="ruby-comment cmt"># File lib/autosnarl.rb, line 4</span>
|
121
121
|
4: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">icon</span>
|
@@ -132,19 +132,19 @@
|
|
132
132
|
</div>
|
133
133
|
</div>
|
134
134
|
|
135
|
-
<div id="method-
|
136
|
-
<a name="
|
135
|
+
<div id="method-M000019" class="method-detail">
|
136
|
+
<a name="M000019"></a>
|
137
137
|
|
138
138
|
<div class="method-heading">
|
139
|
-
<a href="#
|
139
|
+
<a href="#M000019" class="method-signature">
|
140
140
|
<span class="method-name">snarl</span><span class="method-args">(title, msg, ico = nil)</span>
|
141
141
|
</a>
|
142
142
|
</div>
|
143
143
|
|
144
144
|
<div class="method-description">
|
145
145
|
<p><a class="source-toggle" href="#"
|
146
|
-
onclick="toggleCode('
|
147
|
-
<div class="method-source-code" id="
|
146
|
+
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
147
|
+
<div class="method-source-code" id="M000019-source">
|
148
148
|
<pre>
|
149
149
|
<span class="ruby-comment cmt"># File lib/autosnarl.rb, line 14</span>
|
150
150
|
14: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">snarl</span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-identifier">ico</span> = <span class="ruby-keyword kw">nil</span>
|
@@ -0,0 +1,272 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: TestSnarl</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">TestSnarl</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/test/test_snarl_rb.html">
|
59
|
+
test/test_snarl.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Test::Unit::TestCase
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
require ‘test/unit’ unless defined? $ZENTEST and $ZENTEST
|
84
|
+
</p>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div id="method-list">
|
92
|
+
<h3 class="section-bar">Methods</h3>
|
93
|
+
|
94
|
+
<div class="name-list">
|
95
|
+
<a href="#M000013">test_new_api</a>
|
96
|
+
<a href="#M000014">test_show_api</a>
|
97
|
+
<a href="#M000015">test_update_api</a>
|
98
|
+
<a href="#M000017">test_version</a>
|
99
|
+
<a href="#M000016">test_visible</a>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<!-- if includes -->
|
107
|
+
|
108
|
+
<div id="section">
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<!-- if method_list -->
|
118
|
+
<div id="methods">
|
119
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
120
|
+
|
121
|
+
<div id="method-M000013" class="method-detail">
|
122
|
+
<a name="M000013"></a>
|
123
|
+
|
124
|
+
<div class="method-heading">
|
125
|
+
<a href="#M000013" class="method-signature">
|
126
|
+
<span class="method-name">test_new_api</span><span class="method-args">()</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div class="method-description">
|
131
|
+
<p><a class="source-toggle" href="#"
|
132
|
+
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
133
|
+
<div class="method-source-code" id="M000013-source">
|
134
|
+
<pre>
|
135
|
+
<span class="ruby-comment cmt"># File test/test_snarl.rb, line 6</span>
|
136
|
+
6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_new_api</span>
|
137
|
+
7: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>))
|
138
|
+
8: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>))
|
139
|
+
9:
|
140
|
+
10: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">TypeError</span>) { <span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-value">0</span>) }
|
141
|
+
11: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-keyword kw">nil</span>))
|
142
|
+
12: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-value str">'missing_file'</span>))
|
143
|
+
13: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'short'</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>))
|
144
|
+
14: <span class="ruby-keyword kw">end</span>
|
145
|
+
</pre>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div id="method-M000014" class="method-detail">
|
151
|
+
<a name="M000014"></a>
|
152
|
+
|
153
|
+
<div class="method-heading">
|
154
|
+
<a href="#M000014" class="method-signature">
|
155
|
+
<span class="method-name">test_show_api</span><span class="method-args">()</span>
|
156
|
+
</a>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div class="method-description">
|
160
|
+
<p><a class="source-toggle" href="#"
|
161
|
+
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
162
|
+
<div class="method-source-code" id="M000014-source">
|
163
|
+
<pre>
|
164
|
+
<span class="ruby-comment cmt"># File test/test_snarl.rb, line 16</span>
|
165
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_show_api</span>
|
166
|
+
17: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">show_message</span>(<span class="ruby-value str">'title'</span>))
|
167
|
+
18: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">show_message</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>))
|
168
|
+
19:
|
169
|
+
20: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">TypeError</span>) { <span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">show_message</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-value">0</span>) }
|
170
|
+
21: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">show_message</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-keyword kw">nil</span>))
|
171
|
+
22: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">show_message</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-value str">'missing_file'</span>))
|
172
|
+
23: <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">show_message</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'short'</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>))
|
173
|
+
24: <span class="ruby-keyword kw">end</span>
|
174
|
+
</pre>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
<div id="method-M000015" class="method-detail">
|
180
|
+
<a name="M000015"></a>
|
181
|
+
|
182
|
+
<div class="method-heading">
|
183
|
+
<a href="#M000015" class="method-signature">
|
184
|
+
<span class="method-name">test_update_api</span><span class="method-args">()</span>
|
185
|
+
</a>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
<div class="method-description">
|
189
|
+
<p><a class="source-toggle" href="#"
|
190
|
+
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
191
|
+
<div class="method-source-code" id="M000015-source">
|
192
|
+
<pre>
|
193
|
+
<span class="ruby-comment cmt"># File test/test_snarl.rb, line 26</span>
|
194
|
+
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_update_api</span>
|
195
|
+
27: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span> = <span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>))
|
196
|
+
28: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value str">'new title'</span>))
|
197
|
+
29: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>))
|
198
|
+
30:
|
199
|
+
31: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">TypeError</span>) { <span class="ruby-identifier">s</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-value">0</span>) }
|
200
|
+
32: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-keyword kw">nil</span>))
|
201
|
+
33: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'msg'</span>, <span class="ruby-value str">'missing_file'</span>))
|
202
|
+
34: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'short'</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>))
|
203
|
+
35: <span class="ruby-keyword kw">end</span>
|
204
|
+
</pre>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div id="method-M000017" class="method-detail">
|
210
|
+
<a name="M000017"></a>
|
211
|
+
|
212
|
+
<div class="method-heading">
|
213
|
+
<a href="#M000017" class="method-signature">
|
214
|
+
<span class="method-name">test_version</span><span class="method-args">()</span>
|
215
|
+
</a>
|
216
|
+
</div>
|
217
|
+
|
218
|
+
<div class="method-description">
|
219
|
+
<p>
|
220
|
+
this one is a little fragile, but it passes right now…
|
221
|
+
</p>
|
222
|
+
<p><a class="source-toggle" href="#"
|
223
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
224
|
+
<div class="method-source-code" id="M000017-source">
|
225
|
+
<pre>
|
226
|
+
<span class="ruby-comment cmt"># File test/test_snarl.rb, line 44</span>
|
227
|
+
44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_version</span>
|
228
|
+
45: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">"1.1"</span>, <span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">version</span>)
|
229
|
+
46: <span class="ruby-keyword kw">end</span>
|
230
|
+
</pre>
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
<div id="method-M000016" class="method-detail">
|
236
|
+
<a name="M000016"></a>
|
237
|
+
|
238
|
+
<div class="method-heading">
|
239
|
+
<a href="#M000016" class="method-signature">
|
240
|
+
<span class="method-name">test_visible</span><span class="method-args">()</span>
|
241
|
+
</a>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
<div class="method-description">
|
245
|
+
<p><a class="source-toggle" href="#"
|
246
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
247
|
+
<div class="method-source-code" id="M000016-source">
|
248
|
+
<pre>
|
249
|
+
<span class="ruby-comment cmt"># File test/test_snarl.rb, line 37</span>
|
250
|
+
37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_visible</span>
|
251
|
+
38: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span> = <span class="ruby-constant">Snarl</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'title'</span>, <span class="ruby-value str">'hold me'</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>))
|
252
|
+
39: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">visible?</span>)
|
253
|
+
40: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">hide</span>)
|
254
|
+
41: <span class="ruby-keyword kw">end</span>
|
255
|
+
</pre>
|
256
|
+
</div>
|
257
|
+
</div>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
|
261
|
+
</div>
|
262
|
+
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
|
267
|
+
<div id="validator-badges">
|
268
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
</body>
|
272
|
+
</html>
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Tue Aug 08
|
1
|
+
Tue Aug 08 08:38:57 Eastern Standard Time 2006
|
@@ -0,0 +1,108 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: test_snarl.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>test_snarl.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>test/test_snarl.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Tue Aug 08 08:37:39 Eastern Standard Time 2006</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
snarl
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
<!-- if includes -->
|
87
|
+
|
88
|
+
<div id="section">
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if method_list -->
|
98
|
+
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<div id="validator-badges">
|
104
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
</body>
|
108
|
+
</html>
|
data/doc/fr_class_index.html
CHANGED
data/doc/fr_file_index.html
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
<a href="files/examples/example4_rb.html">examples/example4.rb</a><br />
|
27
27
|
<a href="files/lib/autosnarl_rb.html">lib/autosnarl.rb</a><br />
|
28
28
|
<a href="files/lib/snarl_rb.html">lib/snarl.rb</a><br />
|
29
|
+
<a href="files/test/test_snarl_rb.html">test/test_snarl.rb</a><br />
|
29
30
|
</div>
|
30
31
|
</div>
|
31
32
|
</body>
|
data/doc/fr_method_index.html
CHANGED
@@ -21,15 +21,20 @@
|
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
23
|
<a href="classes/Snarl.html#M000004">hide (Snarl)</a><br />
|
24
|
-
<a href="classes/AutoSnarl.html#
|
24
|
+
<a href="classes/AutoSnarl.html#M000018">icon (AutoSnarl)</a><br />
|
25
25
|
<a href="classes/Snarl.html#M000007">id (Snarl)</a><br />
|
26
26
|
<a href="classes/Snarl.html#M000001">new (Snarl)</a><br />
|
27
|
-
<a href="classes/Snarl.html#M000009">send (Snarl)</a><br />
|
28
27
|
<a href="classes/Snarl/SnarlAPI.html#M000012">send (Snarl::SnarlAPI)</a><br />
|
28
|
+
<a href="classes/Snarl.html#M000009">send (Snarl)</a><br />
|
29
29
|
<a href="classes/Snarl.html#M000010">send? (Snarl)</a><br />
|
30
30
|
<a href="classes/Snarl.html#M000008">show (Snarl)</a><br />
|
31
31
|
<a href="classes/Snarl.html#M000002">show_message (Snarl)</a><br />
|
32
|
-
<a href="classes/AutoSnarl.html#
|
32
|
+
<a href="classes/AutoSnarl.html#M000019">snarl (AutoSnarl)</a><br />
|
33
|
+
<a href="classes/TestSnarl.html#M000013">test_new_api (TestSnarl)</a><br />
|
34
|
+
<a href="classes/TestSnarl.html#M000014">test_show_api (TestSnarl)</a><br />
|
35
|
+
<a href="classes/TestSnarl.html#M000015">test_update_api (TestSnarl)</a><br />
|
36
|
+
<a href="classes/TestSnarl.html#M000017">test_version (TestSnarl)</a><br />
|
37
|
+
<a href="classes/TestSnarl.html#M000016">test_visible (TestSnarl)</a><br />
|
33
38
|
<a href="classes/Snarl/SnarlAPI.html#M000011">to_cha (Snarl::SnarlAPI)</a><br />
|
34
39
|
<a href="classes/Snarl.html#M000003">update (Snarl)</a><br />
|
35
40
|
<a href="classes/Snarl.html#M000006">version (Snarl)</a><br />
|
data/doc/index.html
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
5
|
-
|
6
|
-
<!--
|
7
|
-
|
8
|
-
RDoc Documentation
|
9
|
-
|
10
|
-
-->
|
11
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
12
|
-
<head>
|
13
|
-
<title>RDoc Documentation</title>
|
14
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
15
|
-
</head>
|
16
|
-
<frameset rows="20%, 80%">
|
17
|
-
<frameset cols="25%,35%,45%">
|
18
|
-
<frame src="fr_file_index.html" title="Files" name="Files" />
|
19
|
-
<frame src="fr_class_index.html" name="Classes" />
|
20
|
-
<frame src="fr_method_index.html" name="Methods" />
|
21
|
-
</frameset>
|
22
|
-
<frame src="
|
23
|
-
</frameset>
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
5
|
+
|
6
|
+
<!--
|
7
|
+
|
8
|
+
RDoc Documentation
|
9
|
+
|
10
|
+
-->
|
11
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
12
|
+
<head>
|
13
|
+
<title>RDoc Documentation</title>
|
14
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
15
|
+
</head>
|
16
|
+
<frameset rows="20%, 80%">
|
17
|
+
<frameset cols="25%,35%,45%">
|
18
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
19
|
+
<frame src="fr_class_index.html" name="Classes" />
|
20
|
+
<frame src="fr_method_index.html" name="Methods" />
|
21
|
+
</frameset>
|
22
|
+
<frame src="classes/Snarl.html" name="docwin" />
|
23
|
+
</frameset>
|
24
24
|
</html>
|
data/examples/example3.rb
CHANGED
data/examples/example4.rb
CHANGED
data/ruby-snarl.gemspec
CHANGED
data/test/test_snarl.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require "snarl"
|
2
|
+
# require 'test/unit' unless defined? $ZENTEST and $ZENTEST
|
3
|
+
|
4
|
+
class TestSnarl < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def test_new_api
|
7
|
+
assert(Snarl.new('title'))
|
8
|
+
assert(Snarl.new('title', 'msg'))
|
9
|
+
|
10
|
+
assert_raises(TypeError) { Snarl.new('title', 'msg', 0) }
|
11
|
+
assert(Snarl.new('title', 'msg', nil))
|
12
|
+
assert(Snarl.new('title', 'msg', 'missing_file'))
|
13
|
+
assert(Snarl.new('title', 'short', nil, 1))
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_show_api
|
17
|
+
assert(Snarl.show_message('title'))
|
18
|
+
assert(Snarl.show_message('title', 'msg'))
|
19
|
+
|
20
|
+
assert_raises(TypeError) { Snarl.show_message('title', 'msg', 0) }
|
21
|
+
assert(Snarl.show_message('title', 'msg', nil))
|
22
|
+
assert(Snarl.show_message('title', 'msg', 'missing_file'))
|
23
|
+
assert(Snarl.show_message('title', 'short', nil, 1))
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_update_api
|
27
|
+
assert(s = Snarl.new('title'))
|
28
|
+
assert(s.update('new title'))
|
29
|
+
assert(s.update('title', 'msg'))
|
30
|
+
|
31
|
+
assert_raises(TypeError) { s.update('title', 'msg', 0) }
|
32
|
+
assert(s.update('title', 'msg', nil))
|
33
|
+
assert(s.update('title', 'msg', 'missing_file'))
|
34
|
+
assert(s.update('title', 'short', nil, 1))
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_visible
|
38
|
+
assert(s = Snarl.new('title', 'hold me', nil, 1))
|
39
|
+
assert(s.visible?)
|
40
|
+
assert(s.hide)
|
41
|
+
end
|
42
|
+
|
43
|
+
# this one is a little fragile, but it passes right now...
|
44
|
+
def test_version
|
45
|
+
assert_equal("1.1", Snarl.version)
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-snarl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
6
|
+
version: 0.0.7
|
7
7
|
date: 2006-08-08 00:00:00 -04:00
|
8
8
|
summary: Snarl (http://www.fullphat.net/snarl.html) is a simple notification system, similar to Growl under OSX. This is a simple pure Ruby wrapper to the native API (using DL).
|
9
9
|
require_paths:
|
@@ -47,15 +47,18 @@ files:
|
|
47
47
|
- doc/classes/AutoSnarl.html
|
48
48
|
- doc/classes/Snarl
|
49
49
|
- doc/classes/Snarl.html
|
50
|
+
- doc/classes/TestSnarl.html
|
50
51
|
- doc/classes/Snarl/SnarlAPI.html
|
51
52
|
- doc/files/examples
|
52
53
|
- doc/files/lib
|
54
|
+
- doc/files/test
|
53
55
|
- doc/files/examples/example1_rb.html
|
54
56
|
- doc/files/examples/example2_rb.html
|
55
57
|
- doc/files/examples/example3_rb.html
|
56
58
|
- doc/files/examples/example4_rb.html
|
57
59
|
- doc/files/lib/autosnarl_rb.html
|
58
60
|
- doc/files/lib/snarl_rb.html
|
61
|
+
- doc/files/test/test_snarl_rb.html
|
59
62
|
- examples/example1.rb
|
60
63
|
- examples/example2.rb
|
61
64
|
- examples/example3.rb
|
@@ -67,6 +70,7 @@ files:
|
|
67
70
|
- lib/autosnarl.rb
|
68
71
|
- lib/snarl.rb
|
69
72
|
- test/readme.txt
|
73
|
+
- test/test_snarl.rb
|
70
74
|
test_files: []
|
71
75
|
|
72
76
|
rdoc_options: []
|