wee 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,17 @@
1
+ --------------------------------------------------------------------
2
+ TAGGED 0.9.1
3
+ --------------------------------------------------------------------
4
+
5
+ Sun Jul 17 21:21:00 CEST 2005 Michael Neumann <mneumann@ntecs.de>
6
+
7
+ * examples/nitro/run.rb: Mount example under '/'.
8
+
9
+ * lib/wee/adaptors/nitro.rb: Use Render#controller_name. Fix bugs that
10
+ occured when mounted as '/'.
11
+
12
+ * lib/wee/databases/og/session.rb: Fixed bug. Now works with newest Og
13
+ version!
14
+
1
15
  --------------------------------------------------------------------
2
16
  TAGGED 0.9.0
3
17
  --------------------------------------------------------------------
@@ -39,4 +39,4 @@ class AppController < Nitro::Controller
39
39
  end
40
40
  end
41
41
 
42
- Nitro.run(:host => '127.0.0.1', :port => 9999, :dispatcher => Nitro::Dispatcher.new('/app' => AppController))
42
+ Nitro.run(:host => '127.0.0.1', :port => 9999, :dispatcher => Nitro::Dispatcher.new('/' => AppController))
data/lib/wee.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Wee
2
- Version = "0.9.0"
2
+ Version = "0.9.1"
3
3
  LibPath = File.dirname(__FILE__)
4
4
  end
5
5
 
@@ -34,7 +34,6 @@ module Wee::Nitro
34
34
  class FormTag < Wee::Brush::FormTag
35
35
  def with(*args, &block)
36
36
  rctx = @canvas.rendering_context
37
- controller = rctx.request.path.split('/').first
38
37
 
39
38
  super(*args) do
40
39
  block.call if block
@@ -51,8 +50,11 @@ module Wee::Nitro
51
50
 
52
51
  def build_url(hash={})
53
52
  cid = hash[:callback_id]
54
- controller = rendering_context.request.path.split('/').first
55
- url = "/#{ controller }/callback"
53
+ controller = rendering_context.context.controller_name
54
+
55
+ url = ""
56
+ url << "/#{ controller }" if controller
57
+ url << "/callback"
56
58
  url << "?__c=#{ rendering_context.component_name }"
57
59
  url << "&__a=#{ rendering_context.redirect_action }" if rendering_context.redirect_action
58
60
  url << "&#{ cid }" if cid
@@ -92,9 +94,9 @@ module Wee::Nitro
92
94
  callback_stream = Wee::CallbackStream.new(c.callbacks, request.params)
93
95
  c.process_callbacks(callback_stream)
94
96
 
95
- controller = request.path.split('/').first
97
+ controller = context.controller_name
96
98
  action = request.params['__a'] || 'index'
97
- redirect [controller, action].join("/")
99
+ redirect [controller, action].compact.join("/")
98
100
  end
99
101
 
100
102
  protected
@@ -121,8 +123,7 @@ module Wee::Nitro
121
123
 
122
124
  def _show_component(name, hash={}, out='')
123
125
  cb = Wee::CallbackRegistry.new(Wee::SimpleIdGenerator.new)
124
- ctx = Wee::Context.new(request(), response(), session())
125
- rctx = Wee::RenderingContext.new(ctx, cb, Wee::HtmlWriter.new(out))
126
+ rctx = Wee::RenderingContext.new(context(), cb, Wee::HtmlWriter.new(out))
126
127
  rctx.component_name = name
127
128
  rctx.controller = self
128
129
  rctx.redirect_action = hash[:redirect_action]
@@ -1,9 +1,9 @@
1
1
  class OgSession < Wee::Session
2
2
  def awake
3
- application.db.get_connection
3
+ application.db.get_store
4
4
  end
5
5
 
6
6
  def sleep
7
- application.db.put_connection
7
+ application.db.put_store
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: wee
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.0
7
- date: 2005-07-12
6
+ version: 0.9.1
7
+ date: 2005-07-18 00:00:00 +02:00
8
8
  summary: Wee is a framework for building highly dynamic web applications.
9
9
  require_paths:
10
10
  - lib
@@ -24,6 +24,8 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
24
24
  version: 0.0.0
25
25
  version:
26
26
  platform: ruby
27
+ signing_key:
28
+ cert_chain:
27
29
  authors:
