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.
- data/CHANGELOG +31 -1
- data/README +70 -69
- data/RELEASE_NOTES +70 -64
- data/Rakefile +26 -27
- data/TODO +13 -29
- data/doc/about.html +246 -0
- data/doc/configuration.html +49 -36
- data/doc/developer.html +423 -41
- data/doc/directives.html +139 -51
- data/doc/guide.html +19 -9
- data/doc/index.html +90 -224
- data/doc/installation.html +36 -28
- data/doc/media_list.html +30 -20
- data/doc/simple_diagram.html +3 -5
- data/doc/stylesheets/masterview.css +16 -1
- data/examples/rails_app_config/masterview/settings.rb +2 -1
- data/init.rb +1 -1
- data/lib/#ChangeLog# +6 -0
- data/lib/masterview/analyzer.rb +48 -34
- data/lib/masterview/attr_string_parser.rb +5 -1
- data/lib/masterview/case_insensitive_hash.rb +69 -0
- data/lib/masterview/{pathname_extensions.rb → core_ext/pathname.rb} +0 -0
- data/lib/masterview/{string_extensions.rb → core_ext/string.rb} +0 -0
- data/lib/masterview/deprecated/directive_base.rb +362 -0
- data/lib/masterview/directive_base.rb +201 -179
- data/lib/masterview/directive_dsl.rb +457 -0
- data/lib/masterview/directive_helpers.rb +28 -141
- data/lib/masterview/directive_load_path.rb +388 -0
- data/lib/masterview/directive_metadata.rb +377 -0
- data/lib/masterview/directive_registry.rb +259 -69
- data/lib/masterview/directives/.metadata +16 -0
- data/lib/masterview/directives/attr.rb +9 -8
- data/lib/masterview/directives/block.rb +11 -14
- data/lib/masterview/directives/check_box.rb +13 -18
- data/lib/masterview/directives/collection_select.rb +15 -29
- data/lib/masterview/directives/content.rb +9 -3
- data/lib/masterview/directives/else.rb +15 -13
- data/lib/masterview/directives/elsif.rb +14 -13
- data/lib/masterview/directives/eval.rb +20 -0
- data/lib/masterview/directives/form.rb +56 -9
- data/lib/masterview/directives/form_remote.rb +26 -0
- data/lib/masterview/directives/global_inline_erb.rb +10 -14
- data/lib/masterview/directives/hidden_field.rb +11 -20
- data/lib/masterview/directives/if.rb +13 -12
- data/lib/masterview/directives/image_tag.rb +20 -28
- data/lib/masterview/directives/import.rb +5 -12
- data/lib/masterview/directives/import_render.rb +7 -19
- data/lib/masterview/directives/insert_generated_comment.rb +8 -11
- data/lib/masterview/directives/javascript_include.rb +21 -12
- data/lib/masterview/directives/link_to.rb +14 -8
- data/lib/masterview/directives/link_to_function.rb +22 -0
- data/lib/masterview/directives/link_to_if.rb +15 -13
- data/lib/masterview/directives/link_to_remote.rb +13 -8
- data/lib/masterview/directives/omit_tag.rb +32 -16
- data/lib/masterview/directives/password_field.rb +10 -22
- data/lib/masterview/directives/radio_button.rb +11 -22
- data/lib/masterview/directives/replace.rb +7 -8
- data/lib/masterview/directives/select.rb +11 -24
- data/lib/masterview/directives/stylesheet_link.rb +20 -12
- data/lib/masterview/directives/submit.rb +11 -5
- data/lib/masterview/directives/text_area.rb +10 -23
- data/lib/masterview/directives/text_field.rb +10 -22
- data/lib/masterview/exceptions.rb +21 -0
- data/lib/masterview/extras/app/controllers/masterview_controller.rb +102 -75
- data/lib/masterview/extras/app/views/layouts/masterview_admin.rhtml +24 -23
- data/lib/masterview/extras/app/views/layouts/masterview_admin_config.rhtml +81 -0
- data/lib/masterview/extras/app/views/masterview/admin/configuration.rhtml +5 -1
- data/lib/masterview/extras/app/views/masterview/admin/create.rhtml +2 -2
- data/lib/masterview/extras/app/views/masterview/admin/directives.rhtml +5 -0
- data/lib/masterview/extras/app/views/masterview/admin/features.rhtml +5 -79
- data/lib/masterview/extras/app/views/masterview/admin/interact.rhtml +5 -0
- data/lib/masterview/extras/app/views/masterview/admin/list.rhtml +3 -71
- data/lib/masterview/extras/init_mv_admin_pages.rb +42 -23
- data/lib/masterview/filter_helpers.rb +26 -0
- data/lib/masterview/initializer.rb +99 -53
- data/lib/masterview/io.rb +19 -15
- data/lib/masterview/keyword_expander.rb +7 -2
- data/lib/masterview/masterview_info.rb +229 -23
- data/lib/masterview/masterview_version.rb +2 -2
- data/lib/masterview/parser.rb +275 -105
- data/lib/masterview/parser_helpers.rb +54 -0
- data/lib/masterview/rails_ext/action_controller_erb_direct.rb +29 -0
- data/lib/masterview/rails_ext/action_controller_reparse_checking.rb +27 -0
- data/lib/masterview/{extras/init_rails_erb_mv_direct.rb → rails_ext/action_view_erb_direct.rb} +12 -59
- data/lib/masterview/template_spec.rb +3 -2
- data/lib/masterview.rb +21 -12
- data/lib/rexml/parsers/baseparser_with_doctype_fix.rb +473 -0
- data/lib/rexml/parsers/sax2parser_with_doctype_fix.rb +243 -0
- data/test/directive_test_helper.rb +135 -0
- data/test/fixtures/directives/id_check.rb +18 -0
- data/test/fixtures/directives/test_directive_events.rb +70 -0
- data/test/test_helper.rb +18 -5
- data/test/tmp/views/layouts/product.rhtml +10 -10
- data/test/tmp/views/product/_form.rhtml +4 -4
- data/test/tmp/views/product/_product.rhtml +3 -3
- data/test/tmp/views/product/destroy.rhtml +5 -5
- data/test/tmp/views/product/edit.rhtml +4 -4
- data/test/tmp/views/product/list.rhtml +3 -3
- data/test/tmp/views/product/new.rhtml +4 -4
- data/test/tmp/views/product/show.rhtml +2 -2
- data/test/unit/attr_string_parser_test.rb +105 -0
- data/test/unit/case_insensitive_hash_mod_test.rb +104 -0
- data/test/unit/config_settings_test.rb +13 -1
- data/test/unit/default_generate_mio_filter_test.rb +3 -3
- data/test/unit/deprecated_directive_base_test.rb +30 -0
- data/test/unit/directive_attr_test.rb +111 -35
- data/test/unit/directive_base_test.rb +520 -1
- data/test/unit/directive_block_test.rb +30 -22
- data/test/unit/directive_content_test.rb +24 -11
- data/test/unit/directive_else_test.rb +18 -15
- data/test/unit/directive_elsif_test.rb +17 -15
- data/test/unit/directive_form_remote_test.rb +59 -0
- data/test/unit/directive_form_test.rb +31 -39
- data/test/unit/directive_global_inline_erb_test.rb +28 -17
- data/test/unit/directive_grid_test_notready.rb +38 -0
- data/test/unit/directive_helpers_test.rb +39 -0
- data/test/unit/directive_hidden_field_test.rb +44 -29
- data/test/unit/directive_if_test.rb +10 -7
- data/test/unit/directive_image_tag_test.rb +69 -61
- data/test/unit/directive_import_render_test.rb +28 -38
- data/test/unit/directive_import_test.rb +16 -14
- data/test/unit/directive_insert_generated_comment_test.rb +32 -0
- data/test/unit/directive_javascript_include_test.rb +40 -43
- data/test/unit/directive_link_to_function_test.rb +40 -0
- data/test/unit/directive_link_to_if_test.rb +52 -12
- data/test/unit/directive_link_to_remote_test.rb +58 -0
- data/test/unit/directive_link_to_test.rb +46 -31
- data/test/unit/directive_load_path_test.rb +257 -0
- data/test/unit/directive_metadata_test.rb +313 -0
- data/test/unit/directive_omit_tag_test.rb +73 -21
- data/test/unit/directive_password_field_test.rb +44 -38
- data/test/unit/directive_registry_test.rb +44 -0
- data/test/unit/directive_replace_test.rb +28 -12
- data/test/unit/directive_stylesheet_link_test.rb +43 -36
- data/test/unit/directive_submit_test.rb +29 -30
- data/test/unit/directive_text_area_test.rb +40 -36
- data/test/unit/directive_text_field_test.rb +44 -38
- data/test/unit/example_directive_child_events_test.rb +41 -0
- data/test/unit/example_test.rb +31 -4
- data/test/unit/file_mio_test.rb +18 -13
- data/test/unit/filter_helpers_test.rb +10 -8
- data/test/unit/find_directive_parent_test.rb +174 -0
- data/test/unit/keyword_expander_test.rb +4 -2
- data/test/unit/mio_test.rb +18 -11
- data/test/unit/mtime_string_hash_mio_tree_test.rb +5 -1
- data/test/unit/parser_test.rb +41 -29
- data/test/unit/pathname_extensions_test.rb +1 -1
- data/test/unit/run_parser_test.rb +2 -2
- data/test/unit/simplified_directive_base_test.rb +256 -0
- data/test/unit/string_hash_mio_test.rb +5 -1
- data/test/unit/template_file_watcher_test.rb +2 -2
- data/test/unit/template_test.rb +221 -46
- metadata +86 -45
- data/lib/masterview/directives/testfilter.rb +0 -55
- data/lib/masterview/extras/init_rails_reparse_checking.rb +0 -62
metadata
CHANGED
@@ -3,12 +3,12 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: masterview
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2006-08
|
6
|
+
version: 0.3.0
|
7
|
+
date: 2006-11-08 00:00:00 -06:00
|
8
8
|
summary: A (x)html friendly template engine for rails with the power of layouts, and partials.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
|
-
email: jeff.barczewski
|
11
|
+
email: jeff.barczewski (at) gmail (dot) com
|
12
12
|
homepage: http://masterview.org/
|
13
13
|
rubyforge_project:
|
14
14
|
description:
|
@@ -30,7 +30,9 @@ authors:
|
|
30
30
|
files:
|
31
31
|
- lib/facets
|
32
32
|
- lib/masterview
|
33
|
+
- lib/rexml
|
33
34
|
- lib/masterview.rb
|
35
|
+
- lib/#ChangeLog#
|
34
36
|
- lib/facets/ProjectInfo
|
35
37
|
- lib/facets/AUTHORS
|
36
38
|
- lib/facets/CHANGELOG
|
@@ -42,36 +44,37 @@ files:
|
|
42
44
|
- lib/facets/core/string/blank.rb
|
43
45
|
- lib/masterview/directives
|
44
46
|
- lib/masterview/extras
|
47
|
+
- lib/masterview/deprecated
|
45
48
|
- lib/masterview/io.rb
|
46
49
|
- lib/masterview/plugin_load_tracking.rb
|
47
50
|
- lib/masterview/initializer.rb
|
51
|
+
- lib/masterview/rails_ext
|
48
52
|
- lib/masterview/analyzer.rb
|
49
|
-
- lib/masterview/string_extensions.rb
|
50
53
|
- lib/masterview/template_spec.rb
|
51
54
|
- lib/masterview/masterview_version.rb
|
52
55
|
- lib/masterview/parser.rb
|
53
56
|
- lib/masterview/mtime_tracking_hash.rb
|
54
57
|
- lib/masterview/directive_helpers.rb
|
55
|
-
- lib/masterview/masterview_info.rb
|
56
58
|
- lib/masterview/runtime_helpers.rb
|
57
|
-
- lib/masterview/
|
58
|
-
- lib/masterview/pathname_extensions.rb
|
59
|
+
- lib/masterview/core_ext
|
59
60
|
- lib/masterview/filter_helpers.rb
|
60
61
|
- lib/masterview/directive_base.rb
|
61
62
|
- lib/masterview/keyword_expander.rb
|
62
63
|
- lib/masterview/attr_string_parser.rb
|
64
|
+
- lib/masterview/directive_registry.rb
|
65
|
+
- lib/masterview/masterview_info.rb
|
66
|
+
- lib/masterview/parser_helpers.rb
|
67
|
+
- lib/masterview/directive_metadata.rb
|
68
|
+
- lib/masterview/case_insensitive_hash.rb
|
69
|
+
- lib/masterview/exceptions.rb
|
70
|
+
- lib/masterview/directive_dsl.rb
|
71
|
+
- lib/masterview/directive_load_path.rb
|
72
|
+
- lib/masterview/directives/global_inline_erb.rb
|
63
73
|
- lib/masterview/directives/link_to_if.rb
|
64
|
-
- lib/masterview/directives/image_tag.rb
|
65
|
-
- lib/masterview/directives/testfilter.rb
|
66
|
-
- lib/masterview/directives/select.rb
|
67
74
|
- lib/masterview/directives/preview.rb
|
68
|
-
- lib/masterview/directives/
|
69
|
-
- lib/masterview/directives/javascript_include.rb
|
70
|
-
- lib/masterview/directives/global_inline_erb.rb
|
75
|
+
- lib/masterview/directives/password_field.rb
|
71
76
|
- lib/masterview/directives/text_field.rb
|
72
77
|
- lib/masterview/directives/else.rb
|
73
|
-
- lib/masterview/directives/radio_button.rb
|
74
|
-
- lib/masterview/directives/collection_select.rb
|
75
78
|
- lib/masterview/directives/block.rb
|
76
79
|
- lib/masterview/directives/if.rb
|
77
80
|
- lib/masterview/directives/hidden_field.rb
|
@@ -80,63 +83,82 @@ files:
|
|
80
83
|
- lib/masterview/directives/form.rb
|
81
84
|
- lib/masterview/directives/omit_tag.rb
|
82
85
|
- lib/masterview/directives/submit.rb
|
83
|
-
- lib/masterview/directives/
|
86
|
+
- lib/masterview/directives/replace.rb
|
87
|
+
- lib/masterview/directives/attr.rb
|
84
88
|
- lib/masterview/directives/insert_generated_comment.rb
|
85
89
|
- lib/masterview/directives/stylesheet_link.rb
|
86
|
-
- lib/masterview/directives/
|
90
|
+
- lib/masterview/directives/javascript_include.rb
|
87
91
|
- lib/masterview/directives/import_render.rb
|
92
|
+
- lib/masterview/directives/link_to_remote.rb
|
88
93
|
- lib/masterview/directives/import.rb
|
89
94
|
- lib/masterview/directives/content.rb
|
90
|
-
- lib/masterview/directives/
|
91
|
-
- lib/masterview/directives/replace.rb
|
95
|
+
- lib/masterview/directives/radio_button.rb
|
92
96
|
- lib/masterview/directives/text_area.rb
|
97
|
+
- lib/masterview/directives/image_tag.rb
|
98
|
+
- lib/masterview/directives/check_box.rb
|
99
|
+
- lib/masterview/directives/eval.rb
|
100
|
+
- lib/masterview/directives/select.rb
|
101
|
+
- lib/masterview/directives/form_remote.rb
|
102
|
+
- lib/masterview/directives/collection_select.rb
|
103
|
+
- lib/masterview/directives/link_to_function.rb
|
93
104
|
- lib/masterview/extras/app
|
94
105
|
- lib/masterview/extras/init_logger.rb
|
95
106
|
- lib/masterview/extras/watcher.rb
|
96
107
|
- lib/masterview/extras/sample_templates.rb
|
97
|
-
- lib/masterview/extras/init_rails_reparse_checking.rb
|
98
|
-
- lib/masterview/extras/init_rails_erb_mv_direct.rb
|
99
108
|
- lib/masterview/extras/init_mv_admin_pages.rb
|
100
109
|
- lib/masterview/extras/app/controllers
|
101
110
|
- lib/masterview/extras/app/views
|
102
111
|
- lib/masterview/extras/app/controllers/masterview_controller.rb
|
103
|
-
- lib/masterview/extras/app/views/layouts
|
104
112
|
- lib/masterview/extras/app/views/masterview
|
105
|
-
- lib/masterview/extras/app/views/layouts
|
113
|
+
- lib/masterview/extras/app/views/layouts
|
106
114
|
- lib/masterview/extras/app/views/masterview/admin
|
107
|
-
- lib/masterview/extras/app/views/masterview/admin/
|
115
|
+
- lib/masterview/extras/app/views/masterview/admin/view_rhtml.rhtml
|
108
116
|
- lib/masterview/extras/app/views/masterview/admin/list.rhtml
|
109
117
|
- lib/masterview/extras/app/views/masterview/admin/empty.rhtml
|
110
|
-
- lib/masterview/extras/app/views/masterview/admin/configuration.rhtml
|
111
|
-
- lib/masterview/extras/app/views/masterview/admin/view_rhtml.rhtml
|
112
|
-
- lib/masterview/extras/app/views/masterview/admin/create.rhtml
|
113
118
|
- lib/masterview/extras/app/views/masterview/admin/interact.rhtml
|
119
|
+
- lib/masterview/extras/app/views/masterview/admin/create.rhtml
|
120
|
+
- lib/masterview/extras/app/views/masterview/admin/features.rhtml
|
121
|
+
- lib/masterview/extras/app/views/masterview/admin/directives.rhtml
|
122
|
+
- lib/masterview/extras/app/views/masterview/admin/configuration.rhtml
|
123
|
+
- lib/masterview/extras/app/views/layouts/masterview_admin.rhtml
|
124
|
+
- lib/masterview/extras/app/views/layouts/masterview_admin_config.rhtml
|
125
|
+
- lib/masterview/deprecated/directive_base.rb
|
126
|
+
- lib/masterview/rails_ext/action_controller_erb_direct.rb
|
127
|
+
- lib/masterview/rails_ext/action_view_erb_direct.rb
|
128
|
+
- lib/masterview/rails_ext/action_controller_reparse_checking.rb
|
129
|
+
- lib/masterview/core_ext/pathname.rb
|
130
|
+
- lib/masterview/core_ext/string.rb
|
131
|
+
- lib/rexml/parsers
|
132
|
+
- lib/rexml/parsers/sax2parser_with_doctype_fix.rb
|
133
|
+
- lib/rexml/parsers/baseparser_with_doctype_fix.rb
|
134
|
+
- lib/masterview/directives/.metadata
|
114
135
|
- Rakefile
|
115
136
|
- init.rb
|
116
|
-
- doc/screenshots
|
117
|
-
- doc/images
|
118
137
|
- doc/stylesheets
|
119
138
|
- doc/directives.html
|
120
139
|
- doc/guide.html
|
121
|
-
- doc/
|
140
|
+
- doc/screenshots
|
122
141
|
- doc/installation.html
|
123
|
-
- doc/developer.html
|
124
142
|
- doc/configuration.html
|
125
143
|
- doc/index.html
|
126
144
|
- doc/troubleshooting.html
|
127
145
|
- doc/media_list.html
|
146
|
+
- doc/images
|
147
|
+
- doc/about.html
|
148
|
+
- doc/simple_diagram.html
|
149
|
+
- doc/developer.html
|
150
|
+
- doc/images/masterview_rhtml_rendering_thumbnail_smaller.png
|
128
151
|
- doc/images/masterview_rhtml_rendering_thumbnail.png
|
129
|
-
- doc/images/masterview_logo_gradient.png
|
130
152
|
- doc/images/masterview_logo.png
|
131
|
-
- doc/images/
|
132
|
-
- doc/screenshots/
|
133
|
-
- doc/screenshots/
|
153
|
+
- doc/images/masterview_logo_gradient.png
|
154
|
+
- doc/screenshots/generated_list.png
|
155
|
+
- doc/screenshots/generated_new.png
|
134
156
|
- doc/screenshots/masterview_admin.png
|
135
|
-
- doc/screenshots/masterview_admin_medium.png
|
136
157
|
- doc/screenshots/generated_new_medium.png
|
137
|
-
- doc/screenshots/
|
138
|
-
- doc/screenshots/generated_list.png
|
158
|
+
- doc/screenshots/masterview_admin_medium.png
|
139
159
|
- doc/screenshots/generated_list_medium.png
|
160
|
+
- doc/screenshots/generated_list_thumbnail.png
|
161
|
+
- doc/screenshots/masterview_admin_thumbnail.png
|
140
162
|
- doc/screenshots/generated_new_thumbnail.png
|
141
163
|
- doc/stylesheets/mv-directives.css
|
142
164
|
- doc/stylesheets/mv-installation.css
|
@@ -156,24 +178,24 @@ files:
|
|
156
178
|
- test/fixtures
|
157
179
|
- test/tmp
|
158
180
|
- test/test_helper.rb
|
181
|
+
- test/directive_test_helper.rb
|
159
182
|
- test/unit/config_settings_test.rb
|
160
183
|
- test/unit/run_parser_test.rb
|
161
184
|
- test/unit/mio_test.rb
|
162
|
-
- test/unit/
|
185
|
+
- test/unit/directive_helpers_parse_test.rb
|
186
|
+
- test/unit/directive_grid_test_notready.rb
|
163
187
|
- test/unit/directive_text_field_test.rb
|
164
188
|
- test/unit/directive_else_test.rb
|
165
189
|
- test/unit/mtime_string_hash_mio_tree_test.rb
|
166
190
|
- test/unit/directive_block_test.rb
|
167
|
-
- test/unit/
|
191
|
+
- test/unit/parser_test.rb
|
168
192
|
- test/unit/directive_hidden_field_test.rb
|
169
193
|
- test/unit/directive_if_test.rb
|
170
|
-
- test/unit/parser_test.rb
|
171
194
|
- test/unit/directive_link_to_test.rb
|
172
195
|
- test/unit/directive_elsif_test.rb
|
173
196
|
- test/unit/directive_form_test.rb
|
174
197
|
- test/unit/filter_helpers_test.rb
|
175
198
|
- test/unit/directive_javascript_include_test.rb
|
176
|
-
- test/unit/directive_base_test.rb
|
177
199
|
- test/unit/directive_import_test.rb
|
178
200
|
- test/unit/directive_link_to_if_test.rb
|
179
201
|
- test/unit/template_test.rb
|
@@ -186,20 +208,37 @@ files:
|
|
186
208
|
- test/unit/directive_omit_tag_test.rb
|
187
209
|
- test/unit/directive_password_field_test.rb
|
188
210
|
- test/unit/directive_stylesheet_link_test.rb
|
189
|
-
- test/unit/default_generate_mio_filter_test.rb
|
190
211
|
- test/unit/directive_import_render_test.rb
|
191
212
|
- test/unit/directive_attr_test.rb
|
192
213
|
- test/unit/directive_content_test.rb
|
193
214
|
- test/unit/directive_replace_test.rb
|
194
215
|
- test/unit/keyword_expander_test.rb
|
195
216
|
- test/unit/directive_text_area_test.rb
|
196
|
-
- test/unit/directive_image_tag_test.rb
|
197
217
|
- test/unit/pathname_extensions_test.rb
|
198
218
|
- test/unit/string_hash_mio_test.rb
|
219
|
+
- test/unit/directive_image_tag_test.rb
|
220
|
+
- test/unit/directive_base_test.rb
|
221
|
+
- test/unit/default_generate_mio_filter_test.rb
|
222
|
+
- test/unit/find_directive_parent_test.rb
|
223
|
+
- test/unit/simplified_directive_base_test.rb
|
224
|
+
- test/unit/case_insensitive_hash_mod_test.rb
|
225
|
+
- test/unit/directive_link_to_remote_test.rb
|
226
|
+
- test/unit/directive_insert_generated_comment_test.rb
|
227
|
+
- test/unit/directive_helpers_test.rb
|
228
|
+
- test/unit/directive_form_remote_test.rb
|
229
|
+
- test/unit/directive_link_to_function_test.rb
|
230
|
+
- test/unit/directive_metadata_test.rb
|
231
|
+
- test/unit/directive_registry_test.rb
|
232
|
+
- test/unit/example_directive_child_events_test.rb
|
233
|
+
- test/unit/attr_string_parser_test.rb
|
234
|
+
- test/unit/directive_global_inline_erb_test.rb
|
235
|
+
- test/unit/directive_load_path_test.rb
|
236
|
+
- test/unit/deprecated_directive_base_test.rb
|
199
237
|
- test/xtras/config_initialize_standalone.rb
|
200
238
|
- test/xtras/config-mv-logger_config.rb
|
201
239
|
- test/fixtures/configs
|
202
240
|
- test/fixtures/templates
|
241
|
+
- test/fixtures/directives
|
203
242
|
- test/fixtures/configs/fake_rails_app
|
204
243
|
- test/fixtures/configs/fake_rails_app_with_config
|
205
244
|
- test/fixtures/configs/fake_rails_app_with_config/config
|
@@ -210,6 +249,8 @@ files:
|
|
210
249
|
- test/fixtures/configs/fake_rails_app_with_config/config/masterview/environments/production.rb
|
211
250
|
- test/fixtures/templates/product.html
|
212
251
|
- test/fixtures/templates/test.import
|
252
|
+
- test/fixtures/directives/test_directive_events.rb
|
253
|
+
- test/fixtures/directives/id_check.rb
|
213
254
|
- test/tmp/template
|
214
255
|
- test/tmp/erb
|
215
256
|
- test/tmp/templates_src
|
@@ -230,8 +271,8 @@ files:
|
|
230
271
|
- CHANGELOG
|
231
272
|
- TODO
|
232
273
|
- RELEASE_NOTES
|
233
|
-
- MIT-LICENSE
|
234
274
|
- README
|
275
|
+
- MIT-LICENSE
|
235
276
|
test_files: []
|
236
277
|
|
237
278
|
rdoc_options: []
|
@@ -1,55 +0,0 @@
|
|
1
|
-
module MasterView
|
2
|
-
module Directives
|
3
|
-
|
4
|
-
class TestDirective < MasterView::DirectiveBase
|
5
|
-
def priority
|
6
|
-
DirectivePriorities::Low
|
7
|
-
end
|
8
|
-
|
9
|
-
def stag(dcs)
|
10
|
-
ret = []
|
11
|
-
ret << 'stag'
|
12
|
-
ret << dcs.render
|
13
|
-
ret << 'stagend'
|
14
|
-
end
|
15
|
-
|
16
|
-
def characters(dcs)
|
17
|
-
ret = []
|
18
|
-
ret << 'char'
|
19
|
-
ret << dcs.render
|
20
|
-
end
|
21
|
-
|
22
|
-
def comment(dcs)
|
23
|
-
ret = []
|
24
|
-
ret << 'com'
|
25
|
-
ret << dcs.render
|
26
|
-
end
|
27
|
-
|
28
|
-
def cdata(dcs)
|
29
|
-
ret = []
|
30
|
-
ret << 'cdata'
|
31
|
-
ret << dcs.render
|
32
|
-
end
|
33
|
-
|
34
|
-
def etag(dcs)
|
35
|
-
ret = []
|
36
|
-
ret << 'etag'
|
37
|
-
ret << dcs.render
|
38
|
-
ret << 'etagend'
|
39
|
-
end
|
40
|
-
|
41
|
-
def child_title_stag(dcs)
|
42
|
-
ret = []
|
43
|
-
ret << 'desctitle'
|
44
|
-
ret << dcs.render
|
45
|
-
end
|
46
|
-
|
47
|
-
def child_title_etag(dcs)
|
48
|
-
dcs.context[:tag].content = @attribute_value
|
49
|
-
ret = []
|
50
|
-
ret << dcs.render
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
#--
|
4
|
-
# Copyright (c) 2006 Jeff Barczewski
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
7
|
-
# a copy of this software and associated documentation files (the
|
8
|
-
# "Software"), to deal in the Software without restriction, including
|
9
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
10
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
12
|
-
# the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be
|
15
|
-
# included in all copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
-
#++
|
25
|
-
#
|
26
|
-
# Setup hook to insert MasterView changed-template reparsing
|
27
|
-
# into the Rails request dispatching handler in ActionController::Base.
|
28
|
-
#
|
29
|
-
# Ensures that masterview output files are always current while running a
|
30
|
-
# Rails application. Should generally be enabled/disabled in conjunction
|
31
|
-
# with Rails class load caching, which is normally off in a development
|
32
|
-
# environment configuration. Requires that masterview templates be
|
33
|
-
# parsed at application startup to properly initialize the mechanism
|
34
|
-
# to detect template changes after application startup.
|
35
|
-
#
|
36
|
-
|
37
|
-
#--
|
38
|
-
# DBC-style notation per DbC - rubydbc-0.1 (Andy Hunt's Design by Contract)
|
39
|
-
#pre( MasterView::ParseMasterViewTemplatesAtStartup )
|
40
|
-
#pre( MasterView::ReparseChangedMasterViewTemplates )
|
41
|
-
#pre( defined?(ActionController) && ActionController::Base.perform_caching )
|
42
|
-
#++
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
MasterView::Log.info { 'Adding hook to allow MasterView to check for templates that have changed when processing a request' }
|
47
|
-
|
48
|
-
module ActionController #:nodoc:
|
49
|
-
class Base #:nodoc
|
50
|
-
# Install hook to enable MasterView to detect and automatically reparse
|
51
|
-
# changed templates during Rails request dispatching.
|
52
|
-
alias :process_pre_mv :process #:nodoc:
|
53
|
-
def process(request, response, method = :perform_action, *arguments) #:nodoc:
|
54
|
-
MasterView::TemplateWatcher.check_updated(MasterView::IOMgr.template, MasterView::TemplateFilenamePattern ) do |mio|
|
55
|
-
MasterView::Parser.parse_mio( mio, MasterView::IOMgr.erb )
|
56
|
-
end
|
57
|
-
process_pre_mv(request, response, method, *arguments)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
MasterView::LoadedFeatures[:rails_reparse_checking] = true
|