kwartz 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/ChangeLog +36 -1
  2. data/LGPL +504 -0
  3. data/README.txt +16 -2
  4. data/bin/kwartz +1 -1
  5. data/doc-api/classes/Kwartz.html +47 -1
  6. data/doc-api/classes/Kwartz/Assertion.html +6 -6
  7. data/doc-api/classes/Kwartz/AssertionError.html +6 -6
  8. data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
  9. data/doc-api/classes/Kwartz/BaseError.html +12 -12
  10. data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
  11. data/doc-api/classes/Kwartz/CharacterType.html +24 -24
  12. data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
  13. data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
  14. data/doc-api/classes/Kwartz/Config.html +6 -1
  15. data/doc-api/classes/Kwartz/ConvertError.html +14 -14
  16. data/doc-api/classes/Kwartz/Converter.html +31 -30
  17. data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
  18. data/doc-api/classes/Kwartz/Defun.html +313 -0
  19. data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
  20. data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
  21. data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
  22. data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
  23. data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
  24. data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
  25. data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
  26. data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
  27. data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
  28. data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
  29. data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
  30. data/doc-api/classes/Kwartz/Handler.html +122 -117
  31. data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
  32. data/doc-api/classes/Kwartz/Helper.html +112 -0
  33. data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
  34. data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
  35. data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
  36. data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
  37. data/doc-api/classes/Kwartz/KwartzError.html +6 -6
  38. data/doc-api/classes/Kwartz/Main.html +39 -23
  39. data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
  40. data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
  41. data/doc-api/classes/Kwartz/Node.html +6 -6
  42. data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
  43. data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
  44. data/doc-api/classes/Kwartz/ParseError.html +6 -6
  45. data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
  46. data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
  47. data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
  48. data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
  49. data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
  50. data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
  51. data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
  52. data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
  53. data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
  54. data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
  55. data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
  56. data/doc-api/classes/Kwartz/TagInfo.html +28 -28
  57. data/doc-api/classes/Kwartz/TextConverter.html +28 -28
  58. data/doc-api/classes/Kwartz/Translator.html +42 -42
  59. data/doc-api/classes/Kwartz/Util.html +284 -0
  60. data/doc-api/created.rid +1 -1
  61. data/doc-api/files/__/README_txt.html +30 -3
  62. data/doc-api/files/kwartz/assert_rb.html +1 -1
  63. data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
  64. data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
  65. data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
  66. data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
  67. data/doc-api/files/kwartz/binding/php_rb.html +2 -2
  68. data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
  69. data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
  70. data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
  71. data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
  72. data/doc-api/files/kwartz/config_rb.html +2 -2
  73. data/doc-api/files/kwartz/converter_rb.html +3 -2
  74. data/doc-api/files/kwartz/defun_rb.html +116 -0
  75. data/doc-api/files/kwartz/error_rb.html +1 -1
  76. data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
  77. data/doc-api/files/kwartz/main_rb.html +5 -2
  78. data/doc-api/files/kwartz/node_rb.html +2 -2
  79. data/doc-api/files/kwartz/parser_rb.html +2 -2
  80. data/doc-api/files/kwartz/translator_rb.html +2 -2
  81. data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
  82. data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
  83. data/doc-api/files/kwartz/util_rb.html +107 -0
  84. data/doc-api/files/kwartz_rb.html +3 -2
  85. data/doc-api/fr_class_index.html +11 -0
  86. data/doc-api/fr_file_index.html +5 -0
  87. data/doc-api/fr_method_index.html +242 -190
  88. data/doc/p-pattern.html +94 -94
  89. data/doc/reference.html +847 -612
  90. data/doc/users-guide.html +744 -241
  91. data/examples/rails1/README +2 -2
  92. data/examples/rails1/application_helper.rb +2 -27
  93. data/examples/rails1/link_to.plogic +5 -5
  94. data/examples/rails1/list.plogic +2 -2
  95. data/examples/rails2/app/controllers/application.rb +14 -0
  96. data/examples/rails2/app/controllers/groups_controller.rb +47 -0
  97. data/examples/rails2/app/controllers/members_controller.rb +56 -0
  98. data/examples/rails2/app/helpers/application_helper.rb +6 -0
  99. data/examples/rails2/app/helpers/groups_helper.rb +2 -0
  100. data/examples/rails2/app/helpers/members_helper.rb +2 -0
  101. data/examples/rails2/app/models/group.rb +2 -0
  102. data/examples/rails2/app/models/member.rb +3 -0
  103. data/examples/rails2/app/views/groups/_form.html +30 -0
  104. data/examples/rails2/app/views/groups/_form.plogic +11 -0
  105. data/examples/rails2/app/views/groups/_link.plogic +19 -0
  106. data/examples/rails2/app/views/groups/_read.plogic +7 -0
  107. data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
  108. data/examples/rails2/app/views/groups/edit.html +26 -0
  109. data/examples/rails2/app/views/groups/edit.plogic +9 -0
  110. data/examples/rails2/app/views/groups/list.html +48 -0
  111. data/examples/rails2/app/views/groups/list.plogic +32 -0
  112. data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
  113. data/examples/rails2/app/views/groups/new.html +27 -0
  114. data/examples/rails2/app/views/groups/new.plogic +9 -0
  115. data/examples/rails2/app/views/groups/show.html +27 -0
  116. data/examples/rails2/app/views/groups/show.plogic +2 -0
  117. data/examples/rails2/app/views/layouts/groups.html +23 -0
  118. data/examples/rails2/app/views/layouts/groups.plogic +11 -0
  119. data/examples/rails2/app/views/layouts/members.html +23 -0
  120. data/examples/rails2/app/views/layouts/members.plogic +11 -0
  121. data/examples/rails2/app/views/layouts/members2.html +24 -0
  122. data/examples/rails2/app/views/layouts/members2.plogic +11 -0
  123. data/examples/rails2/app/views/members/_form.plogic +27 -0
  124. data/examples/rails2/app/views/members/_link.plogic +19 -0
  125. data/examples/rails2/app/views/members/_read.plogic +29 -0
  126. data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
  127. data/examples/rails2/app/views/members/edit.html +27 -0
  128. data/examples/rails2/app/views/members/edit.plogic +10 -0
  129. data/examples/rails2/app/views/members/list.html +53 -0
  130. data/examples/rails2/app/views/members/list.plogic +32 -0
  131. data/examples/rails2/app/views/members/new.html +61 -0
  132. data/examples/rails2/app/views/members/new.plogic +17 -0
  133. data/examples/rails2/app/views/members/show.html +41 -0
  134. data/examples/rails2/app/views/members/show.plogic +3 -0
  135. data/examples/rails2/db/create-tables.mysql.sql +27 -0
  136. data/examples/rails2/db/create-tables.pgsql.sql +27 -0
  137. data/examples/rails2/db/insert-data.sql +21 -0
  138. data/examples/rails2/db/tabledef.yaml +51 -0
  139. data/kwartz.gemspec +4 -4
  140. data/lib/kwartz.rb +10 -2
  141. data/lib/kwartz/assert.rb +1 -1
  142. data/lib/kwartz/binding/eperl.rb +85 -61
  143. data/lib/kwartz/binding/erubis.rb +6 -8
  144. data/lib/kwartz/binding/eruby.rb +5 -120
  145. data/lib/kwartz/binding/jstl.rb +116 -101
  146. data/lib/kwartz/binding/php.rb +79 -60
  147. data/lib/kwartz/binding/pierubis.rb +58 -0
  148. data/lib/kwartz/binding/rails.rb +45 -42
  149. data/lib/kwartz/binding/ruby.rb +193 -0
  150. data/lib/kwartz/binding/struts.rb +1 -1
  151. data/lib/kwartz/config.rb +4 -3
  152. data/lib/kwartz/converter.rb +231 -68
  153. data/lib/kwartz/defun.rb +126 -0
  154. data/lib/kwartz/error.rb +1 -1
  155. data/lib/kwartz/helper/rails.rb +437 -0
  156. data/lib/kwartz/main.rb +30 -38
  157. data/lib/kwartz/node.rb +46 -31
  158. data/lib/kwartz/parser.rb +43 -15
  159. data/lib/kwartz/translator.rb +104 -6
  160. data/lib/kwartz/util.rb +113 -0
  161. data/lib/kwartz/util/assert-text-equal.rb +1 -1
  162. data/lib/kwartz/util/testcase-helper.rb +26 -8
  163. data/test/test-compile.rb +3 -3
  164. data/test/test-compile.yaml +135 -5
  165. data/test/test-converter.rb +16 -8
  166. data/test/test-converter.yaml +307 -76
  167. data/test/test-directives.rb +1 -1
  168. data/test/test-directives.yaml +964 -979
  169. data/test/test-main.rb +61 -146
  170. data/test/test-main.yaml +235 -0
  171. data/test/test-parser.rb +10 -12
  172. data/test/test-parser.yaml +484 -326
  173. data/test/test-rails.rb +1 -1
  174. data/test/test-rails.yaml +37 -37
  175. data/test/test-ruleset.rb +1 -1
  176. data/test/test-ruleset.yaml +34 -40
  177. data/test/test.rb +1 -1
  178. metadata +82 -3
  179. data/COPYING +0 -340