28
30
  - Michael Neumann
29
31
  files:
@@ -33,7 +35,6 @@ files:
33
35
  - bin
34
36
  - benchmark
35
37
  - examples
36
- - Features
37
38
  - Rakefile
38
39
  - wee.gemspec
39
40
  - TODO
@@ -87,6 +88,7 @@ files:
87
88
  - doc/rdoc/files/lib/wee/idgen
88
89
  - doc/rdoc/files/lib/wee/databases
89
90
  - doc/rdoc/files/lib/wee/utils
91
+ - doc/rdoc/files/lib/wee/examples
90
92
  - doc/rdoc/files/lib/wee/snapshot_ext_rb.html
91
93
  - doc/rdoc/files/lib/wee/callback_rb.html
92
94
  - doc/rdoc/files/lib/wee/snapshot_rb.html
@@ -94,7 +96,6 @@ files:
94
96
  - doc/rdoc/files/lib/wee/component_rb.html
95
97
  - doc/rdoc/files/lib/wee/template_rb.html
96
98
  - doc/rdoc/files/lib/wee/page_rb.html
97
- - doc/rdoc/files/lib/wee/examples
98
99
  - doc/rdoc/files/lib/wee/component_ext_rb.html
99
100
  - doc/rdoc/files/lib/wee/components_rb.html
100
101
  - doc/rdoc/files/lib/wee/core_rb.html
@@ -104,6 +105,8 @@ files:
104
105
  - doc/rdoc/files/lib/wee/pageless_rb.html
105
106
  - doc/rdoc/files/lib/wee/application_rb.html
106
107
  - doc/rdoc/files/lib/wee/presenter_rb.html
108
+ - doc/rdoc/files/lib/wee/abstractsession_rb.html
109
+ - doc/rdoc/files/lib/wee/core_ext_rb.html
107
110
  - doc/rdoc/files/lib/wee/state_registry_rb.html
108
111
  - doc/rdoc/files/lib/wee/continuation_rb.html
109
112
  - doc/rdoc/files/lib/wee/holder_rb.html
@@ -115,26 +118,24 @@ files:
115
118
  - doc/rdoc/files/lib/wee/decoration_rb.html
116
119
  - doc/rdoc/files/lib/wee/stuff_rb.html
117
120
  - doc/rdoc/files/lib/wee/request_rb.html
118
- - doc/rdoc/files/lib/wee/core_ext_rb.html
119
- - doc/rdoc/files/lib/wee/abstractsession_rb.html
120
- - doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html
121
+ - doc/rdoc/files/lib/wee/components/login_decoration_rb.html
121
122
  - doc/rdoc/files/lib/wee/components/form_decoration_rb.html
122
123
  - doc/rdoc/files/lib/wee/components/messagebox_rb.html
124
+ - doc/rdoc/files/lib/wee/components/pager_rb.html
125
+ - doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html
123
126
  - doc/rdoc/files/lib/wee/components/page_decoration_rb.html
124
127
  - doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html
125
- - doc/rdoc/files/lib/wee/components/login_decoration_rb.html
126
- - doc/rdoc/files/lib/wee/components/pager_rb.html
127
128
  - doc/rdoc/files/lib/wee/core/componentrunner_rb.html
128
129
  - doc/rdoc/files/lib/wee/core/valueholder_rb.html
129
130
  - doc/rdoc/files/lib/wee/core/callback_rb.html
130
131
  - doc/rdoc/files/lib/wee/core/snapshot_rb.html
132
+ - doc/rdoc/files/lib/wee/core/page_rb.html
131
133
  - doc/rdoc/files/lib/wee/core/component_rb.html
132
- - doc/rdoc/files/lib/wee/core/decoration_rb.html
133
- - doc/rdoc/files/lib/wee/core/presenter_rb.html
134
134
  - doc/rdoc/files/lib/wee/core/context_rb.html
135
135
  - doc/rdoc/files/lib/wee/core/idgen_rb.html
136
136
  - doc/rdoc/files/lib/wee/core/renderer_rb.html
137
- - doc/rdoc/files/lib/wee/core/page_rb.html
137
+ - doc/rdoc/files/lib/wee/core/decoration_rb.html
138
+ - doc/rdoc/files/lib/wee/core/presenter_rb.html
138
139
  - doc/rdoc/files/lib/wee/pageless/application_rb.html
