masterview 0.2.5 → 0.3.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.
Files changed (155) hide show
  1. data/CHANGELOG +31 -1
  2. data/README +70 -69
  3. data/RELEASE_NOTES +70 -64
  4. data/Rakefile +26 -27
  5. data/TODO +13 -29
  6. data/doc/about.html +246 -0
  7. data/doc/configuration.html +49 -36
  8. data/doc/developer.html +423 -41
  9. data/doc/directives.html +139 -51
  10. data/doc/guide.html +19 -9
  11. data/doc/index.html +90 -224
  12. data/doc/installation.html +36 -28
  13. data/doc/media_list.html +30 -20
  14. data/doc/simple_diagram.html +3 -5
  15. data/doc/stylesheets/masterview.css +16 -1
  16. data/examples/rails_app_config/masterview/settings.rb +2 -1
  17. data/init.rb +1 -1
  18. data/lib/#ChangeLog# +6 -0
  19. data/lib/masterview/analyzer.rb +48 -34
  20. data/lib/masterview/attr_string_parser.rb +5 -1
  21. data/lib/masterview/case_insensitive_hash.rb +69 -0
  22. data/lib/masterview/{pathname_extensions.rb → core_ext/pathname.rb} +0 -0
  23. data/lib/masterview/{string_extensions.rb → core_ext/string.rb} +0 -0
  24. data/lib/masterview/deprecated/directive_base.rb +362 -0
  25. data/lib/masterview/directive_base.rb +201 -179
  26. data/lib/masterview/directive_dsl.rb +457 -0
  27. data/lib/masterview/directive_helpers.rb +28 -141
  28. data/lib/masterview/directive_load_path.rb +388 -0
  29. data/lib/masterview/directive_metadata.rb +377 -0
  30. data/lib/masterview/directive_registry.rb +259 -69
  31. data/lib/masterview/directives/.metadata +16 -0
  32. data/lib/masterview/directives/attr.rb +9 -8
  33. data/lib/masterview/directives/block.rb +11 -14
  34. data/lib/masterview/directives/check_box.rb +13 -18
  35. data/lib/masterview/directives/collection_select.rb +15 -29
  36. data/lib/masterview/directives/content.rb +9 -3
  37. data/lib/masterview/directives/else.rb +15 -13
  38. data/lib/masterview/directives/elsif.rb +14 -13
  39. data/lib/masterview/directives/eval.rb +20 -0
  40. data/lib/masterview/directives/form.rb +56 -9
  41. data/lib/masterview/directives/form_remote.rb +26 -0
  42. data/lib/masterview/directives/global_inline_erb.rb +10 -14
  43. data/lib/masterview/directives/hidden_field.rb +11 -20
  44. data/lib/masterview/directives/if.rb +13 -12
  45. data/lib/masterview/directives/image_tag.rb +20 -28
  46. data/lib/masterview/directives/import.rb +5 -12
  47. data/lib/masterview/directives/import_render.rb +7 -19
  48. data/lib/masterview/directives/insert_generated_comment.rb +8 -11
  49. data/lib/masterview/directives/javascript_include.rb +21 -12
  50. data/lib/masterview/directives/link_to.rb +14 -8
  51. data/lib/masterview/directives/link_to_function.rb +22 -0
  52. data/lib/masterview/directives/link_to_if.rb +15 -13
  53. data/lib/masterview/directives/link_to_remote.rb +13 -8
  54. data/lib/masterview/directives/omit_tag.rb +32 -16
  55. data/lib/masterview/directives/password_field.rb +10 -22
  56. data/lib/masterview/directives/radio_button.rb +11 -22
  57. data/lib/masterview/directives/replace.rb +7 -8
  58. data/lib/masterview/directives/select.rb +11 -24
  59. data/lib/masterview/directives/stylesheet_link.rb +20 -12
  60. data/lib/masterview/directives/submit.rb +11 -5
  61. data/lib/masterview/directives/text_area.rb +10 -23
  62. data/lib/masterview/directives/text_field.rb +10 -22
  63. data/lib/masterview/exceptions.rb +21 -0
  64. data/lib/masterview/extras/app/controllers/masterview_controller.rb +102 -75
  65. data/lib/masterview/extras/app/views/layouts/masterview_admin.rhtml +24 -23
  66. data/lib/masterview/extras/app/views/layouts/masterview_admin_config.rhtml +81 -0
  67. data/lib/masterview/extras/app/views/masterview/admin/configuration.rhtml +5 -1
  68. data/lib/masterview/extras/app/views/masterview/admin/create.rhtml +2 -2
  69. data/lib/masterview/extras/app/views/masterview/admin/directives.rhtml +5 -0
  70. data/lib/masterview/extras/app/views/masterview/admin/features.rhtml +5 -79
  71. data/lib/masterview/extras/app/views/masterview/admin/interact.rhtml +5 -0
  72. data/lib/masterview/extras/app/views/masterview/admin/list.rhtml +3 -71
  73. data/lib/masterview/extras/init_mv_admin_pages.rb +42 -23
  74. data/lib/masterview/filter_helpers.rb +26 -0
  75. data/lib/masterview/initializer.rb +99 -53
  76. data/lib/masterview/io.rb +19 -15
  77. data/lib/masterview/keyword_expander.rb +7 -2
  78. data/lib/masterview/masterview_info.rb +229 -23
  79. data/lib/masterview/masterview_version.rb +2 -2
  80. data/lib/masterview/parser.rb +275 -105
  81. data/lib/masterview/parser_helpers.rb +54 -0
  82. data/lib/masterview/rails_ext/action_controller_erb_direct.rb +29 -0
  83. data/lib/masterview/rails_ext/action_controller_reparse_checking.rb +27 -0
  84. data/lib/masterview/{extras/init_rails_erb_mv_direct.rb → rails_ext/action_view_erb_direct.rb} +12 -59
  85. data/lib/masterview/template_spec.rb +3 -2
  86. data/lib/masterview.rb +21 -12
  87. data/lib/rexml/parsers/baseparser_with_doctype_fix.rb +473 -0
  88. data/lib/rexml/parsers/sax2parser_with_doctype_fix.rb +243 -0
  89. data/test/directive_test_helper.rb +135 -0
  90. data/test/fixtures/directives/id_check.rb +18 -0
  91. data/test/fixtures/directives/test_directive_events.rb +70 -0
  92. data/test/test_helper.rb +18 -5
  93. data/test/tmp/views/layouts/product.rhtml +10 -10
  94. data/test/tmp/views/product/_form.rhtml +4 -4
  95. data/test/tmp/views/product/_product.rhtml +3 -3
  96. data/test/tmp/views/product/destroy.rhtml +5 -5
  97. data/test/tmp/views/product/edit.rhtml +4 -4
  98. data/test/tmp/views/product/list.rhtml +3 -3
  99. data/test/tmp/views/product/new.rhtml +4 -4
  100. data/test/tmp/views/product/show.rhtml +2 -2
  101. data/test/unit/attr_string_parser_test.rb +105 -0
  102. data/test/unit/case_insensitive_hash_mod_test.rb +104 -0
  103. data/test/unit/config_settings_test.rb +13 -1
  104. data/test/unit/default_generate_mio_filter_test.rb +3 -3
  105. data/test/unit/deprecated_directive_base_test.rb +30 -0
  106. data/test/unit/directive_attr_test.rb +111 -35
  107. data/test/unit/directive_base_test.rb +520 -1
  108. data/test/unit/directive_block_test.rb +30 -22
  109. data/test/unit/directive_content_test.rb +24 -11
  110. data/test/unit/directive_else_test.rb +18 -15
  111. data/test/unit/directive_elsif_test.rb +17 -15
  112. data/test/unit/directive_form_remote_test.rb +59 -0
  113. data/test/unit/directive_form_test.rb +31 -39
  114. data/test/unit/directive_global_inline_erb_test.rb +28 -17
  115. data/test/unit/directive_grid_test_notready.rb +38 -0
  116. data/test/unit/directive_helpers_test.rb +39 -0
  117. data/test/unit/directive_hidden_field_test.rb +44 -29
  118. data/test/unit/directive_if_test.rb +10 -7
  119. data/test/unit/directive_image_tag_test.rb +69 -61
  120. data/test/unit/directive_import_render_test.rb +28 -38
  121. data/test/unit/directive_import_test.rb +16 -14
  122. data/test/unit/directive_insert_generated_comment_test.rb +32 -0
  123. data/test/unit/directive_javascript_include_test.rb +40 -43
  124. data/test/unit/directive_link_to_function_test.rb +40 -0
  125. data/test/unit/directive_link_to_if_test.rb +52 -12
  126. data/test/unit/directive_link_to_remote_test.rb +58 -0
  127. data/test/unit/directive_link_to_test.rb +46 -31
  128. data/test/unit/directive_load_path_test.rb +257 -0
  129. data/test/unit/directive_metadata_test.rb +313 -0
  130. data/test/unit/directive_omit_tag_test.rb +73 -21
  131. data/test/unit/directive_password_field_test.rb +44 -38
  132. data/test/unit/directive_registry_test.rb +44 -0
  133. data/test/unit/directive_replace_test.rb +28 -12
  134. data/test/unit/directive_stylesheet_link_test.rb +43 -36
  135. data/test/unit/directive_submit_test.rb +29 -30
  136. data/test/unit/directive_text_area_test.rb +40 -36
  137. data/test/unit/directive_text_field_test.rb +44 -38
  138. data/test/unit/example_directive_child_events_test.rb +41 -0
  139. data/test/unit/example_test.rb +31 -4
  140. data/test/unit/file_mio_test.rb +18 -13
  141. data/test/unit/filter_helpers_test.rb +10 -8
  142. data/test/unit/find_directive_parent_test.rb +174 -0
  143. data/test/unit/keyword_expander_test.rb +4 -2
  144. data/test/unit/mio_test.rb +18 -11
  145. data/test/unit/mtime_string_hash_mio_tree_test.rb +5 -1
  146. data/test/unit/parser_test.rb +41 -29
  147. data/test/unit/pathname_extensions_test.rb +1 -1
  148. data/test/unit/run_parser_test.rb +2 -2
  149. data/test/unit/simplified_directive_base_test.rb +256 -0
  150. data/test/unit/string_hash_mio_test.rb +5 -1
  151. data/test/unit/template_file_watcher_test.rb +2 -2
  152. data/test/unit/template_test.rb +221 -46
  153. metadata +86 -45
  154. data/lib/masterview/directives/testfilter.rb +0 -55
  155. data/lib/masterview/extras/init_rails_reparse_checking.rb +0 -62
