kwartz 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +10 -3
- data/README.txt +6 -1
- data/bin/kwartz +1 -1
- data/doc-api/classes/Kwartz.html +2 -2
- data/doc-api/classes/Kwartz/Main.html +2 -2
- data/doc-api/created.rid +1 -1
- data/doc-api/files/__/README_txt.html +6 -2
- data/doc-api/files/kwartz/assert_rb.html +1 -1
- data/doc-api/files/kwartz/binding/eperl_rb.html +1 -1
- data/doc-api/files/kwartz/binding/erubis_rb.html +1 -1
- data/doc-api/files/kwartz/binding/eruby_rb.html +1 -1
- data/doc-api/files/kwartz/binding/jstl_rb.html +1 -1
- data/doc-api/files/kwartz/binding/php_rb.html +1 -1
- data/doc-api/files/kwartz/binding/pierubis_rb.html +1 -1
- data/doc-api/files/kwartz/binding/rails_rb.html +1 -1
- data/doc-api/files/kwartz/binding/ruby_rb.html +1 -1
- data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
- data/doc-api/files/kwartz/config_rb.html +1 -1
- data/doc-api/files/kwartz/converter_rb.html +1 -1
- data/doc-api/files/kwartz/defun_rb.html +1 -1
- data/doc-api/files/kwartz/error_rb.html +1 -1
- data/doc-api/files/kwartz/helper/rails_rb.html +1 -1
- data/doc-api/files/kwartz/main_rb.html +2 -2
- data/doc-api/files/kwartz/node_rb.html +1 -1
- data/doc-api/files/kwartz/parser_rb.html +1 -1
- data/doc-api/files/kwartz/translator_rb.html +1 -1
- data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
- data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
- data/doc-api/files/kwartz/util_rb.html +1 -1
- data/doc-api/files/kwartz_rb.html +1 -1
- data/doc/img/fig01.png +0 -0
- data/doc/img/fig02.png +0 -0
- data/doc/img/fig03.png +0 -0
- data/doc/img/fig04.png +0 -0
- data/doc/{p-pattern.html → pattern-catalog.html} +29 -21
- data/doc/pattern-catalog/design.css +51 -0
- data/doc/pattern-catalog/design.html +42 -0
- data/doc/reference.html +23 -261
- data/doc/users-guide.html +70 -44
- data/kwartz.gemspec +13 -9
- data/lib/kwartz.rb +2 -2
- data/lib/kwartz/assert.rb +1 -1
- data/lib/kwartz/binding/eperl.rb +1 -1
- data/lib/kwartz/binding/erubis.rb +1 -1
- data/lib/kwartz/binding/eruby.rb +1 -1
- data/lib/kwartz/binding/jstl.rb +1 -1
- data/lib/kwartz/binding/php.rb +1 -1
- data/lib/kwartz/binding/pierubis.rb +1 -1
- data/lib/kwartz/binding/rails.rb +1 -1
- data/lib/kwartz/binding/ruby.rb +1 -1
- data/lib/kwartz/binding/struts.rb +1 -1
- data/lib/kwartz/config.rb +1 -1
- data/lib/kwartz/converter.rb +1 -1
- data/lib/kwartz/defun.rb +1 -1
- data/lib/kwartz/error.rb +1 -1
- data/lib/kwartz/helper/rails.rb +1 -1
- data/lib/kwartz/main.rb +4 -4
- data/lib/kwartz/node.rb +1 -1
- data/lib/kwartz/parser.rb +1 -1
- data/lib/kwartz/translator.rb +1 -1
- data/lib/kwartz/util.rb +1 -1
- data/lib/kwartz/util/assert-text-equal.rb +1 -1
- data/lib/kwartz/util/testcase-helper.rb +10 -4
- data/test/test-compile.rb +1 -1
- data/test/test-converter.rb +27 -12
- data/test/test-converter.yaml +173 -26
- data/test/test-directives.rb +1 -1
- data/test/test-main.rb +1 -1
- data/test/test-parser.rb +1 -1
- data/test/test-parser.yaml +1 -1
- data/test/test-rails.rb +1 -1
- data/test/test-ruleset.rb +1 -1
- data/test/test-ruleset.yaml +18 -18
- data/test/test.rb +1 -1
- metadata +10 -4
data/ChangeLog
CHANGED
@@ -1,9 +1,16 @@
|
|
1
1
|
.+document: ChangeLog
|
2
|
-
.?release: $Release: 3.1.
|
3
|
-
.?updated: $Date: 2006-09-
|
2
|
+
.?release: $Release: 3.1.1 $
|
3
|
+
.?updated: $Date: 2006-09-30 05:02:08 +0900 (Sat, 30 Sep 2006) $
|
4
4
|
|
5
5
|
|
6
|
-
* Release 3.1.
|
6
|
+
* Release 3.1.1 (2006-09-29)
|
7
|
+
|
8
|
+
[changes from 3.1.0]
|
9
|
+
|
10
|
+
- Testdata and documents are integrated with Kwartz-php.
|
11
|
+
|
12
|
+
|
13
|
+
* Release 3.1.0 (2006-09-24)
|
7
14
|
|
8
15
|
[enhancements from 3.0.0]
|
9
16
|
|
data/README.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= README
|
2
2
|
|
3
|
-
release:: $Release: 3.1.
|
3
|
+
release:: $Release: 3.1.1 $
|
4
4
|
copyright:: copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
5
5
|
|
6
6
|
|
@@ -30,6 +30,11 @@ Else download kwartz-ruby_x.x.x.tar.bz2 and install with setup.rb.
|
|
30
30
|
|
31
31
|
== Copyright
|
32
32
|
|
33
|
+
copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
34
|
+
|
35
|
+
|
36
|
+
== License
|
37
|
+
|
33
38
|
LGPL 2.1
|
34
39
|
|
35
40
|
If you need looser license, please suggest me.
|
data/bin/kwartz
CHANGED
data/doc-api/classes/Kwartz.html
CHANGED
@@ -154,7 +154,7 @@
|
|
154
154
|
|
155
155
|
<div id="description">
|
156
156
|
<p>
|
157
|
-
$Rev: 136 $ $Release: 3.1.
|
157
|
+
$Rev: 136 $ $Release: 3.1.1 $ copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
158
158
|
</p>
|
159
159
|
|
160
160
|
</div>
|
@@ -239,7 +239,7 @@ Class <a href="Kwartz/Translator.html" class="link">Kwartz::Translator</a><br />
|
|
239
239
|
<tr class="top-aligned-row context-row">
|
240
240
|
<td class="context-item-name">RELEASE</td>
|
241
241
|
<td>=</td>
|
242
|
-
<td class="context-item-value">('$Release: 3.1.
|
242
|
+
<td class="context-item-value">('$Release: 3.1.1 $' =~ /\$Release: (\S+)\s*\$/) && $1</td>
|
243
243
|
</tr>
|
244
244
|
</table>
|
245
245
|
</div>
|
@@ -142,8 +142,8 @@ ex.
|
|
142
142
|
<span class="ruby-identifier">status</span> = <span class="ruby-value">0</span>
|
143
143
|
<span class="ruby-keyword kw">begin</span>
|
144
144
|
<span class="ruby-identifier">main</span> = <span class="ruby-constant">Kwartz</span><span class="ruby-operator">::</span><span class="ruby-constant">Main</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">argv</span>)
|
145
|
-
<span class="ruby-identifier">
|
146
|
-
<span class="ruby-identifier">print</span> <span class="ruby-identifier">
|
145
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-identifier">main</span>.<span class="ruby-identifier">execute</span>()
|
146
|
+
<span class="ruby-identifier">print</span> <span class="ruby-identifier">output</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
147
147
|
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Kwartz</span><span class="ruby-operator">::</span><span class="ruby-constant">KwartzError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
148
148
|
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">ex</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
149
149
|
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">to_s</span>
|
data/doc-api/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sat Sep 30 05:30:19 JST 2006
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Fri Sep 29 20:16:09 JST 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -71,7 +71,7 @@
|
|
71
71
|
<div id="description">
|
72
72
|
<h1>README</h1>
|
73
73
|
<table>
|
74
|
-
<tr><td valign="top">release:</td><td>$Release: 3.1.
|
74
|
+
<tr><td valign="top">release:</td><td>$Release: 3.1.1 $
|
75
75
|
|
76
76
|
</td></tr>
|
77
77
|
<tr><td valign="top">copyright:</td><td>copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
@@ -107,6 +107,10 @@ Else download kwartz-ruby_x.x.x.tar.bz2 and install with setup.rb.
|
|
107
107
|
</pre>
|
108
108
|
<h2>Copyright</h2>
|
109
109
|
<p>
|
110
|
+
copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
111
|
+
</p>
|
112
|
+
<h2>License</h2>
|
113
|
+
<p>
|
110
114
|
LGPL 2.1
|
111
115
|
</p>
|
112
116
|
<p>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Thu Sep 28 22:22:44 JST 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -70,7 +70,7 @@
|
|
70
70
|
|
71
71
|
<div id="description">
|
72
72
|
<p>
|
73
|
-
$Rev:
|
73
|
+
$Rev: 141 $ $Release: 3.1.1 $ copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
74
74
|
</p>
|
75
75
|
|
76
76
|
</div>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Sat
|
59
|
+
<td>Sat Sep 30 05:25:45 JST 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -70,7 +70,7 @@
|
|
70
70
|
|
71
71
|
<div id="description">
|
72
72
|
<p>
|
73
|
-
$Rev$ $Release: 3.1.
|
73
|
+
$Rev$ $Release: 3.1.1 $ copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
74
74
|
</p>
|
75
75
|
|
76
76
|
</div>
|
data/doc/img/fig01.png
ADDED
Binary file
|
data/doc/img/fig02.png
ADDED
Binary file
|
data/doc/img/fig03.png
ADDED
Binary file
|
data/doc/img/fig04.png
ADDED
Binary file
|
@@ -3,7 +3,6 @@
|
|
3
3
|
<head>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html">
|
5
5
|
<title>Presentation Pattern Catalog</title>
|
6
|
-
<meta name="author" content="Makoto Kuwata <kwa(at)kuwata-lab.com>">
|
7
6
|
<meta name="generator" content="kwaser">
|
8
7
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
9
8
|
<link rel="stylesheet" href="docstyle.css" type="text/css">
|
@@ -14,11 +13,9 @@
|
|
14
13
|
<div class="mainbody">
|
15
14
|
|
16
15
|
<div align="left"><h1>Presentation Pattern Catalog</h1></div>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</div>
|
21
|
-
|
16
|
+
<p>$Release: 3.1.1 $<br>
|
17
|
+
$Date: 2006-09-28 22:22:34 +0900 (Thu, 28 Sep 2006) $
|
18
|
+
</p>
|
22
19
|
<a name="preface"></a>
|
23
20
|
<h2 class="section1">Preface</h2>
|
24
21
|
<p>Kwartz is the template system which realized the concept of '<strong>Independence of Presentation Logic (IoPL)</strong>.'
|
@@ -201,9 +198,9 @@ Output Script:</div>
|
|
201
198
|
<a name="replace2a.expected"></a>
|
202
199
|
<pre class="output"><h1><strong><%= title %></strong></h1>
|
203
200
|
</pre>
|
204
|
-
<p>Kwartz Directive '<code>kw:d="cont: <em>expr</em>"</code>' or '<code>kw:d="value: <em>expr</em>"</code>' lets you to use this pattern without presentation logic file.
|
201
|
+
<p>Kwartz Directive '<code>kw:d="cont: <em>expr</em>"</code>' or '<code>kw:d="kw:d="value: <em>expr</em>"</code>' lets you to use this pattern without presentation logic file.
|
205
202
|
</p>
|
206
|
-
<pre class="program"><h1 <strong>
|
203
|
+
<pre class="program"><h1 <strong>kw:d="value: title"</strong>>Example</h1>
|
207
204
|
</pre>
|
208
205
|
<br>
|
209
206
|
|
@@ -352,7 +349,7 @@ Presentation Logic:</div>
|
|
352
349
|
|
353
350
|
<a name="replace-elem-with-elem-supplement"></a>
|
354
351
|
<h4 class="section3">Supplement</h4>
|
355
|
-
<p>Directive '<code>id="replace_element_with_element
|
352
|
+
<p>Directive '<code>id="replace_element_with_element:<em>name</em>"</code>' and '<code>id="replace_element_with_content:<em>name</em>"</code>' lets you to use this pattern without presentation logic file.
|
356
353
|
</p>
|
357
354
|
<pre class="program"><div <strong>id="mark:links"</strong>>
|
358
355
|
<a href="/">HOME</a> | <a href="/doc">Document</a> | <a href="/faq">FAQ</a>
|
@@ -360,7 +357,7 @@ Presentation Logic:</div>
|
|
360
357
|
|
361
358
|
<p>Welcome to my Home Page!</p>
|
362
359
|
|
363
|
-
<div <strong>id="replace_element_with_element:
|
360
|
+
<div <strong>id="replace_element_with_element:links"</strong>>
|
364
361
|
Home | Document | FAQ
|
365
362
|
</div>
|
366
363
|
</pre>
|
@@ -738,7 +735,7 @@ This pattern is very useful for all these situations.
|
|
738
735
|
Presentation Data:</div>
|
739
736
|
<pre class="program"><table>
|
740
737
|
<tr <strong>id="mark:list"</strong>>
|
741
|
-
<td
|
738
|
+
<td id="mark:item">item</td>
|
742
739
|
</tr>
|
743
740
|
</table>
|
744
741
|
</pre>
|
@@ -755,6 +752,10 @@ Presentation Logic:</div>
|
|
755
752
|
<strong>end</strong>
|
756
753
|
}
|
757
754
|
}
|
755
|
+
|
756
|
+
#item {
|
757
|
+
value: item;
|
758
|
+
}
|
758
759
|
</pre>
|
759
760
|
<a name="iterate_elem.expected"></a>
|
760
761
|
<div class="output_caption">
|
@@ -806,8 +807,8 @@ This pattern is named 'Iterate Content' pattern.
|
|
806
807
|
<div class="program_caption">
|
807
808
|
Presentation Data:</div>
|
808
809
|
<pre class="program"><dl <strong>id="mark:list"</strong>>
|
809
|
-
<dt
|
810
|
-
<dd
|
810
|
+
<dt id="mark:text">text</dt>
|
811
|
+
<dd id="mark:desc">description</dd>
|
811
812
|
</dl>
|
812
813
|
</pre>
|
813
814
|
<a name="iterate_cont.plogic"></a>
|
@@ -823,6 +824,13 @@ Presentation Logic:</div>
|
|
823
824
|
_etag
|
824
825
|
}
|
825
826
|
}
|
827
|
+
|
828
|
+
#text {
|
829
|
+
value: item.text;
|
830
|
+
}
|
831
|
+
#desc {
|
832
|
+
value: item.desc;
|
833
|
+
}
|
826
834
|
</pre>
|
827
835
|
<a name="iterate_cont.expected"></a>
|
828
836
|
<div class="output_caption">
|
@@ -838,7 +846,7 @@ Output Script:</div>
|
|
838
846
|
|
839
847
|
<a name="iterate-cont-supplement"></a>
|
840
848
|
<h4 class="section3">Supplement</h4>
|
841
|
-
<p>Kwartz directive <code>kw:d=
|
849
|
+
<p>Kwartz directive <code>kw:d=list <em>item</em> in <em>list</em></code> lets you to use this pattern without presentation logic file.
|
842
850
|
See reference manual for details.
|
843
851
|
</p>
|
844
852
|
<pre class="program"><dl <strong>kw:d="list item in items"</strong>>
|
@@ -1025,7 +1033,7 @@ This pattern is named 'Extract Element Pattern' or 'Extract Content Pattern'.
|
|
1025
1033
|
</p>
|
1026
1034
|
<a name="design.html"></a>
|
1027
1035
|
<div class="program_caption">
|
1028
|
-
Presentation Data (<a href="
|
1036
|
+
Presentation Data (<a href="pattern-catalog/design.html">design.html</a>):</div>
|
1029
1037
|
<pre class="program"><html <strong>id="mark:whole"</strong>>
|
1030
1038
|
<head>
|
1031
1039
|
<title>Design Examples</title>
|
@@ -1063,7 +1071,7 @@ Presentation Data (<a href="p-pattern/design.html">design.html</a>):</div>
|
|
1063
1071
|
<p> ..... </p>
|
1064
1072
|
|
1065
1073
|
<div align="center" class="copyright" <strong>id="mark:copyright"</strong>>
|
1066
|
-
Copyright&copy; 2004-
|
1074
|
+
Copyright&copy; 2004-2006 kuwata-lab. All Rights Reserved.
|
1067
1075
|
</div>
|
1068
1076
|
|
1069
1077
|
</body>
|
@@ -1119,10 +1127,10 @@ Presentation Logic (menulist.plogic):</div>
|
|
1119
1127
|
#menus {
|
1120
1128
|
logic: {
|
1121
1129
|
_stag
|
1122
|
-
|
1130
|
+
for menu in menulist
|
1123
1131
|
_element(menu)
|
1124
1132
|
_element(menu_separator)
|
1125
|
-
|
1133
|
+
end
|
1126
1134
|
_etag
|
1127
1135
|
}
|
1128
1136
|
}
|
@@ -1152,7 +1160,7 @@ $ kwartz -l eruby -p menulist.plogic design.pdata > menulist.rhtml
|
|
1152
1160
|
<div class="output_caption">
|
1153
1161
|
Output Script (copyright.rhtml):</div>
|
1154
1162
|
<pre class="output"> <div align="center" class="copyright">
|
1155
|
-
Copyright&copy; 2004-
|
1163
|
+
Copyright&copy; 2004-2006 kuwata-lab. All Rights Reserved.
|
1156
1164
|
</div>
|
1157
1165
|
</pre>
|
1158
1166
|
<a name="tablist.expected"></a>
|
@@ -1175,11 +1183,11 @@ Output Script (menulist.rhtml):</div>
|
|
1175
1183
|
<pre class="output"> <div>
|
1176
1184
|
<span class="menu_title" id="value:menu_title">MenuList</span>
|
1177
1185
|
<div class="menus">
|
1178
|
-
<%
|
1186
|
+
<% for menu in menulist %>
|
1179
1187
|
<% klass = current_menu == menu['name'] ? 'selected' : '' %>
|
1180
1188
|
<a href="<%= menu['cgipath'] %>" class="<%= klass %>"><%= menu['name'] %></a>
|
1181
1189
|
<span><br></span>
|
1182
|
-
<%
|
1190
|
+
<% end %>
|
1183
1191
|
</div>
|
1184
1192
|
</div>
|
1185
1193
|
</pre>
|