139
140
  - doc/rdoc/files/lib/wee/pageless/session_rb.html
140
141
  - doc/rdoc/files/lib/wee/pageless/request_rb.html
@@ -149,10 +150,10 @@ files:
149
150
  - doc/rdoc/files/lib/wee/rendering/html/brushes_rb.html
150
151
  - doc/rdoc/files/lib/wee/rendering/html/canvas_rb.html
151
152
  - doc/rdoc/files/lib/wee/rendering/html/writer_rb.html
152
- - doc/rdoc/files/lib/wee/adaptors/webrick_rb.html
153
- - doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html
154
153
  - doc/rdoc/files/lib/wee/adaptors/rails_rb.html
155
154
  - doc/rdoc/files/lib/wee/adaptors/nitro_rb.html
155
+ - doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html
156
+ - doc/rdoc/files/lib/wee/adaptors/webrick_rb.html
156
157
  - doc/rdoc/files/lib/wee/skeleton/og
157
158
  - doc/rdoc/files/lib/wee/skeleton/simple
158
159
  - doc/rdoc/files/lib/wee/skeleton/og/models
@@ -184,12 +185,14 @@ files:
184
185
  - doc/rdoc/classes/Wee
185
186
  - doc/rdoc/classes/OgScaffolder
186
187
  - doc/rdoc/classes/Cache
188
+ - doc/rdoc/classes/ActionView
187
189
  - doc/rdoc/classes/Enumerable.html
188
190
  - doc/rdoc/classes/Array.html
189
- - doc/rdoc/classes/OgSession.html
191
+ - doc/rdoc/classes/ActionView.html
190
192
  - doc/rdoc/classes/Wee.html
191
- - doc/rdoc/classes/Struct.html
193
+ - doc/rdoc/classes/Hash.html
192
194
  - doc/rdoc/classes/Main.html
195
+ - doc/rdoc/classes/Struct.html
193
196
  - doc/rdoc/classes/Cache.html
194
197
  - doc/rdoc/classes/OgApplication.html
195
198
  - doc/rdoc/classes/LiteralMethod.html
@@ -197,125 +200,123 @@ files:
197
200
  - doc/rdoc/classes/String.html
198
201
  - doc/rdoc/classes/Object.html
199
202
  - doc/rdoc/classes/Recipe.html
200
- - doc/rdoc/classes/ActionView.html
201
- - doc/rdoc/classes/Hash.html
202
- - doc/rdoc/classes/ActionView
203
+ - doc/rdoc/classes/OgSession.html
204
+ - doc/rdoc/classes/Wee/Rails
205
+ - doc/rdoc/classes/Wee/Nitro
203
206
  - doc/rdoc/classes/Wee/Utils
204
207
  - doc/rdoc/classes/Wee/Component
205
208
  - doc/rdoc/classes/Wee/StateRegistry
209
+ - doc/rdoc/classes/Wee/Examples
206
210
  - doc/rdoc/classes/Wee/Brush
207
- - doc/rdoc/classes/Wee/Session.html
208
- - doc/rdoc/classes/Wee/Page.html
209
- - doc/rdoc/classes/Wee/Helper.html
210
- - doc/rdoc/classes/Wee/RefreshResponse.html
211
+ - doc/rdoc/classes/Wee/LiteralMethodCallback.html
211
212
  - doc/rdoc/classes/Wee/SimpleIdGenerator.html
212
- - doc/rdoc/classes/Wee/GenericResponse.html
213
- - doc/rdoc/classes/Wee/PageDecoration.html
214
- - doc/rdoc/classes/Wee/RequestHandler.html
215
- - doc/rdoc/classes/Wee/Decoration.html
216
- - doc/rdoc/classes/Wee/AnswerDecoration.html
213
+ - doc/rdoc/classes/Wee/Helper.html
214
+ - doc/rdoc/classes/Wee/Session.html
215
+ - doc/rdoc/classes/Wee/HtmlCanvasRenderer.html
217
216
  - doc/rdoc/classes/Wee/MessageBox.html
218
217
  - doc/rdoc/classes/Wee/Response.html
218
+ - doc/rdoc/classes/Wee/Pager.html
219
219
  - doc/rdoc/classes/Wee/Snapshot.html