data/doc/index.html CHANGED
@@ -1,12 +1,12 @@
1
1
  <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
2
+ <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
 
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
 
9
- <title>MasterView - Rails-optimized (x)html friendly template engine</title>
9
+ <title>MasterView&trade; - Rails-optimized (x)html friendly template engine</title>
10
10
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
11
11
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
12
12
 
@@ -25,6 +25,8 @@
25
25
  &middot;&nbsp;
26
26
  <a href="./index.html">Doc Home</a>
27
27
  &nbsp;|&nbsp;
28
+ <a href="./about.html">About</a>
29
+ &nbsp;|&nbsp;
28
30
  <a href="./installation.html">Installation</a>
29
31
  &nbsp;|&nbsp;
30
32
  <a href="./configuration.html">Configuration</a>
@@ -32,8 +34,10 @@
32
34
  <a href="./guide.html">Usage</a>
33
35
  &nbsp;|&nbsp;
34
36
  <a href="./directives.html">Directives</a>
35
- &nbsp;&nbsp;
36
- <a href="./media_list.html">Media (Videos/Illustrations)</a>
37
+ &nbsp;|&nbsp;
38
+ <a href="./developer.html">Developers</a>
39
+ &nbsp;|&nbsp;
40
+ <a href="./media_list.html">Screencasts</a>
37
41
  &nbsp;&middot;
