wee 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/ChangeLog +132 -0
  2. data/INSTALL +13 -3
  3. data/README +3 -3
  4. data/Rakefile +5 -1
  5. data/bin/wee +100 -0
  6. data/doc/rdoc/classes/Array.html +12 -12
  7. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  8. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  9. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  11. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  12. data/doc/rdoc/classes/Enumerable.html +6 -6
  13. data/doc/rdoc/classes/Main.html +265 -0
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgApplication.html +2 -2
  16. data/doc/rdoc/classes/OgScaffolder.html +444 -64
  17. data/doc/rdoc/classes/OgScaffolder/Editor.html +490 -0
  18. data/doc/rdoc/classes/OgSession.html +4 -4
  19. data/doc/rdoc/classes/Recipe.html +113 -0
  20. data/doc/rdoc/classes/String.html +12 -12
  21. data/doc/rdoc/classes/Struct.html +12 -12
  22. data/doc/rdoc/classes/Wee.html +10 -1
  23. data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
  24. data/doc/rdoc/classes/Wee/Application.html +48 -47
  25. data/doc/rdoc/classes/Wee/Brush.html +19 -23
  26. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +17 -14
  27. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +20 -14
  28. data/doc/rdoc/classes/Wee/Brush/FormTag.html +25 -21
  29. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  30. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  31. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +234 -100
  32. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +28 -22
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +23 -24
  35. data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
  36. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
  37. data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
  38. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +33 -57
  39. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +154 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  41. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +20 -14
  42. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  43. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  45. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +27 -21
  47. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +20 -14
  48. data/doc/rdoc/classes/Wee/CallbackRegistry.html +64 -36
  49. data/doc/rdoc/classes/Wee/CallbackStream.html +21 -21
  50. data/doc/rdoc/classes/Wee/Canvas.html +24 -24
  51. data/doc/rdoc/classes/Wee/Component.html +179 -151
  52. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +12 -12
  53. data/doc/rdoc/classes/Wee/Decoration.html +42 -42
  54. data/doc/rdoc/classes/Wee/Delegate.html +27 -27
  55. data/doc/rdoc/classes/Wee/ErrorResponse.html +14 -14
  56. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  57. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  58. data/doc/rdoc/classes/Wee/HtmlCanvas.html +326 -219
  59. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  60. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +19 -19
  61. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +181 -0
  62. data/doc/rdoc/classes/Wee/MessageBox.html +12 -12
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  64. data/doc/rdoc/classes/Wee/PagelessApplication.html +152 -0
  65. data/doc/rdoc/classes/Wee/PagelessRequest.html +177 -0
  66. data/doc/rdoc/classes/Wee/PagelessSession.html +320 -0
  67. data/doc/rdoc/classes/Wee/Presenter.html +145 -89
  68. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  69. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/Request.html +116 -50
  71. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  72. data/doc/rdoc/classes/Wee/Response.html +76 -28
  73. data/doc/rdoc/classes/Wee/Session.html +129 -506
  74. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +22 -40
  75. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  76. data/doc/rdoc/classes/Wee/Utils.html +70 -17
  77. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  78. data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
  79. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +82 -49
  80. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  81. data/doc/rdoc/created.rid +1 -1
  82. data/doc/rdoc/files/INSTALL.html +17 -5
  83. data/doc/rdoc/files/README.html +9 -11
  84. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  85. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  86. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  87. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -3
  88. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  89. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  90. data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
  91. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +101 -0
  92. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +101 -0
  93. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +108 -0
  94. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +101 -0
  95. data/doc/rdoc/files/lib/wee/databases/og_rb.html +4 -1
  96. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +115 -0
  97. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +107 -0
  98. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +101 -0
  99. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +101 -0
  100. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +108 -0
  101. data/doc/rdoc/files/lib/wee/pageless_rb.html +110 -0
  102. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  103. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +8 -1
  104. data/doc/rdoc/files/lib/wee/request_rb.html +1 -1
  105. data/doc/rdoc/files/lib/wee/response_rb.html +1 -1
  106. data/doc/rdoc/files/lib/wee/session_rb.html +1 -1
  107. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +101 -0
  108. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +114 -0
  109. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +101 -0
  110. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +115 -0
  111. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +101 -0
  112. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +111 -0
  113. data/doc/rdoc/files/lib/wee/template_rb.html +101 -0
  114. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  115. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  116. data/doc/rdoc/files/lib/wee_rb.html +4 -2
  117. data/doc/rdoc/fr_class_index.html +8 -4
  118. data/doc/rdoc/fr_file_index.html +17 -1
  119. data/doc/rdoc/fr_method_index.html +312 -267
  120. data/examples/live-update.rb +1 -1
  121. data/install.rb +14 -0
  122. data/lib/wee.rb +6 -2
  123. data/lib/wee/adaptors/webrick.rb +17 -5
  124. data/lib/wee/application.rb +2 -1
  125. data/lib/wee/continuation/session.rb +1 -146
  126. data/lib/wee/core/callback.rb +11 -5
  127. data/lib/wee/core/component.rb +14 -10
  128. data/lib/wee/databases/og.rb +3 -113
  129. data/lib/wee/databases/og/application.rb +3 -0
  130. data/lib/wee/databases/og/old_scaffolder.rb +98 -0
  131. data/lib/wee/databases/og/scaffolder.rb +174 -0
  132. data/lib/wee/databases/og/session.rb +9 -0
  133. data/lib/wee/idgen/md5.rb +21 -0
  134. data/lib/wee/{idgen.rb → idgen/simple.rb} +2 -4
  135. data/lib/wee/pageless.rb +3 -0
  136. data/lib/wee/pageless/application.rb +9 -0
  137. data/lib/wee/pageless/request.rb +15 -0
  138. data/lib/wee/pageless/session.rb +89 -0
  139. data/lib/wee/renderer/html/brushes.rb +100 -115
  140. data/lib/wee/renderer/html/canvas.rb +32 -2
  141. data/lib/wee/request.rb +36 -24
  142. data/lib/wee/response.rb +8 -1
  143. data/lib/wee/session.rb +13 -7
  144. data/lib/wee/skeleton/og/README +38 -0
  145. data/lib/wee/skeleton/og/components/main.rb +16 -0
  146. data/lib/wee/skeleton/og/conf/db.rb +8 -0
  147. data/lib/wee/skeleton/og/models/recipe.rb +5 -0
  148. data/lib/wee/skeleton/og/run.rb +23 -0
  149. data/lib/wee/skeleton/simple/README +32 -0
  150. data/lib/wee/skeleton/simple/components/main.rb +25 -0
  151. data/lib/wee/skeleton/simple/run.rb +12 -0
  152. data/lib/wee/template.rb +28 -0
  153. data/lib/wee/utils/autoreload.rb +29 -0
  154. data/lib/wee/utils/helper.rb +9 -5
  155. data/test/test_request.rb +4 -3
  156. data/wee.gemspec +3 -1
  157. 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="#M000052">do_GET</a>&nbsp;&nbsp;