@@ -1,6 +1,6 @@
1
1
  ###
2
2
  ### $Rev: 114 $
3
- ### $Release: 3.0.0 $
3
+ ### $Release: 3.1.0 $
4
4
  ### copyright(c) 2004-2006 kuwata-lab.com all rights reserved
5
5
  ###
6
6
 
@@ -14,8 +14,8 @@
14
14
  - name: check_box1
15
15
  binding: rails
16
16
  pdata: |
17
- <input type="checkbox" id="user_chk1" title="check_box">
18
- <input type="checkbox" name="user[chk2]" title="check_box">
17
+ <input type="checkbox" id="user_chk1" kw:d="check_box">
18
+ <input type="checkbox" name="user[chk2]" kw:d="check_box">
19
19
  expected: |
20
20
  <%= check_box 'user', 'chk1' %>
21
21
  <%= check_box 'user', 'chk2' %>
@@ -24,8 +24,8 @@
24
24
  - name: file_field1
25
25
  binding: rails
26
26
  pdata: |
27
- <input type="file" id="user_attach" title="file_field">
28
- <input type="file" name="user[attach]" title="file_field">
27
+ <input type="file" id="user_attach" kw:d="file_field">
28
+ <input type="file" name="user[attach]" kw:d="file_field">
29
29
  expected: |