38
42
  </div>
39
43
  </div>
@@ -41,35 +45,35 @@
41
45
  <div id="pageBody">
42
46
  <div id="bodyContent">
43
47
 
44
- <h1>MasterView - Rails-optimized (x)html friendly template engine</h1>
48
+ <h1>MasterView&trade; - Rails-optimized (x)html friendly template engine</h1>
45
49
 
46
50
  <p>
47
- MasterView is a ruby/rails
51
+ MasterView&trade; is a ruby/rails
48
52
  optimized HTML/XHTML friendly template engine. It is designed to use the
49
53
  <b>full power and productivity of rails including layouts, partials, and rails
50
54
  html helpers</b> while still being editable/styleable in a <b>WYSIWYG</b> HTML editor.
51
55
  </p>
52
- <p>
53
- MasterView is distributed as a gem
54
- or a plugin. You may install it as a gem and then generate a lightweight
55
- plugin which mainly refers to the gem <b>or</b> you can simply install as a
56
- plugin which is self contained. I personally prefer installing as a gem for
57
- ease of management, however if you are running at a shared hosting
58
- environment you might not have authority to install this gem so you may
59
- install as a self contained plugin.
60
- </p>
61
- <p>
62
- If you are interested in the background story behind all this, it is at the
63
- end of this page.
64
- </p>
65
56
 
66
57
  <p>
67
58
  <table summary="project location and author information">
68
59
  <tr>
69
60
  <td>Author:</td>
70
- <td>Jeff Barczewski (jeff.barczewski <span class="class"> @ </span> gmail.com)</td>
61
+ <td style="padding-right: 10px;">Jeff Barczewski (jeff.barczewski <span class="class"> (at) </span> gmail (dot) com)</td>
62
+ <td colspan="2">&nbsp;</td>
63
+ </tr>
64
+ <tr>
65
+ <td>Primary developers:</td><td>Jeff Barczewski, Deb Lewis</td>
66
+ <td colspan="2">&nbsp;</td>
67
+ <tr>
68
+ <td>License:</td>
69
+ <td>MIT open source license (like Rails)</td>
70
+ <td rowspan="4">Mailing lists:</td>
71
+ <td rowspan="4">Join mailing lists at <a href="http://rubyforge.org/mail/?group_id=1290">rubyforge.org</a>
72
+ <div style="margin-left: 10px;"><code>masterview-announce</code> - MasterView release announcements</div>
73
+ <div style="margin-left: 10px;"><code>masterview-users</code> - Discussion, problems, ideas, suggestions for MasterView</div>
74
+ <div style="margin-left: 10px;"><code>masterview-devel</code> - MasterView project developer list</div>
75
+ </td>
71
76
  </tr>
72
- <tr><td>Primary developers:</td><td>Jeff Barczewski, Deb Lewis</td></tr>
73
77
  <tr>
74
78
  <td>Website:</td>
75
79
  <td><a href="http://masterview.org">masterview.org</a></td>
@@ -78,47 +82,28 @@ end of this page.
78
82
  <td>Rubyforge project:</td>
79
83
  <td><a href="http://rubyforge.org/projects/masterview/">masterview</a></td>
80
84
  </tr>
81
- <tr><td>License:</td><td>MIT open source license (like Rails)
82
- </td></tr>
83
- <tr>
84
- <td>Mailing lists:</td>
85
- <td>Join mailing lists at <a href="http://rubyforge.org/mail/?group_id=1290">rubyforge.org</a></td>
86
- </tr>
87
- <tr>
88
- <td>&nbsp;</td>
89
- <td>masterview-announce - MasterView release announcements</td>
90
- </tr>
91
- <tr>
92
- <td>&nbsp;</td>
93
- <td>masterview-users - Discussion, problems, ideas, suggestions for MasterView</td>
94
- </tr>
95
- <tr>
96
- <td>&nbsp;</td>
97
- <td>masterview-devel - MasterView project developer list</td>
98
- </tr>
85
+ <tr><td colspan="2">&nbsp;</td></tr>
99
86
  </table>
100
- </p>
101
87
 
