tweet 0.6

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.
Files changed (65) hide show
  1. data/bin/ttime +36 -0
  2. data/bin/tweet +30 -0
  3. data/bin/tweetd +126 -0
  4. data/doc/classes/SimplePop.html +125 -0
  5. data/doc/classes/SimplePop.src/M000009.html +59 -0
  6. data/doc/classes/SimplePop.src/M000010.html +43 -0
  7. data/doc/classes/SimplePopWindow.html +126 -0
  8. data/doc/classes/SimplePopWindow.src/M000005.html +77 -0
  9. data/doc/classes/SimplePopWindow.src/M000006.html +36 -0
  10. data/doc/classes/SyslogNotifier.html +113 -0
  11. data/doc/classes/SyslogNotifier.src/M000003.html +34 -0
  12. data/doc/classes/SyslogNotifier.src/M000004.html +39 -0
  13. data/doc/classes/Tweet/Monitor.html +236 -0
  14. data/doc/classes/Tweet/Monitor.src/M000028.html +53 -0
  15. data/doc/classes/Tweet/Monitor.src/M000029.html +38 -0
  16. data/doc/classes/Tweet/Monitor.src/M000030.html +40 -0
  17. data/doc/classes/Tweet/Monitor.src/M000031.html +31 -0
  18. data/doc/classes/Tweet/Monitor.src/M000032.html +32 -0
  19. data/doc/classes/Tweet/Monitor.src/M000033.html +65 -0
  20. data/doc/classes/Tweet/Monitor.src/M000034.html +38 -0
  21. data/doc/classes/Tweet/Note.html +272 -0
  22. data/doc/classes/Tweet/Note.src/M000020.html +32 -0
  23. data/doc/classes/Tweet/Note.src/M000021.html +30 -0
  24. data/doc/classes/Tweet/Note.src/M000022.html +30 -0
  25. data/doc/classes/Tweet/Note.src/M000023.html +30 -0
  26. data/doc/classes/Tweet/Note.src/M000024.html +30 -0
  27. data/doc/classes/Tweet/Note.src/M000025.html +30 -0
  28. data/doc/classes/Tweet/Note.src/M000026.html +30 -0
  29. data/doc/classes/Tweet/Note.src/M000027.html +30 -0
  30. data/doc/classes/Tweet/Notifier.html +147 -0
  31. data/doc/classes/Tweet/Notifier.src/M000018.html +34 -0
  32. data/doc/classes/Tweet/Notifier.src/M000019.html +30 -0
  33. data/doc/classes/Tweet.html +336 -0
  34. data/doc/classes/Tweet.src/M000011.html +42 -0
  35. data/doc/classes/Tweet.src/M000012.html +30 -0
  36. data/doc/classes/Tweet.src/M000013.html +30 -0
  37. data/doc/classes/Tweet.src/M000014.html +30 -0
  38. data/doc/classes/Tweet.src/M000015.html +30 -0
  39. data/doc/classes/Tweet.src/M000016.html +30 -0
  40. data/doc/classes/Tweet.src/M000017.html +30 -0
  41. data/doc/classes/XOSDNotifier.html +113 -0
  42. data/doc/classes/XOSDNotifier.src/M000007.html +36 -0
  43. data/doc/classes/XOSDNotifier.src/M000008.html +38 -0
  44. data/doc/created.rid +1 -0
  45. data/doc/files/README.html +228 -0
  46. data/doc/files/bin/ttime.html +112 -0
  47. data/doc/files/bin/tweet.html +111 -0
  48. data/doc/files/bin/tweetd.html +163 -0
  49. data/doc/files/bin/tweetd.src/M000001.html +51 -0
  50. data/doc/files/bin/tweetd.src/M000002.html +30 -0
  51. data/doc/files/lib/tweet_rb.html +178 -0
  52. data/doc/files/plugins/simplepop_rb.html +97 -0
  53. data/doc/files/plugins/syslog_rb.html +101 -0
  54. data/doc/files/plugins/xosd_rb.html +96 -0
  55. data/doc/fr_class_index.html +53 -0
  56. data/doc/fr_file_index.html +53 -0
  57. data/doc/fr_method_index.html +79 -0
  58. data/doc/index.html +26 -0
  59. data/doc/rdoc-style.css +175 -0
  60. data/images/comments.png +0 -0
  61. data/lib/tweet.rb +437 -0
  62. data/plugins/simplepop.rb +128 -0
  63. data/plugins/syslog.rb +24 -0
  64. data/plugins/xosd.rb +23 -0
  65. metadata +142 -0
