serverside 0.1.59 → 0.2.0
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/CHANGELOG +21 -1
- data/Rakefile +69 -40
- data/bin/serverside +7 -15
- data/doc/rdoc/classes/Daemon.html +18 -18
- data/doc/rdoc/classes/Daemon/Base.html +8 -6
- data/doc/rdoc/classes/Daemon/Cluster.html +36 -36
- data/doc/rdoc/classes/Daemon/Cluster/PidFile.html +20 -18
- data/doc/rdoc/classes/Daemon/PidFile.html +12 -12
- data/doc/rdoc/classes/Object.html +151 -0
- data/doc/rdoc/classes/Proc.html +151 -0
- data/doc/rdoc/classes/ServerSide.html +69 -0
- data/doc/rdoc/classes/ServerSide/Application.html +43 -11
- data/doc/rdoc/classes/ServerSide/Application/Base.html +30 -30
- data/doc/rdoc/classes/ServerSide/Application/Static.html +20 -18
- data/doc/rdoc/classes/ServerSide/Connection.html +3 -3
- data/doc/rdoc/classes/ServerSide/Connection/Base.html +142 -99
- data/doc/rdoc/classes/ServerSide/Connection/Const.html +11 -13
- data/doc/rdoc/classes/ServerSide/Connection/Router.html +464 -0
- data/doc/rdoc/classes/ServerSide/Server.html +8 -6
- data/doc/rdoc/classes/ServerSide/StaticFiles.html +75 -43
- data/doc/rdoc/classes/ServerSide/StaticFiles/Const.html +5 -0
- data/doc/rdoc/classes/String.html +20 -18
- data/doc/rdoc/classes/Symbol.html +2 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGELOG.html +32 -2
- data/doc/rdoc/files/lib/serverside/application_rb.html +1 -1
- data/doc/rdoc/files/lib/serverside/connection_rb.html +1 -1
- data/doc/rdoc/files/lib/serverside/core_ext_rb.html +1 -1
- data/doc/rdoc/files/lib/serverside/daemon_rb.html +1 -1
- data/doc/rdoc/files/lib/serverside/routing_rb.html +101 -0
- data/doc/rdoc/files/lib/serverside/static_rb.html +1 -1
- data/doc/rdoc/fr_class_index.html +3 -1
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +49 -33
- data/lib/serverside/application.rb +17 -4
- data/lib/serverside/connection.rb +23 -3
- data/lib/serverside/core_ext.rb +16 -1
- data/lib/serverside/routing.rb +119 -0
- data/lib/serverside/static.rb +9 -23
- data/test/functional/routing_server.rb +14 -0
- data/test/functional/routing_server_test.rb +41 -0
- data/test/functional/static_server_test.rb +8 -2
- data/test/unit/connection_test.rb +13 -0
- data/test/unit/core_ext_test.rb +14 -0
- data/test/unit/routing_test.rb +171 -0
- data/test/unit/static_test.rb +34 -1
- metadata +10 -3
- data/doc/rdoc/classes/ServerSide/Connection/Static.html +0 -172
@@ -65,7 +65,9 @@
|
|
65
65
|
<tr class="top-aligned-row">
|
66
66
|
<td><strong>Parent:</strong></td>
|
67
67
|
<td>
|
68
|
+
<a href="../Object.html">
|
68
69
|
Object
|
70
|
+
</a>
|
69
71
|
</td>
|
70
72
|
</tr>
|
71
73
|
</table>
|
@@ -95,7 +97,7 @@ techniques.
|
|
95
97
|
<h3 class="section-bar">Methods</h3>
|
96
98
|
|
97
99
|
<div class="name-list">
|
98
|
-
<a href="#
|
100
|
+
<a href="#M000050">new</a>
|
99
101
|
</div>
|
100
102
|
</div>
|
101
103
|
|
@@ -117,11 +119,11 @@ techniques.
|
|
117
119
|
<div id="methods">
|
118
120
|
<h3 class="section-bar">Public Class methods</h3>
|
119
121
|
|
120
|
-
<div id="method-
|
121
|
-
<a name="
|
122
|
+
<div id="method-M000050" class="method-detail">
|
123
|
+
<a name="M000050"></a>
|
122
124
|
|
123
125
|
<div class="method-heading">
|
124
|
-
<a href="#
|
126
|
+
<a href="#M000050" class="method-signature">
|
125
127
|
<span class="method-name">new</span><span class="method-args">(host, port, connection_class)</span>
|
126
128
|
</a>
|
127
129
|
</div>
|
@@ -133,8 +135,8 @@ loop. When a new connection is accepted, a new instance of the the supplied
|
|
133
135
|
connection class is instantiated and passed the connection for processing.
|
134
136
|
</p>
|
135
137
|
<p><a class="source-toggle" href="#"
|
136
|
-
onclick="toggleCode('
|
137
|
-
<div class="method-source-code" id="
|
138
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
139
|
+
<div class="method-source-code" id="M000050-source">
|
138
140
|
<pre>
|
139
141
|
<span class="ruby-comment cmt"># File lib/serverside/server.rb, line 12</span>
|
140
142
|
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">connection_class</span>)
|
@@ -75,8 +75,7 @@
|
|
75
75
|
<div id="description">
|
76
76
|
<p>
|
77
77
|
This module provides functionality for serving files and directory listings
|
78
|
-
over HTTP. It is mainly used by
|
79
|
-
href="Connection/Static.html">ServerSide::Connection::Static</a>.
|
78
|
+
over HTTP. It is mainly used by ServerSide::Connection::Static.
|
80
79
|
</p>
|
81
80
|
|
82
81
|
</div>
|
@@ -88,8 +87,9 @@ href="Connection/Static.html">ServerSide::Connection::Static</a>.
|
|
88
87
|
<h3 class="section-bar">Methods</h3>
|
89
88
|
|
90
89
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
90
|
+
<a href="#M000025">serve_dir</a>
|
91
|
+
<a href="#M000024">serve_file</a>
|
92
|
+
<a href="#M000026">serve_static</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -117,11 +117,11 @@ href="Connection/Static.html">ServerSide::Connection::Static</a>.
|
|
117
117
|
<div id="methods">
|
118
118
|
<h3 class="section-bar">Public Instance methods</h3>
|
119
119
|
|
120
|
-
<div id="method-
|
121
|
-
<a name="
|
120
|
+
<div id="method-M000025" class="method-detail">
|
121
|
+
<a name="M000025"></a>
|
122
122
|
|
123
123
|
<div class="method-heading">
|
124
|
-
<a href="#
|
124
|
+
<a href="#M000025" class="method-signature">
|
125
125
|
<span class="method-name">serve_dir</span><span class="method-args">(dir)</span>
|
126
126
|
</a>
|
127
127
|
</div>
|
@@ -131,27 +131,27 @@ href="Connection/Static.html">ServerSide::Connection::Static</a>.
|
|
131
131
|
Serves a directory listing over HTTP in the form of an HTML page.
|
132
132
|
</p>
|
133
133
|
<p><a class="source-toggle" href="#"
|
134
|
-
onclick="toggleCode('
|
135
|
-
<div class="method-source-code" id="
|
134
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
135
|
+
<div class="method-source-code" id="M000025-source">
|
136
136
|
<pre>
|
137
|
-
<span class="ruby-comment cmt"># File lib/serverside/static.rb, line
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
137
|
+
<span class="ruby-comment cmt"># File lib/serverside/static.rb, line 63</span>
|
138
|
+
63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">serve_dir</span>(<span class="ruby-identifier">dir</span>)
|
139
|
+
64: <span class="ruby-identifier">html</span> = (<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">DirListingStart</span> <span class="ruby-operator">%</span> [<span class="ruby-ivar">@path</span>, <span class="ruby-ivar">@path</span>]) <span class="ruby-operator">+</span>
|
140
|
+
65: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">dir</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-value str">''</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">m</span>, <span class="ruby-identifier">fn</span><span class="ruby-operator">|</span>
|
141
|
+
66: (<span class="ruby-identifier">fn</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">m</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">DirListing</span> <span class="ruby-operator">%</span> [<span class="ruby-ivar">@path</span><span class="ruby-operator">/</span><span class="ruby-identifier">fn</span>, <span class="ruby-identifier">fn</span>]
|
142
|
+
67: } <span class="ruby-operator">+</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">DirListingStop</span>
|
143
|
+
68: <span class="ruby-identifier">send_response</span>(<span class="ruby-value">200</span>, <span class="ruby-value str">'text/html'</span>, <span class="ruby-identifier">html</span>)
|
144
|
+
69: <span class="ruby-keyword kw">end</span>
|
145
145
|
</pre>
|
146
146
|
</div>
|
147
147
|
</div>
|
148
148
|
</div>
|
149
149
|
|
150
|
-
<div id="method-
|
151
|
-
<a name="
|
150
|
+
<div id="method-M000024" class="method-detail">
|
151
|
+
<a name="M000024"></a>
|
152
152
|
|
153
153
|
<div class="method-heading">
|
154
|
-
<a href="#
|
154
|
+
<a href="#M000024" class="method-signature">
|
155
155
|
<span class="method-name">serve_file</span><span class="method-args">(fn)</span>
|
156
156
|
</a>
|
157
157
|
</div>
|
@@ -164,30 +164,62 @@ the file’s current ETag. If there’s a match, a 304 response is
|
|
164
164
|
rendered.
|
165
165
|
</p>
|
166
166
|
<p><a class="source-toggle" href="#"
|
167
|
-
onclick="toggleCode('
|
168
|
-
<div class="method-source-code" id="
|
167
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
168
|
+
<div class="method-source-code" id="M000024-source">
|
169
169
|
<pre>
|
170
|
-
<span class="ruby-comment cmt"># File lib/serverside/static.rb, line
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
170
|
+
<span class="ruby-comment cmt"># File lib/serverside/static.rb, line 41</span>
|
171
|
+
41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">serve_file</span>(<span class="ruby-identifier">fn</span>)
|
172
|
+
42: <span class="ruby-identifier">stat</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">fn</span>)
|
173
|
+
43: <span class="ruby-identifier">etag</span> = (<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">ETagFormat</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">stat</span>.<span class="ruby-identifier">mtime</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">ino</span>]).<span class="ruby-identifier">freeze</span>
|
174
|
+
44: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">etag</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@headers</span>[<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">IfNoneMatch</span>]
|
175
|
+
45: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@static_files</span>[<span class="ruby-identifier">fn</span>] <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@@static_files</span>[<span class="ruby-identifier">fn</span>][<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">etag</span>)
|
176
|
+
46: <span class="ruby-identifier">content</span> = <span class="ruby-ivar">@@static_files</span>[<span class="ruby-identifier">fn</span>][<span class="ruby-value">1</span>]
|
177
|
+
47: <span class="ruby-keyword kw">else</span>
|
178
|
+
48: <span class="ruby-identifier">content</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">fn</span>).<span class="ruby-identifier">freeze</span>
|
179
|
+
49: <span class="ruby-ivar">@@static_files</span>[<span class="ruby-identifier">fn</span>] = [<span class="ruby-identifier">etag</span>.<span class="ruby-identifier">freeze</span>, <span class="ruby-identifier">content</span>]
|
180
|
+
50: <span class="ruby-keyword kw">end</span>
|
181
|
+
51:
|
182
|
+
52: <span class="ruby-identifier">send_response</span>(<span class="ruby-value">200</span>, <span class="ruby-ivar">@@mime_types</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">fn</span>)], <span class="ruby-identifier">content</span>, <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">size</span>,
|
183
|
+
53: {<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">ETag</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">etag</span>, <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">CacheControl</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">MaxAge</span>})
|
184
|
+
54: <span class="ruby-keyword kw">else</span>
|
185
|
+
55: <span class="ruby-ivar">@conn</span> <span class="ruby-operator"><<</span> ((<span class="ruby-ivar">@persistent</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">NotModifiedPersist</span> <span class="ruby-operator">:</span>
|
186
|
+
56: <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">NotModifiedClose</span>) <span class="ruby-operator">%</span> <span class="ruby-identifier">etag</span>)
|
187
|
+
57: <span class="ruby-keyword kw">end</span>
|
188
|
+
58: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
189
|
+
59: <span class="ruby-identifier">send_response</span>(<span class="ruby-value">404</span>, <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">TextPlain</span>, <span class="ruby-value str">'Error reading file.'</span>)
|
190
|
+
60: <span class="ruby-keyword kw">end</span>
|
191
|
+
</pre>
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<div id="method-M000026" class="method-detail">
|
197
|
+
<a name="M000026"></a>
|
198
|
+
|
199
|
+
<div class="method-heading">
|
200
|
+
<a href="#M000026" class="method-signature">
|
201
|
+
<span class="method-name">serve_static</span><span class="method-args">(path)</span>
|
202
|
+
</a>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
<div class="method-description">
|
206
|
+
<p>
|
207
|
+
Serves static files and directory listings.
|
208
|
+
</p>
|
209
|
+
<p><a class="source-toggle" href="#"
|
210
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
211
|
+
<div class="method-source-code" id="M000026-source">
|
212
|
+
<pre>
|
213
|
+
<span class="ruby-comment cmt"># File lib/serverside/static.rb, line 72</span>
|
214
|
+
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">serve_static</span>(<span class="ruby-identifier">path</span>)
|
215
|
+
73: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">path</span>)
|
216
|
+
74: <span class="ruby-identifier">serve_file</span>(<span class="ruby-identifier">path</span>)
|
217
|
+
75: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">path</span>)
|
218
|
+
76: <span class="ruby-identifier">serve_dir</span>(<span class="ruby-identifier">path</span>)
|
219
|
+
77: <span class="ruby-keyword kw">else</span>
|
220
|
+
78: <span class="ruby-identifier">send_response</span>(<span class="ruby-value">404</span>, <span class="ruby-value str">'text'</span>, <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">FileNotFound</span>)
|
221
|
+
79: <span class="ruby-keyword kw">end</span>
|
222
|
+
80: <span class="ruby-keyword kw">end</span>
|
191
223
|
</pre>
|
192
224
|
</div>
|
193
225
|
</div>
|
@@ -156,6 +156,11 @@ Frozen constants to be used by the module.
|
|
156
156
|
<td>=</td>
|
157
157
|
<td class="context-item-value">'</body></html>'.freeze</td>
|
158
158
|
</tr>
|
159
|
+
<tr class="top-aligned-row context-row">
|
160
|
+
<td class="context-item-name">FileNotFound</td>
|
161
|
+
<td>=</td>
|
162
|
+
<td class="context-item-value">'File not found.'.freeze</td>
|
163
|
+
</tr>
|
159
164
|
</table>
|
160
165
|
</div>
|
161
166
|
</div>
|
@@ -65,7 +65,9 @@
|
|
65
65
|
<tr class="top-aligned-row">
|
66
66
|
<td><strong>Parent:</strong></td>
|
67
67
|
<td>
|
68
|
+
<a href="Object.html">
|
68
69
|
Object
|
70
|
+
</a>
|
69
71
|
</td>
|
70
72
|
</tr>
|
71
73
|
</table>
|
@@ -92,9 +94,9 @@
|
|
92
94
|
<h3 class="section-bar">Methods</h3>
|
93
95
|
|
94
96
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
97
|
+
<a href="#M000006">/</a>
|
98
|
+
<a href="#M000004">uri_escape</a>
|
99
|
+
<a href="#M000005">uri_unescape</a>
|
98
100
|
</div>
|
99
101
|
</div>
|
100
102
|
|
@@ -116,11 +118,11 @@
|
|
116
118
|
<div id="methods">
|
117
119
|
<h3 class="section-bar">Public Instance methods</h3>
|
118
120
|
|
119
|
-
<div id="method-
|
120
|
-
<a name="
|
121
|
+
<div id="method-M000006" class="method-detail">
|
122
|
+
<a name="M000006"></a>
|
121
123
|
|
122
124
|
<div class="method-heading">
|
123
|
-
<a href="#
|
125
|
+
<a href="#M000006" class="method-signature">
|
124
126
|
<span class="method-name">/</span><span class="method-args">(o)</span>
|
125
127
|
</a>
|
126
128
|
</div>
|
@@ -130,8 +132,8 @@
|
|
130
132
|
Concatenates a path (do we really need this sugar?)
|
131
133
|
</p>
|
132
134
|
<p><a class="source-toggle" href="#"
|
133
|
-
onclick="toggleCode('
|
134
|
-
<div class="method-source-code" id="
|
135
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
136
|
+
<div class="method-source-code" id="M000006-source">
|
135
137
|
<pre>
|
136
138
|
<span class="ruby-comment cmt"># File lib/serverside/core_ext.rb, line 15</span>
|
137
139
|
15: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">/</span>(<span class="ruby-identifier">o</span>)
|
@@ -142,11 +144,11 @@ Concatenates a path (do we really need this sugar?)
|
|
142
144
|
</div>
|
143
145
|
</div>
|
144
146
|
|
145
|
-
<div id="method-
|
146
|
-
<a name="
|
147
|
+
<div id="method-M000004" class="method-detail">
|
148
|
+
<a name="M000004"></a>
|
147
149
|
|
148
150
|
<div class="method-heading">
|
149
|
-
<a href="#
|
151
|
+
<a href="#M000004" class="method-signature">
|
150
152
|
<span class="method-name">uri_escape</span><span class="method-args">()</span>
|
151
153
|
</a>
|
152
154
|
</div>
|
@@ -156,8 +158,8 @@ Concatenates a path (do we really need this sugar?)
|
|
156
158
|
Encodes a normal string to a URI string.
|
157
159
|
</p>
|
158
160
|
<p><a class="source-toggle" href="#"
|
159
|
-
onclick="toggleCode('
|
160
|
-
<div class="method-source-code" id="
|
161
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
162
|
+
<div class="method-source-code" id="M000004-source">
|
161
163
|
<pre>
|
162
164
|
<span class="ruby-comment cmt"># File lib/serverside/core_ext.rb, line 4</span>
|
163
165
|
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri_escape</span>
|
@@ -169,11 +171,11 @@ Encodes a normal string to a URI string.
|
|
169
171
|
</div>
|
170
172
|
</div>
|
171
173
|
|
172
|
-
<div id="method-
|
173
|
-
<a name="
|
174
|
+
<div id="method-M000005" class="method-detail">
|
175
|
+
<a name="M000005"></a>
|
174
176
|
|
175
177
|
<div class="method-heading">
|
176
|
-
<a href="#
|
178
|
+
<a href="#M000005" class="method-signature">
|
177
179
|
<span class="method-name">uri_unescape</span><span class="method-args">()</span>
|
178
180
|
</a>
|
179
181
|
</div>
|
@@ -183,8 +185,8 @@ Encodes a normal string to a URI string.
|
|
183
185
|
Decodes a URI string to a normal string.
|
184
186
|
</p>
|
185
187
|
<p><a class="source-toggle" href="#"
|
186
|
-
onclick="toggleCode('
|
187
|
-
<div class="method-source-code" id="
|
188
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
189
|
+
<div class="method-source-code" id="M000005-source">
|
188
190
|
<pre>
|
189
191
|
<span class="ruby-comment cmt"># File lib/serverside/core_ext.rb, line 10</span>
|
190
192
|
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri_unescape</span>
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Mon Aug 28 10:58:48 IDT 2006
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Mon Aug
|
59
|
+
<td>Mon Aug 28 10:58:09 IDT 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -70,9 +70,39 @@
|
|
70
70
|
|
71
71
|
<div id="description">
|
72
72
|
<p>
|
73
|
-
|
73
|
+
*0.2.0*
|
74
74
|
</p>
|
75
75
|
<ul>
|
76
|
+
<li>Changed substition of embedded parameters from (.*) to (.+).
|
77
|
+
|
78
|
+
</li>
|
79
|
+
<li>Added rule compilation after setting the default handler.
|
80
|
+
|
81
|
+
</li>
|
82
|
+
<li>Added doc_rforge rake task (for updating the docs on rubyforge.org).
|
83
|
+
|
84
|
+
</li>
|
85
|
+
<li>Added stats and svn_add rake tasks.
|
86
|
+
|
87
|
+
</li>
|
88
|
+
<li>Fixed routing unit tests.
|
89
|
+
|
90
|
+
</li>
|
91
|
+
<li>Added Router.has_routes? method.
|
92
|
+
|
93
|
+
</li>
|
94
|
+
<li>Finished unit tests for routing.
|
95
|
+
|
96
|
+
</li>
|
97
|
+
<li>Added Connection::Base.redirect.
|
98
|
+
|
99
|
+
</li>
|
100
|
+
<li>Added routing code from /research/routing, implemented functional test.
|
101
|
+
|
102
|
+
</li>
|
103
|
+
<li>Learned about the (?:) modifier and fixed the request parsing regexp.
|
104
|
+
|
105
|
+
</li>
|
76
106
|
<li>Added a profiled version of a static server -
|
77
107
|
/test/functional/static_profile.rb.
|
78
108
|
|
@@ -0,0 +1,101 @@
|
|
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: routing.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>routing.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/serverside/routing.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Mon Aug 28 10:43:50 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
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|