serverside 0.1.59

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/CHANGELOG +97 -0
  2. data/COPYING +18 -0
  3. data/README +51 -0
  4. data/Rakefile +92 -0
  5. data/bin/serverside +74 -0
  6. data/doc/rdoc/classes/Daemon.html +253 -0
  7. data/doc/rdoc/classes/Daemon/Base.html +146 -0
  8. data/doc/rdoc/classes/Daemon/Cluster.html +308 -0
  9. data/doc/rdoc/classes/Daemon/Cluster/PidFile.html +228 -0
  10. data/doc/rdoc/classes/Daemon/PidFile.html +178 -0
  11. data/doc/rdoc/classes/ServerSide.html +160 -0
  12. data/doc/rdoc/classes/ServerSide/Application.html +147 -0
  13. data/doc/rdoc/classes/ServerSide/Application/Base.html +196 -0
  14. data/doc/rdoc/classes/ServerSide/Application/Static.html +154 -0
  15. data/doc/rdoc/classes/ServerSide/Connection.html +128 -0
  16. data/doc/rdoc/classes/ServerSide/Connection/Base.html +343 -0
  17. data/doc/rdoc/classes/ServerSide/Connection/Const.html +229 -0
  18. data/doc/rdoc/classes/ServerSide/Connection/Static.html +172 -0
  19. data/doc/rdoc/classes/ServerSide/Server.html +162 -0
  20. data/doc/rdoc/classes/ServerSide/StaticFiles.html +208 -0
  21. data/doc/rdoc/classes/ServerSide/StaticFiles/Const.html +179 -0
  22. data/doc/rdoc/classes/String.html +210 -0
  23. data/doc/rdoc/classes/Symbol.html +156 -0
  24. data/doc/rdoc/created.rid +1 -0
  25. data/doc/rdoc/files/CHANGELOG.html +260 -0
  26. data/doc/rdoc/files/COPYING.html +129 -0
  27. data/doc/rdoc/files/README.html +171 -0
  28. data/doc/rdoc/files/lib/serverside/application_rb.html +109 -0
  29. data/doc/rdoc/files/lib/serverside/cluster_rb.html +101 -0
  30. data/doc/rdoc/files/lib/serverside/connection_rb.html +101 -0
  31. data/doc/rdoc/files/lib/serverside/core_ext_rb.html +107 -0
  32. data/doc/rdoc/files/lib/serverside/daemon_rb.html +108 -0
  33. data/doc/rdoc/files/lib/serverside/server_rb.html +108 -0
  34. data/doc/rdoc/files/lib/serverside/static_rb.html +101 -0
  35. data/doc/rdoc/files/lib/serverside_rb.html +131 -0
  36. data/doc/rdoc/fr_class_index.html +44 -0
  37. data/doc/rdoc/fr_file_index.html +37 -0
  38. data/doc/rdoc/fr_method_index.html +60 -0
  39. data/doc/rdoc/index.html +24 -0
  40. data/doc/rdoc/rdoc-style.css +208 -0
  41. data/lib/serverside.rb +13 -0
  42. data/lib/serverside/application.rb +40 -0
  43. data/lib/serverside/cluster.rb +72 -0
  44. data/lib/serverside/connection.rb +115 -0
  45. data/lib/serverside/core_ext.rb +27 -0
  46. data/lib/serverside/daemon.rb +67 -0
  47. data/lib/serverside/server.rb +18 -0
  48. data/lib/serverside/static.rb +96 -0
  49. data/test/functional/primitive_static_server_test.rb +37 -0
  50. data/test/functional/static_profile.rb +17 -0
  51. data/test/functional/static_rfuzz.rb +67 -0
  52. data/test/functional/static_server_test.rb +25 -0
  53. data/test/test_helper.rb +2 -0
  54. data/test/unit/application_test.rb +16 -0
  55. data/test/unit/cluster_test.rb +129 -0
  56. data/test/unit/connection_test.rb +193 -0
  57. data/test/unit/core_ext_test.rb +32 -0
  58. data/test/unit/daemon_test.rb +75 -0
  59. data/test/unit/server_test.rb +26 -0
  60. data/test/unit/static_test.rb +143 -0
  61. metadata +140 -0