@@ -0,0 +1,36 @@
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
+ <html>
6
+ <head><title>notify (SimplePopWindow)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File plugins/simplepop.rb, line 117</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notify</span>
27
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
28
+ <span class="ruby-ivar">@sleep_thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">loop</span> { <span class="ruby-identifier">sleep</span>(<span class="ruby-value">0</span><span class="ruby-value">.1</span>) } }
29
+ <span class="ruby-keyword kw">else</span>
30
+ <span class="ruby-ivar">@sleep_thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">sleep</span>(<span class="ruby-ivar">@duration</span>) }
31
+ <span class="ruby-keyword kw">end</span>
32
+ <span class="ruby-ivar">@sleep_thread</span>.<span class="ruby-identifier">join</span>
33
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">destroy</span>
34
+ <span class="ruby-keyword kw">end</span></pre>
35
+ </body>
36
+ </html>
@@ -0,0 +1,113 @@
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
+ <html>
6
+ <head>
7
+ <title>Class: SyslogNotifier</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
+ <td class="file-title"><span class="file-title-prefix">Class</span><br />SyslogNotifier</td>
55
+ <td align="right">
56
+ <table cellspacing=0 cellpadding=2>
57
+ <tr valign="top">
58
+ <td>In:</td>
59
+ <td>
60
+ <a href="../files/plugins/syslog_rb.html">plugins/syslog.rb</a>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Parent:</td>
65
+ <td>
66
+ <a href="Tweet/Notifier.html">
67
+ Tweet::Notifier
68
+ </a>
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </td>
73
+ </tr>
74
+ </table>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+ <div id="content">
79
+
80
+
81
+
82
+
83
+ <div class="sectiontitle">Methods</div>
84
+ <ul>
85
+ <li><a href="#M000003">new</a></li>
86
+ <li><a href="#M000004">show</a></li>
87
+ </ul>
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <div class="sectiontitle">Public Class methods</div>
95
+ <div class="method">
96
+ <div class="title">
97
+ <a name="M000003"></a><b>new</b>()
98
+ [ <a href="javascript:openCode('SyslogNotifier.src/M000003.html')">source</a> ]
99
+ </div>
100
+ </div>
101
+ <div class="sectiontitle">Public Instance methods</div>
102
+ <div class="method">
103
+ <div class="title">
104
+ <a name="M000004"></a><b>show</b>(n)
105
+ [ <a href="javascript:openCode('SyslogNotifier.src/M000004.html')">source</a> ]
106
+ </div>
107
+ </div>
108
+ </div>
109
+
110
+ </div>
111
+
112
+ </body>
113
+ </html>
@@ -0,0 +1,34 @@
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
+ <html>
6
+ <head><title>new (SyslogNotifier)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File plugins/syslog.rb, line 4</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
27
+ <span class="ruby-keyword kw">begin</span>
28
+ <span class="ruby-ivar">@log</span> = <span class="ruby-constant">Syslog</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">&quot;tweetd&quot;</span>);
29
+ <span class="ruby-keyword kw">rescue</span>
30
+ <span class="ruby-ivar">@log</span> = <span class="ruby-constant">Syslog</span>
31
+ <span class="ruby-keyword kw">end</span>
32
+ <span class="ruby-keyword kw">end</span></pre>
33
+ </body>
34
+ </html>
@@ -0,0 +1,39 @@
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
+ <html>
6
+ <head><title>show (SyslogNotifier)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File plugins/syslog.rb, line 12</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show</span>(<span class="ruby-identifier">n</span>)
27
+ <span class="ruby-identifier">message</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">application</span><span class="ruby-operator">+</span><span class="ruby-value str">&quot;: &quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">n</span>.<span class="ruby-identifier">message</span>
28
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">priority</span>
29
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Tweet</span><span class="ruby-operator">::</span><span class="ruby-constant">PRI</span>[<span class="ruby-value str">'CRITICAL'</span>]<span class="ruby-operator">:</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">crit</span>(<span class="ruby-identifier">message</span>)
30
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Tweet</span><span class="ruby-operator">::</span><span class="ruby-constant">PRI</span>[<span class="ruby-value str">'WARNING'</span>]<span class="ruby-operator">:</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-identifier">message</span>)
31
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Tweet</span><span class="ruby-operator">::</span><span class="ruby-constant">PRI</span>[<span class="ruby-value str">'INFO'</span>]<span class="ruby-operator">:</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">info</span>(<span class="ruby-identifier">message</span>)
32
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Tweet</span><span class="ruby-operator">::</span><span class="ruby-constant">PRI</span>[<span class="ruby-value str">'LOW'</span>]<span class="ruby-operator">:</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">notice</span>(<span class="ruby-identifier">message</span>)
33
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Tweet</span><span class="ruby-operator">::</span><span class="ruby-constant">PRI</span>[<span class="ruby-value str">'DEBUG'</span>]<span class="ruby-operator">:</span> <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">message</span>)
34
+ <span class="ruby-keyword kw">else</span>
35
+ <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">info</span>(<span class="ruby-identifier">message</span>)
36
+ <span class="ruby-keyword kw">end</span>
37
+ <span class="ruby-keyword kw">end</span></pre>
38
+ </body>
39
+ </html>
@@ -0,0 +1,236 @@
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
+ <html>
6
+ <head>
7
+ <title>Class: Tweet::Monitor</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
+ <td class="file-title"><span class="file-title-prefix">Class</span><br />Tweet::Monitor</td>
55
+ <td align="right">
56
+ <table cellspacing=0 cellpadding=2>
57
+ <tr valign="top">
58
+ <td>In:</td>
59
+ <td>
60
+ <a href="../../files/lib/tweet_rb.html">lib/tweet.rb</a>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Parent:</td>
65
+ <td>
66
+ GServer
67
+ </td>
68
+ </tr>
69
+ </table>
70
+ </td>
71
+ </tr>
72
+ </table>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+ <div id="content">
77
+
78
+ <div class="description"><p>
79
+ Listens on a network port for notifications, firing off the appropriate
80
+ action (via a <a href="Notifier.html">Notifier</a>) when one is received.
81
+ </p>
82
+ <p>
83
+ A proper request looks like this (fields can be in any order, semicolons
84
+ not required):
85
+ </p>
86
+ <pre>
87
+ app &quot;MyApplication&quot;;title &quot;hello world&quot;;message &quot;Hello World!&quot;;duration &quot;2&quot;;priority &quot;3&quot;
88
+ </pre>
89
+ <p>
90
+ A request may also include a list of requested notifier plugins, space
91
+ separated, like this:
92
+ </p>
93
+ <pre>
94
+ app &quot;MyApplication&quot;;title &quot;hello world&quot;;message &quot;Hello World!&quot;;duration &quot;2&quot;;notifier &quot;MyPlugin1 MyPlugin2&quot;;priority &quot;3&quot;
95
+ </pre>
96
+ <p>
97
+ If the server is configured to allow requested notifiers (see
98
+ Monitor.allow_requested_notifiers), then it will try to use the plugins
99
+ that were requested instead of the configured notifier plugins for that
100
+ request.
101
+ </p>
102
+ </div>
103
+
104
+
105
+
106
+ <div class="sectiontitle">Methods</div>
107
+ <ul>
108
+ <li><a href="#M000029">activate_notifier</a></li>
109
+ <li><a href="#M000030">get_notifier</a></li>
110
+ <li><a href="#M000028">new</a></li>
111
+ <li><a href="#M000034">notify</a></li>
112
+ <li><a href="#M000033">serve</a></li>
113
+ <li><a href="#M000031">start</a></li>
114
+ <li><a href="#M000032">stop</a></li>
115
+ </ul>
116
+
117
+
118
+
119
+
120
+
121
+ <div class="sectiontitle">Attributes</div>
122
+ <table border='0' cellpadding='5'>
123
+ <tr valign='top'>
124
+ <td class='attr-rw'>
125
+ [R]
126
+ </td>
127
+ <td class='attr-name'>active_notifiers</td>
128
+ <td class='attr-desc'>
129
+ A list of the <a href="Notifier.html">Notifier</a> objects to send
130
+ notifications to.
131
+
132
+ </td>
133
+ </tr>
134
+ <tr valign='top'>
135
+ <td class='attr-rw'>
136
+ [RW]
137
+ </td>
138
+ <td class='attr-name'>allow_priority</td>
139
+ <td class='attr-desc'>
140
+ Don&#8216;t show (silently drop) notifications of priority under this.
141
+
142
+ </td>
143
+ </tr>
144
+ <tr valign='top'>
145
+ <td class='attr-rw'>
146
+ [RW]
147
+ </td>
148
+ <td class='attr-name'>allow_requested_notifiers</td>
149
+ <td class='attr-desc'>
150
+ If true, the client can request a notifier plugins in its request string.
151
+
152
+ </td>
153
+ </tr>
154
+ </table>
155
+
156
+ <div class="sectiontitle">Public Class methods</div>
157
+ <div class="method">
158
+ <div class="title">
159
+ <a name="M000028"></a><b>new</b>(allow_priority=PRI['INFO'])
160
+ [ <a href="javascript:openCode('Monitor.src/M000028.html')">source</a> ]
161
+ </div>
162
+ <div class="description">
163
+ <p>
164
+ Creates a new <a href="Monitor.html">Monitor</a>. Defaults to showing
165
+ notifications of INFO level and higher. Change allow_priority to modify
166
+ this setting either here or after the creation of the object.
167
+ </p>
168
+ </div>
169
+ </div>
170
+ <div class="sectiontitle">Public Instance methods</div>
171
+ <div class="method">
172
+ <div class="title">
173
+ <a name="M000029"></a><b>activate_notifier</b>(name)
174
+ [ <a href="javascript:openCode('Monitor.src/M000029.html')">source</a> ]
175
+ </div>
176
+ <div class="description">
177
+ <p>
178
+ Instantiates a (registered) <a href="Notifier.html">Notifier</a> and adds
179
+ it to the list of active notifiers for this Watcher. Returns false if it
180
+ fails.
181
+ </p>
182
+ </div>
183
+ </div>
184
+ <div class="method">
185
+ <div class="title">
186
+ <a name="M000030"></a><b>get_notifier</b>(name)
187
+ [ <a href="javascript:openCode('Monitor.src/M000030.html')">source</a> ]
188
+ </div>
189
+ <div class="description">
190
+ <p>
191
+ Instantiates a (registered) <a href="Notifier.html">Notifier</a> and
192
+ returns it, or returns false if it failed.
193
+ </p>
194
+ </div>
195
+ </div>
196
+ <div class="method">
197
+ <div class="title">
198
+ <a name="M000034"></a><b>notify</b>(note)
199
+ [ <a href="javascript:openCode('Monitor.src/M000034.html')">source</a> ]
200
+ </div>
201
+ <div class="description">
202
+ <p>
203
+ Calls the <a href="Notifier.html#M000019">Notifier#show</a> method for each
204
+ active notifier.
205
+ </p>
206
+ </div>
207
+ </div>
208
+ <div class="method">
209
+ <div class="title">
210
+ <a name="M000033"></a><b>serve</b>(client)
211
+ [ <a href="javascript:openCode('Monitor.src/M000033.html')">source</a> ]
212
+ </div>
213
+ <div class="description">
214
+ <p>
215
+ Handles incoming TCP connections.
216
+ </p>
217
+ </div>
218
+ </div>
219
+ <div class="method">
220
+ <div class="title">
221
+ <a name="M000031"></a><b>start</b>()
222
+ [ <a href="javascript:openCode('Monitor.src/M000031.html')">source</a> ]
223
+ </div>
224
+ </div>
225
+ <div class="method">
226
+ <div class="title">
227
+ <a name="M000032"></a><b>stop</b>()
228
+ [ <a href="javascript:openCode('Monitor.src/M000032.html')">source</a> ]
229
+ </div>
230
+ </div>
231
+ </div>
232
+
233
+ </div>
234
+
235
+ </body>
236
+ </html>
@@ -0,0 +1,53 @@
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
+ <html>
6
+ <head><title>new (Tweet::Monitor)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File lib/tweet.rb, line 244</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">allow_priority</span>=<span class="ruby-constant">PRI</span>[<span class="ruby-value str">'INFO'</span>])
27
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-constant">PORT</span>)
28
+ <span class="ruby-ivar">@allow_priority</span> = <span class="ruby-identifier">allow_priority</span>
29
+ <span class="ruby-ivar">@allow_requested_notifiers</span> = <span class="ruby-keyword kw">true</span>
30
+ <span class="ruby-ivar">@active_notifiers</span> = []
31
+
32
+ <span class="ruby-constant">Signal</span>.<span class="ruby-identifier">trap</span>(<span class="ruby-value str">'INT'</span>) { <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Tweet stopped by user interrupt.&quot;</span>; <span class="ruby-identifier">stop</span> }
33
+
34
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">USE_SYSLOG</span>
35
+ <span class="ruby-keyword kw">begin</span>
36
+ <span class="ruby-identifier">require</span> <span class="ruby-value str">'syslog'</span>
37
+ <span class="ruby-ivar">@syslog</span> = <span class="ruby-constant">Syslog</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">&quot;tweetd&quot;</span>);
38
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">'tweetd starting.'</span>)
39
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span>
40
+ <span class="ruby-keyword kw">end</span>
41
+ <span class="ruby-keyword kw">end</span>
42
+
43
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">USE_GTK_TRAY_ICON</span>
44
+ <span class="ruby-keyword kw">begin</span>
45
+ <span class="ruby-identifier">set_up_gtk_tray_icon</span>
46
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">'gtk tray icon loaded.'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@syslog</span>
47
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span>
48
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">'gtk tray icon not loaded.'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@syslog</span>
49
+ <span class="ruby-keyword kw">end</span>
50
+ <span class="ruby-keyword kw">end</span>
51
+ <span class="ruby-keyword kw">end</span></pre>
52
+ </body>
53
+ </html>
@@ -0,0 +1,38 @@
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
+ <html>
6
+ <head><title>activate_notifier (Tweet::Monitor)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File lib/tweet.rb, line 308</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">activate_notifier</span>(<span class="ruby-identifier">name</span>)
27
+ <span class="ruby-keyword kw">begin</span>
28
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span> = <span class="ruby-identifier">get_notifier</span>(<span class="ruby-identifier">name</span>)
29
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;activating notifier: #{n.class}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@syslog</span>
30
+ <span class="ruby-ivar">@active_notifiers</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">n</span>
31
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
32
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">e</span>
33
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;problem activating notifier: #{name} (#{e})&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@syslog</span>
34
+ <span class="ruby-keyword kw">end</span>
35
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
36
+ <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </html>
@@ -0,0 +1,40 @@
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
+ <html>
6
+ <head><title>get_notifier (Tweet::Monitor)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File lib/tweet.rb, line 322</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_notifier</span>(<span class="ruby-identifier">name</span>)
27
+ <span class="ruby-keyword kw">begin</span>
28
+ <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">name</span>)
29
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Notifier</span>.<span class="ruby-identifier">registered_notifiers</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">klass</span>
30
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span>
31
+ <span class="ruby-keyword kw">else</span>
32
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;notifier not registered: #{klass}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@syslog</span>
33
+ <span class="ruby-keyword kw">end</span>
34
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">e</span>
35
+ <span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">&quot;notifier not found: #{name} (#{e})&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@syslog</span>
36
+ <span class="ruby-keyword kw">end</span>
37
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
38
+ <span class="ruby-keyword kw">end</span></pre>
39
+ </body>
40
+ </html>
@@ -0,0 +1,31 @@
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
+ <html>
6
+ <head><title>start (Tweet::Monitor)</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8
+ <style>
9
+ .ruby-comment { color: green; font-style: italic }
10
+ .ruby-constant { color: #4433aa; font-weight: bold; }
11
+ .ruby-identifier { color: #222222; }
12
+ .ruby-ivar { color: #2233dd; }
13
+ .ruby-keyword { color: #3333FF; font-weight: bold }
14
+ .ruby-node { color: #777777; }
15
+ .ruby-operator { color: #111111; }
16
+ .ruby-regexp { color: #662222; }
17
+ .ruby-value { color: #662222; font-style: italic }
18
+ .kw { color: #3333FF; font-weight: bold }
19
+ .cmt { color: green; font-style: italic }
20
+ .str { color: #662222; font-style: italic }
21
+ .re { color: #662222; }
22
+ </style>
23
+ </head>
24
+ <body bgcolor="white">
25
+ <pre><span class="ruby-comment cmt"># File lib/tweet.rb, line 337</span>
26
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
27
+ <span class="ruby-constant">Pidify</span>.<span class="ruby-identifier">start</span>
28
+ <span class="ruby-identifier">old_start</span>
29
+ <span class="ruby-keyword kw">end</span></pre>
30
+ </body>
31
+ </html>