102
- <h2>Illustrations/Diagrams</h2>
103
- <ul>
104
- <li><a href="simple_diagram.html" alt="MasterView rhtml Rendering Illustration">MasterView rendering illustration</a> - showing how MasterView renders rhtml internally<br/><br/>
105
- <a href="simple_diagram.html" alt="MasterView rhtml Rendering Illustration"><img src="images/masterview_rhtml_rendering_thumbnail_smaller.png"/></a><br/><br/>
106
- </li>
107
- <li><a href="media_list.html" alt="MasterView Screenshots and other media">MasterView screenshots - showing some generated MasterView templates and MasterView Admin page</a><br/><br/>
108
- <a href="media_list.html" alt="MasterView Screenshots and other media"><img src="screenshots/generated_new_thumbnail.png"/></a><br/><br/>
109
- </li>
110
- </ul>
88
+ <hr />
89
+ <p>Why invent another templating engine?
90
+ In short, to be able to use standard web design tools such as WYSIWYG editors to design and lay out pages for a rails site, without giving up the power and productivity of layouts, partials, and rails helpers.
91
+ As programmers, we want to be able to create rails view templates which can also be worked on by web designers with their own tools for complex graphics and styling.
92
+ If you are interested in the background story and the goals of the MasterView project,
93
+ visit the <a href="about.html">About</a> page to learn more.
94
+ </p>
111
95
 
112
- <h2>Videos</h2>
113
- <ul>
114
- <li><a href="http://masterview.org/videos/demo_short.html">MasterView Short Video</a> - demonstrating basic usage of MasterView (no audio, ~5 minutes, uses flash)<br/><br/>
115
- <a href="http://masterview.org/videos/demo_short.html"><img src="screenshots/generated_list_thumbnail.png"/></a><br/><br/>
96
+ <h2>Quick Start and Roadmap</h2>
116
97
 
117
- </li>
118
- <li><a href="http://masterview.org/videos/masterview_quick_start.html">MasterView Quick Start Video</a> - longer video detailing basic configuration and operation of MasterView (no audio, ~25 minutes, uses flash)<br/><br/>
119
- <a href="http://masterview.org/videos/masterview_quick_start.html"><img src="screenshots/masterview_admin_thumbnail.png"/></a><br/><br/>
120
- </li>
121
- </ul>
98
+ <p>
99
+ MasterView is distributed as a gem
100
+ or a plugin. You may install it as a gem and then generate a lightweight
101
+ plugin which mainly refers to the gem <b>or</b> you can simply install as a
102
+ plugin which is self contained. I personally prefer installing as a gem for
103
+ ease of management, however if you are running at a shared hosting
104
+ environment you might not have authority to install this gem so you may
105
+ install as a self contained plugin.
106
+ </p>
122
107
 
123
108
  <h2>Usage Scenarios</h2>
124
109
  <ul>
@@ -127,70 +112,67 @@ end of this page.
127
112
  <li><b>Hybrid of legacy and new</b> - MasterView will coexist nicely with existing rhtml being able to utilize it in new templates or even bring the rhtml into a MasterView template to drive it from there. Build your new MasterView templates with the generator or by augmenting html prototypes.</li>
128
113
  </ul>
129
114
 
130
- <h2>Why another templating engine?</h2>
131
- <p>In short, I needed a way to be able to use a WYSIWYG editor to design/layout my rails pages and didn't want to give up the power and productivity of layouts, partials, and rails helpers. I needed to be able to create html templates quickly that could be handed off to a graphic designer for complex styling, and then use those html templates directly in the project. I also needed to be able to take existing html prototypes and easily make them real. I wanted to be able to give these html templates back to the designer at anytime throughout the project if the style or layout needs to be updated. The existing templating solutions did not meet all my goals or desired operation. For more information, read the background story below.
115
+ <p>See the <a href="guide.html">MasterView User's Guide</a> for information on using MasterView templates and supporting services.
116
+ View the <a href="simple_diagram.html">MasterView rendering illustration</a> to understand how a MasterView template renders rhtml
132
117
  </p>
133
118
 
134
- <h2>Goals</h2>
135
- <ul>
136
- <li>Create/extend a template engine for rails that would be XHTML friendly and
137
- thus could be edited/styled with a WYSIWYG HTML editor even late in
138
- development without breaking template.
139
-
140
- </li>
141
- <li>Keep it simple. DRY. No extra config files, simple syntax with ruby flavor.
142
-
143
- </li>
144
- <li>Design it specifically for ruby and rails. Use the full power and not be
145
- limited in its capabilities over what can be done with ERb
146
-
147
- </li>
148
- <li>Utilize layouts, partials, and rails html helpers.
119
+ <p>See the <a href="directives.html">MasterView Directives Reference</a> for complete descriptions of all the standard built-in MasterView directives.</p>
149
120
 
150
- </li>
151
- <li>Reduce complexity, work with existing rails code, no extra view logic or
152
- hashes than what is used by ERb. Scaffold generate initial templates or
153
- work from existing html prototype.
121
+ <h2>Diagrams, Screenshots, and Videos</h2>
154
122
 
155
- </li>
156
- <li>Production ready generated templates - Make generated scaffolding templates
157
- useable for production. Build in proper structure and style hooks. Provide simple
158
- CSS for style and color usage. Fully generate labels and fields so that
159
- it will be simple to reorder or remove things from views there by eliminating much
160
- of the re-work necessary to build out real-world views.
123
+ <p>The <a href="media_list.html">Screencasts</a> section includes a variety of
124
+ diagrams, illustrations, screencasts, and other media which provide an introduction
125
+ and overview of MasterView.
126
+ </p>
161
127
 