220
- - doc/rdoc/classes/Wee/HtmlWriter.html
221
220
  - doc/rdoc/classes/Wee/WEBrickAdaptor.html
222
- - doc/rdoc/classes/Wee/PagelessRequest.html
221
+ - doc/rdoc/classes/Wee/HtmlWriter.html
223
222
  - doc/rdoc/classes/Wee/CallbackStream.html
224
223
  - doc/rdoc/classes/Wee/StateRegistry.html
225
- - doc/rdoc/classes/Wee/Delegate.html
226
224
  - doc/rdoc/classes/Wee/ValueHolder.html
225
+ - doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html
226
+ - doc/rdoc/classes/Wee/Delegate.html
227
227
  - doc/rdoc/classes/Wee/Canvas.html
228
228
  - doc/rdoc/classes/Wee/FormDecoration.html
229
- - doc/rdoc/classes/Wee/RedirectResponse.html
230
- - doc/rdoc/classes/Wee/StateHolder.html
231
- - doc/rdoc/classes/Wee/PagelessApplication.html
229
+ - doc/rdoc/classes/Wee/PagelessRequest.html
230
+ - doc/rdoc/classes/Wee/LoginDecoration.html
232
231
  - doc/rdoc/classes/Wee/RenderingContext.html
233
- - doc/rdoc/classes/Wee/Brush.html
234
- - doc/rdoc/classes/Wee/Context.html
235
232
  - doc/rdoc/classes/Wee/CallbackRegistry.html
236
233
  - doc/rdoc/classes/Wee/ErrorPage.html
237
234
  - doc/rdoc/classes/Wee/Request.html
238
- - doc/rdoc/classes/Wee/LiteralMethodCallback.html
239
235
  - doc/rdoc/classes/Wee/WrapperDecoration.html
236
+ - doc/rdoc/classes/Wee/Nitro.html
237
+ - doc/rdoc/classes/Wee/HtmlCanvas.html
238
+ - doc/rdoc/classes/Wee/Component.html
239
+ - doc/rdoc/classes/Wee/RefreshResponse.html
240
+ - doc/rdoc/classes/Wee/Page.html
241
+ - doc/rdoc/classes/Wee/ComponentDispatcher.html
242
+ - doc/rdoc/classes/Wee/Examples.html
243
+ - doc/rdoc/classes/Wee/CanvasMixin.html
244
+ - doc/rdoc/classes/Wee/PageDecoration.html
245
+ - doc/rdoc/classes/Wee/RequestHandler.html
246
+ - doc/rdoc/classes/Wee/Decoration.html
247
+ - doc/rdoc/classes/Wee/GenericResponse.html
248
+ - doc/rdoc/classes/Wee/ComponentRunner.html
249
+ - doc/rdoc/classes/Wee/IdGenerator.html
250
+ - doc/rdoc/classes/Wee/PagelessComponentDriver.html
251
+ - doc/rdoc/classes/Wee/Renderer.html
252
+ - doc/rdoc/classes/Wee/AnswerDecoration.html
253
+ - doc/rdoc/classes/Wee/AbstractSession.html
254
+ - doc/rdoc/classes/Wee/RedirectResponse.html
255
+ - doc/rdoc/classes/Wee/StateHolder.html
256
+ - doc/rdoc/classes/Wee/Context.html
257
+ - doc/rdoc/classes/Wee/Brush.html
258
+ - doc/rdoc/classes/Wee/PagelessApplication.html
259
+ - doc/rdoc/classes/Wee/FastCGIAdaptor.html
240
260
  - doc/rdoc/classes/Wee/Callback.html
241
261
  - doc/rdoc/classes/Wee/MethodCallback.html
242
- - doc/rdoc/classes/Wee/HtmlCanvas.html
243
262
  - doc/rdoc/classes/Wee/Utils.html
244
- - doc/rdoc/classes/Wee/Component.html
245
263
  - doc/rdoc/classes/Wee/Application.html
246
264
  - doc/rdoc/classes/Wee/Presenter.html
247
265
  - doc/rdoc/classes/Wee/PagelessSession.html
248
266
  - doc/rdoc/classes/Wee/ErrorResponse.html
249
267
  - doc/rdoc/classes/Wee/Md5IdGenerator.html