30
30
  <%= file_field 'user', 'attach' %>
31
31
  <%= file_field 'user', 'attach' %>
@@ -34,8 +34,8 @@
34
34
  - name: hidden_field1
35
35
  binding: rails
36
36
  pdata: |
37
- <input type="hidden" id="user_id" title="hidden_field">
38
- <input type="hidden" name="user[id]" title="hidden_field">
37
+ <input type="hidden" id="user_id" kw:d="hidden_field">
38
+ <input type="hidden" name="user[id]" kw:d="hidden_field">
39
39
  expected: |
40
40
  <%= hidden_field 'user', 'id' %>
41
41
  <%= hidden_field 'user', 'id' %>
@@ -44,9 +44,9 @@
44
44
  - name: password_field1
45
45
  binding: rails
46
46
  pdata: |
47
- <input type="password" size="10" maxsize="20" title="password_field 'user1', 'name1'">
48
- <input type="password" size="10" maxsize="20" id="user2_name2" title="password_field">
49
- <input type="password" size="10" maxsize="20" name="user3[name3]" title="password_field">
47
+ <input type="password" size="10" maxsize="20" kw:d="password_field 'user1', 'name1'">
48
+ <input type="password" size="10" maxsize="20" id="user2_name2" kw:d="password_field">
49
+ <input type="password" size="10" maxsize="20" name="user3[name3]" kw:d="password_field">
50
50
  expected: |
51
51
  <%= password_field 'user1', 'name1', :size=>10, :maxsize=>20 %>
52
52
  <%= password_field 'user2', 'name2', :size=>10, :maxsize=>20 %>
@@ -56,8 +56,8 @@
56
56
  - name: radio_button1
57
57
  binding: rails
58
58
  pdata: |
59
- <input type="radio" id="user_radio_button1" value="button1" title="radio_button">
60
- <input type="radio" name="user[radio]" value="button2" title="radio_button">
59
+ <input type="radio" id="user_radio_button1" value="button1" kw:d="radio_button">
60
+ <input type="radio" name="user[radio]" value="button2" kw:d="radio_button">
61
61
  expected: |
62
62
  <%= radio_button 'user', 'radio', 'button1' %>
63
63
  <%= radio_button 'user', 'radio', 'button2' %>
@@ -66,9 +66,9 @@
66
66
  - name: text_area1
67
67
  binding: rails
68
68
  pdata: |
69
- <textarea cols="3" rows="10" title="text_area 'user1', 'desc1'">...</textarea>
70
- <textarea cols="2" rows="20" id="user2_desc2" title="text_area">...</textarea>
71
- <textarea cols="1" rows="30" name="user3[desc3]" title="text_area">...</textarea>
69
+ <textarea cols="3" rows="10" kw:d="text_area 'user1', 'desc1'">...</textarea>
70
+ <textarea cols="2" rows="20" id="user2_desc2" kw:d="text_area">...</textarea>
71
+ <textarea cols="1" rows="30" name="user3[desc3]" kw:d="text_area">...</textarea>
72
72
  expected: |
73
73
  <%= text_area 'user1', 'desc1', :cols=>3, :rows=>10 %>
74
74
  <%= text_area 'user2', 'desc2', :cols=>2, :rows=>20 %>
@@ -78,9 +78,9 @@
78
78
  - name: text_field1
79
79
  binding: rails
80
80
  pdata: |
81
- <input type="text" size="10" maxsize="20" title="text_field 'user1', 'name1'">
82
- <input type="text" size="10" maxsize="20" id="user2_name2" title="text_field">
83
- <input type="text" size="10" maxsize="20" name="user3[name3]" title="text_field">
81
+ <input type="text" size="10" maxsize="20" kw:d="text_field 'user1', 'name1'">
82
+ <input type="text" size="10" maxsize="20" id="user2_name2" kw:d="text_field">
83
+ <input type="text" size="10" maxsize="20" name="user3[name3]" kw:d="text_field">
84
84
  expected: |
85
85
  <%= text_field 'user1', 'name1', :size=>10, :maxsize=>20 %>
86
86
  <%= text_field 'user2', 'name2', :size=>10, :maxsize=>20 %>
@@ -108,9 +108,9 @@
108
108
  - name: form_tag1
109
109
  binding: rails
110
110
  pdata: |
111
- <form action="show" method="get" multipart="" title="form_tag">
111
+ <form action="show" method="get" multipart="" kw:d="form_tag">
112
112
  </form>
113
- <form title="form_tag ( {:action=>'show', :id=>2}, {:method=>'get', :multipart=>true} )">
113
+ <form kw:d="form_tag ( {:action=>'show', :id=>2}, {:method=>'get', :multipart=>true} )">
114
114
  </form>
115
115
  expected: |
116
116
  <%= form_tag 'action'=>'show' %>