128
+ <table summary="layout area for screencasts info">
129
+ <tbody>
130
+ <tr>
131
+ <td>
132
+ <h3>Illustrations/Diagrams</h3>
133
+ <ul>
134
+ <li><a href="simple_diagram.html">MasterView rendering illustration</a> - showing how MasterView renders rhtml internally<br/><br/>
135
+ <a href="simple_diagram.html"><img src="images/masterview_rhtml_rendering_thumbnail_smaller.png" title="MasterView rhtml Rendering Illustration" alt="MasterView rhtml Rendering Illustration" /></a><br/><br/>
162
136
  </li>
163
- <li>Reduce the numbers of files, simplifying editing. Define partials and
164
- layouts naturally right in the template, no need to go to another file.
165
-
137
+ </ul>
138
+ <h3>Screenshots</h3>
139
+ <ul>
140
+ <li><a href="media_list.html">MasterView screenshots</a> - showing some generated MasterView templates and MasterView Admin page<br/><br/>
141
+ <a href="media_list.html"><img src="screenshots/generated_new_thumbnail.png" title="MasterView Screenshots and other media" alt="MasterView Screenshots and other media" /></a><br/><br/>
166
142
  </li>
167
- <li>Preview in browser without running an app. Allow for dummy data in the
168
- template so that the page can be viewed and styled independently of the
169
- application.
170
-
143
+ </ul>
144
+ </td>
145
+ <td>
146
+ <h3>Videos</h3>
147
+ <ul>
148
+ <li><a href="http://masterview.org/videos/demo_short.html">MasterView Short Video</a> - demonstrating basic usage of MasterView (no audio, ~5 minutes, uses flash)<br/><br/>
149
+ <a href="http://masterview.org/videos/demo_short.html"><img src="screenshots/generated_list_thumbnail.png" title="MasterView short video" alt="MasterView short video" /></a><br/><br/>
171
150
  </li>
172
- <li>Performance equal to ERb
173
-
151
+ <li><a href="http://masterview.org/videos/masterview_quick_start.html">MasterView Quick Start Video</a> - longer video detailing basic configuration and operation of MasterView (no audio, ~25 minutes, uses flash)<br/><br/>
152
+ <a href="http://masterview.org/videos/masterview_quick_start.html"><img src="screenshots/masterview_admin_thumbnail.png" title="MasterView quick-start video" alt="MasterView quick-start video" /></a><br/><br/>
174
153
  </li>
175
154
  </ul>
155
+ </td>
156
+ </tr>
157
+ </tbody>
158
+ </table>
159
+
176
160
 
177
161
 
178
162
  <h2>Prerequisites</h2>
179
163
  <table summary="prerequisites summary">
180
164
  <tr><td valign="top">Requires:</td><td>No external dependencies
181
-
182
165
  </td></tr>
183
166
  <tr><td valign="top">Optional:</td><td>tidy, log4r</td></tr>
184
167
  </table>
185
168
 
186
169
  <p>See the <a href="installation.html">MasterView Installation Guide</a> for details.</p>
187
170
 
188
-
189
171
  <h2>Installation and Configuration</h2>
190
172
 
191
173
  <p>See the <a href="installation.html">MasterView Installation Guide</a> for complete installation instructions.</p>
192
174
 
193
- <p>Briefly installation/launching is as follows:
175
+ <p>Briefly installation/launching is as follows:</p>
194
176
  <pre style="background-color: #eeeeee">
195
177
  &gt; gem install masterview_gem_pack
196
178
  &gt; rails demo; cd demo
@@ -198,131 +180,9 @@ application.
198
180
  &gt; script/generate masterview YOURMODEL YOURCONTROLLERNAME
199
181
  &gt; script/server
200
182
  </pre>
201
- </p>
202
-
203
- <p>See the <a href="configuration.html">MasterView Configuration Guide</a> for informatino about customizing the MasterView configuration settings for your application.</p>
204
183
 
205
- <h2>Usage</h2>
206
184
 