250
- - doc/rdoc/classes/Wee/Nitro
251
- - doc/rdoc/classes/Wee/Nitro.html
252
- - doc/rdoc/classes/Wee/Rails
253
- - doc/rdoc/classes/Wee/CanvasMixin.html
254
268
  - doc/rdoc/classes/Wee/Rails.html
255
- - doc/rdoc/classes/Wee/Examples
256
- - doc/rdoc/classes/Wee/ComponentDispatcher.html
257
- - doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html
258
- - doc/rdoc/classes/Wee/Examples.html
259
- - doc/rdoc/classes/Wee/ComponentRunner.html
260
- - doc/rdoc/classes/Wee/IdGenerator.html
261
- - doc/rdoc/classes/Wee/Renderer.html
262
- - doc/rdoc/classes/Wee/Pager.html
263
- - doc/rdoc/classes/Wee/FastCGIAdaptor.html
264
- - doc/rdoc/classes/Wee/LoginDecoration.html
265
- - doc/rdoc/classes/Wee/PagelessComponentDriver.html
266
- - doc/rdoc/classes/Wee/AbstractSession.html
267
- - doc/rdoc/classes/Wee/HtmlCanvasRenderer.html
269
+ - doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html
270
+ - doc/rdoc/classes/Wee/Rails/FormTag.html
271
+ - doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html
272
+ - doc/rdoc/classes/Wee/Rails/ControllerMixin.html
273
+ - doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html
274
+ - doc/rdoc/classes/Wee/Nitro/FormTag.html
275
+ - doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html
276
+ - doc/rdoc/classes/Wee/Nitro/ControllerMixin.html
268
277
  - doc/rdoc/classes/Wee/Utils/LRUCache.html
269
278
  - doc/rdoc/classes/Wee/Component/OnAnswer.html
270
279
  - doc/rdoc/classes/Wee/StateRegistry/Snapshot.html
271
280
  - doc/rdoc/classes/Wee/StateRegistry/WithObject.html
281
+ - doc/rdoc/classes/Wee/Examples/Counter.html
282
+ - doc/rdoc/classes/Wee/Examples/Window.html
283
+ - doc/rdoc/classes/Wee/Examples/Calculator.html
284
+ - doc/rdoc/classes/Wee/Examples/EditableCounter.html
272
285
  - doc/rdoc/classes/Wee/Brush/SelectListTag
273
- - doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html
274
- - doc/rdoc/classes/Wee/Brush/GenericTagBrush.html
286
+ - doc/rdoc/classes/Wee/Brush/RadioButtonTag
287
+ - doc/rdoc/classes/Wee/Brush/TableTag.html
275
288
  - doc/rdoc/classes/Wee/Brush/Page.html
289
+ - doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html
276
290
  - doc/rdoc/classes/Wee/Brush/TableDataTag.html
277
- - doc/rdoc/classes/Wee/Brush/ImageTag.html
278
- - doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html
279
- - doc/rdoc/classes/Wee/Brush/FileUploadTag.html
280
- - doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html
281
- - doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html
282
291
  - doc/rdoc/classes/Wee/Brush/ActionMixin.html
283
- - doc/rdoc/classes/Wee/Brush/TableTag.html
284
- - doc/rdoc/classes/Wee/Brush/GenericTextBrush.html
285
- - doc/rdoc/classes/Wee/Brush/AssignMixin.html
286
- - doc/rdoc/classes/Wee/Brush/InputTag.html
287
- - doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html
292
+ - doc/rdoc/classes/Wee/Brush/RadioButtonTag.html
293
+ - doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html
294
+ - doc/rdoc/classes/Wee/Brush/SelectOptionTag.html
288
295
  - doc/rdoc/classes/Wee/Brush/TableHeaderTag.html
289
296
  - doc/rdoc/classes/Wee/Brush/FormTag.html
297
+ - doc/rdoc/classes/Wee/Brush/SelectListTag.html
290
298
  - doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html
291
299
  - doc/rdoc/classes/Wee/Brush/ToCallback.html
