campfire-bot_alexchee 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +11 -0
- data/.gitignore +6 -0
- data/Gemfile +12 -0
- data/README.textile +62 -0
- data/TODO +72 -0
- data/bin/campfire-bot +59 -0
- data/campfire-bot.gemspec +24 -0
- data/cfbot-stop.sh +8 -0
- data/config.example.yml +32 -0
- data/lib/bot.rb +194 -0
- data/lib/event.rb +114 -0
- data/lib/message.rb +30 -0
- data/lib/plugin.rb +77 -0
- data/lib/version.rb +3 -0
- data/plugins-example/fun.rb +95 -0
- data/spec/command_spec.rb +96 -0
- data/spec/plugin_spec.rb +43 -0
- data/spec/spec.opts +1 -0
- data/tmp/.gitignore +0 -0
- data/vendor/escape/ChangeLog +30 -0
- data/vendor/escape/Makefile +5 -0
- data/vendor/escape/README +81 -0
- data/vendor/escape/VERSION +1 -0
- data/vendor/escape/escape.rb +302 -0
- data/vendor/escape/install.rb +109 -0
- data/vendor/escape/misc/README.erb +85 -0
- data/vendor/escape/rdoc/classes/Escape/HTMLAttrValue.html +113 -0
- data/vendor/escape/rdoc/classes/Escape/HTMLEscaped.html +113 -0
- data/vendor/escape/rdoc/classes/Escape/PercentEncoded.html +113 -0
- data/vendor/escape/rdoc/classes/Escape/ShellEscaped.html +113 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.html +242 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000029.html +18 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000030.html +18 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000031.html +18 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000032.html +18 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000033.html +18 -0
- data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000035.html +18 -0
- data/vendor/escape/rdoc/classes/Escape.html +427 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000022.html +19 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000023.html +32 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000024.html +24 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000025.html +19 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000026.html +48 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000027.html +19 -0
- data/vendor/escape/rdoc/classes/Escape.src/M000028.html +19 -0
- data/vendor/escape/rdoc/classes/TestEscapeHTML.html +182 -0
- data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000008.html +18 -0
- data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000009.html +18 -0
- data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000010.html +18 -0
- data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000011.html +18 -0
- data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.html +182 -0
- data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000012.html +18 -0
- data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000013.html +19 -0
- data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000014.html +20 -0
- data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000015.html +22 -0
- data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.html +167 -0
- data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.src/M000016.html +18 -0
- data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.src/M000017.html +20 -0
- data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.src/M000018.html +20 -0
- data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.html +167 -0
- data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.src/M000019.html +20 -0
- data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.src/M000020.html +24 -0
- data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.src/M000021.html +22 -0
- data/vendor/escape/rdoc/files/escape_rb.html +136 -0
- data/vendor/escape/rdoc/files/install_rb.html +250 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000001.html +23 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000002.html +31 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000003.html +27 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000004.html +27 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000005.html +21 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000006.html +23 -0
- data/vendor/escape/rdoc/files/install_rb.src/M000007.html +21 -0
- data/vendor/escape/rdoc/files/test/test-escape_rb.html +109 -0
- data/vendor/escape/rdoc/fr_class_index.html +36 -0
- data/vendor/escape/rdoc/fr_file_index.html +29 -0
- data/vendor/escape/rdoc/fr_method_index.html +61 -0
- data/vendor/escape/rdoc/index.html +24 -0
- data/vendor/escape/rdoc/rdoc-style.css +208 -0
- data/vendor/escape/test/test-escape.rb +90 -0
- metadata +209 -0
@@ -0,0 +1,250 @@
|
|
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: install.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>install.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>install.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>2007-01-04 03:24:56 +0900</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
usage: ruby install.rb [-n] options:
|
74
|
+
</p>
|
75
|
+
<pre>
|
76
|
+
-n : don't install
|
77
|
+
</pre>
|
78
|
+
<p>
|
79
|
+
Author: Tanaka Akira <akr@m17n.org>
|
80
|
+
</p>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
|
84
|
+
<div id="requires-list">
|
85
|
+
<h3 class="section-bar">Required files</h3>
|
86
|
+
|
87
|
+
<div class="name-list">
|
88
|
+
optparse
|
89
|
+
fileutils
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div id="method-list">
|
96
|
+
<h3 class="section-bar">Methods</h3>
|
97
|
+
|
98
|
+
<div class="name-list">
|
99
|
+
<a href="#M000005">collect_target</a>
|
100
|
+
<a href="#M000002">cvs_files</a>
|
101
|
+
<a href="#M000004">each_require</a>
|
102
|
+
<a href="#M000003">each_target</a>
|
103
|
+
<a href="#M000007">ignore_exc</a>
|
104
|
+
<a href="#M000006">install_file</a>
|
105
|
+
<a href="#M000001">target_directory</a>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
<!-- if includes -->
|
113
|
+
|
114
|
+
<div id="section">
|
115
|
+
|
116
|
+
|
117
|
+
<div id="constants-list">
|
118
|
+
<h3 class="section-bar">Constants</h3>
|
119
|
+
|
120
|
+
<div class="name-list">
|
121
|
+
<table summary="Constants">
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">CVS_FILES</td>
|
124
|
+
<td>=</td>
|
125
|
+
<td class="context-item-value">{}</td>
|
126
|
+
</tr>
|
127
|
+
</table>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<!-- if method_list -->
|
137
|
+
<div id="methods">
|
138
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
139
|
+
|
140
|
+
<div id="method-M000005" class="method-detail">
|
141
|
+
<a name="M000005"></a>
|
142
|
+
|
143
|
+
<div class="method-heading">
|
144
|
+
<a href="install_rb.src/M000005.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('install_rb.src/M000005.html');return false;">
|
146
|
+
<span class="method-name">collect_target</span><span class="method-args">()</span>
|
147
|
+
</a>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-description">
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div id="method-M000002" class="method-detail">
|
155
|
+
<a name="M000002"></a>
|
156
|
+
|
157
|
+
<div class="method-heading">
|
158
|
+
<a href="install_rb.src/M000002.html" target="Code" class="method-signature"
|
159
|
+
onclick="popupCode('install_rb.src/M000002.html');return false;">
|
160
|
+
<span class="method-name">cvs_files</span><span class="method-args">(dir)</span>
|
161
|
+
</a>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
<div class="method-description">
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div id="method-M000004" class="method-detail">
|
169
|
+
<a name="M000004"></a>
|
170
|
+
|
171
|
+
<div class="method-heading">
|
172
|
+
<a href="install_rb.src/M000004.html" target="Code" class="method-signature"
|
173
|
+
onclick="popupCode('install_rb.src/M000004.html');return false;">
|
174
|
+
<span class="method-name">each_require</span><span class="method-args">(file, target_set) {|filename| ...}</span>
|
175
|
+
</a>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div class="method-description">
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div id="method-M000003" class="method-detail">
|
183
|
+
<a name="M000003"></a>
|
184
|
+
|
185
|
+
<div class="method-heading">
|
186
|
+
<a href="install_rb.src/M000003.html" target="Code" class="method-signature"
|
187
|
+
onclick="popupCode('install_rb.src/M000003.html');return false;">
|
188
|
+
<span class="method-name">each_target</span><span class="method-args">() {|filename| ...}</span>
|
189
|
+
</a>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<div id="method-M000007" class="method-detail">
|
197
|
+
<a name="M000007"></a>
|
198
|
+
|
199
|
+
<div class="method-heading">
|
200
|
+
<a href="install_rb.src/M000007.html" target="Code" class="method-signature"
|
201
|
+
onclick="popupCode('install_rb.src/M000007.html');return false;">
|
202
|
+
<span class="method-name">ignore_exc</span><span class="method-args">(exc) {|| ...}</span>
|
203
|
+
</a>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
<div class="method-description">
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
<div id="method-M000006" class="method-detail">
|
211
|
+
<a name="M000006"></a>
|
212
|
+
|
213
|
+
<div class="method-heading">
|
214
|
+
<a href="install_rb.src/M000006.html" target="Code" class="method-signature"
|
215
|
+
onclick="popupCode('install_rb.src/M000006.html');return false;">
|
216
|
+
<span class="method-name">install_file</span><span class="method-args">(src, dst)</span>
|
217
|
+
</a>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="method-description">
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div id="method-M000001" class="method-detail">
|
225
|
+
<a name="M000001"></a>
|
226
|
+
|
227
|
+
<div class="method-heading">
|
228
|
+
<a href="install_rb.src/M000001.html" target="Code" class="method-signature"
|
229
|
+
onclick="popupCode('install_rb.src/M000001.html');return false;">
|
230
|
+
<span class="method-name">target_directory</span><span class="method-args">()</span>
|
231
|
+
</a>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div class="method-description">
|
235
|
+
</div>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
|
245
|
+
<div id="validator-badges">
|
246
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</body>
|
250
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>target_directory (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 12</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">target_directory</span>
|
15
|
+
<span class="ruby-identifier">$:</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">loc</span><span class="ruby-operator">|</span>
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">%r{/site_ruby/[\d.]+\z}</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">loc</span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">loc</span>
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
}
|
20
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"could not find target install directory"</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</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
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>cvs_files (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 22</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cvs_files</span>(<span class="ruby-identifier">dir</span>)
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">CVS_FILES</span>[<span class="ruby-identifier">dir</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-constant">CVS_FILES</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">dir</span>
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-node">"#{dir}/CVS"</span>
|
17
|
+
<span class="ruby-identifier">result</span> = {}
|
18
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-node">"#{dir}/CVS/Entries"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
19
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">line</span>
|
20
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">%r{\A/([^/]+)/}</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">result</span>[<span class="ruby-identifier">$1</span>] = <span class="ruby-keyword kw">true</span>
|
21
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">%r{\AD/([^/]+)/}</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">result</span>[<span class="ruby-identifier">$1</span>] = <span class="ruby-keyword kw">true</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
}
|
24
|
+
<span class="ruby-keyword kw">else</span>
|
25
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">nil</span>
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
<span class="ruby-constant">CVS_FILES</span>[<span class="ruby-identifier">dir</span>] = <span class="ruby-identifier">result</span>
|
28
|
+
<span class="ruby-identifier">result</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>each_target (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 39</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_target</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
15
|
+
<span class="ruby-identifier">target_set</span> = {}
|
16
|
+
<span class="ruby-identifier">cvs</span> = <span class="ruby-identifier">cvs_files</span>(<span class="ruby-value str">'.'</span>)
|
17
|
+
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">"*.rb"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
|
18
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/\Atest-/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">filename</span>
|
19
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/\Ainstall/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">filename</span>
|
20
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cvs</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">cvs</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">filename</span>)
|
21
|
+
<span class="ruby-identifier">target_set</span>[<span class="ruby-identifier">filename</span>] = <span class="ruby-keyword kw">true</span>
|
22
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">filename</span>
|
23
|
+
<span class="ruby-identifier">each_require</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">target_set</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
24
|
+
}
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>each_require (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 52</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_require</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">target_set</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
15
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">file</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
16
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/\A\s*require\s+['"]([^'"]+)['"]/</span> <span class="ruby-operator">!~</span> <span class="ruby-identifier">line</span>
|
17
|
+
<span class="ruby-identifier">feature</span> = <span class="ruby-identifier">$1</span>
|
18
|
+
<span class="ruby-identifier">filename</span> = <span class="ruby-node">"#{feature}.rb"</span>
|
19
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">target_set</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">filename</span>
|
20
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
21
|
+
<span class="ruby-identifier">target_set</span>[<span class="ruby-identifier">filename</span>] = <span class="ruby-keyword kw">true</span>
|
22
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">filename</span>
|
23
|
+
<span class="ruby-identifier">each_require</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">target_set</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
24
|
+
}
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>collect_target (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 65</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_target</span>
|
15
|
+
<span class="ruby-identifier">result</span> = []
|
16
|
+
<span class="ruby-identifier">each_target</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span> <span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">filename</span> }
|
17
|
+
<span class="ruby-identifier">result</span>.<span class="ruby-identifier">sort!</span>
|
18
|
+
<span class="ruby-identifier">result</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>install_file (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 72</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_file</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dst</span>)
|
15
|
+
<span class="ruby-identifier">ignore_exc</span>(<span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>) { <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">compare_file</span> <span class="ruby-identifier">src</span>, <span class="ruby-identifier">dst</span> }
|
16
|
+
<span class="ruby-comment cmt"># check shadow</span>
|
17
|
+
<span class="ruby-identifier">ignore_exc</span>(<span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>) { <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span> <span class="ruby-identifier">dst</span> }
|
18
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">dst</span>), <span class="ruby-identifier">:mode=</span><span class="ruby-operator">></span><span class="ruby-value">0755</span>)
|
19
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">cp</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dst</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>)
|
20
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span>(<span class="ruby-value">0644</span>, <span class="ruby-identifier">dst</span>)
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>ignore_exc (install.rb)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File install.rb, line 81</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ignore_exc</span>(<span class="ruby-identifier">exc</span>)
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
16
|
+
<span class="ruby-keyword kw">yield</span>
|
17
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-identifier">exc</span>
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,109 @@
|
|
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-escape.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-escape.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>test/test-escape.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>2007-02-28 11:31:32 +0900</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
|
+
test/unit
|
77
|
+
<a href="../escape_rb.html">escape</a>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<!-- if includes -->
|
88
|
+
|
89
|
+
<div id="section">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if method_list -->
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<div id="validator-badges">
|
105
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</body>
|
109
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
+
<!DOCTYPE html
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
|
9
|
+
Classes
|
10
|
+
|
11
|
+
-->
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
+
<head>
|
14
|
+
<title>Classes</title>
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
+
<base target="docwin" />
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="index">
|
21
|
+
<h1 class="section-bar">Classes</h1>
|
22
|
+
<div id="index-entries">
|
23
|
+
<a href="classes/Escape.html">Escape</a><br />
|
24
|
+
<a href="classes/Escape/HTMLAttrValue.html">Escape::HTMLAttrValue</a><br />
|
25
|
+
<a href="classes/Escape/HTMLEscaped.html">Escape::HTMLEscaped</a><br />
|
26
|
+
<a href="classes/Escape/PercentEncoded.html">Escape::PercentEncoded</a><br />
|
27
|
+
<a href="classes/Escape/ShellEscaped.html">Escape::ShellEscaped</a><br />
|
28
|
+
<a href="classes/Escape/StringWrapper.html">Escape::StringWrapper</a><br />
|
29
|
+
<a href="classes/TestEscapeHTML.html">TestEscapeHTML</a><br />
|
30
|
+
<a href="classes/TestEscapePercentEncoded.html">TestEscapePercentEncoded</a><br />
|
31
|
+
<a href="classes/TestEscapeShellEscaped.html">TestEscapeShellEscaped</a><br />
|
32
|
+
<a href="classes/TestEscapeStringWrapper.html">TestEscapeStringWrapper</a><br />
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
+
<!DOCTYPE html
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
|
9
|
+
Files
|
10
|
+
|
11
|
+
-->
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
+
<head>
|
14
|
+
<title>Files</title>
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
+
<base target="docwin" />
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="index">
|
21
|
+
<h1 class="section-bar">Files</h1>
|
22
|
+
<div id="index-entries">
|
23
|
+
<a href="files/escape_rb.html">escape.rb</a><br />
|
24
|
+
<a href="files/install_rb.html">install.rb</a><br />
|
25
|
+
<a href="files/test/test-escape_rb.html">test/test-escape.rb</a><br />
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</body>
|
29
|
+
</html>
|