207
- <p>See the <a href="guide.html">MasterView User's Guide</a> for information on using MasterView templates and supporting services.
208
- View the <a href="simple_diagram.html" alt="MasterView rhtml rendering illustration">MasterView rendering illustration</a> to understand how a MasterView template renders rhtml
209
- </p>
210
-
211
-
212
- <h2>MasterView attribute directive syntax</h2>
213
-
214
- <p>See the <a href="directives.html">MasterView Directives Reference</a> for complete descriptions of all the standard built-in MasterView directives.</p>
215
-
216
-
217
- <h2>Background story</h2>
218
- <p>
219
- I came from a Java Struts environment when I was introduced to Ruby. I was
220
- just in the process of evaluating Tapestry and JSF when I learned about
221
- Rails. Ruby and Rails changed my world forever. I had to however drop many
222
- of my bad habits aquired from years of Java and C++ work. I had to embrace
223
- the new ideas and approach things now with a different mindset. (If you
224
- ever have a chance to hear Dave Thomas speak, you will know what I mean. He
225
- has a wonderfully entertaining yet enlightening way of illustrating this.)
226
- </p>
227
- <p>
228
- After learning the Ruby and Rails way, (Thank you Matz and DHH for such
229
- wonderful gifts to the world) I was amazed at how productive this
230
- environment is. Programming was fun once again, and everything you do in
231
- Ruby or Rails is easier than any other language or framework I have ever
232
- seen. Even taking into account having to learn something new, I was still
233
- far more productive than ever before. The only thing that I felt that could
234
- be done better, was to have a nice html friendly templating engine so that
235
- designers and developers could work collaboratively together on a project.
236
- The designers could style and layout the pages with their WYSIWYG HTML
237
- editors and developers would have the full power of Ruby and Rails without
238
- having to jump through extra hoops to use them. I looked at the available
239
- html template engines to see if anything fit with my style. I was
240
- disappointed with each of them, mainly because they all made it harder than
241
- straight ERb (rhtml) and were not able to use layouts and partials easily.
242
- </p>
243
- <p>
244
- After all the hard work so many people have put into Ruby and Rails, I
245
- wanted to see if there was anyway I could contribute as well, maybe
246
- extending one of the existing template projects to have the ideal
247
- functionality I was striving for. I wanted something to make my own web
248
- development even more productive. However after reviewing each of them and
249
- even getting into the source code, the closest ones seemed to be Amrita2,
250
- Liquid, and Kwartz. Unfortunately it was not going to be easy to add the
251
- functionality and usability I desired.
252
- </p>
253
- <p>
254
- During my research I learned that many of the rails gurus were putting down
255
- html template engines because they felt that they handicapped the developer
256
- severely, namely by not taking advantage of rails layouts, partials, and
257
- html helpers. After doing some projects with ERb (rhtml) I realized that
258
- they were right. I too did not want to give up any of that power either. I
259
- also didn&#8217;t want to create a bunch of extra code or config to use the
260
- templates (extra view code, or data structures to pass to the templates) as
261
- so many of the other engines relied on.
262
- </p>
263
- <p>
264
- I expanded my search outside of Ruby for the best html template technology
265
- I could find. After reviewing all the front runners I still didn&#8217;t
266
- find anything that quite met with my goals for developing with ruby and
267
- rails. I also didn&#8217;t find any technology that was close enough that I
268
- could adapt it. However I did come across features in a variety of systems
269
- that inspired me, and helped me shape the ideas that are presented here. A few
270
- of those systems were Tapestry, Zope/PHP TAL, Kwartz, Amrita 2, Liquid,
271
- and Web Objects.
272
- </p>
273
- <p>
274
- After putting much thought into all the possible options I could not see
275
- extending an existing template engine to meet my needs. And since I wanted
276
- this engine to have all the power of ruby and rails, it seemed that I would
277
- be best served by developing a html template syntax that was a thin layer
278
- above ERb. That way it would be intuitive to use (not having to learn yet
279
- another syntax) yet very powerful. Once I was able to come up with the
280
- desired syntax and approach it became apparent that this would also be
281
- fairly straightforward to build.
282
- </p>
283
- <p>
284
- I ran the concept by the guys at the St. Louis Ruby Group <a
285
- href="http://stlruby.org">stlruby.org</a> and they were excited about the
286
- project. With their help I was able to simply some of the confusing or
287
- complicated areas before beginning development. They also sparked some
288
- ideas about how to make this infinitely extensible such that developers
289
- could easily add their own attribute directives. This would give them the
290
- power to create custom extensions that would encapsulate some of their
291
- development work. This would serve a couple needs, it would not only make
292
- this engine extensible, it would also allow this engine to grow easily
293
- being composed of small pluggable attribute directives. Many thanks to the
294
- members of this group, I continue to enjoy discussing the power of Ruby and
295
- learning from each of them on a monthly basis.
296
- </p>
297
- <p>
298
- While I am on the subject of thanks, I would like to thank my wife and
299
- daughter for their support as I took time away from them to work on this
300
- project and I want to thank God for bringing the right people into my life
301
- just when I needed them and for bringing me on this wonderful journey, I am
302
- so very blessed. May I be able to give back some of what has been given to
303
- me.
304
- </p>
305
- <p>
306
- And one more mention of tremendous thanks to Deb Lewis, the other core developer on the
307
- team, she has spent countless hours reviewing, revising, and improving the codebase,
308
- configuration, and documentation. The project wouldn't be half of what it is today
309
- without all her help, inspiration, and hard work. I thoroughly enjoy working and
310
- debating the finer points of the project with her each step of the way.
311
- </p>
312
- <p>
313
- So that&#8217;s the story, I hope that many of you will find MasterView to be a useful tool for
314
- your development. I am continuing to refine MasterView by using it daily for
315
- Genesis Ministry sites and all my web projects. I know that there is much
316
- more work needed in documentation, examples, test cases, additional
317
- directives, etc., so I would appreciate any feedback and ideas that you
318
- have. Thanks for taking the time to review MasterView!
319
- </p>
320
- <p>
321
- Jeff Barczewski
322
- (jeff.barczewski
323
- <span class="class"> @ </span>
324
- gmail.com)
325
- </p>
185
+ <p>See the <a href="configuration.html">MasterView Configuration Guide</a> for information about customizing the MasterView configuration settings for your application.</p>
326
186
 
327
187
  </div> <!-- bodyContent -->
328
188
  </div>
@@ -332,6 +192,8 @@ gmail.com)
332
192
  &middot;&nbsp;
333
193
  <a href="./index.html">Doc Home</a>
334
194
  &nbsp;|&nbsp;
195
+ <a href="./about.html">About</a>
196
+ &nbsp;|&nbsp;
335
197
  <a href="./installation.html">Installation</a>