300
+ - doc/rdoc/classes/Wee/Brush/FileUploadTag.html
301
+ - doc/rdoc/classes/Wee/Brush/ImageTag.html
302
+ - doc/rdoc/classes/Wee/Brush/HiddenInputTag.html
303
+ - doc/rdoc/classes/Wee/Brush/TextAreaTag.html
304
+ - doc/rdoc/classes/Wee/Brush/TableRowTag.html
305
+ - doc/rdoc/classes/Wee/Brush/GenericTagBrush.html
306
+ - doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html
307
+ - doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html
308
+ - doc/rdoc/classes/Wee/Brush/CheckboxTag.html
309
+ - doc/rdoc/classes/Wee/Brush/GenericTextBrush.html
310
+ - doc/rdoc/classes/Wee/Brush/AssignMixin.html
311
+ - doc/rdoc/classes/Wee/Brush/InputTag.html
292
312
  - doc/rdoc/classes/Wee/Brush/TextInputTag.html
293
313
  - doc/rdoc/classes/Wee/Brush/CallbackMixin.html
294
314
  - doc/rdoc/classes/Wee/Brush/JavascriptTag.html
295
- - doc/rdoc/classes/Wee/Brush/SelectOptionTag.html
296
315
  - doc/rdoc/classes/Wee/Brush/AnchorTag.html
297
- - doc/rdoc/classes/Wee/Brush/RadioButtonTag
298
- - doc/rdoc/classes/Wee/Brush/SelectListTag.html
299
- - doc/rdoc/classes/Wee/Brush/TextAreaTag.html
316
+ - doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html
300
317
  - doc/rdoc/classes/Wee/Brush/ImageButtonTag.html
301
- - doc/rdoc/classes/Wee/Brush/TableRowTag.html
302
- - doc/rdoc/classes/Wee/Brush/HiddenInputTag.html
303
- - doc/rdoc/classes/Wee/Brush/CheckboxTag.html
304
- - doc/rdoc/classes/Wee/Brush/RadioButtonTag.html
305
318
  - doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html
306
319
  - doc/rdoc/classes/Wee/Brush/RadioButtonTag/RadioGroup.html
307
- - doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html
308
- - doc/rdoc/classes/Wee/Nitro/ControllerMixin.html
309
- - doc/rdoc/classes/Wee/Nitro/FormTag.html
310
- - doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html
311
- - doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html
312
- - doc/rdoc/classes/Wee/Rails/ControllerMixin.html
313
- - doc/rdoc/classes/Wee/Rails/FormTag.html
314
- - doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html
315
- - doc/rdoc/classes/Wee/Examples/EditableCounter.html
316
- - doc/rdoc/classes/Wee/Examples/Calculator.html
317
- - doc/rdoc/classes/Wee/Examples/Window.html
318
- - doc/rdoc/classes/Wee/Examples/Counter.html
319
320
  - doc/rdoc/classes/OgScaffolder/Editor.html
320
321
  - doc/rdoc/classes/Cache/Strategy
321
322
  - doc/rdoc/classes/Cache/StorageCache.html
