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
@@ -55,8 +55,8 @@
|
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
-
<a href="../files/lib/wee/databases/
|
59
|
-
lib/wee/databases/og.rb
|
58
|
+
<a href="../files/lib/wee/databases/og/session_rb.html">
|
59
|
+
lib/wee/databases/og/session.rb
|
60
60
|
</a>
|
61
61
|
<br />
|
62
62
|
</td>
|
@@ -125,7 +125,7 @@
|
|
125
125
|
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
126
126
|
<div class="method-source-code" id="M000001-source">
|
127
127
|
<pre>
|
128
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line
|
128
|
+
<span class="ruby-comment cmt"># File lib/wee/databases/og/session.rb, line 2</span>
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">awake</span>
|
130
130
|
<span class="ruby-identifier">application</span>.<span class="ruby-identifier">db</span>.<span class="ruby-identifier">get_connection</span>
|
131
131
|
<span class="ruby-keyword kw">end</span>
|
@@ -148,7 +148,7 @@
|
|
148
148
|
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
149
149
|
<div class="method-source-code" id="M000002-source">
|
150
150
|
<pre>
|
151
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og.rb, line
|
151
|
+
<span class="ruby-comment cmt"># File lib/wee/databases/og/session.rb, line 6</span>
|
152
152
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sleep</span>
|
153
153
|
<span class="ruby-identifier">application</span>.<span class="ruby-identifier">db</span>.<span class="ruby-identifier">put_connection</span>
|
154
154
|
<span class="ruby-keyword kw">end</span>
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Recipe</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Recipe</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/wee/skeleton/og/models/recipe_rb.html">
|
59
|
+
lib/wee/skeleton/og/models/recipe.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<!-- if method_list -->
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<div id="validator-badges">
|
109
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</body>
|
113
|
+
</html>
|
@@ -88,8 +88,8 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
91
|
+
<a href="#M000076">restore_snapshot</a>
|
92
|
+
<a href="#M000075">take_snapshot</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -111,19 +111,19 @@
|
|
111
111
|
<div id="methods">
|
112
112
|
<h3 class="section-bar">Public Instance methods</h3>
|
113
113
|
|
114
|
-
<div id="method-
|
115
|
-
<a name="
|
114
|
+
<div id="method-M000076" class="method-detail">
|
115
|
+
<a name="M000076"></a>
|
116
116
|
|
117
117
|
<div class="method-heading">
|
118
|
-
<a href="#
|
118
|
+
<a href="#M000076" class="method-signature">
|
119
119
|
<span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
|
120
120
|
</a>
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div class="method-description">
|
124
124
|
<p><a class="source-toggle" href="#"
|
125
|
-
onclick="toggleCode('
|
126
|
-
<div class="method-source-code" id="
|
125
|
+
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000076-source">
|
127
127
|
<pre>
|
128
128
|
<span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 32</span>
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
|
@@ -134,19 +134,19 @@
|
|
134
134
|
</div>
|
135
135
|
</div>
|
136
136
|
|
137
|
-
<div id="method-
|
138
|
-
<a name="
|
137
|
+
<div id="method-M000075" class="method-detail">
|
138
|
+
<a name="M000075"></a>
|
139
139
|
|
140
140
|
<div class="method-heading">
|
141
|
-
<a href="#
|
141
|
+
<a href="#M000075" class="method-signature">
|
142
142
|
<span class="method-name">take_snapshot</span><span class="method-args">()</span>
|
143
143
|
</a>
|
144
144
|
</div>
|
145
145
|
|
146
146
|
<div class="method-description">
|
147
147
|
<p><a class="source-toggle" href="#"
|
148
|
-
onclick="toggleCode('
|
149
|
-
<div class="method-source-code" id="
|
148
|
+
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
149
|
+
<div class="method-source-code" id="M000075-source">
|
150
150
|
<pre>
|
151
151
|
<span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 28</span>
|
152
152
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
|
@@ -88,8 +88,8 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
91
|
+
<a href="#M000009">restore_snapshot</a>
|
92
|
+
<a href="#M000008">take_snapshot</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -111,19 +111,19 @@
|
|
111
111
|
<div id="methods">
|
112
112
|
<h3 class="section-bar">Public Instance methods</h3>
|
113
113
|
|
114
|
-
<div id="method-
|
115
|
-
<a name="
|
114
|
+
<div id="method-M000009" class="method-detail">
|
115
|
+
<a name="M000009"></a>
|
116
116
|
|
117
117
|
<div class="method-heading">
|
118
|
-
<a href="#
|
118
|
+
<a href="#M000009" class="method-signature">
|
119
119
|
<span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
|
120
120
|
</a>
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div class="method-description">
|
124
124
|
<p><a class="source-toggle" href="#"
|
125
|
-
onclick="toggleCode('
|
126
|
-
<div class="method-source-code" id="
|
125
|
+
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000009-source">
|
127
127
|
<pre>
|
128
128
|
<span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 44</span>
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
|
@@ -134,19 +134,19 @@
|
|
134
134
|
</div>
|
135
135
|
</div>
|
136
136
|
|
137
|
-
<div id="method-
|
138
|
-
<a name="
|
137
|
+
<div id="method-M000008" class="method-detail">
|
138
|
+
<a name="M000008"></a>
|
139
139
|
|
140
140
|
<div class="method-heading">
|
141
|
-
<a href="#
|
141
|
+
<a href="#M000008" class="method-signature">
|
142
142
|
<span class="method-name">take_snapshot</span><span class="method-args">()</span>
|
143
143
|
</a>
|
144
144
|
</div>
|
145
145
|
|
146
146
|
<div class="method-description">
|
147
147
|
<p><a class="source-toggle" href="#"
|
148
|
-
onclick="toggleCode('
|
149
|
-
<div class="method-source-code" id="
|
148
|
+
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
149
|
+
<div class="method-source-code" id="M000008-source">
|
150
150
|
<pre>
|
151
151
|
<span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 38</span>
|
152
152
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
|
data/doc/rdoc/classes/Wee.html
CHANGED
@@ -112,9 +112,13 @@ Class <a href="Wee/GenericResponse.html" class="link">Wee::GenericResponse</a><b
|
|
112
112
|
Class <a href="Wee/HtmlCanvas.html" class="link">Wee::HtmlCanvas</a><br />
|
113
113
|
Class <a href="Wee/HtmlWriter.html" class="link">Wee::HtmlWriter</a><br />
|
114
114
|
Class <a href="Wee/LiteralMethodCallback.html" class="link">Wee::LiteralMethodCallback</a><br />
|
115
|
+
Class <a href="Wee/Md5IdGenerator.html" class="link">Wee::Md5IdGenerator</a><br />
|
115
116
|
Class <a href="Wee/MessageBox.html" class="link">Wee::MessageBox</a><br />
|
116
117
|
Class <a href="Wee/Page.html" class="link">Wee::Page</a><br />
|
117
118
|
Class <a href="Wee/PageDecoration.html" class="link">Wee::PageDecoration</a><br />
|
119
|
+
Class <a href="Wee/PagelessApplication.html" class="link">Wee::PagelessApplication</a><br />
|
120
|
+
Class <a href="Wee/PagelessRequest.html" class="link">Wee::PagelessRequest</a><br />
|
121
|
+
Class <a href="Wee/PagelessSession.html" class="link">Wee::PagelessSession</a><br />
|
118
122
|
Class <a href="Wee/Presenter.html" class="link">Wee::Presenter</a><br />
|
119
123
|
Class <a href="Wee/RedirectResponse.html" class="link">Wee::RedirectResponse</a><br />
|
120
124
|
Class <a href="Wee/RefreshResponse.html" class="link">Wee::RefreshResponse</a><br />
|
@@ -139,7 +143,12 @@ Class <a href="Wee/WrapperDecoration.html" class="link">Wee::WrapperDecoration</
|
|
139
143
|
<tr class="top-aligned-row context-row">
|
140
144
|
<td class="context-item-name">Version</td>
|
141
145
|
<td>=</td>
|
142
|
-
<td class="context-item-value">"0.
|
146
|
+
<td class="context-item-value">"0.6.0"</td>
|
147
|
+
</tr>
|
148
|
+
<tr class="top-aligned-row context-row">
|
149
|
+
<td class="context-item-name">LibPath</td>
|
150
|
+
<td>=</td>
|
151
|
+
<td class="context-item-value">File.dirname(__FILE__)</td>
|
143
152
|
</tr>
|
144
153
|
</table>
|
145
154
|
</div>
|
@@ -84,9 +84,9 @@
|
|
84
84
|
<p>
|
85
85
|
A <a href="AnswerDecoration.html">Wee::AnswerDecoration</a> is wrapped
|
86
86
|
around a component that will call <a
|
87
|
-
href="Component.html#
|
87
|
+
href="Component.html#M000265">Component#answer</a>. This makes it possible
|
88
88
|
to use such components without the need to call them (<a
|
89
|
-
href="Component.html#
|
89
|
+
href="Component.html#M000264">Component#call</a>), e.g. as child components
|
90
90
|
of other components.
|
91
91
|
</p>
|
92
92
|
|
@@ -99,7 +99,7 @@ of other components.
|
|
99
99
|
<h3 class="section-bar">Methods</h3>
|
100
100
|
|
101
101
|
<div class="name-list">
|
102
|
-
<a href="#
|
102
|
+
<a href="#M000096">process_callbacks</a>
|
103
103
|
</div>
|
104
104
|
</div>
|
105
105
|
|
@@ -125,7 +125,7 @@ of other components.
|
|
125
125
|
<td class="context-item-desc">
|
126
126
|
When a component answers, <tt>on_answer.call(args)</tt> will be executed
|
127
127
|
(unless nil), where <tt>args</tt> are the arguments passed to <a
|
128
|
-
href="Component.html#
|
128
|
+
href="Component.html#M000265">Component#answer</a>. Note that no snapshot
|
129
129
|
of on_answer is taken, so you should avoid modifying it!
|
130
130
|
|
131
131
|
</td>
|
@@ -140,19 +140,19 @@ of on_answer is taken, so you should avoid modifying it!
|
|
140
140
|
<div id="methods">
|
141
141
|
<h3 class="section-bar">Public Instance methods</h3>
|
142
142
|
|
143
|
-
<div id="method-
|
144
|
-
<a name="
|
143
|
+
<div id="method-M000096" class="method-detail">
|
144
|
+
<a name="M000096"></a>
|
145
145
|
|
146
146
|
<div class="method-heading">
|
147
|
-
<a href="#
|
147
|
+
<a href="#M000096" class="method-signature">
|
148
148
|
<span class="method-name">process_callbacks</span><span class="method-args">(callback_stream)</span>
|
149
149
|
</a>
|
150
150
|
</div>
|
151
151
|
|
152
152
|
<div class="method-description">
|
153
153
|
<p><a class="source-toggle" href="#"
|
154
|
-
onclick="toggleCode('
|
155
|
-
<div class="method-source-code" id="
|
154
|
+
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
155
|
+
<div class="method-source-code" id="M000096-source">
|
156
156
|
<pre>
|
157
157
|
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 131</span>
|
158
158
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
|
@@ -103,13 +103,13 @@ the correct handler by examining the request.
|
|
103
103
|
<h3 class="section-bar">Methods</h3>
|
104
104
|
|
105
105
|
<div class="name-list">
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
106
|
+
<a href="#M000218">default_request_handler</a>
|
107
|
+
<a href="#M000223">garbage_collect_handlers</a>
|
108
|
+
<a href="#M000221">get_property</a>
|
109
|
+
<a href="#M000220">handle_request</a>
|
110
|
+
<a href="#M000219">new</a>
|
111
|
+
<a href="#M000224">request_handler_expired</a>
|
112
|
+
<a href="#M000222">unique_request_handler_id</a>
|
113
113
|
</div>
|
114
114
|
</div>
|
115
115
|
|
@@ -155,11 +155,11 @@ The maximum number of request handlers
|
|
155
155
|
<div id="methods">
|
156
156
|
<h3 class="section-bar">Public Class methods</h3>
|
157
157
|
|
158
|
-
<div id="method-
|
159
|
-
<a name="
|
158
|
+
<div id="method-M000219" class="method-detail">
|
159
|
+
<a name="M000219"></a>
|
160
160
|
|
161
161
|
<div class="method-heading">
|
162
|
-
<a href="#
|
162
|
+
<a href="#M000219" class="method-signature">
|
163
163
|
<span class="method-name">new</span><span class="method-args">(&block)</span>
|
164
164
|
</a>
|
165
165
|
</div>
|
@@ -176,8 +176,8 @@ Creates a new application. The block is used to initialize the attributes:
|
|
176
176
|
}
|
177
177
|
</pre>
|
178
178
|
<p><a class="source-toggle" href="#"
|
179
|
-
onclick="toggleCode('
|
180
|
-
<div class="method-source-code" id="
|
179
|
+
onclick="toggleCode('M000219-source');return false;">[Source]</a></p>
|
180
|
+
<div class="method-source-code" id="M000219-source">
|
181
181
|
<pre>
|
182
182
|
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 34</span>
|
183
183
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -203,11 +203,11 @@ Creates a new application. The block is used to initialize the attributes:
|
|
203
203
|
|
204
204
|
<h3 class="section-bar">Public Instance methods</h3>
|
205
205
|
|
206
|
-
<div id="method-
|
207
|
-
<a name="
|
206
|
+
<div id="method-M000218" class="method-detail">
|
207
|
+
<a name="M000218"></a>
|
208
208
|
|
209
209
|
<div class="method-heading">
|
210
|
-
<a href="#
|
210
|
+
<a href="#M000218" class="method-signature">
|
211
211
|
<span class="method-name">default_request_handler</span><span class="method-args">(&block)</span>
|
212
212
|
</a>
|
213
213
|
</div>
|
@@ -218,8 +218,8 @@ Get or set the default request handler. The default request handler is used
|
|
218
218
|
if no request handler id is given in a request.
|
219
219
|
</p>
|
220
220
|
<p><a class="source-toggle" href="#"
|
221
|
-
onclick="toggleCode('
|
222
|
-
<div class="method-source-code" id="
|
221
|
+
onclick="toggleCode('M000218-source');return false;">[Source]</a></p>
|
222
|
+
<div class="method-source-code" id="M000218-source">
|
223
223
|
<pre>
|
224
224
|
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 18</span>
|
225
225
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_request_handler</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -234,19 +234,19 @@ if no request handler id is given in a request.
|
|
234
234
|
</div>
|
235
235
|
</div>
|
236
236
|
|
237
|
-
<div id="method-
|
238
|
-
<a name="
|
237
|
+
<div id="method-M000220" class="method-detail">
|
238
|
+
<a name="M000220"></a>
|
239
239
|
|
240
240
|
<div class="method-heading">
|
241
|
-
<a href="#
|
241
|
+
<a href="#M000220" class="method-signature">
|
242
242
|
<span class="method-name">handle_request</span><span class="method-args">(context)</span>
|
243
243
|
</a>
|
244
244
|
</div>
|
245
245
|
|
246
246
|
<div class="method-description">
|
247
247
|
<p><a class="source-toggle" href="#"
|
248
|
-
onclick="toggleCode('
|
249
|
-
<div class="method-source-code" id="
|
248
|
+
onclick="toggleCode('M000220-source');return false;">[Source]</a></p>
|
249
|
+
<div class="method-source-code" id="M000220-source">
|
250
250
|
<pre>
|
251
251
|
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 51</span>
|
252
252
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
|
@@ -277,7 +277,8 @@ if no request handler id is given in a request.
|
|
277
277
|
<span class="ruby-ivar">@request_handlers</span>[<span class="ruby-identifier">request_handler_id</span>] = <span class="ruby-identifier">request_handler</span>
|
278
278
|
}
|
279
279
|
|
280
|
-
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">
|
280
|
+
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">request_handler_id</span> = <span class="ruby-identifier">request_handler_id</span>
|
281
|
+
<span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
|
281
282
|
<span class="ruby-keyword kw">return</span>
|
282
283
|
|
283
284
|
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">request_handler</span>.<span class="ruby-identifier">nil?</span>
|
@@ -339,11 +340,11 @@ if no request handler id is given in a request.
|
|
339
340
|
<div id="methods">
|
340
341
|
<h3 class="section-bar">Public Instance methods</h3>
|
341
342
|
|
342
|
-
<div id="method-
|
343
|
-
<a name="
|
343
|
+
<div id="method-M000221" class="method-detail">
|
344
|
+
<a name="M000221"></a>
|
344
345
|
|
345
346
|
<div class="method-heading">
|
346
|
-
<a href="#
|
347
|
+
<a href="#M000221" class="method-signature">
|
347
348
|
<span class="method-name">get_property</span><span class="method-args">(prop, klass)</span>
|
348
349
|
</a>
|
349
350
|
</div>
|
@@ -353,10 +354,10 @@ if no request handler id is given in a request.
|
|
353
354
|
Returns an "owned" property for the given <tt>klass</tt>.
|
354
355
|
</p>
|
355
356
|
<p><a class="source-toggle" href="#"
|
356
|
-
onclick="toggleCode('
|
357
|
-
<div class="method-source-code" id="
|
357
|
+
onclick="toggleCode('M000221-source');return false;">[Source]</a></p>
|
358
|
+
<div class="method-source-code" id="M000221-source">
|
358
359
|
<pre>
|
359
|
-
<span class="ruby-comment cmt"># File lib/wee/application.rb, line
|
360
|
+
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 114</span>
|
360
361
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">klass</span>)
|
361
362
|
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@properties</span>
|
362
363
|
<span class="ruby-ivar">@properties</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">klass</span>, {})[<span class="ruby-identifier">prop</span>]
|
@@ -371,11 +372,11 @@ Returns an "owned" property for the given <tt>klass</tt>.
|
|
371
372
|
|
372
373
|
<h3 class="section-bar">Private Instance methods</h3>
|
373
374
|
|
374
|
-
<div id="method-
|
375
|
-
<a name="
|
375
|
+
<div id="method-M000223" class="method-detail">
|
376
|
+
<a name="M000223"></a>
|
376
377
|
|
377
378
|
<div class="method-heading">
|
378
|
-
<a href="#
|
379
|
+
<a href="#M000223" class="method-signature">
|
379
380
|
<span class="method-name">garbage_collect_handlers</span><span class="method-args">()</span>
|
380
381
|
</a>
|
381
382
|
</div>
|
@@ -385,10 +386,10 @@ Returns an "owned" property for the given <tt>klass</tt>.
|
|
385
386
|
MUST be called while holding @mutex
|
386
387
|
</p>
|
387
388
|
<p><a class="source-toggle" href="#"
|
388
|
-
onclick="toggleCode('
|
389
|
-
<div class="method-source-code" id="
|
389
|
+
onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
|
390
|
+
<div class="method-source-code" id="M000223-source">
|
390
391
|
<pre>
|
391
|
-
<span class="ruby-comment cmt"># File lib/wee/application.rb, line
|
392
|
+
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 134</span>
|
392
393
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">garbage_collect_handlers</span>
|
393
394
|
<span class="ruby-ivar">@request_handlers</span>.<span class="ruby-identifier">delete_if</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">id</span>,<span class="ruby-identifier">rh</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">rh</span>.<span class="ruby-identifier">alive?</span> }
|
394
395
|
<span class="ruby-keyword kw">end</span>
|
@@ -397,21 +398,21 @@ MUST be called while holding @mutex
|
|
397
398
|
</div>
|
398
399
|
</div>
|
399
400
|
|
400
|
-
<div id="method-
|
401
|
-
<a name="
|
401
|
+
<div id="method-M000224" class="method-detail">
|
402
|
+
<a name="M000224"></a>
|
402
403
|
|
403
404
|
<div class="method-heading">
|
404
|
-
<a href="#
|
405
|
+
<a href="#M000224" class="method-signature">
|
405
406
|
<span class="method-name">request_handler_expired</span><span class="method-args">(context)</span>
|
406
407
|
</a>
|
407
408
|
</div>
|
408
409
|
|
409
410
|
<div class="method-description">
|
410
411
|
<p><a class="source-toggle" href="#"
|
411
|
-
onclick="toggleCode('
|
412
|
-
<div class="method-source-code" id="
|
412
|
+
onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
|
413
|
+
<div class="method-source-code" id="M000224-source">
|
413
414
|
<pre>
|
414
|
-
<span class="ruby-comment cmt"># File lib/wee/application.rb, line
|
415
|
+
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 138</span>
|
415
416
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request_handler_expired</span>(<span class="ruby-identifier">context</span>)
|
416
417
|
<span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RefreshResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Invalid or expired request handler!"</span>, <span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">application_path</span>)
|
417
418
|
<span class="ruby-keyword kw">end</span>
|
@@ -420,11 +421,11 @@ MUST be called while holding @mutex
|
|
420
421
|
</div>
|
421
422
|
</div>
|
422
423
|
|
423
|
-
<div id="method-
|
424
|
-
<a name="
|
424
|
+
<div id="method-M000222" class="method-detail">
|
425
|
+
<a name="M000222"></a>
|
425
426
|
|
426
427
|
<div class="method-heading">
|
427
|
-
<a href="#
|
428
|
+
<a href="#M000222" class="method-signature">
|
428
429
|
<span class="method-name">unique_request_handler_id</span><span class="method-args">()</span>
|
429
430
|
</a>
|
430
431
|
</div>
|
@@ -434,10 +435,10 @@ MUST be called while holding @mutex
|
|
434
435
|
MUST be called while holding @mutex
|
435
436
|
</p>
|
436
437
|
<p><a class="source-toggle" href="#"
|
437
|
-
onclick="toggleCode('
|
438
|
-
<div class="method-source-code" id="
|
438
|
+
onclick="toggleCode('M000222-source');return false;">[Source]</a></p>
|
439
|
+
<div class="method-source-code" id="M000222-source">
|
439
440
|
<pre>
|
440
|
-
<span class="ruby-comment cmt"># File lib/wee/application.rb, line
|
441
|
+
<span class="ruby-comment cmt"># File lib/wee/application.rb, line 126</span>
|
441
442
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unique_request_handler_id</span>
|
442
443
|
<span class="ruby-identifier">id</span> = <span class="ruby-ivar">@id_generator</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">to_s</span>
|
443
444
|
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"failed to create unique request handler id"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@request_handlers</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">id</span>)
|