336
198
  &nbsp;|&nbsp;
337
199
  <a href="./configuration.html">Configuration</a>
@@ -339,16 +201,20 @@ gmail.com)
339
201
  <a href="./guide.html">Usage</a>
340
202
  &nbsp;|&nbsp;
341
203
  <a href="./directives.html">Directives</a>
342
- &nbsp;&nbsp;
343
- <a href="./media_list.html">Media (Videos/Illustrations)</a>
204
+ &nbsp;|&nbsp;
205
+ <a href="./developer.html">Developers</a>
206
+ &nbsp;|&nbsp;
207
+ <a href="./media_list.html">Screencasts</a>
344
208
  &nbsp;&middot;
345
209
  </div>
346
210
  <table summary="layout area">
347
211
  <tbody>
348
212
  <tr>
349
- <td class="copyright">&copy;&nbsp;Copyright MasterView 2006</td>
213
+ <td class="copyright">&copy;&nbsp;Copyright MasterView 2006. MasterView&trade; is a trademark of the MasterView Project.</td>
350
214
  <td class="validators">
351
- <a href="http://validator.w3.org/check/referer">[Valid XHTML]</a>
215
+ <a href="http://validator.w3.org/check/referer"><img
216
+ src="http://www.w3.org/Icons/valid-xhtml10" class="w3c_validator"
217
+ title="Valid XHTML 1.0!" alt="Valid XHTML 1.0!" /></a>
352
218
  </td>
353
219
  </tr>
354
220
  </tbody>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
2
+ <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
 
@@ -25,6 +25,8 @@
25
25
  &middot;&nbsp;
26
26
  <a href="./index.html">Doc Home</a>
27
27
  &nbsp;|&nbsp;
28
+ <a href="./about.html">About</a>
29
+ &nbsp;|&nbsp;
28
30
  <a href="./installation.html">Installation</a>
29
31
  &nbsp;|&nbsp;
30
32
  <a href="./configuration.html">Configuration</a>
@@ -32,8 +34,10 @@
32
34
  <a href="./guide.html">Usage</a>
33
35
  &nbsp;|&nbsp;
34
36
  <a href="./directives.html">Directives</a>
35
- &nbsp;&nbsp;
36
- <a href="./media_list.html">Media (Videos/Illustrations)</a>
37
+ &nbsp;|&nbsp;
38
+ <a href="./developer.html">Developers</a>
39
+ &nbsp;|&nbsp;
40
+ <a href="./media_list.html">Screencasts</a>
37
41
  &nbsp;&middot;
38
42
  </div>
39
43
  </div>
@@ -41,7 +45,7 @@
41
45
  <div id="pageBody">
42
46
  <div id="bodyContent">
43
47
 
44
- <h1>MasterView - Installation Guide</h1>
48
+ <h1>MasterView Installation Guide</h1>
45
49
 
46
50
  <p>
47
51
  <span class="productName">MasterView</span> is a Ruby/Rails
@@ -51,10 +55,10 @@ html helpers while still being editable/styleable in a WYSIWYG HTML editor.
51
55
  </p>
52
56
 
53
57
  <p>
54
- <span class="productName">MasterView</span> is distributed as both
55
- a gem and as a fully self-contained plugin.
58
+ <span class="productName">MasterView</span> is distributed as both
59
+ a gem and as a fully self-contained plugin.
56
60
  You may install it as a gem and then generate a lightweight
57
- plugin in your Rails application which references the gem
61
+ plugin in your Rails application which references the gem
58
62
  <b>or</b> you can simply install a complete copy as a self-contained plugin
59
63
  in your application.
60
64
  </p>
@@ -96,8 +100,8 @@ on Ruby 1.8.4 and Rails 1.1.2 on *nix and Windows.
96
100
  <td class="package">tidy</td>
97
101
  <td>
98
102
  If HTML tidy support is installed, you can use tidy to
99
- automatically clean up html in your templates into valid xhtml
100
- prior to MasterView template parsing.
103
+ automatically clean up html in your templates into valid xhtml
104
+ prior to MasterView template parsing.
101
105
  You will need both the tidy processor and the Ruby gem tidy library installed on your system.
102
106
  Visit the <a href="http://tidy.sourceforge.net/" target="_blank">HTML Tidy project on sourceforge</a> to download and install tidy on your system.
103
107
  To install the Ruby gem tidy library:
@@ -127,7 +131,7 @@ by using the standard Ruby <code>gem</code> package manager
127
131
  to <a href="#install_gem">install the MasterView gem</a>
128
132
  <b>or</b>
129
133
  you can <a href="#install_plugin">install a copy of the MasterView plugin</a> in your application.
130
- Masterview releases are published on
134
+ Masterview releases are published on
131
135
  <a href="http://rubyforge.org/projects/masterview/" target="_blank">rubyforge.org</a>
132
136
  and can be downloaded and installed manually or installed using the standard procedures described here.
133
137
  </p>
@@ -179,9 +183,9 @@ cd mynewapp
179
183
  rails
180
184
  </pre>
181
185
 
182
- <p>Now run the <code>masterview_plugin_generator</code> in your Rails application directory
186
+ <p>Now run the <code>masterview_plugin_generator</code> in your Rails application directory
183
187
  to install <span class="productName">MasterView</span> as a plugin.
