campfire-bot_alexchee 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/.autotest +11 -0
  2. data/.gitignore +6 -0
  3. data/Gemfile +12 -0
  4. data/README.textile +62 -0
  5. data/TODO +72 -0
  6. data/bin/campfire-bot +59 -0
  7. data/campfire-bot.gemspec +24 -0
  8. data/cfbot-stop.sh +8 -0
  9. data/config.example.yml +32 -0
  10. data/lib/bot.rb +194 -0
  11. data/lib/event.rb +114 -0
  12. data/lib/message.rb +30 -0
  13. data/lib/plugin.rb +77 -0
  14. data/lib/version.rb +3 -0
  15. data/plugins-example/fun.rb +95 -0
  16. data/spec/command_spec.rb +96 -0
  17. data/spec/plugin_spec.rb +43 -0
  18. data/spec/spec.opts +1 -0
  19. data/tmp/.gitignore +0 -0
  20. data/vendor/escape/ChangeLog +30 -0
  21. data/vendor/escape/Makefile +5 -0
  22. data/vendor/escape/README +81 -0
  23. data/vendor/escape/VERSION +1 -0
  24. data/vendor/escape/escape.rb +302 -0
  25. data/vendor/escape/install.rb +109 -0
  26. data/vendor/escape/misc/README.erb +85 -0
  27. data/vendor/escape/rdoc/classes/Escape/HTMLAttrValue.html +113 -0
  28. data/vendor/escape/rdoc/classes/Escape/HTMLEscaped.html +113 -0
  29. data/vendor/escape/rdoc/classes/Escape/PercentEncoded.html +113 -0
  30. data/vendor/escape/rdoc/classes/Escape/ShellEscaped.html +113 -0
  31. data/vendor/escape/rdoc/classes/Escape/StringWrapper.html +242 -0
  32. data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000029.html +18 -0
  33. data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000030.html +18 -0
  34. data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000031.html +18 -0
  35. data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000032.html +18 -0
  36. data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000033.html +18 -0
  37. data/vendor/escape/rdoc/classes/Escape/StringWrapper.src/M000035.html +18 -0
  38. data/vendor/escape/rdoc/classes/Escape.html +427 -0
  39. data/vendor/escape/rdoc/classes/Escape.src/M000022.html +19 -0
  40. data/vendor/escape/rdoc/classes/Escape.src/M000023.html +32 -0
  41. data/vendor/escape/rdoc/classes/Escape.src/M000024.html +24 -0
  42. data/vendor/escape/rdoc/classes/Escape.src/M000025.html +19 -0
  43. data/vendor/escape/rdoc/classes/Escape.src/M000026.html +48 -0
  44. data/vendor/escape/rdoc/classes/Escape.src/M000027.html +19 -0
  45. data/vendor/escape/rdoc/classes/Escape.src/M000028.html +19 -0
  46. data/vendor/escape/rdoc/classes/TestEscapeHTML.html +182 -0
  47. data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000008.html +18 -0
  48. data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000009.html +18 -0
  49. data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000010.html +18 -0
  50. data/vendor/escape/rdoc/classes/TestEscapeHTML.src/M000011.html +18 -0
  51. data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.html +182 -0
  52. data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000012.html +18 -0
  53. data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000013.html +19 -0
  54. data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000014.html +20 -0
  55. data/vendor/escape/rdoc/classes/TestEscapePercentEncoded.src/M000015.html +22 -0
  56. data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.html +167 -0
  57. data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.src/M000016.html +18 -0
  58. data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.src/M000017.html +20 -0
  59. data/vendor/escape/rdoc/classes/TestEscapeShellEscaped.src/M000018.html +20 -0
  60. data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.html +167 -0
  61. data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.src/M000019.html +20 -0
  62. data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.src/M000020.html +24 -0
  63. data/vendor/escape/rdoc/classes/TestEscapeStringWrapper.src/M000021.html +22 -0
  64. data/vendor/escape/rdoc/files/escape_rb.html +136 -0
  65. data/vendor/escape/rdoc/files/install_rb.html +250 -0
  66. data/vendor/escape/rdoc/files/install_rb.src/M000001.html +23 -0
  67. data/vendor/escape/rdoc/files/install_rb.src/M000002.html +31 -0
  68. data/vendor/escape/rdoc/files/install_rb.src/M000003.html +27 -0
  69. data/vendor/escape/rdoc/files/install_rb.src/M000004.html +27 -0
  70. data/vendor/escape/rdoc/files/install_rb.src/M000005.html +21 -0
  71. data/vendor/escape/rdoc/files/install_rb.src/M000006.html +23 -0
  72. data/vendor/escape/rdoc/files/install_rb.src/M000007.html +21 -0
  73. data/vendor/escape/rdoc/files/test/test-escape_rb.html +109 -0
  74. data/vendor/escape/rdoc/fr_class_index.html +36 -0
  75. data/vendor/escape/rdoc/fr_file_index.html +29 -0
  76. data/vendor/escape/rdoc/fr_method_index.html +61 -0
  77. data/vendor/escape/rdoc/index.html +24 -0
  78. data/vendor/escape/rdoc/rdoc-style.css +208 -0
  79. data/vendor/escape/test/test-escape.rb +90 -0
  80. metadata +209 -0
