kwartz 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +444 -0
- data/README.txt +4 -1
- data/bin/kwartz +2 -2
- data/doc-api/classes/Kwartz.html +16 -7
- data/doc-api/classes/Kwartz/Assertion.html +6 -6
- data/doc-api/classes/Kwartz/AssertionError.html +6 -6
- data/doc-api/classes/Kwartz/AttrInfo.html +71 -61
- data/doc-api/classes/Kwartz/BaseError.html +12 -12
- data/doc-api/classes/Kwartz/BaseTranslator.html +104 -74
- data/doc-api/classes/Kwartz/CharacterType.html +24 -24
- data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
- data/doc-api/classes/Kwartz/CommandOptions.html +50 -50
- data/doc-api/classes/Kwartz/Config.html +5 -0
- data/doc-api/classes/Kwartz/ConvertError.html +12 -12
- data/doc-api/classes/Kwartz/Converter.html +31 -33
- data/doc-api/classes/Kwartz/CssStyleParser.html +207 -168
- data/doc-api/classes/Kwartz/Defun.html +32 -31
- data/doc-api/classes/Kwartz/{HandlerArgument.html → Directive.html} +27 -53
- data/doc-api/classes/Kwartz/ElementInfo.html +68 -53
- data/doc-api/classes/Kwartz/EperlExpressionParser.html +185 -0
- data/doc-api/classes/Kwartz/EperlHandler.html +65 -58
- data/doc-api/classes/Kwartz/EperlTranslator.html +14 -7
- data/doc-api/classes/Kwartz/ErubisTranslator.html +14 -7
- data/doc-api/classes/Kwartz/ErubyTranslator.html +14 -7
- data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
- data/doc-api/classes/Kwartz/Expander.html +358 -0
- data/doc-api/classes/Kwartz/Handler.html +287 -157
- data/doc-api/classes/Kwartz/{StatementHelper.html → HandlerHelper.html} +307 -112
- data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +23 -23
- data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +96 -96
- data/doc-api/classes/Kwartz/JstlExpressionParser.html +181 -0
- data/doc-api/classes/Kwartz/JstlHandler.html +134 -126
- data/doc-api/classes/Kwartz/JstlTranslator.html +21 -14
- data/doc-api/classes/Kwartz/KwartzError.html +6 -6
- data/doc-api/classes/Kwartz/Main.html +4 -4
- data/doc-api/classes/Kwartz/NativeExpression.html +19 -19
- data/doc-api/classes/Kwartz/NativeStatement.html +24 -24
- data/doc-api/classes/Kwartz/Node.html +7 -7
- data/doc-api/classes/Kwartz/PIErubisTranslator.html +21 -14
- data/doc-api/classes/Kwartz/ParseError.html +6 -6
- data/doc-api/classes/Kwartz/PerlExpressionParser.html +185 -0
- data/doc-api/classes/Kwartz/PerlHandler.html +353 -0
- data/doc-api/classes/Kwartz/PerlTranslator.html +226 -0
- data/doc-api/classes/Kwartz/PhpExpressionParser.html +185 -0
- data/doc-api/classes/Kwartz/PhpHandler.html +63 -56
- data/doc-api/classes/Kwartz/PhpTranslator.html +21 -14
- data/doc-api/classes/Kwartz/PresentationLogicParser.html +126 -123
- data/doc-api/classes/Kwartz/PrintStatement.html +18 -18
- data/doc-api/classes/Kwartz/RailsHandler.html +84 -85
- data/doc-api/classes/Kwartz/RailsTranslator.html +13 -6
- data/doc-api/classes/Kwartz/RubyExpressionParser.html +180 -0
- data/doc-api/classes/Kwartz/RubyHandler.html +73 -69
- data/doc-api/classes/Kwartz/RubyStyleParser.html +86 -86
- data/doc-api/classes/Kwartz/RubyTranslator.html +28 -21
- data/doc-api/classes/Kwartz/Ruleset.html +622 -1
- data/doc-api/classes/Kwartz/StrutsTranslator.html +14 -14
- data/doc-api/classes/Kwartz/TagInfo.html +52 -27
- data/doc-api/classes/Kwartz/TextConverter.html +75 -37
- data/doc-api/classes/Kwartz/Translator.html +54 -53
- data/doc-api/classes/Kwartz/Util.html +25 -25
- data/doc-api/created.rid +1 -1
- data/doc-api/files/__/README_txt.html +7 -2
- data/doc-api/files/kwartz/assert_rb.html +2 -2
- data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
- data/doc-api/files/kwartz/binding/erubis_rb.html +2 -2
- data/doc-api/files/kwartz/binding/eruby_rb.html +2 -2
- data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
- data/doc-api/files/kwartz/binding/perl_rb.html +115 -0
- data/doc-api/files/kwartz/binding/php_rb.html +2 -2
- data/doc-api/files/kwartz/binding/pierubis_rb.html +2 -2
- data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
- data/doc-api/files/kwartz/binding/ruby_rb.html +2 -2
- data/doc-api/files/kwartz/binding/struts_rb.html +2 -2
- data/doc-api/files/kwartz/config_rb.html +2 -2
- data/doc-api/files/kwartz/converter_rb.html +2 -2
- data/doc-api/files/kwartz/defun_rb.html +2 -2
- data/doc-api/files/kwartz/error_rb.html +2 -2
- data/doc-api/files/kwartz/helper/rails_rb.html +2 -2
- data/doc-api/files/kwartz/main_rb.html +3 -2
- data/doc-api/files/kwartz/node_rb.html +2 -2
- data/doc-api/files/kwartz/parser_rb.html +2 -2
- data/doc-api/files/kwartz/translator_rb.html +2 -2
- data/doc-api/files/kwartz/util/assert-text-equal_rb.html +2 -2
- data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
- data/doc-api/files/kwartz/util_rb.html +2 -2
- data/doc-api/files/kwartz_rb.html +2 -2
- data/doc-api/fr_class_index.html +10 -5
- data/doc-api/fr_file_index.html +1 -0
- data/doc-api/fr_method_index.html +268 -239
- data/doc/docstyle.css +9 -3
- data/doc/img/fig05.png +0 -0
- data/doc/introduction-to-kwartz.html +3040 -0
- data/doc/pattern-catalog.html +5 -3
- data/doc/reference.html +680 -26
- data/doc/users-guide.html +222 -67
- data/kwartz.gemspec +4 -4
- data/lib/kwartz.rb +3 -3
- data/lib/kwartz/assert.rb +2 -2
- data/lib/kwartz/binding/eperl.rb +71 -31
- data/lib/kwartz/binding/erubis.rb +3 -2
- data/lib/kwartz/binding/eruby.rb +3 -2
- data/lib/kwartz/binding/jstl.rb +66 -29
- data/lib/kwartz/binding/perl.rb +230 -0
- data/lib/kwartz/binding/php.rb +69 -29
- data/lib/kwartz/binding/pierubis.rb +3 -2
- data/lib/kwartz/binding/rails.rb +18 -18
- data/lib/kwartz/binding/ruby.rb +74 -42
- data/lib/kwartz/binding/struts.rb +22 -21
- data/lib/kwartz/config.rb +4 -4
- data/lib/kwartz/converter.rb +465 -345
- data/lib/kwartz/defun.rb +2 -2
- data/lib/kwartz/error.rb +2 -2
- data/lib/kwartz/helper/rails.rb +2 -2
- data/lib/kwartz/main.rb +5 -4
- data/lib/kwartz/node.rb +92 -144
- data/lib/kwartz/parser.rb +112 -103
- data/lib/kwartz/translator.rb +14 -6
- data/lib/kwartz/util.rb +2 -2
- data/lib/kwartz/util/assert-text-equal.rb +2 -2
- data/lib/kwartz/util/testcase-helper.rb +1 -1
- data/test/test-compile.rb +2 -2
- data/test/test-compile.yaml +81 -0
- data/test/test-converter.rb +4 -8
- data/test/test-converter.yaml +152 -3
- data/test/test-directives.rb +2 -2
- data/test/test-directives.yaml +222 -0
- data/test/test-main.rb +6 -4
- data/test/test-main.yaml +66 -1
- data/test/test-parser.rb +12 -3
- data/test/test-parser.yaml +64 -51
- data/test/test-rails.rb +2 -2
- data/test/test-ruleset.rb +2 -2
- data/test/test-ruleset.yaml +465 -4
- data/test/test.log +6 -0
- data/test/test.rb +2 -2
- metadata +116 -106
- data/ChangeLog +0 -156
- data/doc-api/classes/Kwartz/DocumentRuleset.html +0 -369
- data/doc-api/classes/Kwartz/ElementExpander.html +0 -325
- data/doc-api/classes/Kwartz/ElementRuleset.html +0 -612
data/CHANGES
ADDED
@@ -0,0 +1,444 @@
|
|
1
|
+
.+document: ChangeLog
|
2
|
+
.?release: $Release: 3.2.0 $
|
3
|
+
.?updated: $Date$
|
4
|
+
|
5
|
+
|
6
|
+
$ Release 3.2.0 (2010-10-26)
|
7
|
+
|
8
|
+
|
9
|
+
[Enhancements]
|
10
|
+
|
11
|
+
|
12
|
+
* Ruby 1.9 support.
|
13
|
+
|
14
|
+
|
15
|
+
* Class selector and tag selector support.
|
16
|
+
--------------------
|
17
|
+
/* tag selector */
|
18
|
+
h1 {
|
19
|
+
Value: title;
|
20
|
+
}
|
21
|
+
/* class selector */
|
22
|
+
.list {
|
23
|
+
attrs: 'bgcolor' color;
|
24
|
+
}
|
25
|
+
--------------------
|
26
|
+
|
27
|
+
|
28
|
+
* Multi selector support
|
29
|
+
--------------------
|
30
|
+
/* OK - multi selector */
|
31
|
+
#foo, #bar, .baz {
|
32
|
+
value: item;
|
33
|
+
}
|
34
|
+
/* NG - compound selector is not supported */
|
35
|
+
#foo .baz { // parse error
|
36
|
+
value: item;
|
37
|
+
}
|
38
|
+
--------------------
|
39
|
+
|
40
|
+
|
41
|
+
* Attribute variable support. Attribute variable represents attribute
|
42
|
+
value of element. Its notation is '$(attr-name)'.
|
43
|
+
|
44
|
+
ex. form.html
|
45
|
+
--------------------
|
46
|
+
<form action="create">
|
47
|
+
Username: <input type="text" id="comment_username" size="20"><br>
|
48
|
+
Comment: <textarea id="comment_body" cols="40" rows="3"></textarea><br>
|
49
|
+
<input type="submit" id="mark:comment_submit" value="Send comment">
|
50
|
+
</form>
|
51
|
+
--------------------
|
52
|
+
|
53
|
+
ex. form.plogic
|
54
|
+
--------------------
|
55
|
+
form {
|
56
|
+
stag: start_form_tag :action=>'$(action)';
|
57
|
+
}
|
58
|
+
#comment_username {
|
59
|
+
elem: text_field 'comment', 'username', :size=>$(size);
|
60
|
+
}
|
61
|
+
#comment_body {
|
62
|
+
elem: text_area 'comment', 'body', :rows=>$(rows), :cols=>$(cols);
|
63
|
+
}
|
64
|
+
#comment_submit {
|
65
|
+
elem: submit_tag '$(value)';
|
66
|
+
}
|
67
|
+
--------------------
|
68
|
+
|
69
|
+
ex. compile
|
70
|
+
====================
|
71
|
+
$ kwartz -p form.plogic form.html
|
72
|
+
<%= start_form_tag :action=>'create' %>
|
73
|
+
Username: <%= text_field 'comment', 'username', :size=>20 %><br>
|
74
|
+
Comment: <%= text_area 'comment', 'body', :rows=>3, :cols=>40 %><br>
|
75
|
+
<%= submit_tag 'Send comment' %>
|
76
|
+
</form>
|
77
|
+
====================
|
78
|
+
|
79
|
+
|
80
|
+
* New property 'before:' and 'after:' are supported.
|
81
|
+
They mean prework and postwork of presentation logic respectively.
|
82
|
+
|
83
|
+
ex. example.html
|
84
|
+
--------------------
|
85
|
+
<!-- Groups -->
|
86
|
+
<p id="mark:groups">group name</p>
|
87
|
+
|
88
|
+
<!-- Members -->
|
89
|
+
<p id="mark:members">member name</p>
|
90
|
+
--------------------
|
91
|
+
|
92
|
+
ex. example.plogic
|
93
|
+
--------------------
|
94
|
+
#groups {
|
95
|
+
before: {
|
96
|
+
list = @groups
|
97
|
+
}
|
98
|
+
after: {
|
99
|
+
group_count = count
|
100
|
+
}
|
101
|
+
}
|
102
|
+
#members {
|
103
|
+
before: {
|
104
|
+
list = @members
|
105
|
+
}
|
106
|
+
after: {
|
107
|
+
member_count = count
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
/* common properties ('Value:' and 'logic:') */
|
112
|
+
#groups, #members {
|
113
|
+
Value: item;
|
114
|
+
logic: {
|
115
|
+
count = 0
|
116
|
+
for item in list
|
117
|
+
count += 1
|
118
|
+
_stag # start-tag
|
119
|
+
_cont # content
|
120
|
+
_etag # end-tag
|
121
|
+
end
|
122
|
+
}
|
123
|
+
}
|
124
|
+
--------------------
|
125
|
+
|
126
|
+
compile:
|
127
|
+
====================
|
128
|
+
$ kwartz -p example.plogic example.html
|
129
|
+
<!-- Groups -->
|
130
|
+
<% list = @groups %>
|
131
|
+
<% count = 0 %>
|
132
|
+
<% for item in list %>
|
133
|
+
<% count += 1 %>
|
134
|
+
<p><%=h item %></p>
|
135
|
+
<% end %>
|
136
|
+
<% group_count = count %>
|
137
|
+
|
138
|
+
<!-- Members -->
|
139
|
+
<% list = @members %>
|
140
|
+
<% count = 0 %>
|
141
|
+
<% for item in list %>
|
142
|
+
<% count += 1 %>
|
143
|
+
<p><%=h item %></p>
|
144
|
+
<% end %>
|
145
|
+
<% member_count = count %>
|
146
|
+
====================
|
147
|
+
|
148
|
+
|
149
|
+
* Selector '#DOCUMENT' now suppprts 'logic:' property.
|
150
|
+
This is convenient for Extract Element/Content Pattern.
|
151
|
+
|
152
|
+
ex. doc.html
|
153
|
+
--------------------
|
154
|
+
<html>
|
155
|
+
<body>
|
156
|
+
<h1 id="mark:title">...title...</h1>
|
157
|
+
<p>...</p>
|
158
|
+
<div id="mark:contents">
|
159
|
+
<table>
|
160
|
+
<tr id="mark:list">
|
161
|
+
<td>@{item}@</td>
|
162
|
+
</tr>
|
163
|
+
</table>
|
164
|
+
</div>
|
165
|
+
</body>
|
166
|
+
</html>
|
167
|
+
--------------------
|
168
|
+
|
169
|
+
ex. doc.plogic
|
170
|
+
--------------------
|
171
|
+
#DOCUMENT {
|
172
|
+
/* retrieve element of 'id="mark:title"'
|
173
|
+
and content of 'id="mark:contents"' */
|
174
|
+
logic: {
|
175
|
+
_element(title)
|
176
|
+
_content(contents)
|
177
|
+
}
|
178
|
+
}
|
179
|
+
#title {
|
180
|
+
Value: title;
|
181
|
+
}
|
182
|
+
#list {
|
183
|
+
logic: {
|
184
|
+
for item in list
|
185
|
+
_elem
|
186
|
+
end
|
187
|
+
}
|
188
|
+
}
|
189
|
+
--------------------
|
190
|
+
|
191
|
+
compile:
|
192
|
+
====================
|
193
|
+
<h1><%=h title %></h1>
|
194
|
+
<table>
|
195
|
+
<% for item in list %>
|
196
|
+
<tr>
|
197
|
+
<td><%=h item %></td>
|
198
|
+
</tr>
|
199
|
+
<% end %>
|
200
|
+
</table>
|
201
|
+
====================
|
202
|
+
|
203
|
+
|
204
|
+
* Embedded expression '@{...}@' and '@!{...}@' now represents both
|
205
|
+
language-independent expression and language-depend expression.
|
206
|
+
If expression matches the following pattern then it is recognized
|
207
|
+
as language-independent expression, else as language-depend
|
208
|
+
expression.
|
209
|
+
- variable
|
210
|
+
- object.property
|
211
|
+
- hash['key'], hash["key"], hash[:key]
|
212
|
+
- array[123], array[index]
|
213
|
+
|
214
|
+
ex. expr.html
|
215
|
+
--------------------
|
216
|
+
@!{variable}@
|
217
|
+
@!{object.property}@
|
218
|
+
@!{hash['key']}@
|
219
|
+
@!{hash[:key]}@
|
220
|
+
@!{array[0]}@
|
221
|
+
@!{array[index]}@
|
222
|
+
@!{$unknown->style}@
|
223
|
+
--------------------
|
224
|
+
|
225
|
+
compile:
|
226
|
+
====================
|
227
|
+
$ kwarz -l eruby expr.html
|
228
|
+
<%= variable %>
|
229
|
+
<%= object.property %>
|
230
|
+
<%= hash['key'] %>
|
231
|
+
<%= hash["key"] %>
|
232
|
+
<%= hash[:key] %>
|
233
|
+
<%= array[0] %>
|
234
|
+
<%= array[index] %>
|
235
|
+
<%= $unknown->style %>
|
236
|
+
$ kwartz -l php expr.html
|
237
|
+
<?php echo $variable; ?>
|
238
|
+
<?php echo $object->property; ?>
|
239
|
+
<?php echo $hash['key']; ?>
|
240
|
+
<?php echo $hash["key"]; ?>
|
241
|
+
<?php echo $hash['key']; ?>
|
242
|
+
<?php echo $array[0]; ?>
|
243
|
+
<?php echo $array[$index]; ?>
|
244
|
+
<?php echo $unknown->style; ?>
|
245
|
+
====================
|
246
|
+
|
247
|
+
|
248
|
+
* Directive 'value', 'elem', 'stag', 'cont', 'etag', and 'default'
|
249
|
+
can be language-independent if their argument is one of the
|
250
|
+
following format.
|
251
|
+
- variable
|
252
|
+
- object.property
|
253
|
+
- hash['key'], hash["key"], hash[:key]
|
254
|
+
- array[123], array[index]
|
255
|
+
|
256
|
+
ex. value.html
|
257
|
+
--------------------
|
258
|
+
<p id="Value:user">foo</p>
|
259
|
+
<p id="value:user.name">foo</p>
|
260
|
+
<p id="value:user['name']">foo</p>
|
261
|
+
<p id="value:user[:name]">foo</p>
|
262
|
+
<p id="value:user[0]">foo</p>
|
263
|
+
<p id="value:user[i]">foo</p>
|
264
|
+
--------------------
|
265
|
+
|
266
|
+
compile:
|
267
|
+
====================
|
268
|
+
$ kwartz -l eruby value.html
|
269
|
+
<p><%=h user %></p>
|
270
|
+
<p><%= user.name %></p>
|
271
|
+
<p><%= user['name'] %></p>
|
272
|
+
<p><%= user[:name] %></p>
|
273
|
+
<p><%= user[0] %></p>
|
274
|
+
<p><%= user[i] %></p>
|
275
|
+
$ kwartz -l php value.html
|
276
|
+
<p><?php echo htmlspecialchars($user); ?></p>
|
277
|
+
<p><?php echo $user->name; ?></p>
|
278
|
+
<p><?php echo $user['name']; ?></p>
|
279
|
+
<p><?php echo $user['name']; ?></p>
|
280
|
+
<p><?php echo $user[0]; ?></p>
|
281
|
+
<p><?php echo $user[$i]; ?></p>
|
282
|
+
====================
|
283
|
+
|
284
|
+
|
285
|
+
[Changes]
|
286
|
+
|
287
|
+
* Properties 'begin:' and 'end:' are obsolete (but still available
|
288
|
+
for compatibility). You should use 'before:' and 'after:'
|
289
|
+
instead of 'begin:' and 'end:'.
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
$ Release 3.1.2 (2006-10-22)
|
294
|
+
|
295
|
+
[enhancements from 3.1.1]
|
296
|
+
|
297
|
+
* Error reporting improved when using with Ruby on Rails.
|
298
|
+
'kwartz/helper/rails.rb' now show template filename and
|
299
|
+
linenumber on where exception raised.
|
300
|
+
Notice that you have to read *.cache file instead of *.html
|
301
|
+
or *.plogic.
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
$ Release 3.1.1 (2006-09-29)
|
306
|
+
|
307
|
+
[changes from 3.1.0]
|
308
|
+
|
309
|
+
* Testdata and documents are integrated with Kwartz-php.
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
$ Release 3.1.0 (2006-09-24)
|
314
|
+
|
315
|
+
[enhancements from 3.0.0]
|
316
|
+
|
317
|
+
* Support of Ruby on Rails improved.
|
318
|
+
Kwartz now provides template class for RoR.
|
319
|
+
You don't have to convert *.html and *.plogic into *.rhtml.
|
320
|
+
Kwartz directly render HTML page from *.html and *.plogic.
|
321
|
+
See Kwartz Users' Guide for detail.
|
322
|
+
http://www.kuwata-lab.com/kwartz/kwartz3-users-guide.03.html
|
323
|
+
|
324
|
+
* New example 'example/rails2' added.
|
325
|
+
It is a good example to use Kwartz with Ruby on Rails.
|
326
|
+
|
327
|
+
* Command-line option '-l rails' support. This option extends
|
328
|
+
directives in *.html to support Rails helper methods.
|
329
|
+
See Kwartz Users' Guide for detail.
|
330
|
+
http://www.kuwata-lab.com/kwartz/kwartz3-users-guide.03.html#rails-helper-methods
|
331
|
+
|
332
|
+
* (experimental) Embedded pattern '@{...}@' and '@!{...}@' supported.
|
333
|
+
They are equivarent to '<%=h ... %>' and '<%= ... %>' of ERB,
|
334
|
+
but they are available for PHP and JSP as well as eRuby.
|
335
|
+
|
336
|
+
* New command line optin '-a defun' support. It generates
|
337
|
+
Ruby/PHP function to generate view page from *.html and *.plogic.
|
338
|
+
|
339
|
+
[changes from 3.0.0]
|
340
|
+
|
341
|
+
* Directive attribute name is changed from 'title' to 'kw:d'.
|
342
|
+
You can change it in configuration file ('kwartz/config.rb').
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
$ Release 3.0.0
|
347
|
+
|
348
|
+
[enhancements from 2.0.4]
|
349
|
+
|
350
|
+
* Presentation logic is described in target language.
|
351
|
+
It means that you can write presentatin logic in Ruby, PHP,
|
352
|
+
and so on.
|
353
|
+
|
354
|
+
* New properties 'elem:', 'stag:', 'cont:', 'etag:' are added.
|
355
|
+
They replaces element, start-tag, content, end-tag with
|
356
|
+
expression value. This is useful especially for Rails.
|
357
|
+
|
358
|
+
new.html : presentation data file
|
359
|
+
--------------------
|
360
|
+
<form id="mark:form">
|
361
|
+
Name: <input type="text" id="user_name">
|
362
|
+
<input type="submit" id="mark:submit">
|
363
|
+
</form>
|
364
|
+
--------------------
|
365
|
+
|
366
|
+
new.plogic : presentation logic file
|
367
|
+
--------------------
|
368
|
+
#form {
|
369
|
+
stag: start_form_tag :action=>'create';
|
370
|
+
}
|
371
|
+
#user_name {
|
372
|
+
elem: text_field 'user', 'name';
|
373
|
+
}
|
374
|
+
#submit {
|
375
|
+
elem: submit_tag 'Create';
|
376
|
+
}
|
377
|
+
--------------------
|
378
|
+
|
379
|
+
compile:
|
380
|
+
====================
|
381
|
+
$ kwartz -p new.plogic new.html > new.rhtml
|
382
|
+
====================
|
383
|
+
|
384
|
+
new.rhtml : compiled output script
|
385
|
+
--------------------
|
386
|
+
<%= start_form_tag :action=>'create' %>
|
387
|
+
Name: <%= text_field 'user', 'name' %>
|
388
|
+
<%= submit_tag 'Create' %>
|
389
|
+
</form>
|
390
|
+
--------------------
|
391
|
+
|
392
|
+
See 'examples/rails1' for more details about Rails and Kwartz.
|
393
|
+
|
394
|
+
* New keyword '_elem' added. '_elem' means element and
|
395
|
+
it is equivarent to '_stag' + '_cont' + '_etag'.
|
396
|
+
|
397
|
+
* New language 'rails' addes. It uses '<% -%>' instead of '<% %>'
|
398
|
+
as embedded pattern.
|
399
|
+
|
400
|
+
* New command-line option '-L layout' specifies layout file.
|
401
|
+
====================
|
402
|
+
$ kwartz -p new.plogic -L layout.html new.html > new.rhtml
|
403
|
+
## this is equivarent to the following:
|
404
|
+
## $ kwartz -p new.plogic -i new.html layout.html > new.rhtml
|
405
|
+
====================
|
406
|
+
|
407
|
+
* ...and more
|
408
|
+
|
409
|
+
|
410
|
+
[changes from 2.0.4]
|
411
|
+
|
412
|
+
* Property 'plogic:' is renamed to 'logic:'.
|
413
|
+
|
414
|
+
* '@stag', '@cont', '@etag' is changed to
|
415
|
+
'_stag', '_cont', '_etag' respectively.
|
416
|
+
|
417
|
+
* Directive format is changed.
|
418
|
+
See reference manual for details.
|
419
|
+
|
420
|
+
* Directive attribute is changed from 'kw:d' to 'title'.
|
421
|
+
(this may be change in the future.)
|
422
|
+
|
423
|
+
* Directive 'id="replace:xxx"' is renamed to
|
424
|
+
'id="replace_element_with_element:xxx"' and
|
425
|
+
'id="replace_element_with_content:xxx"'.
|
426
|
+
|
427
|
+
* Directive 'id="placeholder:xxx" is renamed to
|
428
|
+
'id="relace_content_with_element:xxx"' and
|
429
|
+
'id="relace_content_with_content:xxx"'.
|
430
|
+
|
431
|
+
* 'analyze' action is obsolete (because presentation logic
|
432
|
+
is described in Ruby, PHP, and so on).
|
433
|
+
|
434
|
+
* 'defun' action is currently not supported
|
435
|
+
(but is planned to be implemented in the future release).
|
436
|
+
|
437
|
+
* Velocity is not supported.
|
438
|
+
|
439
|
+
* Project name in RubyForge.org is changed from 'kwartz-ruby'
|
440
|
+
to 'Kwartz', and gem file is also changed.
|
441
|
+
|
442
|
+
* ...and more
|
443
|
+
|
444
|
+
.-document:
|
data/README.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= README
|
2
2
|
|
3
|
-
release:: $Release: 3.
|
3
|
+
release:: $Release: 3.2.0 $
|
4
4
|
copyright:: copyright(c) 2004-2006 kuwata-lab.com all rights reserved
|
5
5
|
|
6
6
|
|
@@ -27,6 +27,9 @@ Else download kwartz-ruby_x.x.x.tar.bz2 and install with setup.rb.
|
|
27
27
|
$ cd kwartz-ruby_x.x.x/
|
28
28
|
$ sudo ruby setup.rb
|
29
29
|
|
30
|
+
Kwartz-ruby requires 'abstract.rb'. You can install it by RubyGems
|
31
|
+
or download from rubyforge.
|
32
|
+
|
30
33
|
|
31
34
|
== Copyright
|
32
35
|
|