184
- The plugin generator will create a lightweight plugin for <code>masterview</code>
188
+ The plugin generator will create a lightweight plugin for <code>masterview</code>
185
189
  in your rails <code>vendor/plugins</code> directory, consisting
186
190
  of an <code>init.rb</code> file which causes the MasterView template
187
191
  engine to be loaded during Rails startup.
@@ -193,7 +197,6 @@ engine to be loaded during Rails startup.
193
197
  </span>
194
198
  </p>
195
199
  <pre class="code">
196
- script/generate masterview_plugin
197
200
  ruby script/generate masterview_plugin
198
201
  </pre>
199
202
 
@@ -207,13 +210,13 @@ your application's <code>config/masterview</code> directory.
207
210
  <p>Congratulations - you are now ready to use MasterView in your application!</p>
208
211
 
209
212
  <p>To run <span class="productName">MasterView</span> with the default
210
- configuration settings, which are designed to be appropriate for a
211
- typical Rails application, simply start creating <code>.html</code>
212
- template views containing MasterView <code>mv:</code> attribute markup
213
- and run your application.
213
+ configuration settings, which are designed to be appropriate for a
214
+ typical Rails application, simply start creating <code>.html</code>
215
+ template views containing MasterView <code>mv:</code> attribute markup
216
+ and run your application.
214
217
  </p>
215
218
 
216
- <p>For information about customizing <span class="productName">MasterView</span>
219
+ <p>For information about customizing <span class="productName">MasterView</span>
217
220
  configuration settings, see the
218
221
  <a href="configuration.html">MasterView Configuration Guide</a>.
219
222
  </p>
@@ -251,7 +254,6 @@ your rails application and run the standard Rails
251
254
  </p>
252
255
 
253
256
  <pre class="code">
254
- script/plugin install svn://rubyforge.org/var/svn/masterview/tags/masterview
255
257
  ruby script/plugin install svn://rubyforge.org/var/svn/masterview/tags/masterview
256
258
  </pre>
257
259
 
@@ -263,7 +265,7 @@ system into your <code>vendor/plugins/masterview</code> directory.
263
265
  you can manually download a copy of the <code>masterview</code>
264
266
  plugin package from
265
267
  <a href="http://rubyforge.org/projects/masterview" target="_blank">rubyforge.org/projects/masterview</a>.
266
- <span class="explanation">(Go to the <code>Files</code> tab and
268
+ <span class="explanation">(Go to the <code>Files</code> tab and
267
269
  select the latest release version <i>D.D.D</i>)</span>
268
270
  Download either <code>masterview_plugin-<i>D.D.D</i>.tgz</code>
269
271
  or <code>masterview_plugin-<i>D.D.D</i>.zip</code>
@@ -275,13 +277,13 @@ of your rails application to install the <code>masterview</code> plugin.
275
277
  <p>Congratulations - you are now ready to use MasterView in your application!</p>
276
278
 
277
279
  <p>To run <span class="productName">MasterView</span> with the default
278
- configuration settings, which are designed to be appropriate for a
279
- typical Rails application, simply start creating <code>.html</code>
280
- template views containing MasterView <code>mv:</code> attribute markup
281
- and run your application.
280
+ configuration settings, which are designed to be appropriate for a
281
+ typical Rails application, simply start creating <code>.html</code>
282
+ template views containing MasterView <code>mv:</code> attribute markup
283
+ and run your application.
282
284
  </p>
283
285
 
284
- <p>For information about customizing <span class="productName">MasterView</span>
286
+ <p>For information about customizing <span class="productName">MasterView</span>
285
287
  configuration settings, see the
286
288
  <a href="configuration.html">MasterView Configuration Guide</a>.
287
289
  </p>
@@ -368,6 +370,8 @@ releases. They are obsolete and should be ignored.
368
370
  &middot;&nbsp;
369
371
  <a href="./index.html">Doc Home</a>
370
372
  &nbsp;|&nbsp;
373
+ <a href="./about.html">About</a>
374
+ &nbsp;|&nbsp;
371
375
  <a href="./installation.html">Installation</a>
372
376
  &nbsp;|&nbsp;
373
377
  <a href="./configuration.html">Configuration</a>
@@ -375,8 +379,10 @@ releases. They are obsolete and should be ignored.
375
379
  <a href="./guide.html">Usage</a>
376
380
  &nbsp;|&nbsp;
377
381
  <a href="./directives.html">Directives</a>
378
- &nbsp;&nbsp;
379
- <a href="./media_list.html">Media (Videos/Illustrations)</a>
382
+ &nbsp;|&nbsp;
383
+ <a href="./developer.html">Developers</a>
384
+ &nbsp;|&nbsp;
385
+ <a href="./media_list.html">Screencasts</a>
380
386
  &nbsp;&middot;
381
387
  </div>
382
388
  <table summary="layout area">
@@ -384,7 +390,9 @@ releases. They are obsolete and should be ignored.
384
390
  <tr>
385
391
  <td class="copyright">&copy;&nbsp;Copyright MasterView 2006</td>
386
392
  <td class="validators">
387
- <a href="http://validator.w3.org/check/referer">[Valid XHTML]</a>
393
+ <a href="http://validator.w3.org/check/referer"><img
394
+ src="http://www.w3.org/Icons/valid-xhtml10" class="w3c_validator"
395
+ title="Valid XHTML 1.0!" alt="Valid XHTML 1.0!" /></a>
388
396
  </td>
389
397
  </tr>
390
398
  </tbody>