@@ -122,9 +122,9 @@
122
122
  - name: submit_tag1
123
123
  binding: rails
124
124
  pdata: |
125
- <input type="submit" value="OK" title="submit_tag:">
126
- <input type="submit" value="OK" title="submit_tag">
127
- <input type="submit" title="submit_tag">
125
+ <input type="submit" value="OK" kw:d="submit_tag:">
126
+ <input type="submit" value="OK" kw:d="submit_tag">
127
+ <input type="submit" kw:d="submit_tag">
128
128
  expected: |
129
129
  <%= submit_tag 'OK' %>
130
130
  <%= submit_tag 'OK' %>
@@ -148,16 +148,16 @@
148
148
  - name: select1
149
149
  binding: rails
150
150
  pdata: |
151
- <select name="user[id]" title="select %[foo bar baz]">
151
+ <select name="user[id]" kw:d="select %[foo bar baz]">
152
152
  <option value="1">aaa</option>
153
153
  </select>
154
- <select name="user[id]" title="collection_select @users">
154
+ <select name="user[id]" kw:d="collection_select @users">
155
155
  <option value="1">aaa</option>
156
156
  </select>
157
- <select name="user[country]" title="country_select">
157
+ <select name="user[country]" kw:d="country_select">
158
158
  <option value="us">United States</option>
159
159
  </select>
160
- <select name="user[timezone]" title="time_zone_select">
160
+ <select name="user[timezone]" kw:d="time_zone_select">
161
161
  <option value="1">timezone</option>
162
162
  </select>
163
163
  expected: |
@@ -185,8 +185,8 @@
185
185
  - name: link_to1
186
186
  binding: rails
187
187
  pdata: |
188
- <a href="#" title="link_to :action=>'show', :id=>@user.id">Show user</a>
189
- <a href="#" title="link_to text, :action=>'list'">All</a>
188
+ <a href="#" kw:d="link_to :action=>'show', :id=>@user.id">Show user</a>
189
+ <a href="#" kw:d="link_to text, :action=>'list'">All</a>
190
190
  expected: |
191
191
  <%= link_to 'Show user', :action=>'show', :id=>@user.id %>
192
192
  <%= link_to text, :action=>'list' %>
@@ -195,8 +195,8 @@
195
195
  - name: link_image_to1
196
196
  binding: rails
197
197
  pdata: |
198
- <img src="foo.jpg" title="link_image_to :action=>'new', :id=>10">
199
- <img src="foo.jpg" title="link_to_image :action=>'new', :id=>10">
198
+ <img src="foo.jpg" kw:d="link_image_to :action=>'new', :id=>10">
199
+ <img src="foo.jpg" kw:d="link_to_image :action=>'new', :id=>10">
200
200
  expected: |
201
201
  <%= link_image_to 'foo.jpg', :action=>'new', :id=>10 %>
202
202
  <%= link_to_image 'foo.jpg', :action=>'new', :id=>10 %>
@@ -205,7 +205,7 @@
205
205
  - name: mail_to1
206
206
  binding: rails
207
207
  pdata: |
208
- <a href="mailto:admin@example.com" title="mail_to">contact</a>
208
+ <a href="mailto:admin@example.com" kw:d="mail_to">contact</a>
209
209
  expected: |
210
210
  <%= mail_to 'admin@example.com', 'contact' %>
211
211
 
@@ -235,8 +235,8 @@
235
235
  - name: link_remote_to1
236
236
  binding: rails
237
237
  pdata: |
238
- <a href="#" title="link_to_remote :action=>'show', :id=>@user.id">Show user</a>
239
- <a href="#" title="link_to_remote @text, :action=>'list'">All</a>
238
+ <a href="#" kw:d="link_to_remote :action=>'show', :id=>@user.id">Show user</a>
239
+ <a href="#" kw:d="link_to_remote @text, :action=>'list'">All</a>
240
240
  expected: |
241
241
  <%= link_to_remote 'Show user', :action=>'show', :id=>@user.id %>
242
242
  <%= link_to_remote @text, :action=>'list' %>
@@ -245,7 +245,7 @@
245
245
  - name: submit_to_remote1
246
246
  binding: rails
247
247
  pdata: |
248
- <input type="submit" name="NAME" value="SUBMIT" title="submit_to_remote">
248
+ <input type="submit" name="NAME" value="SUBMIT" kw:d="submit_to_remote">
249
249
  expected: |
250
250
  <%= submit_to_remote 'NAME', 'SUBMIT' %>
251
251
 
@@ -267,7 +267,7 @@
267
267
  - name: image_tag1
268
268
  binding: rails
269
269
  pdata: |
270
- <img src="/image/foo.gif" alt="text" title="image_tag">
270
+ <img src="/image/foo.gif" alt="text" kw:d="image_tag">
271
271
  expected: |
272
272
  <%= image_tag '/image/foo.gif', :alt=>'text' %>
273
273
 
@@ -292,9 +292,9 @@
292
292
  - name: date_select1
293
293
  binding: rails
294
294
  pdata: |