@@ -0,0 +1,156 @@
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: Symbol</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">Symbol</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/serverside/core_ext_rb.html">
59
+ lib/serverside/core_ext.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
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ <a href="Symbol.html">Symbol</a> extensions and overrides.
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000001">to_s</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Instance methods</h3>
116
+
117
+ <div id="method-M000001" class="method-detail">
118
+ <a name="M000001"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000001" class="method-signature">
122
+ <span class="method-name">to_s</span><span class="method-args">()</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p>
128
+ A faster <a href="Symbol.html#M000001">to_s</a> method. This is called a
129
+ lot, and memoization gives us performance between 10%-35% better.
130
+ </p>
131
+ <p><a class="source-toggle" href="#"
132
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
133
+ <div class="method-source-code" id="M000001-source">
134
+ <pre>
135
+ <span class="ruby-comment cmt"># File lib/serverside/core_ext.rb, line 24</span>
136
+ 24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
137
+ 25: <span class="ruby-ivar">@_to_s</span> <span class="ruby-operator">||</span> (<span class="ruby-ivar">@_to_s</span> = <span class="ruby-identifier">id2name</span>)
138
+ 26: <span class="ruby-keyword kw">end</span>
139
+ </pre>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+
145
+ </div>
146
+
147
+
148
+ </div>
149
+
150
+
151
+ <div id="validator-badges">
152
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
153
+ </div>
154
+
155
+ </body>
156
+ </html>
@@ -0,0 +1 @@
1
+ Tue Aug 22 15:21:30 IDT 2006
@@ -0,0 +1,260 @@
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: CHANGELOG</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>CHANGELOG</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>CHANGELOG
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Aug 21 12:45:07 IDT 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ <b>SVN</b>
74
+ </p>
75
+ <ul>
76
+ <li>Added a profiled version of a static server -
77
+ /test/functional/static_profile.rb.
78
+
79
+ </li>
80
+ <li>Added freezing of HTTP headers.
81
+
82
+ </li>
83
+ <li>Small change to documentation.
84
+
85
+ </li>
86
+ <li>Changed filename for cluster pid file to serverside_cluster.pid.
87
+
88
+ </li>
89
+ <li>Added documentation.
90
+
91
+ </li>
92
+ <li>Fixed require in serverside script to load the gem.
93
+
94
+ </li>
95
+ <li>Fixed the <a href="../classes/Daemon.html">Daemon</a> pid file for static
96
+ file server mode.
97
+
98
+ </li>
99
+ <li>Added directory listing to static file server.
100
+
101
+ </li>
102
+ <li>Fixed request header parsing Regexp so a trailing slash would be ignored.
103
+
104
+ </li>
105
+ <li>Added static application. Using the binary script in static mode works.
106
+
107
+ </li>
108
+ <li>Added cluster class with unit tests.
109
+
110
+ </li>
111
+ <li>Added unit tests for static server.
112
+
113
+ </li>
114
+ <li>Added static server functional test.
115
+
116
+ </li>
117
+ <li>Added static file serving code.
118
+
119
+ </li>
120
+ <li>Renamed ServerSide::Request to <a
121
+ href="../classes/ServerSide/Connection.html">ServerSide::Connection</a>.
122
+ This is more appropriate.
123
+
124
+ </li>
125
+ <li>Added functional static server test.
126
+
127
+ </li>
128
+ <li>Added test/functional for functional tests. Updated Rakefile.
129
+
130
+ </li>
131
+ <li>Added Request.send_response and stream.
132
+
133
+ </li>
134
+ <li>Added faster <a href="../classes/Symbol.html#M000001">Symbol.to_s</a> to
135
+ core_ext.
136
+
137
+ </li>
138
+ <li>Added HTTP parsing code with unit tests.
139
+
140
+ </li>
141
+ <li>Started adding request code.
142
+
143
+ </li>
144
+ <li>More unit tests for application code.
145
+
146
+ </li>
147
+ <li>Basic server code works with unit tests.
148
+
149
+ </li>
150
+ <li>Started work on application code.
151
+
152
+ </li>
153
+ <li>Added option parsing to serverside script.
154
+
155
+ </li>
156
+ <li>Added daemon code and unit tests.
157
+
158
+ </li>
159
+ <li>Created serverside script.
160
+
161
+ </li>
162
+ <li>Created Gem spec.
163
+
164
+ </li>
165
+ <li>Created directory structure.
166
+
167
+ </li>
168
+ </ul>
169
+ <p>
170
+ *Mongrel-based branch*
171
+ </p>
172
+ <ul>
173
+ <li>Added host attribute to Controller::Request.
174
+
175
+ </li>
176
+ <li>Added ability to create rules on any request attribute, not just path.
177
+
178
+ </li>
179
+ <li>Added ability to mount controllers with a block for a rule.
180
+
181
+ </li>
182
+ <li>Wrote object extensions to create frozen constants on the fly.
183
+
184
+ </li>
185
+ <li>Changed DirHandler to use frozen strings for cache header.
186
+
187
+ </li>
188
+ <li>Hooked Mongrel server to Controller::Router.
189
+
190
+ </li>
191
+ <li>Imported request code with unit tests.
192
+
193
+ </li>
194
+ <li>Wrote unit tests for daemon module.
195
+
196
+ </li>
197
+ <li>Wrote unit tests for controller routing code.
198
+
199
+ </li>
200
+ <li>Refactored controller routing code.
201
+
202
+ </li>
203
+ <li>Imported unit tests for extensions.
204
+
205
+ </li>
206
+ <li>Created Rakefile.
207
+
208
+ </li>
209
+ <li>Prototypical routing code.
210
+
211
+ </li>
212
+ <li>Fixed location of daemon pid files.
213
+
214
+ </li>
215
+ <li>Imported Mongrel code from Reality project.
216
+
217
+ </li>
218
+ <li>Imported extensions from Reality project.
219
+
220
+ </li>
221
+ <li>Implemented daemon and server cluster.
222
+
223
+ </li>
224
+ <li>Basic configuration infrastructure is ready.
225
+
226
+ </li>
227
+ </ul>
228
+
229
+ </div>
230
+
231
+
232
+ </div>
233
+
234
+
235
+ </div>
236
+
237
+
238
+ <!-- if includes -->
239
+
240
+ <div id="section">
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <!-- if method_list -->
250
+
251
+
252
+ </div>
253
+
254
+
255
+ <div id="validator-badges">
256
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
257
+ </div>
258
+
259
+ </body>
260
+ </html>
@@ -0,0 +1,129 @@
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: COPYING</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>COPYING</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>COPYING
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Wed Aug 16 11:52:20 IDT 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ Copyright &#169; 2006 Sharon Rosner
74
+ </p>
75
+ <p>
76
+ Permission is hereby granted, free of charge, to any person obtaining a
77
+ copy of this software and associated documentation files (the
78
+ &quot;Software&quot;), to deal in the Software without restriction,
79
+ including without limitation the rights to use, copy, modify, merge,
80
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
81
+ permit persons to whom the Software is furnished to do so, subject to the
82
+ following conditions:
83
+ </p>
84
+ <p>
85
+ The above copyright notice and this permission notice shall be included in
86
+ all copies or substantial portions of the Software.
87
+ </p>
88
+ <p>
89
+ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
90
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
91
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
92
+ NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
93
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
94
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
95
+ DEALINGS IN THE SOFTWARE.
96
+ </p>
97
+
98
+ </div>
99
+
100
+
101
+ </div>
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <!-- if includes -->
108
+
109
+ <div id="section">
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <!-- if method_list -->
119
+
120
+
121
+ </div>
122
+
123
+
124
+ <div id="validator-badges">
125
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
126
+ </div>
127
+
128
+ </body>
129
+ </html>