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.
- data/bin/ttime +36 -0
- data/bin/tweet +30 -0
- data/bin/tweetd +126 -0
- data/doc/classes/SimplePop.html +125 -0
- data/doc/classes/SimplePop.src/M000009.html +59 -0
- data/doc/classes/SimplePop.src/M000010.html +43 -0
- data/doc/classes/SimplePopWindow.html +126 -0
- data/doc/classes/SimplePopWindow.src/M000005.html +77 -0
- data/doc/classes/SimplePopWindow.src/M000006.html +36 -0
- data/doc/classes/SyslogNotifier.html +113 -0
- data/doc/classes/SyslogNotifier.src/M000003.html +34 -0
- data/doc/classes/SyslogNotifier.src/M000004.html +39 -0
- data/doc/classes/Tweet/Monitor.html +236 -0
- data/doc/classes/Tweet/Monitor.src/M000028.html +53 -0
- data/doc/classes/Tweet/Monitor.src/M000029.html +38 -0
- data/doc/classes/Tweet/Monitor.src/M000030.html +40 -0
- data/doc/classes/Tweet/Monitor.src/M000031.html +31 -0
- data/doc/classes/Tweet/Monitor.src/M000032.html +32 -0
- data/doc/classes/Tweet/Monitor.src/M000033.html +65 -0
- data/doc/classes/Tweet/Monitor.src/M000034.html +38 -0
- data/doc/classes/Tweet/Note.html +272 -0
- data/doc/classes/Tweet/Note.src/M000020.html +32 -0
- data/doc/classes/Tweet/Note.src/M000021.html +30 -0
- data/doc/classes/Tweet/Note.src/M000022.html +30 -0
- data/doc/classes/Tweet/Note.src/M000023.html +30 -0
- data/doc/classes/Tweet/Note.src/M000024.html +30 -0
- data/doc/classes/Tweet/Note.src/M000025.html +30 -0
- data/doc/classes/Tweet/Note.src/M000026.html +30 -0
- data/doc/classes/Tweet/Note.src/M000027.html +30 -0
- data/doc/classes/Tweet/Notifier.html +147 -0
- data/doc/classes/Tweet/Notifier.src/M000018.html +34 -0
- data/doc/classes/Tweet/Notifier.src/M000019.html +30 -0
- data/doc/classes/Tweet.html +336 -0
- data/doc/classes/Tweet.src/M000011.html +42 -0
- data/doc/classes/Tweet.src/M000012.html +30 -0
- data/doc/classes/Tweet.src/M000013.html +30 -0
- data/doc/classes/Tweet.src/M000014.html +30 -0
- data/doc/classes/Tweet.src/M000015.html +30 -0
- data/doc/classes/Tweet.src/M000016.html +30 -0
- data/doc/classes/Tweet.src/M000017.html +30 -0
- data/doc/classes/XOSDNotifier.html +113 -0
- data/doc/classes/XOSDNotifier.src/M000007.html +36 -0
- data/doc/classes/XOSDNotifier.src/M000008.html +38 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +228 -0
- data/doc/files/bin/ttime.html +112 -0
- data/doc/files/bin/tweet.html +111 -0
- data/doc/files/bin/tweetd.html +163 -0
- data/doc/files/bin/tweetd.src/M000001.html +51 -0
- data/doc/files/bin/tweetd.src/M000002.html +30 -0
- data/doc/files/lib/tweet_rb.html +178 -0
- data/doc/files/plugins/simplepop_rb.html +97 -0
- data/doc/files/plugins/syslog_rb.html +101 -0
- data/doc/files/plugins/xosd_rb.html +96 -0
- data/doc/fr_class_index.html +53 -0
- data/doc/fr_file_index.html +53 -0
- data/doc/fr_method_index.html +79 -0
- data/doc/index.html +26 -0
- data/doc/rdoc-style.css +175 -0
- data/images/comments.png +0 -0
- data/lib/tweet.rb +437 -0
- data/plugins/simplepop.rb +128 -0
- data/plugins/syslog.rb +24 -0
- data/plugins/xosd.rb +23 -0
- 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"><</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">"tweetd"</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">": "</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 "MyApplication";title "hello world";message "Hello World!";duration "2";priority "3"
|
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 "MyApplication";title "hello world";message "Hello World!";duration "2";notifier "MyPlugin1 MyPlugin2";priority "3"
|
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‘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">"Tweet stopped by user interrupt."</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">"tweetd"</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">"activating notifier: #{n.class}"</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"><<</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">></span><span class="ruby-identifier">e</span>
|
33
|
+
<span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"problem activating notifier: #{name} (#{e})"</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">"notifier not registered: #{klass}"</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">></span><span class="ruby-identifier">e</span>
|
35
|
+
<span class="ruby-ivar">@syslog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"notifier not found: #{name} (#{e})"</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>
|