295
- <select id="user_birth" title="date_select :start_year=>2000, :include_blank=>true">
295
+ <select id="user_birth" kw:d="date_select :start_year=>2000, :include_blank=>true">
296
296
  </select>
297
- <select id="user_time" title="datetime_select :start_year=>1900">
297
+ <select id="user_time" kw:d="datetime_select :start_year=>1900">
298
298
  </select>
299
299
  expected: |
300
300
  <%= date_select 'user', 'birth', :start_year=>2000, :include_blank=>true %>
@@ -1,6 +1,6 @@
1
1
  ###
2
2
  ### $Rev: 117 $
3
- ### $Release: 3.0.0 $
3
+ ### $Release: 3.1.0 $
4
4
  ### copyright(c) 2004-2006 kuwata-lab.com all rights reserved
5
5
  ###
6
6
 
@@ -1,4 +1,4 @@
1
- ---
1
+ ###
2
2
  - name: elem
3
3
  title: elem, Elem, ELEM
4
4
  desc: |
@@ -76,7 +76,7 @@
76
76
  {{*${user.name}*}}
77
77
  {{*<c:out value="${user.name}" escapeXml="false"/>*}}
78
78
 
79
- ##
79
+ ###
80
80
  - name: cont
81
81
  title: cont, Cont, CONT
82
82
  desc: |
@@ -154,7 +154,7 @@
154
154
  <p>{{*${user.name}*}}</p>
155
155
  <p>{{*<c:out value="${user.name}" escapeXml="false"/>*}}</p>
156
156
 
157
- ##
157
+ ###
158
158
  - name: value
159
159
  title: value, Value, VALUE
160
160
  desc: |
@@ -230,7 +230,7 @@
230
230
  <p>{{*${user.name}*}}</p>
231
231
  <p>{{*<c:out value="${user.name}" escapeXml="false"/>*}}</p>
232
232
 
233
- ##
233
+ ###
234
234
  - name: stag
235
235
  title: stag, Stag, STAG
236
236
  desc: |
@@ -249,66 +249,66 @@
249
249
  plogic*:
250
250
  eruby: |
251
251
  #link1 {
252
- {{*stag:*}} start_link_to :action=>'list';
252
+ {{*stag:*}} start_link_tag :action=>'list';
253
253
  }
254
254
  #link2 {
255
- {{*Stag:*}} start_link_to :action=>'list';
255
+ {{*Stag:*}} start_link_tag :action=>'list';
256
256
  }
257
257
  #link3 {
258
- {{*STAG:*}} start_link_to :action=>'list';
258
+ {{*STAG:*}} start_link_tag :action=>'list';
259
259
  }
260
260
  php: |
261
261
  #link1 {
262
- {{*stag:*}} start_link_to('list');
262
+ {{*stag:*}} start_link_tag('list');
263
263
  }
264
264
  #link2 {
265
- {{*Stag:*}} start_link_to('list');
265
+ {{*Stag:*}} start_link_tag('list');
266
266
  }
267
267
  #link3 {
268
- {{*STAG:*}} start_link_to('list');
268
+ {{*STAG:*}} start_link_tag('list');
269
269
  }
270
270
  eperl: |
271
271
  #link1 {
272
- {{*stag:*}} start_link_to('list');
272
+ {{*stag:*}} start_link_tag('list');
273
273
  }
274
274
  #link2 {
275
- {{*Stag:*}} start_link_to('list');
275
+ {{*Stag:*}} start_link_tag('list');
276
276
  }
277
277
  #link3 {
278
- {{*STAG:*}} start_link_to('list');
278
+ {{*STAG:*}} start_link_tag('list');
279
279
  }
280
280
  jstl: |
281
281
  #link1 {
282
- {{*stag:*}} fn:start_link_to('list');
282
+ {{*stag:*}} fn:start_link_tag('list');
283
283
  }
284
284
  #link2 {
285
- {{*Stag:*}} fn:start_link_to('list');
285
+ {{*Stag:*}} fn:start_link_tag('list');
286
286
  }
287
287
  #link3 {
288
- {{*STAG:*}} fn:start_link_to('list');
288
+ {{*STAG:*}} fn:start_link_tag('list');
289
289
  }
290
290
 
291
291
  expected*:
292
292
  eruby: |
293
- {{*<%= start_link_to :action=>'list' %>*}}<img src="button1.png"></a>
294
- {{*<%=h start_link_to :action=>'list' %>*}}<img src="button2.png"></a>
295
- {{*<%= start_link_to :action=>'list' %>*}}<img src="button3.png"></a>
293
+ {{*<%= start_link_tag :action=>'list' %>*}}<img src="button1.png"></a>
294
+ {{*<%=h start_link_tag :action=>'list' %>*}}<img src="button2.png"></a>
295
+ {{*<%= start_link_tag :action=>'list' %>*}}<img src="button3.png"></a>
296
296
  php: |
297
- {{*<?php echo start_link_to('list'); ?>*}}<img src="button1.png"></a>
298
- {{*<?php echo htmlspecialchars(start_link_to('list')); ?>*}}<img src="button2.png"></a>
299
- {{*<?php echo start_link_to('list'); ?>*}}<img src="button3.png"></a>
297
+ {{*<?php echo start_link_tag('list'); ?>*}}<img src="button1.png"></a>
298
+ {{*<?php echo htmlspecialchars(start_link_tag('list')); ?>*}}<img src="button2.png"></a>
299
+ {{*<?php echo start_link_tag('list'); ?>*}}<img src="button3.png"></a>
300
300
  eperl: |