90
- <a href="#M000053">do_POST</a>&nbsp;&nbsp;
91
- <a href="#M000051">handle_request</a>&nbsp;&nbsp;
92
- <a href="#M000049">mount</a>&nbsp;&nbsp;
93
- <a href="#M000050">new</a>&nbsp;&nbsp;
94
- <a href="#M000048">register</a>&nbsp;&nbsp;
95
- <a href="#M000047">start</a>&nbsp;&nbsp;
89
+ <a href="#M000087">do_GET</a>&nbsp;&nbsp;
90
+ <a href="#M000088">do_POST</a>&nbsp;&nbsp;
91
+ <a href="#M000086">handle_request</a>&nbsp;&nbsp;
92
+ <a href="#M000084">mount</a>&nbsp;&nbsp;
93
+ <a href="#M000085">new</a>&nbsp;&nbsp;
94
+ <a href="#M000083">register</a>&nbsp;&nbsp;
95
+ <a href="#M000082">request_class</a>&nbsp;&nbsp;
96
+ <a href="#M000081">start</a>&nbsp;&nbsp;
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-M000049" class="method-detail">
118
- <a name="M000049"></a>
118
+ <div id="method-M000084" class="method-detail">
119
+ <a name="M000084"></a>
119
120
 
120
121
  <div class="method-heading">