data/Features DELETED
@@ -1,185 +0,0 @@
1
- = New in 0.9.0
2
-
3
- == Nitro/Rails integration
4
-
5
- Wee can now be used from within Nitro or Rails, but with limited functionality.
6
-
7
- A brief example using Nitro+Wee:
8
-
9
- require 'wee'
10
- require 'wee/adaptors/nitro'
11
- require 'wee/examples/calculator'
12
- require 'nitro'
13
- require 'nitro/contoller'
14
-
15
- class AppController < Nitro::Controller
16
- include Wee::Nitro::ControllerMixin
17
-
18
- scaffold_with_component do
19
- Wee::Examples::Calculator.new.
20
- add_decoration(Wee::FormDecoration.new).
21
- add_decoration(Wee::PageDecoration.new('Hello from Wee/Nitro!'))
22
- end
23
- end
24
-
25
- Nitro.run(:host => '127.0.0.1', :port => 9999, :dispatcher => Nitro::Dispatcher.new('/app' => AppController))
26
-
27
- How to use Rails+Wee (most stuff applies to Nitro as well):
28
-
29
- ##
30
- # In config/environment.rb add:
31
-
32
- require 'wee'
33
- require 'wee/adaptors/rails'
34
- require 'components/mycomponent'
35
-
36
- ##
37
- # In components/mycomponent.rb:
38
-
39
- class MyComponent < Wee::Component
40
- # ... your Wee component ...
41
- end
42
-
43
- ##
44
- # In app/controllers/wee_controller.rb:
45
-
46
- class WeeController < ApplicationController
47
- include Wee::Rails::ControllerMixin
48
-
49
- register_component "my" do
50
- MyComponent.new
51
- end
52
- end
53
-
54
- ##
55
- # In app/views/index.rhtml:
56
-
57
- <html><body>
58
- <%= show_component 'my' %>
59
- </body></html>
60
-
61
- Of course you can render as many components as you like on one page.
62
- You can create components dynamically at runtime with:
63
-
64
- make_component component_name, component_object
65
-
66
- For example instead of using 'register_component' in the WeeController
67
- shown above, you could write:
68
-
69
- def index
70
- make_component('my', MyComponent.new) unless has_component?('my')
71
- # render the view
72
- end
73
-
74
- If you don't need the component anymore, drop it:
75
-
76
- drop_component 'my'
77
-
78
- If you want to map 1:1 a Wee::Component to an ActionController, you can
79
- use:
80
-
81
- class WeeController < ApplicationController
82
- include Wee::Rails::ControllerMixin
83
-
84
- scaffold_with_component do
85
- MyComponent.new
86
- end
87
- end
88
-
89
- At the moment, only pageless mode is possible, so no backtracking is
90
- performed.
91
-
92
- NOTE: Your Wee components must be fully marshallable to work with Rails
93
- CGI mode. That means, you are not allowed to use continuations, and no
94
- code blocks (callbacks). For example instead of:
95
-
96
- r.anchor.callback { answer true }
97
-
98
- You have to write:
99
-
100
- r.anchor.callback(:answer, true)
101
-
102
- Or more general:
103
-
104
- r.anchor.callback(Wee::LiteralMethodCallback.new(self, :answer, true))
105
-
106
- == Changes in Html renderer
107
-
108
- * r.label # => <label>...</label>
109
-
110
- * r.hidden_input # => <input type="hidden" ...>
111
-
112
- * r.anchor.info(info_url) # => <a href="/app/info_url/session_id/page_id">
113
-
114
- * Added support for radio buttons (methods r.new_radio_group and r.radio_button)
115
-
116
- * You can now use #value of textarea fields instead of #with.
117
-
118
- * Implemented r.form.onsubmit_update method
119
-
120
- * Method Brush::SelectListTag#selected takes optionally a block. In
121
- this case, only those elements will be selected, for which the block
122
- evaluates to true. This allows us to use some custom compare
123
- functions instead of the default ones '==' or 'include?'.
124
-
125
- * Method Brush::SelectListTag#labels also might be passed a block, in
126
- which case the label is the return value of the block called with
127
- the corresponding item as parameter.
128
-
129
- * Added class Brush::CheckboxTag and corresponding methods
130
- HtmlCanvas#check_box and alias #checkbox.
131
-
132
- * Method HtmlCanvas#paragraph is no longer a single tag. It can now
133
- contain other tags, e.g. like <p><a .../></p>.
134
-
135
- * Added method HtmlCanvas#multiline_text, which replaces newline
136
- characters (\n) in the text with <br/> tags.
137
-
138
- == Changes in Templating
139
-
140
- * Added :local option, with which one can
141
- specify a template file relative to the component file, e.g:
142
-
143
- class MyComponent < Wee::Component
144
- template :render_this, :local => 'this.tmpl'
145
- end
146
-
147
- Futhermore, added an :r_as_param option, which generates a render
148
- method that takes a renderer object as parameter 'r'.
149
-
150
- == New components
151
-
152
- * Wee::LoginDecoration
153
-
154
- * Wee::ComponentDispatcher
155
- For an example see examples/dispatcher.rb
156
-
157
- * Wee::Pager
158
-
159
- * Wee::Examples::Counter
160
- You need to require 'wee/examples/counter'
161
-
162
- * Wee::Examples::EditableCounter
163
- You need to require 'wee/examples/editable_counter'
164
-
165
- * Wee::Examples::Calculator
166
- You need to require 'wee/examples/calculator'
167
-
168
- == New Examples
169
-
170
- * examples/dispatcher.rb
171
- * examples/nitro/*
172
- * examples/demo.rb
173
- * examples/radio.rb
174
-
175
- = Hello World
176
-
177
- require 'wee'
178
-
179
- class HelloWorld < Wee::Component
180
- def render
181
- r.h1 "Hello world!"
182
- end
183
- end
184
-
185
- Wee.run(HelloWorld)