301
- {{*<?= start_link_to('list') !>*}}<img src="button1.png"></a>
302
- {{*<?= encode_entities(start_link_to('list')) !>*}}<img src="button2.png"></a>
303
- {{*<?= start_link_to('list') !>*}}<img src="button3.png"></a>
301
+ {{*<?= start_link_tag('list') !>*}}<img src="button1.png"></a>
302
+ {{*<?= encode_entities(start_link_tag('list')) !>*}}<img src="button2.png"></a>
303
+ {{*<?= start_link_tag('list') !>*}}<img src="button3.png"></a>
304
304
  jstl: |
305
305
  <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
306
306
  <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
307
- {{*${fn:start_link_to('list')}*}}<img src="button1.png"></a>
308
- {{*${fn:start_link_to('list')}*}}<img src="button2.png"></a>
309
- {{*<c:out value="${fn:start_link_to('list')}" escapeXml="false"/>*}}<img src="button3.png"></a>
307
+ {{*${fn:start_link_tag('list')}*}}<img src="button1.png"></a>
308
+ {{*${fn:start_link_tag('list')}*}}<img src="button2.png"></a>
309
+ {{*<c:out value="${fn:start_link_tag('list')}" escapeXml="false"/>*}}<img src="button3.png"></a>
310
310
 
311
- ##
311
+ ###
312
312
  - name: etag
313
313
  title: etag, Etag, ETAG
314
314
  desc: |
@@ -386,7 +386,7 @@
386
386
  <li>bar{{*${is_xml ? '</li>' : ''}*}}
387
387
  <li>baz{{*<c:out value="${is_xml ? '</li>' : ''}" escapeXml="false"/>*}}
388
388
 
389
- ##
389
+ ###
390
390
  - name: attrs
391
391
  title: attrs, Attrs, ATTRS
392
392
  desc: |
@@ -453,7 +453,7 @@
453
453
  }
454
454
  .--------------------
455
455
 
456
- ##
456
+ ###
457
457
  - name: append
458
458
  title: append, Append, APPEND
459
459
  desc: |
@@ -497,7 +497,6 @@
497
497
  eperl: |
498
498
  <input type="checkboxk" value="y"{{*<?= $flag ? ' checked' : '' !>*}}>Remeber me
499
499
 
500
-
501
500
  postscript: |
502
501
  The following is an example to append several expressions.
503
502
 
@@ -517,7 +516,7 @@
517
516
  }
518
517
  .--------------------
519
518
 
520
- ##
519
+ ###
521
520
  - name: remove
522
521
  title: remove
523
522
  common: yes
@@ -552,8 +551,7 @@
552
551
  </p>
553
552
  eperl: *remove_expected
554
553
 
555
-
556
- ##
554
+ ###
557
555
  - name: logic
558
556
  title: logic
559
557
  desc: |
@@ -654,7 +652,7 @@
654
652
  {{*<? } !>*}}
655
653
  </ul>
656
654
 
657
- ##
655
+ ###
658
656
  - name: begin
659
657
  title: begin, end
660
658
  desc: |
@@ -678,7 +676,6 @@
678
676
  }
679
677
  {{*end:*}} {
680
678
  print "<!-- document end -->\n"
681
-
682
679
  }
683
680
  }
684
681
  #username {
@@ -700,7 +697,6 @@
700
697
  }
701
698
  {{*end:*}} {
702
699
  print("<!-- document end -->\n");
703
-
704
700
  }
705
701
  }
706
702
  #username {
@@ -743,7 +739,6 @@
743
739
  }
744
740
  {{*end:*}} {
745
741
  print("<!-- document end -->\n");
746
-
747
742
  }
748
743
  }
749
744
  #username {
@@ -769,7 +764,6 @@
769
764
  <% end %>
770
765
  </ul>
771
766
  {{*<%= "<!-- document end -->\n" %>*}}
772
-
773
767
  php: |-
774
768
  {{*<?php $username = $context['username']; ?>*}}
775
769
  {{*<?php $menulist = $context['menulist']; ?>*}}
@@ -1,6 +1,6 @@
1
1
  ###
2
2
  ### $Rev: 117 $
3
- ### $Release: 3.0.0 $
3
+ ### $Release: 3.1.0 $
4
4
  ### copyright(c) 2004-2006 kuwata-lab.com all rights reserved
5
5
  ###
6
6
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: kwartz
5
5
  version: !ruby/object:Gem::Version
6
- version: 3.0.0
7
- date: 2006-06-01 00:00:00 +09:00
6
+ version: 3.1.0
7
+ date: 2006-09-24 00:00:00 +09:00
8
8
  summary: a template system for Ruby, PHP, and Java
9
9
  require_paths:
10
10
  - lib
@@ -34,19 +34,25 @@ files:
34
34
  - lib/kwartz/binding