121
- <a href="#M000049" class="method-signature">
122
+ <a href="#M000084" class="method-signature">
122
123
  <span class="method-name">mount</span><span class="method-args">(*args, &amp;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('M000049-source');return false;">[Source]</a></p>
132
- <div class="method-source-code" id="M000049-source">
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 55</span>
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">&amp;</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">&lt;&lt;</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-M000050" class="method-detail">
146
- <a name="M000050"></a>
146
+ <div id="method-M000085" class="method-detail">
147
+ <a name="M000085"></a>
147
148
 
148
149
  <div class="method-heading">
149
- <a href="#M000050" class="method-signature">
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('M000050-source');return false;">[Source]</a></p>
157
- <div class="method-source-code" id="M000050-source">
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 61</span>
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-M000048" class="method-detail">
171
- <a name="M000048"></a>
172
+ <div id="method-M000083" class="method-detail">
173
+ <a name="M000083"></a>
172
174
 
173
175
  <div class="method-heading">
174
- <a href="#M000048" class="method-signature">
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('M000048-source');return false;">[Source]</a></p>
185
- <div class="method-source-code" id="M000048-source">
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 46</span>
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">&lt;&lt;</span> [<span class="ruby-identifier">path</span>, <span class="ruby-identifier">application</span>]
193
+ <span class="ruby-ivar">@apps</span> <span class="ruby-operator">&lt;&lt;</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-M000047" class="method-detail">
201
- <a name="M000047"></a>
202
+ <div id="method-M000082" class="method-detail">
203
+ <a name="M000082"></a>
202
204
 
203
205
  <div class="method-heading">
204
- <a href="#M000047" class="method-signature">
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('M000047-source');return false;">[Source]</a></p>
215
- <div class="method-source-code" id="M000047-source">
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 27</span>
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">&gt;</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">&quot;INT&quot;</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-M000052" class="method-detail">
243
- <a name="M000052"></a>
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#M000051">handle_request</a>
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-M000053" class="method-detail">
257
- <a name="M000053"></a>
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#M000051">handle_request</a>
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-M000051" class="method-detail">
271
- <a name="M000051"></a>
300
+ <div id="method-M000086" class="method-detail">
301
+ <a name="M000086"></a>
272
302
 
273
303
  <div class="method-heading">
274
- <a href="#M000051" class="method-signature">
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('M000051-source');return false;">[Source]</a></p>
282
- <div class="method-source-code" id="M000051-source">
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 67</span>
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-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</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>))
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">&lt;&lt;</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="#M000056">do_render</a>&nbsp;&nbsp;
91
+ <a href="#M000095">do_render</a>&nbsp;&nbsp;
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-M000056" class="method-detail">
114
- <a name="M000056"></a>
113
+ <div id="method-M000095" class="method-detail">
114
+ <a name="M000095"></a>
115
115
 
116
116
  <div class="method-heading">
117
- <a href="#M000056" class="method-signature">
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('M000056-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000056-source">
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
- Wed Jan 26 22:18:42 CET 2005
1
+ Mon Jan 31 15:06:48 CET 2005
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sun Jan 02 21:04:57 CET 2005</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>: <tt>gem install wee</tt>
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): <tt>export
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
 
@@ -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 20:20:05 CET 2005</td>
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&#8217;t changed anything at the continuation implementation, I
99
95
  can&#8217;t say for sure whether the problem has been fixed or not.
100
- </p>
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#M000215">Wee::Component#decoration</a>
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#M000210">Wee::Component#process_callbacks_chain</a>
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#M000234">Wee::Presenter#process_callbacks</a>
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#M000208">Wee::Component#do_render_chain</a>
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#M000229">Wee::Presenter#do_render</a>
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>Tue Jan 25 20:46:48 CET 2005</td>
59
+ <td>Thu Jan 27 02:00:30 CET 2005</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jan 25 14:47:11 CET 2005</td>
59
+ <td>Fri Jan 28 00:15:09 CET 2005</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sun Jan 23 17:30:43 CET 2005</td>
59
+ <td>Sun Jan 30 01:31:56 CET 2005</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -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 14:06:43 CET 2005</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&nbsp;&nbsp;
77
- thread&nbsp;&nbsp;
78
76
  timeout&nbsp;&nbsp;
79
77
  </div>
80
78
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jan 25 17:59:08 CET 2005</td>
59
+ <td>Sat Jan 29 16:17:55 CET 2005</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>