@@ -0,0 +1,167 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: TestEscapeShellEscaped</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">TestEscapeShellEscaped</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/test/test-escape_rb.html">
59
+ test/test-escape.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Test::Unit::TestCase
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000016">assert_equal_se</a>&nbsp;&nbsp;
90
+ <a href="#M000017">test_shell_command</a>&nbsp;&nbsp;
91
+ <a href="#M000018">test_shell_single_word</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Instance methods</h3>
112
+
113
+ <div id="method-M000016" class="method-detail">
114
+ <a name="M000016"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="TestEscapeShellEscaped.src/M000016.html" target="Code" class="method-signature"
118
+ onclick="popupCode('TestEscapeShellEscaped.src/M000016.html');return false;">
119
+ <span class="method-name">assert_equal_se</span><span class="method-args">(str, tst)</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ </div>
125
+ </div>
126
+
127
+ <div id="method-M000017" class="method-detail">
128
+ <a name="M000017"></a>
129
+
130
+ <div class="method-heading">
131
+ <a href="TestEscapeShellEscaped.src/M000017.html" target="Code" class="method-signature"
132
+ onclick="popupCode('TestEscapeShellEscaped.src/M000017.html');return false;">
133
+ <span class="method-name">test_shell_command</span><span class="method-args">()</span>
134
+ </a>
135
+ </div>
136
+
137
+ <div class="method-description">
138
+ </div>
139
+ </div>
140
+
141
+ <div id="method-M000018" class="method-detail">
142
+ <a name="M000018"></a>
143
+
144
+ <div class="method-heading">
145
+ <a href="TestEscapeShellEscaped.src/M000018.html" target="Code" class="method-signature"
146
+ onclick="popupCode('TestEscapeShellEscaped.src/M000018.html');return false;">
147
+ <span class="method-name">test_shell_single_word</span><span class="method-args">()</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ </div>
153
+ </div>
154
+
155
+
156
+ </div>
157
+
158
+
159
+ </div>
160
+
161
+
162
+ <div id="validator-badges">
163
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
164
+ </div>
165
+
166
+ </body>
167
+ </html>
@@ -0,0 +1,18 @@
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>assert_equal_se (TestEscapeShellEscaped)</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 test/test-escape.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">tst</span>)
15
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">ShellEscaped</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>), <span class="ruby-identifier">tst</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,20 @@
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>test_shell_command (TestEscapeShellEscaped)</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 test/test-escape.rb, line 35</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_shell_command</span>
15
+ <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-value str">&quot;com arg&quot;</span>, <span class="ruby-constant">Escape</span>.<span class="ruby-identifier">shell_command</span>(<span class="ruby-node">%w[com arg]</span>))
16
+ <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-value str">&quot;ls /&quot;</span>, <span class="ruby-constant">Escape</span>.<span class="ruby-identifier">shell_command</span>(<span class="ruby-node">%w[ls /]</span>))
17
+ <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-value str">&quot;echo '*'&quot;</span>, <span class="ruby-constant">Escape</span>.<span class="ruby-identifier">shell_command</span>(<span class="ruby-node">%w[echo *]</span>))
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,20 @@
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>test_shell_single_word (TestEscapeShellEscaped)</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 test/test-escape.rb, line 41</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_shell_single_word</span>
15
+ <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-value str">&quot;''&quot;</span>, <span class="ruby-constant">Escape</span>.<span class="ruby-identifier">shell_single_word</span>(<span class="ruby-value str">''</span>))
16
+ <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-value str">&quot;foo&quot;</span>, <span class="ruby-constant">Escape</span>.<span class="ruby-identifier">shell_single_word</span>(<span class="ruby-value str">'foo'</span>))
17
+ <span class="ruby-identifier">assert_equal_se</span>(<span class="ruby-value str">&quot;'*'&quot;</span>, <span class="ruby-constant">Escape</span>.<span class="ruby-identifier">shell_single_word</span>(<span class="ruby-value str">'*'</span>))
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,167 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: TestEscapeStringWrapper</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">TestEscapeStringWrapper</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/test/test-escape_rb.html">
59
+ test/test-escape.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Test::Unit::TestCase
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000019">test_eq</a>&nbsp;&nbsp;
90
+ <a href="#M000020">test_hash</a>&nbsp;&nbsp;
91
+ <a href="#M000021">test_new_dup</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Instance methods</h3>
112
+
113
+ <div id="method-M000019" class="method-detail">
114
+ <a name="M000019"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="TestEscapeStringWrapper.src/M000019.html" target="Code" class="method-signature"
118
+ onclick="popupCode('TestEscapeStringWrapper.src/M000019.html');return false;">
119
+ <span class="method-name">test_eq</span><span class="method-args">()</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ </div>
125
+ </div>
126
+
127
+ <div id="method-M000020" class="method-detail">
128
+ <a name="M000020"></a>
129
+
130
+ <div class="method-heading">
131
+ <a href="TestEscapeStringWrapper.src/M000020.html" target="Code" class="method-signature"
132
+ onclick="popupCode('TestEscapeStringWrapper.src/M000020.html');return false;">
133
+ <span class="method-name">test_hash</span><span class="method-args">()</span>
134
+ </a>
135
+ </div>
136
+
137
+ <div class="method-description">
138
+ </div>
139
+ </div>
140
+
141
+ <div id="method-M000021" class="method-detail">
142
+ <a name="M000021"></a>
143
+
144
+ <div class="method-heading">
145
+ <a href="TestEscapeStringWrapper.src/M000021.html" target="Code" class="method-signature"
146
+ onclick="popupCode('TestEscapeStringWrapper.src/M000021.html');return false;">
147
+ <span class="method-name">test_new_dup</span><span class="method-args">()</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ </div>
153
+ </div>
154
+
155
+
156
+ </div>
157
+
158
+
159
+ </div>
160
+
161
+
162
+ <div id="validator-badges">
163
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
164
+ </div>
165
+
166
+ </body>
167
+ </html>
@@ -0,0 +1,20 @@
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>test_eq (TestEscapeStringWrapper)</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 test/test-escape.rb, line 5</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_eq</span>
15
+ <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>) <span class="ruby-operator">==</span> <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>))
16
+ <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>) <span class="ruby-operator">!=</span> <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;bar&quot;</span>))
17
+ <span class="ruby-identifier">assert</span>(<span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">ShellEscaped</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;a&quot;</span>) <span class="ruby-operator">!=</span> <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;a&quot;</span>))
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,24 @@
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>test_hash (TestEscapeStringWrapper)</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 test/test-escape.rb, line 11</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_hash</span>
15
+ <span class="ruby-identifier">v1</span> = <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>)
16
+ <span class="ruby-identifier">v2</span> = <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>)
17
+ <span class="ruby-identifier">h</span> = {}
18
+ <span class="ruby-identifier">h</span>[<span class="ruby-identifier">v1</span>] = <span class="ruby-value">1</span>
19
+ <span class="ruby-identifier">h</span>[<span class="ruby-identifier">v2</span>] = <span class="ruby-value">2</span>
20
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">h</span>.<span class="ruby-identifier">size</span>)
21
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">h</span>[<span class="ruby-identifier">v1</span>])
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,22 @@
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>test_new_dup (TestEscapeStringWrapper)</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 test/test-escape.rb, line 21</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_new_dup</span>
15
+ <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;a&quot;</span>
16
+ <span class="ruby-identifier">o</span> = <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">s</span>)
17
+ <span class="ruby-identifier">assert_not_equal</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">object_id</span>, <span class="ruby-identifier">o</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">:@str</span>).<span class="ruby-identifier">object_id</span>)
18
+ <span class="ruby-identifier">o</span> = <span class="ruby-constant">Escape</span><span class="ruby-operator">::</span><span class="ruby-constant">PercentEncoded</span>.<span class="ruby-identifier">new_no_dup</span>(<span class="ruby-identifier">s</span>)
19
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">object_id</span>, <span class="ruby-identifier">o</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">:@str</span>).<span class="ruby-identifier">object_id</span>)
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,136 @@
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: 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>escape.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>escape.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>2007-02-28 18:21:33 +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
+ escape.rb - escape/unescape library for several formats
74
+ </p>
75
+ <p>
76
+ Copyright (C) 2006,2007 Tanaka Akira &lt;akr@fsij.org&gt;
77
+ </p>
78
+ <p>
79
+ Redistribution and use in source and binary forms, with or without
80
+ modification, are permitted provided that the following conditions are met:
81
+ </p>
82
+ <pre>
83
+ 1. Redistributions of source code must retain the above copyright notice, this
84
+ list of conditions and the following disclaimer.
85
+ 2. Redistributions in binary form must reproduce the above copyright notice,
86
+ this list of conditions and the following disclaimer in the documentation
87
+ and/or other materials provided with the distribution.
88
+ 3. The name of the author may not be used to endorse or promote products
89
+ derived from this software without specific prior written permission.
90
+ </pre>
91
+ <p>
92
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS&#8217;&#8217; AND ANY
93
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
94
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
95
+ DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
96
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
97
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
98
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
99
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
100
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
101
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
102
+ DAMAGE.
103
+ </p>
104
+
105
+ </div>
106
+
107
+
108
+ </div>
109
+
110
+
111
+ </div>
112
+
113
+
114
+ <!-- if includes -->
115
+
116
+ <div id="section">
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <!-- if method_list -->
126
+
127
+
128
+ </div>
129
+
130
+
131
+ <div id="validator-badges">
132
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
133
+ </div>
134
+
135
+ </body>
136
+ </html>