35
35
  - lib/kwartz/config.rb
36
36
  - lib/kwartz/converter.rb
37
+ - lib/kwartz/defun.rb
37
38
  - lib/kwartz/error.rb
39
+ - lib/kwartz/helper
38
40
  - lib/kwartz/main.rb
39
41
  - lib/kwartz/node.rb
40
42
  - lib/kwartz/parser.rb
41
43
  - lib/kwartz/translator.rb
42
44
  - lib/kwartz/util
45
+ - lib/kwartz/util.rb
43
46
  - lib/kwartz/binding/eperl.rb
44
47
  - lib/kwartz/binding/erubis.rb
45
48
  - lib/kwartz/binding/eruby.rb
46
49
  - lib/kwartz/binding/jstl.rb
47
50
  - lib/kwartz/binding/php.rb
51
+ - lib/kwartz/binding/pierubis.rb
48
52
  - lib/kwartz/binding/rails.rb
53
+ - lib/kwartz/binding/ruby.rb
49
54
  - lib/kwartz/binding/struts.rb
55
+ - lib/kwartz/helper/rails.rb
50
56
  - lib/kwartz/util/assert-text-equal.rb
51
57
  - lib/kwartz/util/testcase-helper.rb
52
58
  - bin/kwartz
@@ -54,6 +60,7 @@ files:
54
60
  - examples/breadcrumbs2
55
61
  - examples/pagelayout
56
62
  - examples/rails1
63
+ - examples/rails2
57
64
  - examples/table1
58
65
  - examples/breadcrumbs1/breadcrumbs.eruby.plogic
59
66
  - examples/breadcrumbs1/breadcrumbs.html
@@ -100,6 +107,59 @@ files:
100
107
  - examples/rails1/show.html
101
108
  - examples/rails1/show.plogic
102
109
  - examples/rails1/writer.plogic
110
+ - examples/rails2/app
111
+ - examples/rails2/db
112
+ - examples/rails2/app/controllers
113
+ - examples/rails2/app/helpers
114
+ - examples/rails2/app/models
115
+ - examples/rails2/app/views
116
+ - examples/rails2/app/controllers/application.rb
117
+ - examples/rails2/app/controllers/groups_controller.rb
118
+ - examples/rails2/app/controllers/members_controller.rb
119
+ - examples/rails2/app/helpers/application_helper.rb
120
+ - examples/rails2/app/helpers/groups_helper.rb
121
+ - examples/rails2/app/helpers/members_helper.rb
122
+ - examples/rails2/app/models/group.rb
123
+ - examples/rails2/app/models/member.rb
124
+ - examples/rails2/app/views/groups
125
+ - examples/rails2/app/views/layouts
126
+ - examples/rails2/app/views/members
127
+ - examples/rails2/app/views/groups/_form.html
128
+ - examples/rails2/app/views/groups/_form.plogic
129
+ - examples/rails2/app/views/groups/_link.plogic
130
+ - examples/rails2/app/views/groups/_read.plogic
131
+ - examples/rails2/app/views/groups/edit.cfg.yaml
132
+ - examples/rails2/app/views/groups/edit.html
133
+ - examples/rails2/app/views/groups/edit.plogic
134
+ - examples/rails2/app/views/groups/list.html
135
+ - examples/rails2/app/views/groups/list.plogic
136
+ - examples/rails2/app/views/groups/new.cfg.yaml
137
+ - examples/rails2/app/views/groups/new.html
138
+ - examples/rails2/app/views/groups/new.plogic
139
+ - examples/rails2/app/views/groups/show.html
140
+ - examples/rails2/app/views/groups/show.plogic
141
+ - examples/rails2/app/views/layouts/groups.html
142
+ - examples/rails2/app/views/layouts/groups.plogic
143
+ - examples/rails2/app/views/layouts/members.html
144
+ - examples/rails2/app/views/layouts/members.plogic
145
+ - examples/rails2/app/views/layouts/members2.html
146
+ - examples/rails2/app/views/layouts/members2.plogic
147
+ - examples/rails2/app/views/members/_form.plogic
148
+ - examples/rails2/app/views/members/_link.plogic
149
+ - examples/rails2/app/views/members/_read.plogic
150
+ - examples/rails2/app/views/members/edit.cfg.yaml
151
+ - examples/rails2/app/views/members/edit.html
152
+ - examples/rails2/app/views/members/edit.plogic
153
+ - examples/rails2/app/views/members/list.html
154
+ - examples/rails2/app/views/members/list.plogic
155
+ - examples/rails2/app/views/members/new.html
156
+ - examples/rails2/app/views/members/new.plogic
157
+ - examples/rails2/app/views/members/show.html
158
+ - examples/rails2/app/views/members/show.plogic
159
+ - examples/rails2/db/create-tables.mysql.sql
160
+ - examples/rails2/db/create-tables.pgsql.sql
161
+ - examples/rails2/db/insert-data.sql
162
+ - examples/rails2/db/tabledef.yaml
103
163
  - examples/table1/main.php
104
164
  - examples/table1/main.rb
105
165
  - examples/table1/Makefile
@@ -114,6 +174,7 @@ files:
114
174
  - test/test-directives.rb
