wee 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +132 -0
- data/INSTALL +13 -3
- data/README +3 -3
- data/Rakefile +5 -1
- data/bin/wee +100 -0
- data/doc/rdoc/classes/Array.html +12 -12
- data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
- data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
- data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
- data/doc/rdoc/classes/Enumerable.html +6 -6
- data/doc/rdoc/classes/Main.html +265 -0
- data/doc/rdoc/classes/Object.html +12 -12
- data/doc/rdoc/classes/OgApplication.html +2 -2
- data/doc/rdoc/classes/OgScaffolder.html +444 -64
- data/doc/rdoc/classes/OgScaffolder/Editor.html +490 -0
- data/doc/rdoc/classes/OgSession.html +4 -4
- data/doc/rdoc/classes/Recipe.html +113 -0
- data/doc/rdoc/classes/String.html +12 -12
- data/doc/rdoc/classes/Struct.html +12 -12
- data/doc/rdoc/classes/Wee.html +10 -1
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
- data/doc/rdoc/classes/Wee/Application.html +48 -47
- data/doc/rdoc/classes/Wee/Brush.html +19 -23
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +17 -14
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +20 -14
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +25 -21
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +234 -100
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +28 -22
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +23 -24
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +33 -57
- data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +154 -0
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +20 -14
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +27 -21
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +20 -14
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +64 -36
- data/doc/rdoc/classes/Wee/CallbackStream.html +21 -21
- data/doc/rdoc/classes/Wee/Canvas.html +24 -24
- data/doc/rdoc/classes/Wee/Component.html +179 -151
- data/doc/rdoc/classes/Wee/Component/OnAnswer.html +12 -12
- data/doc/rdoc/classes/Wee/Decoration.html +42 -42
- data/doc/rdoc/classes/Wee/Delegate.html +27 -27
- data/doc/rdoc/classes/Wee/ErrorResponse.html +14 -14
- data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
- data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
- data/doc/rdoc/classes/Wee/HtmlCanvas.html +326 -219
- data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +19 -19
- data/doc/rdoc/classes/Wee/Md5IdGenerator.html +181 -0
- data/doc/rdoc/classes/Wee/MessageBox.html +12 -12
- data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
- data/doc/rdoc/classes/Wee/PagelessApplication.html +152 -0
- data/doc/rdoc/classes/Wee/PagelessRequest.html +177 -0
- data/doc/rdoc/classes/Wee/PagelessSession.html +320 -0
- data/doc/rdoc/classes/Wee/Presenter.html +145 -89
- data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
- data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
- data/doc/rdoc/classes/Wee/Request.html +116 -50
- data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
- data/doc/rdoc/classes/Wee/Response.html +76 -28
- data/doc/rdoc/classes/Wee/Session.html +129 -506
- data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +22 -40
- data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
- data/doc/rdoc/classes/Wee/Utils.html +70 -17
- data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
- data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +82 -49
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/INSTALL.html +17 -5
- data/doc/rdoc/files/README.html +9 -11
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -3
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
- data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/databases/og_rb.html +4 -1
- data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +115 -0
- data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +107 -0
- data/doc/rdoc/files/lib/wee/pageless/application_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/pageless/request_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/pageless/session_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/pageless_rb.html +110 -0
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +8 -1
- data/doc/rdoc/files/lib/wee/request_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/response_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/session_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +114 -0
- data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +115 -0
- data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +111 -0
- data/doc/rdoc/files/lib/wee/template_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
- data/doc/rdoc/files/lib/wee_rb.html +4 -2
- data/doc/rdoc/fr_class_index.html +8 -4
- data/doc/rdoc/fr_file_index.html +17 -1
- data/doc/rdoc/fr_method_index.html +312 -267
- data/examples/live-update.rb +1 -1
- data/install.rb +14 -0
- data/lib/wee.rb +6 -2
- data/lib/wee/adaptors/webrick.rb +17 -5
- data/lib/wee/application.rb +2 -1
- data/lib/wee/continuation/session.rb +1 -146
- data/lib/wee/core/callback.rb +11 -5
- data/lib/wee/core/component.rb +14 -10
- data/lib/wee/databases/og.rb +3 -113
- data/lib/wee/databases/og/application.rb +3 -0
- data/lib/wee/databases/og/old_scaffolder.rb +98 -0
- data/lib/wee/databases/og/scaffolder.rb +174 -0
- data/lib/wee/databases/og/session.rb +9 -0
- data/lib/wee/idgen/md5.rb +21 -0
- data/lib/wee/{idgen.rb → idgen/simple.rb} +2 -4
- data/lib/wee/pageless.rb +3 -0
- data/lib/wee/pageless/application.rb +9 -0
- data/lib/wee/pageless/request.rb +15 -0
- data/lib/wee/pageless/session.rb +89 -0
- data/lib/wee/renderer/html/brushes.rb +100 -115
- data/lib/wee/renderer/html/canvas.rb +32 -2
- data/lib/wee/request.rb +36 -24
- data/lib/wee/response.rb +8 -1
- data/lib/wee/session.rb +13 -7
- data/lib/wee/skeleton/og/README +38 -0
- data/lib/wee/skeleton/og/components/main.rb +16 -0
- data/lib/wee/skeleton/og/conf/db.rb +8 -0
- data/lib/wee/skeleton/og/models/recipe.rb +5 -0
- data/lib/wee/skeleton/og/run.rb +23 -0
- data/lib/wee/skeleton/simple/README +32 -0
- data/lib/wee/skeleton/simple/components/main.rb +25 -0
- data/lib/wee/skeleton/simple/run.rb +12 -0
- data/lib/wee/template.rb +28 -0
- data/lib/wee/utils/autoreload.rb +29 -0
- data/lib/wee/utils/helper.rb +9 -5
- data/test/test_request.rb +4 -3
- data/wee.gemspec +3 -1
- metadata +91 -22
@@ -86,13 +86,14 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
89
|
+
<a href="#M000087">do_GET</a>
|
90
|
+
<a href="#M000088">do_POST</a>
|
91
|
+
<a href="#M000086">handle_request</a>
|
92
|
+
<a href="#M000084">mount</a>
|
93
|
+
<a href="#M000085">new</a>
|
94
|
+
<a href="#M000083">register</a>
|
95
|
+
<a href="#M000082">request_class</a>
|
96
|
+
<a href="#M000081">start</a>
|
96
97
|
</div>
|
97
98
|
</div>
|
98
99
|
|
@@ -114,11 +115,11 @@
|
|
114
115
|
<div id="methods">
|
115
116
|
<h3 class="section-bar">Public Class methods</h3>
|
116
117
|
|
117
|
-
<div id="method-
|
118
|
-
<a name="
|
118
|
+
<div id="method-M000084" class="method-detail">
|
119
|
+
<a name="M000084"></a>
|
119
120
|
|
120
121
|
<div class="method-heading">
|
121
|
-
<a href="#
|
122
|
+
<a href="#M000084" class="method-signature">
|
122
123
|
<span class="method-name">mount</span><span class="method-args">(*args, &block)</span>
|
123
124
|
</a>
|
124
125
|
</div>
|
@@ -128,10 +129,10 @@
|
|
128
129
|
Convenience method
|
129
130
|
</p>
|
130
131
|
<p><a class="source-toggle" href="#"
|
131
|
-
onclick="toggleCode('
|
132
|
-
<div class="method-source-code" id="
|
132
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
133
|
+
<div class="method-source-code" id="M000084-source">
|
133
134
|
<pre>
|
134
|
-
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line
|
135
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line 63</span>
|
135
136
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">mount</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
136
137
|
<span class="ruby-ivar">@mounts</span> <span class="ruby-operator">||=</span> []
|
137
138
|
<span class="ruby-ivar">@mounts</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>]
|
@@ -142,36 +143,37 @@ Convenience method
|
|
142
143
|
</div>
|
143
144
|
</div>
|
144
145
|
|
145
|
-
<div id="method-
|
146
|
-
<a name="
|
146
|
+
<div id="method-M000085" class="method-detail">
|
147
|
+
<a name="M000085"></a>
|
147
148
|
|
148
149
|
<div class="method-heading">
|
149
|
-
<a href="#
|
150
|
-
<span class="method-name">new</span><span class="method-args">(server, mount_path, application)</span>
|
150
|
+
<a href="#M000085" class="method-signature">
|
151
|
+
<span class="method-name">new</span><span class="method-args">(server, mount_path, application, request_class=Wee::Request)</span>
|
151
152
|
</a>
|
152
153
|
</div>
|
153
154
|
|
154
155
|
<div class="method-description">
|
155
156
|
<p><a class="source-toggle" href="#"
|
156
|
-
onclick="toggleCode('
|
157
|
-
<div class="method-source-code" id="
|
157
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
158
|
+
<div class="method-source-code" id="M000085-source">
|
158
159
|
<pre>
|
159
|
-
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line
|
160
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">server</span>, <span class="ruby-identifier">mount_path</span>, <span class="ruby-identifier">application</span>)
|
160
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line 69</span>
|
161
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">server</span>, <span class="ruby-identifier">mount_path</span>, <span class="ruby-identifier">application</span>, <span class="ruby-identifier">request_class</span>=<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>)
|
161
162
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">server</span>)
|
162
163
|
<span class="ruby-ivar">@mount_path</span> = <span class="ruby-identifier">mount_path</span>
|
163
164
|
<span class="ruby-ivar">@application</span> = <span class="ruby-identifier">application</span>
|
165
|
+
<span class="ruby-ivar">@request_class</span> = <span class="ruby-identifier">request_class</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>
|
164
166
|
<span class="ruby-keyword kw">end</span>
|
165
167
|
</pre>
|
166
168
|
</div>
|
167
169
|
</div>
|
168
170
|
</div>
|
169
171
|
|
170
|
-
<div id="method-
|
171
|
-
<a name="
|
172
|
+
<div id="method-M000083" class="method-detail">
|
173
|
+
<a name="M000083"></a>
|
172
174
|
|
173
175
|
<div class="method-heading">
|
174
|
-
<a href="#
|
176
|
+
<a href="#M000083" class="method-signature">
|
175
177
|
<span class="method-name">register</span><span class="method-args">(hash)</span>
|
176
178
|
</a>
|
177
179
|
</div>
|
@@ -181,14 +183,14 @@ Convenience method
|
|
181
183
|
Convenience method
|
182
184
|
</p>
|
183
185
|
<p><a class="source-toggle" href="#"
|
184
|
-
onclick="toggleCode('
|
185
|
-
<div class="method-source-code" id="
|
186
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
187
|
+
<div class="method-source-code" id="M000083-source">
|
186
188
|
<pre>
|
187
|
-
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line
|
189
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line 54</span>
|
188
190
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">hash</span>)
|
189
191
|
<span class="ruby-ivar">@apps</span> <span class="ruby-operator">||=</span> []
|
190
192
|
<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span>, <span class="ruby-identifier">application</span><span class="ruby-operator">|</span>
|
191
|
-
<span class="ruby-ivar">@apps</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">path</span>, <span class="ruby-identifier">application</span>]
|
193
|
+
<span class="ruby-ivar">@apps</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">path</span>, <span class="ruby-identifier">application</span>, <span class="ruby-ivar">@request_class</span>]
|
192
194
|
<span class="ruby-keyword kw">end</span>
|
193
195
|
<span class="ruby-keyword kw">self</span>
|
194
196
|
<span class="ruby-keyword kw">end</span>
|
@@ -197,11 +199,39 @@ Convenience method
|
|
197
199
|
</div>
|
198
200
|
</div>
|
199
201
|
|
200
|
-
<div id="method-
|
201
|
-
<a name="
|
202
|
+
<div id="method-M000082" class="method-detail">
|
203
|
+
<a name="M000082"></a>
|
202
204
|
|
203
205
|
<div class="method-heading">
|
204
|
-
<a href="#
|
206
|
+
<a href="#M000082" class="method-signature">
|
207
|
+
<span class="method-name">request_class</span><span class="method-args">(request_class)</span>
|
208
|
+
</a>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div class="method-description">
|
212
|
+
<p>
|
213
|
+
Sets the used <a href="WEBrickAdaptor.html#M000082">request_class</a> for
|
214
|
+
all following calls to <a href="WEBrickAdaptor.html#M000083">register</a>
|
215
|
+
</p>
|
216
|
+
<p><a class="source-toggle" href="#"
|
217
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
218
|
+
<div class="method-source-code" id="M000082-source">
|
219
|
+
<pre>
|
220
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line 48</span>
|
221
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">request_class</span>(<span class="ruby-identifier">request_class</span>)
|
222
|
+
<span class="ruby-ivar">@request_class</span> = <span class="ruby-identifier">request_class</span>
|
223
|
+
<span class="ruby-keyword kw">self</span>
|
224
|
+
<span class="ruby-keyword kw">end</span>
|
225
|
+
</pre>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
|
230
|
+
<div id="method-M000081" class="method-detail">
|
231
|
+
<a name="M000081"></a>
|
232
|
+
|
233
|
+
<div class="method-heading">
|
234
|
+
<a href="#M000081" class="method-signature">
|
205
235
|
<span class="method-name">start</span><span class="method-args">(options={}) {|server if block_given?| ...}</span>
|
206
236
|
</a>
|
207
237
|
</div>
|
@@ -211,16 +241,16 @@ Convenience method
|
|
211
241
|
Convenience method
|
212
242
|
</p>
|
213
243
|
<p><a class="source-toggle" href="#"
|
214
|
-
onclick="toggleCode('
|
215
|
-
<div class="method-source-code" id="
|
244
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
245
|
+
<div class="method-source-code" id="M000081-source">
|
216
246
|
<pre>
|
217
|
-
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line
|
247
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line 28</span>
|
218
248
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">options</span>={})
|
219
249
|
<span class="ruby-identifier">server</span> = <span class="ruby-constant">WEBrick</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPServer</span>.<span class="ruby-identifier">new</span>({<span class="ruby-identifier">:Port</span> =<span class="ruby-operator">></span> <span class="ruby-value">2000</span>}.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span>))
|
220
250
|
<span class="ruby-identifier">trap</span>(<span class="ruby-value str">"INT"</span>) { <span class="ruby-identifier">server</span>.<span class="ruby-identifier">shutdown</span> }
|
221
251
|
|
222
|
-
(<span class="ruby-ivar">@apps</span><span class="ruby-operator">||</span>[]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span>, <span class="ruby-identifier">app</span><span class="ruby-operator">|</span>
|
223
|
-
<span class="ruby-identifier">server</span>.<span class="ruby-identifier">mount</span>(<span class="ruby-identifier">path</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">app</span>)
|
252
|
+
(<span class="ruby-ivar">@apps</span><span class="ruby-operator">||</span>[]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span>, <span class="ruby-identifier">app</span>, <span class="ruby-identifier">request_class</span><span class="ruby-operator">|</span>
|
253
|
+
<span class="ruby-identifier">server</span>.<span class="ruby-identifier">mount</span>(<span class="ruby-identifier">path</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">app</span>, <span class="ruby-identifier">request_class</span>)
|
224
254
|
<span class="ruby-keyword kw">end</span>
|
225
255
|
|
226
256
|
(<span class="ruby-ivar">@mounts</span><span class="ruby-operator">||</span>[]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span><span class="ruby-operator">|</span>
|
@@ -239,8 +269,8 @@ Convenience method
|
|
239
269
|
|
240
270
|
<h3 class="section-bar">Public Instance methods</h3>
|
241
271
|
|
242
|
-
<div id="method-
|
243
|
-
<a name="
|
272
|
+
<div id="method-M000087" class="method-detail">
|
273
|
+
<a name="M000087"></a>
|
244
274
|
|
245
275
|
<div class="method-heading">
|
246
276
|
<span class="method-name">do_GET</span><span class="method-args">(req, res)</span>
|
@@ -248,13 +278,13 @@ Convenience method
|
|
248
278
|
|
249
279
|
<div class="method-description">
|
250
280
|
<p>
|
251
|
-
Alias for <a href="WEBrickAdaptor.html#
|
281
|
+
Alias for <a href="WEBrickAdaptor.html#M000086">handle_request</a>
|
252
282
|
</p>
|
253
283
|
</div>
|
254
284
|
</div>
|
255
285
|
|
256
|
-
<div id="method-
|
257
|
-
<a name="
|
286
|
+
<div id="method-M000088" class="method-detail">
|
287
|
+
<a name="M000088"></a>
|
258
288
|
|
259
289
|
<div class="method-heading">
|
260
290
|
<span class="method-name">do_POST</span><span class="method-args">(req, res)</span>
|
@@ -262,32 +292,35 @@ Alias for <a href="WEBrickAdaptor.html#M000051">handle_request</a>
|
|
262
292
|
|
263
293
|
<div class="method-description">
|
264
294
|
<p>
|
265
|
-
Alias for <a href="WEBrickAdaptor.html#
|
295
|
+
Alias for <a href="WEBrickAdaptor.html#M000086">handle_request</a>
|
266
296
|
</p>
|
267
297
|
</div>
|
268
298
|
</div>
|
269
299
|
|
270
|
-
<div id="method-
|
271
|
-
<a name="
|
300
|
+
<div id="method-M000086" class="method-detail">
|
301
|
+
<a name="M000086"></a>
|
272
302
|
|
273
303
|
<div class="method-heading">
|
274
|
-
<a href="#
|
304
|
+
<a href="#M000086" class="method-signature">
|
275
305
|
<span class="method-name">handle_request</span><span class="method-args">(req, res)</span>
|
276
306
|
</a>
|
277
307
|
</div>
|
278
308
|
|
279
309
|
<div class="method-description">
|
280
310
|
<p><a class="source-toggle" href="#"
|
281
|
-
onclick="toggleCode('
|
282
|
-
<div class="method-source-code" id="
|
311
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
312
|
+
<div class="method-source-code" id="M000086-source">
|
283
313
|
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line
|
314
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/webrick.rb, line 76</span>
|
285
315
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">req</span>, <span class="ruby-identifier">res</span>)
|
286
|
-
<span class="ruby-identifier">context</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-
|
316
|
+
<span class="ruby-identifier">context</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@request_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@mount_path</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">path</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">header</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">query</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">cookies</span>))
|
287
317
|
<span class="ruby-ivar">@application</span>.<span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
|
288
318
|
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">status</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span>
|
289
319
|
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">content</span>
|
290
320
|
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">header</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span> }
|
321
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">cookies?</span>
|
322
|
+
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span> }
|
323
|
+
<span class="ruby-keyword kw">end</span>
|
291
324
|
<span class="ruby-keyword kw">end</span>
|
292
325
|
</pre>
|
293
326
|
</div>
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
91
|
+
<a href="#M000095">do_render</a>
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
|
@@ -110,19 +110,19 @@
|
|
110
110
|
<div id="methods">
|
111
111
|
<h3 class="section-bar">Public Instance methods</h3>
|
112
112
|
|
113
|
-
<div id="method-
|
114
|
-
<a name="
|
113
|
+
<div id="method-M000095" class="method-detail">
|
114
|
+
<a name="M000095"></a>
|
115
115
|
|
116
116
|
<div class="method-heading">
|
117
|
-
<a href="#
|
117
|
+
<a href="#M000095" class="method-signature">
|
118
118
|
<span class="method-name">do_render</span><span class="method-args">(rendering_context)</span>
|
119
119
|
</a>
|
120
120
|
</div>
|
121
121
|
|
122
122
|
<div class="method-description">
|
123
123
|
<p><a class="source-toggle" href="#"
|
124
|
-
onclick="toggleCode('
|
125
|
-
<div class="method-source-code" id="
|
124
|
+
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
125
|
+
<div class="method-source-code" id="M000095-source">
|
126
126
|
<pre>
|
127
127
|
<span class="ruby-comment cmt"># File lib/wee/components/wrapper_decoration.rb, line 2</span>
|
128
128
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_render</span>(<span class="ruby-identifier">rendering_context</span>)
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Mon Jan 31 15:06:48 CET 2005
|
data/doc/rdoc/files/INSTALL.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Fri Jan 28 02:08:31 CET 2005</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -69,18 +69,30 @@
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
71
|
<div id="description">
|
72
|
-
<h1>Installation</h1>
|
72
|
+
<h1>Installation without Rubygems</h1>
|
73
|
+
<p>
|
74
|
+
Simply run:
|
75
|
+
</p>
|
76
|
+
<pre>
|
77
|
+
ruby install.rb
|
78
|
+
</pre>
|
79
|
+
<h1>Installation with Rubygems</h1>
|
73
80
|
<ol>
|
74
81
|
<li>Download and Install RubyGems: <a
|
75
82
|
href="http://rubygems.rubyforge.org">rubygems.rubyforge.org</a>
|
76
83
|
|
77
84
|
</li>
|
78
|
-
<li>Install <a href="../classes/Wee.html">Wee</a>:
|
85
|
+
<li>Install <a href="../classes/Wee.html">Wee</a>:
|
79
86
|
|
87
|
+
<pre>
|
88
|
+
gem install wee
|
89
|
+
</pre>
|
80
90
|
</li>
|
81
|
-
<li>Set environment variable (required to load RubyGems):
|
82
|
-
RUBYOPT=-rubygems</tt>
|
91
|
+
<li>Set environment variable (required to load RubyGems):
|
83
92
|
|
93
|
+
<pre>
|
94
|
+
export RUBYOPT=-rubygems
|
95
|
+
</pre>
|
84
96
|
</li>
|
85
97
|
</ol>
|
86
98
|
|
data/doc/rdoc/files/README.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Wed Jan 26
|
59
|
+
<td>Wed Jan 26 22:25:46 CET 2005</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -90,14 +90,12 @@ Known Bugs:
|
|
90
90
|
</p>
|
91
91
|
<ul>
|
92
92
|
<li>Using continuations might leak memory, at least they did in the past. The
|
93
|
-
|
94
|
-
</li>
|
95
|
-
</ul>
|
96
|
-
<p>
|
97
93
|
latest memory stress-test has not showed up any memory problems, but since
|
98
94
|
I haven’t changed anything at the continuation implementation, I
|
99
95
|
can’t say for sure whether the problem has been fixed or not.
|
100
|
-
|
96
|
+
|
97
|
+
</li>
|
98
|
+
</ul>
|
101
99
|
<h2>Introduction</h2>
|
102
100
|
<p>
|
103
101
|
<a href="../classes/Wee.html">Wee</a> is a light-weight, very high-level
|
@@ -268,7 +266,7 @@ Decorations are used to modify the look and behaviour of a component,
|
|
268
266
|
without modifying the components tree. A component can have more than one
|
269
267
|
decoration. This is implemented as a linked list of decorations
|
270
268
|
(Wee::Decoration#owner points to the next decoration). <a
|
271
|
-
href="../classes/Wee/Component.html#
|
269
|
+
href="../classes/Wee/Component.html#M000256">Wee::Component#decoration</a>
|
272
270
|
points to the first decoration in the chain or to the component itself, if
|
273
271
|
no decorations were specified. We actually use a <a
|
274
272
|
href="../classes/Wee/ValueHolder.html">Wee::ValueHolder</a> for the
|
@@ -361,11 +359,11 @@ There are two methods related to callback processing:
|
|
361
359
|
</p>
|
362
360
|
<ul>
|
363
361
|
<li><a
|
364
|
-
href="../classes/Wee/Component.html#
|
362
|
+
href="../classes/Wee/Component.html#M000251">Wee::Component#process_callbacks_chain</a>
|
365
363
|
|
366
364
|
</li>
|
367
365
|
<li><a
|
368
|
-
href="../classes/Wee/Presenter.html#
|
366
|
+
href="../classes/Wee/Presenter.html#M000289">Wee::Presenter#process_callbacks</a>
|
369
367
|
|
370
368
|
</li>
|
371
369
|
</ul>
|
@@ -402,11 +400,11 @@ a page:
|
|
402
400
|
</p>
|
403
401
|
<ul>
|
404
402
|
<li><a
|
405
|
-
href="../classes/Wee/Component.html#
|
403
|
+
href="../classes/Wee/Component.html#M000249">Wee::Component#do_render_chain</a>
|
406
404
|
|
407
405
|
</li>
|
408
406
|
<li><a
|
409
|
-
href="../classes/Wee/Presenter.html#
|
407
|
+
href="../classes/Wee/Presenter.html#M000284">Wee::Presenter#do_render</a>
|
410
408
|
|
411
409
|
</li>
|
412
410
|
</ul>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Fri Jan 28 02:30:08 CET 2005</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -73,8 +73,6 @@
|
|
73
73
|
<h3 class="section-bar">Required files</h3>
|
74
74
|
|
75
75
|
<div class="name-list">
|
76
|
-
wee/page
|
77
|
-
thread
|
78
76
|
timeout
|
79
77
|
</div>
|
80
78
|
</div>
|