Ed Howland
2006-Jul-05 16:27 UTC
[Masterview-users] Urgent Help! - User directives no longer functioning in 0.2.2
After upgrading to 0.2.2, my directives in vendor/plugins/masterview/directives no longer function. Scanned all the documentation and could not find _any_ information on user created directives. Reading the code itself, there seems to be 2 commented out sections. One refers to app/masterview/directives and the other refers to config/masterview/directives. Seems to be a lot of TODO commentary. Why were user directives disabled in this release and no notification given? Is there a work around? I desperately need to get my code working again. Thanks Ed -- Ed Howland http://greenprogrammer.blogspot.com
Jeff Barczewski
2006-Jul-05 17:47 UTC
[Masterview-users] Urgent Help! - User directives no longer functioning in 0.2.2
We didn''t intentionally remove user level directives from the release. We consider it a benefit to allow user created directives. I would guess that since the newer version uses new configuration of how those user directive paths are specified that this is what broke things for you. Check your config/masterview/settings.rb that you have specified config.directive_paths << /path/to/my/directives to include your directive directories. I will run some tests to verify whether there are any issues with this. Also note that you can also manually ''require'' any files that you want if you do it after you require ''masterview''. This will allow you to manually load any directives anywhere in your path including inside of gems. They simply have to be done after masterview though so that MasterView will become aware of them as they load. Jeff On 7/5/06, Ed Howland <ed.howland at gmail.com> wrote:> > After upgrading to 0.2.2, my directives in > vendor/plugins/masterview/directives no longer function. Scanned all > the documentation and could not find _any_ information on user created > directives. > > Reading the code itself, there seems to be 2 commented out sections. > One refers to app/masterview/directives and the other refers to > config/masterview/directives. Seems to be a lot of TODO commentary. > > Why were user directives disabled in this release and no notification > given? Is there a work around? I desperately need to get my code > working again. > > Thanks > > Ed > > -- > Ed Howland > http://greenprogrammer.blogspot.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20060705/fec4b3eb/attachment.html
Ed Howland
2006-Jul-05 18:18 UTC
[Masterview-users] Urgent Help! - User directives no longer functioning in 0.2.2
Thanks Jeff. I got confused by the masterview_plugin generator which when I ran it created ''vendor/plugins/masterview/directives'' which was where I installed them previously. Since that option was commented out, I assumed it still picked up any there and that you could add additional ones in the settings. I suggest that you make a note of this in the announcement, since others may run into this as well. Also, I never explicitly require ''masterview'' anywhere. Are you suggesting this in one of the normal Rails configuration files? Or in vendor/plugins/masterview/init.rb? Thanks Ed On 7/5/06, Jeff Barczewski <jeff.barczewski at gmail.com> wrote:> We didn''t intentionally remove user level directives from the release. We > consider it a benefit to allow user created directives. > > I would guess that since the newer version uses new configuration of how > those user directive paths are specified that this is what broke things for > you. > > Check your config/masterview/settings.rb that you have specified > config.directive_paths << /path/to/my/directives > > to include your directive directories. > > I will run some tests to verify whether there are any issues with this. > > Also note that you can also manually ''require'' any files that you want if > you do it after you require ''masterview''. This will allow you to manually > load any directives anywhere in your path including inside of gems. They > simply have to be done after masterview though so that MasterView will > become aware of them as they load. > > Jeff > > > On 7/5/06, Ed Howland <ed.howland at gmail.com> wrote: > > After upgrading to 0.2.2, my directives in > > vendor/plugins/masterview/directives no longer function. > Scanned all > > the documentation and could not find _any_ information on user created > > directives. > > > > Reading the code itself, there seems to be 2 commented out sections. > > One refers to app/masterview/directives and the other refers to > > config/masterview/directives. Seems to be a lot of TODO commentary. > > > > Why were user directives disabled in this release and no notification > > given? Is there a work around? I desperately need to get my code > > working again. > > > > Thanks > > > > Ed > > > > -- > > Ed Howland > > http://greenprogrammer.blogspot.com > > > >-- Ed Howland http://greenprogrammer.blogspot.com
Jeff Barczewski
2006-Jul-05 18:33 UTC
[Masterview-users] Urgent Help! - User directives no longer functioning in 0.2.2
Yes, we need to make that clearer. Deb has been working on the user directive side of things so I''ll see if she has any good ideas on that front. So everything appears to be working if you add in any directive directories to the config.directive_paths, but we''ll make sure that either we communicate that better. As for doing manual require''s you shouldn''t have to, but I wanted to provide full flexibility to do this if necessary. You could do this in init.rbhowever ideally we would do it with the settings.rb, so not sure if we can simply put require''s in there or not? Deb? (The main reason this might be needed is if you want to manually include a single file or to include a gem of directives). On 7/5/06, Ed Howland <ed.howland at gmail.com> wrote:> > Thanks Jeff. I got confused by the masterview_plugin generator which > when I ran it created ''vendor/plugins/masterview/directives'' which was > where I installed them previously. Since that option was commented > out, I assumed it still picked up any there and that you could add > additional ones in the settings. > > I suggest that you make a note of this in the announcement, since > others may run into this as well. > > Also, I never explicitly require ''masterview'' anywhere. Are you > suggesting this in one of the normal Rails configuration files? Or in > vendor/plugins/masterview/init.rb? > > Thanks > Ed > > > > On 7/5/06, Jeff Barczewski <jeff.barczewski at gmail.com> wrote: > > We didn''t intentionally remove user level directives from the release. > We > > consider it a benefit to allow user created directives. > > > > I would guess that since the newer version uses new configuration of how > > those user directive paths are specified that this is what broke things > for > > you. > > > > Check your config/masterview/settings.rb that you have specified > > config.directive_paths << /path/to/my/directives > > > > to include your directive directories. > > > > I will run some tests to verify whether there are any issues with this. > > > > Also note that you can also manually ''require'' any files that you want > if > > you do it after you require ''masterview''. This will allow you to > manually > > load any directives anywhere in your path including inside of gems. They > > simply have to be done after masterview though so that MasterView will > > become aware of them as they load. > > > > Jeff > > > > > > On 7/5/06, Ed Howland <ed.howland at gmail.com> wrote: > > > After upgrading to 0.2.2, my directives in > > > vendor/plugins/masterview/directives no longer function. > > Scanned all > > > the documentation and could not find _any_ information on user created > > > directives. > > > > > > Reading the code itself, there seems to be 2 commented out sections. > > > One refers to app/masterview/directives and the other refers to > > > config/masterview/directives. Seems to be a lot of TODO commentary. > > > > > > Why were user directives disabled in this release and no notification > > > given? Is there a work around? I desperately need to get my code > > > working again. > > > > > > Thanks > > > > > > Ed > > > > > > -- > > > Ed Howland > > > http://greenprogrammer.blogspot.com > > > > > > > > > > -- > Ed Howland > http://greenprogrammer.blogspot.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20060705/0f8c3b8b/attachment-0001.html
Deb Lewis
2006-Jul-06 05:05 UTC
[Masterview-users] Urgent Help! - User directives no longer functioning in 0.2.2
Ed wrote in response to Jeff''s remarks:>> Also, I never explicitly require ''masterview'' anywhere. >> Are you suggesting this in one of the normal Rails configuration >> files? Or in vendor/plugins/masterview/init.rb?No, you shouldn''t have to write ''require masterview'' in a normal rails app. That all gets handled by the standard rails framework loading mechanism. (we actually do that in the masterview plugin''s init.rb file, but that''s a std file that user''s don''t generally know or care about, and in contrast to early versions of MV should generally *not* be modified) There are some cases when you might need to explicit load masterview via a require, but they''re generally outside the context of a rails app or because you''re doing something tricky down in plugin loading and rails startup. Not likely for most users. So - if you do nothing at all, you''ll get stock MasterView configuration once you''ve installed the plugin in your rails app. If you choose to provide config/masterview settings files, you can customize your config (but you don''t have to). And as of 0.2.3, if you place custom directive implementations in app/masterview/directives, they''ll be automatically loaded along with the builtin rails directives. ~ Deb On 7/5/06, Jeff Barczewski <jeff.barczewski at gmail.com> wrote:> We didn''t intentionally remove user level directives from the release. > We consider it a benefit to allow user created directives. > > I would guess that since the newer version uses new configuration of > how those user directive paths are specified that this is what broke > things for you. > > Check your config/masterview/settings.rb that you have specified > config.directive_paths << /path/to/my/directives > > to include your directive directories. > > I will run some tests to verify whether there are any issues with this. > > Also note that you can also manually ''require'' any files that you want > if you do it after you require ''masterview''. This will allow you to > manually load any directives anywhere in your path including inside of > gems. They simply have to be done after masterview though so that > MasterView will become aware of them as they load. > > Jeff >
Deb Lewis
2006-Jul-06 05:05 UTC
[Masterview-users] Urgent Help! - User directives no longer functioning in 0.2.2
Ed - apologies, we didn''t make the config-loading change clear enough in the upgrade notes s.t. you now *had* to append your custom directives dir to the config.directive_paths. Dropping out autoloading from vendor/plugins/masterview/directives was a side effect of reworking where and how user configuration and customization gets done. Basic philosophy: your app settings and custom directives should live in your "own space", not in vendor/plugins which really ought to be black-box stuff that''s just installed and used. When we made this change as part of the 0.2.0 release, it wasn''t quite clear yet where the "right" place to automatically look for user directives was. These are code entities, so config/masterview didn''t seem like the right place. Somewhere in app directory makes more sense, but we weren''t quite sure at that point how things were best organized given other changes going on at the same time related to where template files should be located. I think we''re now clear that the standard place for template files is in the usual rails app/views directory, with direct compilation into the rails view cache just like .rhtml, rather than in a separate dir such as app/masterview/templates as we''d explored in some earlier versions of the system. Given that templates live in app/views, I think the right place to look for any app custom directives for a rails app is in an app/masterview/directives directory. In the new 0.2.3 release that was just published today, if that directory is found it will be automatically appended to the MasterView directives load path, along with the builtin directives that ship with MV. So... suggest you move your directive impls to app/masterview/directives, then you don''t need any special path additions in your MV config (though dup registration is benign if there) or manual directive registration. In progress for next release: support for alternate namespaces for custom directives, so they aren''t forced to share the mv: namespace prefix. Also better API doc and a developer''s guide for directive implementors. ~ Deb P.S. the new 0.2.3 release has new config settings to allow alt locations for img/stylesheet assets, per some of the issues you raised, so that .html templates can reference co-located design-time copies of those resources and have paths mapped properly to the public dir files. I use that to keep a placeholder stylesheet in my app/views directory that''s referenced from my templates, so I don''t have to use ugly ../../../public/stylesheet/xxx refs (those are actually still around, but hidden in one place in the colocated stylesheet rather than cluttering up all my .html docs) -----Original Message----- From: Ed Howland [mailto:ed.howland at gmail.com] Sent: Wednesday, July 05, 2006 11:18 AM To: Jeff Barczewski Cc: masterview-users at rubyforge.org; djlewis at acm.org Subject: Re: Urgent Help! - User directives no longer functioning in 0.2.2 Thanks Jeff. I got confused by the masterview_plugin generator which when I ran it created ''vendor/plugins/masterview/directives'' which was where I installed them previously. Since that option was commented out, I assumed it still picked up any there and that you could add additional ones in the settings. I suggest that you make a note of this in the announcement, since others may run into this as well. Also, I never explicitly require ''masterview'' anywhere. Are you suggesting this in one of the normal Rails configuration files? Or in vendor/plugins/masterview/init.rb? Thanks Ed On 7/5/06, Jeff Barczewski <jeff.barczewski at gmail.com> wrote:> We didn''t intentionally remove user level directives from the release. > We consider it a benefit to allow user created directives. > > I would guess that since the newer version uses new configuration of > how those user directive paths are specified that this is what broke > things for you. > > Check your config/masterview/settings.rb that you have specified > config.directive_paths << /path/to/my/directives > > to include your directive directories. > > I will run some tests to verify whether there are any issues with this. > > Also note that you can also manually ''require'' any files that you want > if you do it after you require ''masterview''. This will allow you to > manually load any directives anywhere in your path including inside of > gems. They simply have to be done after masterview though so that > MasterView will become aware of them as they load. > > Jeff > > > On 7/5/06, Ed Howland <ed.howland at gmail.com> wrote: > > After upgrading to 0.2.2, my directives in > > vendor/plugins/masterview/directives no longer function. > Scanned all > > the documentation and could not find _any_ information on user > > created directives. > > > > Reading the code itself, there seems to be 2 commented out sections. > > One refers to app/masterview/directives and the other refers to > > config/masterview/directives. Seems to be a lot of TODO commentary. > > > > Why were user directives disabled in this release and no > > notification given? Is there a work around? I desperately need to > > get my code working again. > > > > Thanks > > > > Ed > > > > -- > > Ed Howland > > http://greenprogrammer.blogspot.com > > > >-- Ed Howland http://greenprogrammer.blogspot.com