115
175
  - test/test-directives.yaml
116
176
  - test/test-main.rb
177
+ - test/test-main.yaml
117
178
  - test/test-parser.rb
118
179
  - test/test-parser.yaml
119
180
  - test/test-rails.rb
@@ -149,6 +210,7 @@ files:
149
210
  - doc-api/classes/Kwartz/Converter.html
150
211
  - doc-api/classes/Kwartz/ConvertError.html
151
212
  - doc-api/classes/Kwartz/CssStyleParser.html
213
+ - doc-api/classes/Kwartz/Defun.html
152
214
  - doc-api/classes/Kwartz/DocumentRuleset.html
153
215
  - doc-api/classes/Kwartz/ElementExpander.html
154
216
  - doc-api/classes/Kwartz/ElementInfo.html
@@ -162,6 +224,9 @@ files:
162
224
  - doc-api/classes/Kwartz/ExpandStatement.html
163
225
  - doc-api/classes/Kwartz/Expression.html
164
226
  - doc-api/classes/Kwartz/Handler.html
227
+ - doc-api/classes/Kwartz/HandlerArgument.html
228
+ - doc-api/classes/Kwartz/Helper
229
+ - doc-api/classes/Kwartz/Helper.html
165
230
  - doc-api/classes/Kwartz/JstlHandler.html
166
231
  - doc-api/classes/Kwartz/JstlTranslator.html
167
232
  - doc-api/classes/Kwartz/KwartzError.html
@@ -172,17 +237,25 @@ files:
172
237
  - doc-api/classes/Kwartz/ParseError.html
173
238
  - doc-api/classes/Kwartz/PhpHandler.html
174
239
  - doc-api/classes/Kwartz/PhpTranslator.html
240
+ - doc-api/classes/Kwartz/PIErubisHandler.html
241
+ - doc-api/classes/Kwartz/PIErubisTranslator.html
175
242
  - doc-api/classes/Kwartz/PresentationLogicParser.html
176
243
  - doc-api/classes/Kwartz/PrintStatement.html
177
244
  - doc-api/classes/Kwartz/RailsHandler.html
178
245
  - doc-api/classes/Kwartz/RailsTranslator.html
246
+ - doc-api/classes/Kwartz/RubyHandler.html
179
247
  - doc-api/classes/Kwartz/RubyStyleParser.html
248
+ - doc-api/classes/Kwartz/RubyTranslator.html
180
249
  - doc-api/classes/Kwartz/Ruleset.html
181
250
  - doc-api/classes/Kwartz/Statement.html
251
+ - doc-api/classes/Kwartz/StatementHelper.html
182
252
  - doc-api/classes/Kwartz/StrutsTranslator.html
183
253
  - doc-api/classes/Kwartz/TagInfo.html
184
254
  - doc-api/classes/Kwartz/TextConverter.html
185
255
  - doc-api/classes/Kwartz/Translator.html
256
+ - doc-api/classes/Kwartz/Util.html
257
+ - doc-api/classes/Kwartz/Helper/ActionViewHelper.html
258
+ - doc-api/classes/Kwartz/Helper/RailsTemplate.html
186
259
  - doc-api/classes/Test/Unit.html
187
260
  - doc-api/files/__
188
261
  - doc-api/files/kwartz
@@ -192,24 +265,30 @@ files:
192
265
  - doc-api/files/kwartz/binding
193
266
  - doc-api/files/kwartz/config_rb.html
194
267
  - doc-api/files/kwartz/converter_rb.html
268
+ - doc-api/files/kwartz/defun_rb.html
195
269
  - doc-api/files/kwartz/error_rb.html
270
+ - doc-api/files/kwartz/helper
196
271
  - doc-api/files/kwartz/main_rb.html
197
272
  - doc-api/files/kwartz/node_rb.html
198
273
  - doc-api/files/kwartz/parser_rb.html
199
274
  - doc-api/files/kwartz/translator_rb.html
200
275
  - doc-api/files/kwartz/util
276
+ - doc-api/files/kwartz/util_rb.html
201
277
  - doc-api/files/kwartz/binding/eperl_rb.html
202
278
  - doc-api/files/kwartz/binding/erubis_rb.html
203
279
  - doc-api/files/kwartz/binding/eruby_rb.html
204
280
  - doc-api/files/kwartz/binding/jstl_rb.html
205
281
  - doc-api/files/kwartz/binding/php_rb.html
282
+ - doc-api/files/kwartz/binding/pierubis_rb.html
206
283
  - doc-api/files/kwartz/binding/rails_rb.html
284
+ - doc-api/files/kwartz/binding/ruby_rb.html
207
285
  - doc-api/files/kwartz/binding/struts_rb.html
286
+ - doc-api/files/kwartz/helper/rails_rb.html
208
287
  - doc-api/files/kwartz/util/assert-text-equal_rb.html
209
288
  - doc-api/files/kwartz/util/testcase-helper_rb.html
210
289
  - README.txt
211
290
  - ChangeLog
212
- - COPYING
291
+ - LGPL
213
292
  - setup.rb
214
293
  - kwartz.gemspec
215
294
  test_files: