wee 0.10.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +127 -0
- data/Rakefile +11 -32
- data/doc/rdoc/classes/Array.html +28 -24
- data/doc/rdoc/classes/Hash.html +28 -24
- data/doc/rdoc/classes/Object.html +37 -84
- data/doc/rdoc/classes/String.html +89 -21
- data/doc/rdoc/classes/Struct.html +32 -82
- data/doc/rdoc/classes/Wee.html +285 -86
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +111 -48
- data/doc/rdoc/classes/Wee/{Context.html → AnswerDecoration/Answer.html} +61 -51
- data/doc/rdoc/classes/Wee/Application.html +161 -322
- data/doc/rdoc/classes/Wee/Application/SessionCache.html +162 -0
- data/doc/rdoc/classes/Wee/Brush.html +147 -62
- data/doc/rdoc/classes/{Enumerable.html → Wee/Brush/ActionInputTag.html} +68 -41
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +150 -100
- data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +132 -46
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +63 -41
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +184 -78
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +48 -65
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +83 -37
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +334 -310
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +74 -54
- data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +58 -43
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +64 -74
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +109 -86
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +205 -45
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +96 -34
- data/doc/rdoc/classes/Wee/Brush/Page.html +129 -67
- data/doc/rdoc/classes/Wee/{Utils/LRUCache.html → Brush/PasswordInputTag.html} +65 -38
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +132 -78
- data/doc/rdoc/classes/Wee/Brush/{RadioButtonTag/RadioGroup.html → RadioGroup.html} +91 -53
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +301 -127
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +96 -33
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +59 -44
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +94 -57
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +96 -33
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +181 -121
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +94 -32
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +257 -71
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +58 -43
- data/doc/rdoc/classes/Wee/CallAnswerMixin.html +289 -0
- data/doc/rdoc/classes/Wee/CallbackMixin.html +233 -0
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +179 -155
- data/doc/rdoc/classes/Wee/Callbacks.html +262 -0
- data/doc/rdoc/classes/Wee/Component.html +228 -779
- data/doc/rdoc/classes/Wee/Decoration.html +144 -159
- data/doc/rdoc/classes/Wee/DecorationMixin.html +340 -0
- data/doc/rdoc/classes/Wee/Delegate.html +119 -76
- data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +64 -47
- data/doc/rdoc/classes/Wee/ErrorResponse.html +59 -62
- data/doc/rdoc/classes/Wee/FormDecoration.html +51 -37
- data/doc/rdoc/classes/Wee/GenericResponse.html +60 -35
- data/doc/rdoc/classes/Wee/HtmlCanvas.html +1000 -602
- data/doc/rdoc/classes/Wee/HtmlDocument.html +288 -0
- data/doc/rdoc/classes/Wee/HtmlWriter.html +227 -126
- data/doc/rdoc/classes/Wee/IdGenerator.html +60 -31
- data/doc/rdoc/classes/Wee/IdGenerator/Secure.html +282 -0
- data/doc/rdoc/classes/Wee/{SimpleIdGenerator.html → IdGenerator/Sequential.html} +76 -49
- data/doc/rdoc/classes/Wee/JQuery.html +221 -0
- data/doc/rdoc/classes/Wee/LRUCache.html +514 -0
- data/doc/rdoc/classes/Wee/LRUCache/Item.html +158 -0
- data/doc/rdoc/classes/Wee/ObjectSnapshotMixin.html +187 -0
- data/doc/rdoc/classes/Wee/PageDecoration.html +88 -59
- data/doc/rdoc/classes/Wee/Presenter.html +124 -704
- data/doc/rdoc/classes/Wee/RedirectResponse.html +64 -33
- data/doc/rdoc/classes/Wee/RefreshResponse.html +59 -44
- data/doc/rdoc/classes/Wee/Renderer.html +234 -54
- data/doc/rdoc/classes/Wee/Request.html +151 -286
- data/doc/rdoc/classes/Wee/Response.html +29 -212
- data/doc/rdoc/classes/Wee/Session.html +585 -360
- data/doc/rdoc/classes/Wee/{StateHolder.html → Session/AbortCallbackProcessing.html} +67 -40
- data/doc/rdoc/classes/Wee/Session/MutexSerializer.html +166 -0
- data/doc/rdoc/classes/{Cache/Strategy/LFU/Item.html → Wee/Session/Page.html} +26 -27
- data/doc/rdoc/classes/Wee/Session/ThreadSerializer.html +219 -0
- data/doc/rdoc/classes/Wee/State.html +307 -0
- data/doc/rdoc/classes/{Cache/Strategy/LRU/Item.html → Wee/State/Snapshot.html} +26 -27
- data/doc/rdoc/classes/{Cache/Strategy/Unbounded/Item.html → Wee/State/SnapshotIVars.html} +26 -27
- data/doc/rdoc/classes/Wee/StructSnapshotMixin.html +183 -0
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +101 -35
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README_rdoc.html +243 -0
- data/doc/rdoc/files/lib/wee/application_rb.html +22 -30
- data/doc/rdoc/files/lib/wee/{page_rb.html → call_answer_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/callback_rb.html +12 -29
- data/doc/rdoc/files/lib/wee/component_rb.html +22 -27
- data/doc/rdoc/files/lib/wee/decoration_rb.html +19 -20
- data/doc/rdoc/files/lib/wee/{idgen_rb.html → html_brushes_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/html_canvas_rb.html +15 -23
- data/doc/rdoc/files/lib/wee/{abstractsession_rb.html → html_document_rb.html} +17 -25
- data/doc/rdoc/files/lib/wee/html_writer_rb.html +15 -23
- data/doc/rdoc/files/lib/wee/{webrick_rb.html → id_generator_rb.html} +19 -25
- data/doc/rdoc/files/lib/wee/{core/page_rb.html → jquery/jquery_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/{state_registry_rb.html → jquery_rb.html} +17 -27
- data/doc/rdoc/files/lib/{cache/cache_rb.html → wee/lru_cache_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/presenter_rb.html +12 -34
- data/doc/rdoc/files/lib/wee/{holder_rb.html → renderer_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/request_rb.html +18 -32
- data/doc/rdoc/files/lib/wee/response_rb.html +17 -24
- data/doc/rdoc/files/lib/wee/session_rb.html +21 -23
- data/doc/rdoc/files/lib/wee/state_rb.html +90 -0
- data/doc/rdoc/files/lib/wee_rb.html +48 -40
- data/doc/rdoc/fr_class_index.html +111 -75
- data/doc/rdoc/fr_file_index.html +46 -76
- data/doc/rdoc/fr_method_index.html +473 -480
- data/doc/rdoc/index.html +6 -9
- data/doc/rdoc/rdoc-style.css +210 -119
- data/examples/ObjectSpaceBrowser.rb +33 -23
- data/examples/ajax.rb +71 -0
- data/examples/continuations.rb +28 -0
- data/examples/demo.rb +92 -36
- data/examples/demo/calculator.rb +63 -0
- data/examples/demo/calendar.rb +42 -55
- data/examples/demo/counter.rb +38 -0
- data/{lib/wee/examples → examples/demo}/editable_counter.rb +11 -6
- data/examples/demo/example.rb +28 -24
- data/examples/demo/file_upload.rb +19 -0
- data/{lib/wee/components → examples/demo}/messagebox.rb +3 -3
- data/examples/demo/radio.rb +33 -0
- data/{lib/wee/examples → examples/demo}/window.rb +15 -10
- data/examples/hw.rb +3 -4
- data/{lib/wee/components → examples}/pager.rb +14 -14
- data/lib/wee.rb +48 -25
- data/lib/wee/application.rb +69 -131
- data/lib/wee/call_answer.rb +118 -0
- data/lib/wee/callback.rb +88 -0
- data/lib/wee/component.rb +141 -0
- data/lib/wee/decoration.rb +242 -0
- data/lib/wee/html_brushes.rb +725 -0
- data/lib/wee/html_canvas.rb +241 -0
- data/lib/wee/html_document.rb +45 -0
- data/lib/wee/html_writer.rb +71 -0
- data/lib/wee/id_generator.rb +70 -0
- data/lib/wee/jquery.rb +1 -0
- data/lib/wee/jquery/jquery.rb +17 -0
- data/lib/wee/jquery/public/jquery-1.3.2.min.js +19 -0
- data/lib/wee/jquery/public/wee-jquery.js +19 -0
- data/lib/wee/lru_cache.rb +89 -0
- data/lib/wee/presenter.rb +43 -0
- data/lib/wee/renderer.rb +65 -0
- data/lib/wee/request.rb +37 -113
- data/lib/wee/response.rb +43 -70
- data/lib/wee/session.rb +304 -113
- data/lib/wee/state.rb +85 -0
- data/test/component_spec.rb +17 -0
- data/wee.gemspec +4 -3
- metadata +249 -452
- data/ChangeLog +0 -657
- data/INSTALL +0 -17
- data/README +0 -272
- data/TODO +0 -142
- data/benchmark/Centrino1300/result.2000.counter.action +0 -45
- data/benchmark/Centrino1300/result.2000.counter.render +0 -43
- data/benchmark/Centrino1300/result.2000.filehandler +0 -43
- data/benchmark/Centrino600/result.2000.counter.action +0 -47
- data/benchmark/Centrino600/result.2000.counter.render +0 -45
- data/benchmark/Centrino600/result.2000.filehandler +0 -43
- data/benchmark/Makefile +0 -53
- data/benchmark/counter.rb +0 -77
- data/benchmark/filehandler.rb +0 -6
- data/benchmark/report_req.rb +0 -12
- data/bin/wee +0 -100
- data/doc/rdoc/classes/ActionView.html +0 -107
- data/doc/rdoc/classes/ActionView/Base.html +0 -133
- data/doc/rdoc/classes/Cache.html +0 -126
- data/doc/rdoc/classes/Cache/StorageCache.html +0 -320
- data/doc/rdoc/classes/Cache/Strategy.html +0 -128
- data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +0 -269
- data/doc/rdoc/classes/Cache/Strategy/LFU.html +0 -238
- data/doc/rdoc/classes/Cache/Strategy/LRU.html +0 -238
- data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +0 -225
- data/doc/rdoc/classes/LiteralMethod.html +0 -196
- data/doc/rdoc/classes/Main.html +0 -289
- data/doc/rdoc/classes/OgApplication.html +0 -126
- data/doc/rdoc/classes/OgScaffolder.html +0 -827
- data/doc/rdoc/classes/OgScaffolder/Editor.html +0 -565
- data/doc/rdoc/classes/OgSession.html +0 -172
- data/doc/rdoc/classes/Recipe.html +0 -113
- data/doc/rdoc/classes/Wee/AbstractSession.html +0 -502
- data/doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html +0 -148
- data/doc/rdoc/classes/Wee/Brush/ActionMixin.html +0 -146
- data/doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html +0 -154
- data/doc/rdoc/classes/Wee/Brush/AssignMixin.html +0 -141
- data/doc/rdoc/classes/Wee/Brush/CallbackMixin.html +0 -141
- data/doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html +0 -148
- data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +0 -158
- data/doc/rdoc/classes/Wee/Brush/ToCallback.html +0 -146
- data/doc/rdoc/classes/Wee/Callback.html +0 -231
- data/doc/rdoc/classes/Wee/CallbackStream.html +0 -227
- data/doc/rdoc/classes/Wee/Canvas.html +0 -235
- data/doc/rdoc/classes/Wee/CanvasMixin.html +0 -225
- data/doc/rdoc/classes/Wee/Component/OnAnswer.html +0 -153
- data/doc/rdoc/classes/Wee/ComponentDispatcher.html +0 -289
- data/doc/rdoc/classes/Wee/ComponentRunner.html +0 -321
- data/doc/rdoc/classes/Wee/ErrorPage.html +0 -175
- data/doc/rdoc/classes/Wee/Examples.html +0 -114
- data/doc/rdoc/classes/Wee/Examples/Calculator.html +0 -319
- data/doc/rdoc/classes/Wee/Examples/Counter.html +0 -289
- data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +0 -210
- data/doc/rdoc/classes/Wee/Examples/Window.html +0 -346
- data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +0 -227
- data/doc/rdoc/classes/Wee/Helper.html +0 -148
- data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +0 -1230
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +0 -198
- data/doc/rdoc/classes/Wee/LoginDecoration.html +0 -261
- data/doc/rdoc/classes/Wee/Md5IdGenerator.html +0 -181
- data/doc/rdoc/classes/Wee/MessageBox.html +0 -180
- data/doc/rdoc/classes/Wee/MethodCallback.html +0 -193
- data/doc/rdoc/classes/Wee/Nitro.html +0 -114
- data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +0 -192
- data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +0 -345
- data/doc/rdoc/classes/Wee/Nitro/FormTag.html +0 -155
- data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +0 -178
- data/doc/rdoc/classes/Wee/Page.html +0 -115
- data/doc/rdoc/classes/Wee/PagelessApplication.html +0 -154
- data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +0 -296
- data/doc/rdoc/classes/Wee/PagelessRequest.html +0 -208
- data/doc/rdoc/classes/Wee/PagelessSession.html +0 -359
- data/doc/rdoc/classes/Wee/Pager.html +0 -534
- data/doc/rdoc/classes/Wee/Rails.html +0 -114
- data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +0 -192
- data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +0 -342
- data/doc/rdoc/classes/Wee/Rails/FormTag.html +0 -155
- data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +0 -177
- data/doc/rdoc/classes/Wee/RenderingContext.html +0 -283
- data/doc/rdoc/classes/Wee/RequestHandler.html +0 -341
- data/doc/rdoc/classes/Wee/Snapshot.html +0 -211
- data/doc/rdoc/classes/Wee/StateRegistry.html +0 -434
- data/doc/rdoc/classes/Wee/StateRegistry/Snapshot.html +0 -320
- data/doc/rdoc/classes/Wee/StateRegistry/WithObject.html +0 -153
- data/doc/rdoc/classes/Wee/Utils.html +0 -300
- data/doc/rdoc/classes/Wee/ValueHolder.html +0 -220
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +0 -368
- data/doc/rdoc/files/INSTALL.html +0 -130
- data/doc/rdoc/files/README.html +0 -471
- data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/component_ext_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/pager_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components_rb.html +0 -114
- data/doc/rdoc/files/lib/wee/context_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/continuation/session_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/continuation_rb.html +0 -116
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/core/component_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +0 -110
- data/doc/rdoc/files/lib/wee/core/context_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/core/decoration_rb.html +0 -133
- data/doc/rdoc/files/lib/wee/core/idgen_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/core/presenter_rb.html +0 -112
- data/doc/rdoc/files/lib/wee/core/renderer_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +0 -113
- data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +0 -110
- data/doc/rdoc/files/lib/wee/core_ext_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/core_rb.html +0 -124
- data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/databases/og_rb.html +0 -111
- data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/examples/counter_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +0 -114
- data/doc/rdoc/files/lib/wee/examples/window_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/pageless/application_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/pageless/request_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/pageless/session_rb.html +0 -109
- data/doc/rdoc/files/lib/wee/pageless_rb.html +0 -110
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/rendering/html/brushes_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/rendering/html/canvas_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/rendering/html/writer_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/requesthandler_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +0 -114
- data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +0 -111
- data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/snapshot_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/stuff_rb.html +0 -144
- data/doc/rdoc/files/lib/wee/template_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/utils/cache_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/utils_rb.html +0 -110
- data/examples/ajax/ajax.js +0 -444
- data/examples/ajax/ajax.rb +0 -31
- data/examples/cc.rb +0 -74
- data/examples/dispatcher.rb +0 -37
- data/examples/draw.rb +0 -94
- data/examples/live-update.rb +0 -45
- data/examples/nitro/run.rb +0 -42
- data/examples/og-test.rb +0 -60
- data/examples/radio.rb +0 -44
- data/examples/test.rb +0 -39
- data/install.rb +0 -14
- data/lib/cache/cache.rb +0 -167
- data/lib/wee/abstractsession.rb +0 -96
- data/lib/wee/adaptors/fastcgi.rb +0 -76
- data/lib/wee/adaptors/nitro.rb +0 -155
- data/lib/wee/adaptors/rails.rb +0 -154
- data/lib/wee/adaptors/webrick.rb +0 -89
- data/lib/wee/components.rb +0 -7
- data/lib/wee/components/component_dispatcher.rb +0 -46
- data/lib/wee/components/form_decoration.rb +0 -7
- data/lib/wee/components/login_decoration.rb +0 -35
- data/lib/wee/components/page_decoration.rb +0 -14
- data/lib/wee/components/wrapper_decoration.rb +0 -7
- data/lib/wee/continuation.rb +0 -5
- data/lib/wee/continuation/core/component.rb +0 -56
- data/lib/wee/continuation/session.rb +0 -64
- data/lib/wee/core.rb +0 -16
- data/lib/wee/core/callback.rb +0 -121
- data/lib/wee/core/component.rb +0 -356
- data/lib/wee/core/componentrunner.rb +0 -73
- data/lib/wee/core/context.rb +0 -27
- data/lib/wee/core/decoration.rb +0 -138
- data/lib/wee/core/idgen.rb +0 -5
- data/lib/wee/core/page.rb +0 -1
- data/lib/wee/core/presenter.rb +0 -100
- data/lib/wee/core/renderer.rb +0 -23
- data/lib/wee/core/snapshot.rb +0 -21
- data/lib/wee/core/valueholder.rb +0 -19
- data/lib/wee/core_ext.rb +0 -122
- data/lib/wee/databases/og.rb +0 -4
- data/lib/wee/databases/og/application.rb +0 -3
- data/lib/wee/databases/og/old_scaffolder.rb +0 -98
- data/lib/wee/databases/og/scaffolder.rb +0 -255
- data/lib/wee/databases/og/session.rb +0 -9
- data/lib/wee/examples/calculator.rb +0 -70
- data/lib/wee/examples/counter.rb +0 -33
- data/lib/wee/idgen/md5.rb +0 -21
- data/lib/wee/idgen/sequential.rb +0 -11
- data/lib/wee/pageless.rb +0 -3
- data/lib/wee/pageless/application.rb +0 -13
- data/lib/wee/pageless/request.rb +0 -27
- data/lib/wee/pageless/session.rb +0 -74
- data/lib/wee/renderer/html/brushes.rb +0 -667
- data/lib/wee/renderer/html/canvas.rb +0 -265
- data/lib/wee/renderer/html/writer.rb +0 -80
- data/lib/wee/requesthandler.rb +0 -81
- data/lib/wee/skeleton/og/README +0 -38
- data/lib/wee/skeleton/og/components/main.rb +0 -20
- data/lib/wee/skeleton/og/conf/db.rb +0 -8
- data/lib/wee/skeleton/og/models/recipe.rb +0 -5
- data/lib/wee/skeleton/og/run.rb +0 -23
- data/lib/wee/skeleton/simple/README +0 -32
- data/lib/wee/skeleton/simple/components/main.rb +0 -25
- data/lib/wee/skeleton/simple/run.rb +0 -12
- data/lib/wee/snapshot_ext.rb +0 -41
- data/lib/wee/template.rb +0 -42
- data/lib/wee/utils.rb +0 -5
- data/lib/wee/utils/autoreload.rb +0 -56
- data/lib/wee/utils/cache.rb +0 -7
- data/lib/wee/utils/helper.rb +0 -51
@@ -1,43 +0,0 @@
|
|
1
|
-
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
|
2
|
-
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
|
3
|
-
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
|
4
|
-
|
5
|
-
Benchmarking localhost (be patient)
|
6
|
-
|
7
|
-
|
8
|
-
Server Software: WEBrick/1.3.1
|
9
|
-
Server Hostname: localhost
|
10
|
-
Server Port: 2000
|
11
|
-
|
12
|
-
Document Path: /counter/s:1/p:0
|
13
|
-
Document Length: 3728 bytes
|
14
|
-
|
15
|
-
Concurrency Level: 1
|
16
|
-
Time taken for tests: 23.491602 seconds
|
17
|
-
Complete requests: 2000
|
18
|
-
Failed requests: 0
|
19
|
-
Write errors: 0
|
20
|
-
Total transferred: 7796000 bytes
|
21
|
-
HTML transferred: 7456000 bytes
|
22
|
-
Requests per second: 85.14 [#/sec] (mean)
|
23
|
-
Time per request: 11.746 [ms] (mean)
|
24
|
-
Time per request: 11.746 [ms] (mean, across all concurrent requests)
|
25
|
-
Transfer rate: 324.07 [Kbytes/sec] received
|
26
|
-
|
27
|
-
Connection Times (ms)
|
28
|
-
min mean[+/-sd] median max
|
29
|
-
Connect: 0 0 0.4 0 8
|
30
|
-
Processing: 7 11 5.0 8 45
|
31
|
-
Waiting: 0 6 5.6 6 44
|
32
|
-
Total: 7 11 5.0 8 45
|
33
|
-
|
34
|
-
Percentage of the requests served within a certain time (ms)
|
35
|
-
50% 8
|
36
|
-
66% 9
|
37
|
-
75% 11
|
38
|
-
80% 17
|
39
|
-
90% 18
|
40
|
-
95% 19
|
41
|
-
98% 20
|
42
|
-
99% 30
|
43
|
-
100% 45 (longest request)
|
@@ -1,43 +0,0 @@
|
|
1
|
-
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
|
2
|
-
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
|
3
|
-
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
|
4
|
-
|
5
|
-
Benchmarking localhost (be patient)
|
6
|
-
|
7
|
-
|
8
|
-
Server Software: WEBrick/1.3.1
|
9
|
-
Server Hostname: localhost
|
10
|
-
Server Port: 2000
|
11
|
-
|
12
|
-
Document Path: /counter.html
|
13
|
-
Document Length: 3728 bytes
|
14
|
-
|
15
|
-
Concurrency Level: 1
|
16
|
-
Time taken for tests: 6.5092 seconds
|
17
|
-
Complete requests: 2000
|
18
|
-
Failed requests: 0
|
19
|
-
Write errors: 0
|
20
|
-
Total transferred: 7942000 bytes
|
21
|
-
HTML transferred: 7456000 bytes
|
22
|
-
Requests per second: 333.05 [#/sec] (mean)
|
23
|
-
Time per request: 3.003 [ms] (mean)
|
24
|
-
Time per request: 3.003 [ms] (mean, across all concurrent requests)
|
25
|
-
Transfer rate: 1291.40 [Kbytes/sec] received
|
26
|
-
|
27
|
-
Connection Times (ms)
|
28
|
-
min mean[+/-sd] median max
|
29
|
-
Connect: 0 0 0.5 0 7
|
30
|
-
Processing: 2 2 2.2 2 32
|
31
|
-
Waiting: 0 0 1.9 0 31
|
32
|
-
Total: 2 2 2.3 2 32
|
33
|
-
|
34
|
-
Percentage of the requests served within a certain time (ms)
|
35
|
-
50% 2
|
36
|
-
66% 2
|
37
|
-
75% 2
|
38
|
-
80% 2
|
39
|
-
90% 3
|
40
|
-
95% 9
|
41
|
-
98% 10
|
42
|
-
99% 10
|
43
|
-
100% 32 (longest request)
|
@@ -1,47 +0,0 @@
|
|
1
|
-
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
|
2
|
-
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
|
3
|
-
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
|
4
|
-
|
5
|
-
Benchmarking localhost (be patient)
|
6
|
-
|
7
|
-
|
8
|
-
Server Software: WEBrick/1.3.1
|
9
|
-
Server Hostname: localhost
|
10
|
-
Server Port: 2000
|
11
|
-
|
12
|
-
Document Path: /counter/s:1/p:0/h:1
|
13
|
-
Document Length: 62 bytes
|
14
|
-
|
15
|
-
Concurrency Level: 1
|
16
|
-
Time taken for tests: 47.402115 seconds
|
17
|
-
Complete requests: 2000
|
18
|
-
Failed requests: 1991
|
19
|
-
(Connect: 0, Length: 1991, Exceptions: 0)
|
20
|
-
Write errors: 0
|
21
|
-
Non-2xx responses: 2000
|
22
|
-
Total transferred: 552679 bytes
|
23
|
-
HTML transferred: 133786 bytes
|
24
|
-
Requests per second: 42.19 [#/sec] (mean)
|
25
|
-
Time per request: 23.701 [ms] (mean)
|
26
|
-
Time per request: 23.701 [ms] (mean, across all concurrent requests)
|
27
|
-
Transfer rate: 11.37 [Kbytes/sec] received
|
28
|
-
|
29
|
-
Connection Times (ms)
|
30
|
-
min mean[+/-sd] median max
|
31
|
-
Connect: 0 0 1.0 1 7
|
32
|
-
Processing: 14 22 14.9 17 186
|
33
|
-
Waiting: 4 17 15.3 14 182
|
34
|
-
Total: 15 22 14.9 18 187
|
35
|
-
WARNING: The median and mean for the initial connection time are not within a normal deviation
|
36
|
-
These results are probably not that reliable.
|
37
|
-
|
38
|
-
Percentage of the requests served within a certain time (ms)
|
39
|
-
50% 18
|
40
|
-
66% 20
|
41
|
-
75% 21
|
42
|
-
80% 24
|
43
|
-
90% 39
|
44
|
-
95% 41
|
45
|
-
98% 45
|
46
|
-
99% 122
|
47
|
-
100% 187 (longest request)
|
@@ -1,45 +0,0 @@
|
|
1
|
-
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
|
2
|
-
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
|
3
|
-
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
|
4
|
-
|
5
|
-
Benchmarking localhost (be patient)
|
6
|
-
|
7
|
-
|
8
|
-
Server Software: WEBrick/1.3.1
|
9
|
-
Server Hostname: localhost
|
10
|
-
Server Port: 2000
|
11
|
-
|
12
|
-
Document Path: /counter/s:1/p:0
|
13
|
-
Document Length: 3728 bytes
|
14
|
-
|
15
|
-
Concurrency Level: 1
|
16
|
-
Time taken for tests: 53.215675 seconds
|
17
|
-
Complete requests: 2000
|
18
|
-
Failed requests: 0
|
19
|
-
Write errors: 0
|
20
|
-
Total transferred: 7796000 bytes
|
21
|
-
HTML transferred: 7456000 bytes
|
22
|
-
Requests per second: 37.58 [#/sec] (mean)
|
23
|
-
Time per request: 26.608 [ms] (mean)
|
24
|
-
Time per request: 26.608 [ms] (mean, across all concurrent requests)
|
25
|
-
Transfer rate: 143.06 [Kbytes/sec] received
|
26
|
-
|
27
|
-
Connection Times (ms)
|
28
|
-
min mean[+/-sd] median max
|
29
|
-
Connect: 0 0 1.0 1 8
|
30
|
-
Processing: 15 24 14.6 19 167
|
31
|
-
Waiting: 5 20 14.8 16 165
|
32
|
-
Total: 16 25 14.6 20 168
|
33
|
-
WARNING: The median and mean for the initial connection time are not within a normal deviation
|
34
|
-
These results are probably not that reliable.
|
35
|
-
|
36
|
-
Percentage of the requests served within a certain time (ms)
|
37
|
-
50% 20
|
38
|
-
66% 22
|
39
|
-
75% 28
|
40
|
-
80% 39
|
41
|
-
90% 42
|
42
|
-
95% 44
|
43
|
-
98% 48
|
44
|
-
99% 76
|
45
|
-
100% 168 (longest request)
|
@@ -1,43 +0,0 @@
|
|
1
|
-
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
|
2
|
-
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
|
3
|
-
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
|
4
|
-
|
5
|
-
Benchmarking localhost (be patient)
|
6
|
-
|
7
|
-
|
8
|
-
Server Software: WEBrick/1.3.1
|
9
|
-
Server Hostname: localhost
|
10
|
-
Server Port: 2000
|
11
|
-
|
12
|
-
Document Path: /counter.html
|
13
|
-
Document Length: 3728 bytes
|
14
|
-
|
15
|
-
Concurrency Level: 1
|
16
|
-
Time taken for tests: 14.912528 seconds
|
17
|
-
Complete requests: 2000
|
18
|
-
Failed requests: 0
|
19
|
-
Write errors: 0
|
20
|
-
Total transferred: 7942000 bytes
|
21
|
-
HTML transferred: 7456000 bytes
|
22
|
-
Requests per second: 134.12 [#/sec] (mean)
|
23
|
-
Time per request: 7.456 [ms] (mean)
|
24
|
-
Time per request: 7.456 [ms] (mean, across all concurrent requests)
|
25
|
-
Transfer rate: 520.03 [Kbytes/sec] received
|
26
|
-
|
27
|
-
Connection Times (ms)
|
28
|
-
min mean[+/-sd] median max
|
29
|
-
Connect: 0 0 0.8 0 10
|
30
|
-
Processing: 3 6 16.4 4 575
|
31
|
-
Waiting: 0 3 16.3 1 568
|
32
|
-
Total: 4 6 16.5 4 576
|
33
|
-
|
34
|
-
Percentage of the requests served within a certain time (ms)
|
35
|
-
50% 4
|
36
|
-
66% 5
|
37
|
-
75% 5
|
38
|
-
80% 6
|
39
|
-
90% 8
|
40
|
-
95% 20
|
41
|
-
98% 23
|
42
|
-
99% 25
|
43
|
-
100% 576 (longest request)
|
data/benchmark/Makefile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
N=2000
|
2
|
-
PORT=2000
|
3
|
-
COUNTERS=10
|
4
|
-
|
5
|
-
RUBY=ruby
|
6
|
-
|
7
|
-
all: bench1 bench2
|
8
|
-
echo "DONE"
|
9
|
-
|
10
|
-
start_counter:
|
11
|
-
# start the counter app
|
12
|
-
$(RUBY) counter.rb $(PORT) $(COUNTERS) > /dev/null 2> /dev/null &
|
13
|
-
sleep 3
|
14
|
-
|
15
|
-
stop_counter:
|
16
|
-
kill -9 `cat counter.$(PORT).pid`
|
17
|
-
rm -f counter.$(PORT).pid
|
18
|
-
rm -f dump
|
19
|
-
|
20
|
-
bench_counter:
|
21
|
-
# generate initial session and first page
|
22
|
-
fetch -o counter.html http://localhost:$(PORT)/counter
|
23
|
-
|
24
|
-
# perform benchmark
|
25
|
-
ab -n ${N} http://localhost:$(PORT)/counter/@1/1 > result.${N}.counter.render
|
26
|
-
ab -n ${N} http://localhost:$(PORT)/counter/@1/1?4 > result.${N}.counter.action
|
27
|
-
|
28
|
-
report_counter:
|
29
|
-
$(RUBY) report_req.rb result.$(N).counter.render result.$(N).counter.action
|
30
|
-
|
31
|
-
start_filehandler:
|
32
|
-
# start the filehandler app
|
33
|
-
$(RUBY) filehandler.rb > /dev/null 2> /dev/null &
|
34
|
-
sleep 3
|
35
|
-
|
36
|
-
stop_filehandler:
|
37
|
-
kill -9 `cat filehandler.pid`
|
38
|
-
rm -f filehandler.pid
|
39
|
-
|
40
|
-
bench_filehandler:
|
41
|
-
ab -n ${N} http://localhost:$(PORT)/counter.html > result.${N}.filehandler
|
42
|
-
|
43
|
-
clean:
|
44
|
-
rm -f counter.$(PORT).pid
|
45
|
-
rm -f filehandler.pid
|
46
|
-
rm -f dump
|
47
|
-
rm -f result.${N}.*
|
48
|
-
rm -f counter.html
|
49
|
-
|
50
|
-
bench1: start_counter bench_counter stop_counter report_counter
|
51
|
-
bench2: start_filehandler bench_filehandler stop_filehandler
|
52
|
-
|
53
|
-
|
data/benchmark/counter.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift '../lib'
|
2
|
-
require 'wee'
|
3
|
-
require 'wee/adaptors/webrick'
|
4
|
-
require 'wee/utils'
|
5
|
-
|
6
|
-
class Counter < Wee::Component
|
7
|
-
def initialize(cnt)
|
8
|
-
super()
|
9
|
-
@cnt = cnt
|
10
|
-
@show_edit_field = false
|
11
|
-
end
|
12
|
-
|
13
|
-
def backtrack_state(snap)
|
14
|
-
super
|
15
|
-
snap.add(self)
|
16
|
-
end
|
17
|
-
|
18
|
-
def dec
|
19
|
-
@cnt -= 1
|
20
|
-
end
|
21
|
-
|
22
|
-
def inc
|
23
|
-
@cnt += 1
|
24
|
-
end
|
25
|
-
|
26
|
-
def render
|
27
|
-
r.form.callback(:submit).with do
|
28
|
-
r.anchor.callback(:dec).with("--")
|
29
|
-
r.space
|
30
|
-
|
31
|
-
if @show_edit_field
|
32
|
-
r.text_input.callback(:cnt=).value(@cnt).size(6)
|
33
|
-
else
|
34
|
-
r.anchor.callback(:submit).with(@cnt)
|
35
|
-
end
|
36
|
-
|
37
|
-
r.space
|
38
|
-
r.anchor.callback(:inc).with("++")
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def submit
|
43
|
-
@show_edit_field = !@show_edit_field
|
44
|
-
end
|
45
|
-
|
46
|
-
def cnt
|
47
|
-
@cnt
|
48
|
-
end
|
49
|
-
|
50
|
-
def cnt=(val)
|
51
|
-
if val =~ /^\d+$/
|
52
|
-
@cnt = val.to_i
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
class Main < Wee::Component
|
58
|
-
def initialize
|
59
|
-
super()
|
60
|
-
@counters = (1..COUNTERS).map {|i| Counter.new(i)}
|
61
|
-
children.push(*@counters)
|
62
|
-
end
|
63
|
-
|
64
|
-
def render
|
65
|
-
r.page.title("Counter Test").with do
|
66
|
-
@counters.each { |cnt| r.render(cnt) }
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
if __FILE__ == $0
|
72
|
-
PORT = (ARGV[0] || 2000).to_i
|
73
|
-
COUNTERS = (ARGV[1] || 20).to_i
|
74
|
-
File.open("counter.#{ PORT }.pid", 'w+') {|f| f.puts($$.to_s) }
|
75
|
-
app = Wee::Utils.app_for(Main, :id_seed => 0, :page_cache_capacity => 10)
|
76
|
-
Wee::WEBrickAdaptor.register('/counter' => app).start(:Port => PORT)
|
77
|
-
end
|
data/benchmark/filehandler.rb
DELETED
data/benchmark/report_req.rb
DELETED
data/bin/wee
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'wee'
|
3
|
-
|
4
|
-
def usage
|
5
|
-
puts <<-USAGE
|
6
|
-
|
7
|
-
NAME
|
8
|
-
wee - creates a new Wee installation
|
9
|
-
|
10
|
-
SYNOPSIS
|
11
|
-
wee create [full path]
|
12
|
-
wee create-simple [full path]
|
13
|
-
wee create-og [full path]
|
14
|
-
|
15
|
-
DESCRIPTION
|
16
|
-
This will create a suggested directory structure as well as some
|
17
|
-
files to get you quickly started running a simple Wee application.
|
18
|
-
For further information have a look at the README file in the
|
19
|
-
created directory.
|
20
|
-
|
21
|
-
"create-simple" is an alias for "create". "create-og" creates a
|
22
|
-
simple Wee application that uses a database and the
|
23
|
-
Og (ObjectGraph) OR mapper.
|
24
|
-
|
25
|
-
|
26
|
-
EXAMPLE
|
27
|
-
|
28
|
-
wee create ~/my-wee-project
|
29
|
-
|
30
|
-
This will generate a new Wee installation in the ~/my-wee-project
|
31
|
-
folder.
|
32
|
-
USAGE
|
33
|
-
exit 1
|
34
|
-
end
|
35
|
-
|
36
|
-
require 'ftools'
|
37
|
-
|
38
|
-
SKEL_DIR = File.join(Wee::LibPath, 'wee', 'skeleton')
|
39
|
-
|
40
|
-
def run
|
41
|
-
case command = ARGV[0] || usage()
|
42
|
-
when 'create', 'create-simple'
|
43
|
-
path = ARGV[1] || usage()
|
44
|
-
path = File.expand_path(path)
|
45
|
-
|
46
|
-
if File.exists?(path)
|
47
|
-
STDERR.puts "ERROR: Path #{ path } already exists! Aborting!"
|
48
|
-
exit 1
|
49
|
-
end
|
50
|
-
|
51
|
-
src = File.join(SKEL_DIR, 'simple')
|
52
|
-
|
53
|
-
File.makedirs path
|
54
|
-
File.makedirs File.join(path, 'components')
|
55
|
-
|
56
|
-
File.copy File.join(src, 'run.rb'), path, true
|
57
|
-
File.copy File.join(src, 'README'), path, true
|
58
|
-
File.copy File.join(src, 'components', 'main.rb'), File.join(path, 'components'), true
|
59
|
-
|
60
|
-
when 'create-og'
|
61
|
-
|
62
|
-
path = ARGV[1] || usage()
|
63
|
-
path = File.expand_path(path)
|
64
|
-
|
65
|
-
if File.exists?(path)
|
66
|
-
STDERR.puts "ERROR: Path #{ path } already exists! Aborting!"
|
67
|
-
exit 1
|
68
|
-
end
|
69
|
-
|
70
|
-
src = File.join(SKEL_DIR, 'og')
|
71
|
-
|
72
|
-
File.makedirs path
|
73
|
-
File.makedirs File.join(path, 'components')
|
74
|
-
File.makedirs File.join(path, 'models')
|
75
|
-
File.makedirs File.join(path, 'conf')
|
76
|
-
|
77
|
-
File.copy File.join(src, 'run.rb'), path, true
|
78
|
-
File.copy File.join(src, 'README'), path, true
|
79
|
-
File.copy File.join(src, 'components', 'main.rb'), File.join(path, 'components'), true
|
80
|
-
File.copy File.join(src, 'models', 'recipe.rb'), File.join(path, 'models'), true
|
81
|
-
|
82
|
-
cfg = File.read(File.join(src, 'conf', 'db.rb'))
|
83
|
-
cfg = cfg.gsub('%%db%%', get_username).gsub('%%user%%', get_username)
|
84
|
-
File.open(File.join(path, 'conf', 'db.rb'), 'w+') {|f| f << cfg }
|
85
|
-
|
86
|
-
else
|
87
|
-
usage()
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
def get_username
|
92
|
-
begin
|
93
|
-
require 'etc'
|
94
|
-
Etc.getlogin
|
95
|
-
rescue LoadError
|
96
|
-
'xxx'
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
run()
|