From ed.howland at gmail.com Tue Jan 2 16:09:07 2007 From: ed.howland at gmail.com (Ed Howland) Date: Tue, 2 Jan 2007 15:09:07 -0600 Subject: [Masterview-users] Integration Testing - Howto? Message-ID: <3df642dd0701021309v599a1f79j7936332bf6726791@mail.gmail.com> Hi, all. I have some controller tests in (using rspec) How do I test them with Masterview? If I try to test that the correct partial is rendered, this fails because the requested file doesn't exist. (The .html is there, but not the MV generated .rthml) Do I need to test only with Rake? Ed -- Ed Howland http://greenprogrammer.blogspot.com From jeff.barczewski at gmail.com Tue Jan 2 19:40:44 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Tue, 2 Jan 2007 18:40:44 -0600 Subject: [Masterview-users] Integration Testing - Howto? In-Reply-To: <3df642dd0701021309v599a1f79j7936332bf6726791@mail.gmail.com> References: <3df642dd0701021309v599a1f79j7936332bf6726791@mail.gmail.com> Message-ID: <19cda190701021640k6f5335bap2d3ecccd2d925613@mail.gmail.com> On 1/2/07, Ed Howland wrote: > > Hi, all. > > I have some controller tests in (using rspec) How do I test them with > Masterview? > > If I try to test that the correct partial is rendered, this fails > because the requested file doesn't exist. (The .html is there, but not > the MV generated .rthml) > > Do I need to test only with Rake? I'll have to look into that Ed. I think it most likely has to do with the logic that tries to determine the mode in which MasterView is supposed to run. For instance when running in a server additional code is executed than when running other commands. The work around is to switch the environment setting to generate the rhtml rather than load it directly. Then after you have generated it (either by starting a server or using the rake command do do it) then you can run all your tests normally because the rhtml will be there (along with the html). There are no issues with running this way except that your file system gets a little cluttered with these generated files, which is one of the reasons we made the feature to load the erb directly. Also if you decide to switch back to non-generated you have to manually clean up the old files. So hopefully the work around will solve your immediate need while I look into a longer term fix which is a little tricky because of the reasons I mentioned. We also probably need an easy way to clean up generated files and some way to easily switch back and forth. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070102/cb0325ba/attachment.html From reza_prima77 at yahoo.com Tue Jan 2 21:48:30 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Tue, 2 Jan 2007 18:48:30 -0800 (PST) Subject: [Masterview-users] how to share header / layout across controllers Message-ID: <472382.37053.qm@web53102.mail.yahoo.com> Hi, all Can anyone show me how to create shared layout across controller so I can use one design that I can put links to other controllers? Thanks in advance __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jeff.barczewski at gmail.com Wed Jan 3 10:55:52 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Wed, 3 Jan 2007 09:55:52 -0600 Subject: [Masterview-users] how to share header / layout across controllers In-Reply-To: <472382.37053.qm@web53102.mail.yahoo.com> References: <472382.37053.qm@web53102.mail.yahoo.com> Message-ID: <19cda190701030755q113ad1cl258f51580f3aa267@mail.gmail.com> If you want to use the same layout across all controllers then you edit the list.html template (or which ever master template which contains the mv:generate="layouts/yourcontroller.rhtml") and you will edit this to be instead mv:generate="layouts/application.rhtml". There would only be one of these across all of your MasterView template files, all others would use import. In all your other templates you would use mv:import="layouts/yourcontroller.rhtml" If you had a layouts/appliction.rhtml previously on the file system then delete or rename it so there is no confusion as to which one is being used. You would probably want to rebuild your templates so they are all in sync using the new layout, you do this at the command line with rake mv:rebuild_all or you can do it from the MasterView admin screen (if in development mode on localhost and it hasn't been disabled in your settings) http://localhost:3000/masterview and click on the Rebuild All link If you wanted to use something other than applicion.rhtml then you would also have to specify the layout in your controller with the layout command, but since in the above we are using appliction.rhtml there is nothing else necessary in the code. See if all this makes sense and works for you. We should add this to a FAQ, I'll make a note to do this. If you have any problems with everything I described let me know. Blessings, Jeff On 1/2/07, Reza Primardiansyah wrote: > > Hi, all > > Can anyone show me how to create shared layout across > controller so I can use one design that I can put > links to other controllers? > > Thanks in advance > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070103/aedc77f7/attachment-0001.html From reza_prima77 at yahoo.com Sun Jan 7 21:45:02 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Sun, 7 Jan 2007 18:45:02 -0800 (PST) Subject: [Masterview-users] how to share header / layout across controllers In-Reply-To: <19cda190701030755q113ad1cl258f51580f3aa267@mail.gmail.com> Message-ID: <20070108024502.30973.qmail@web53105.mail.yahoo.com> Thanks Jeff. Work nicely. But must be noted that script/server must be restarted for the change to appear. --- Jeff Barczewski wrote: > If you want to use the same layout across all > controllers then you edit the > list.html template (or which ever master template > which contains the > mv:generate="layouts/yourcontroller.rhtml") and you > will edit this to be > instead mv:generate="layouts/application.rhtml". > There would only be one of > these across all of your MasterView template files, > all others would use > import. > > In all your other templates you would use > mv:import="layouts/yourcontroller.rhtml" > > If you had a layouts/appliction.rhtml previously on > the file system then > delete or rename it so there is no confusion as to > which one is being used. > > You would probably want to rebuild your templates so > they are all in sync > using the new layout, you do this at the command > line with > > rake mv:rebuild_all > > or > > you can do it from the MasterView admin screen (if > in development mode > on localhost > and it hasn't been disabled in your settings) > > http://localhost:3000/masterview > and click on the Rebuild All link > > > If you wanted to use something other than > applicion.rhtml then you would > also have to specify the layout in your controller > with the layout command, > but since in the above we are using appliction.rhtml > there is nothing else > necessary in the code. > > See if all this makes sense and works for you. We > should add this to a FAQ, > I'll make a note to do this. > > If you have any problems with everything I described > let me know. > > Blessings, > > Jeff > > > > On 1/2/07, Reza Primardiansyah > wrote: > > > > Hi, all > > > > Can anyone show me how to create shared layout > across > > controller so I can use one design that I can put > > links to other controllers? > > > > Thanks in advance > > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From reza_prima77 at yahoo.com Sun Jan 7 21:48:52 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Sun, 7 Jan 2007 18:48:52 -0800 (PST) Subject: [Masterview-users] ActiveRecord associations generator Message-ID: <48696.49942.qm@web53104.mail.yahoo.com> Jeff, do you plan to add associative fields like selectbox for belongs_to and childtable for has_many in your generator? May I add it (taking from streamlined or autoadmin)? Where can I put it? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jeff.barczewski at gmail.com Mon Jan 8 05:33:42 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 8 Jan 2007 04:33:42 -0600 Subject: [Masterview-users] ActiveRecord associations generator In-Reply-To: <48696.49942.qm@web53104.mail.yahoo.com> References: <48696.49942.qm@web53104.mail.yahoo.com> Message-ID: <19cda190701080233l40ad751ctf7105e37cbddeae2@mail.gmail.com> That would be a great thing to add to our generator. Something I have wanted but didn't have time to put in yet. If you would like to add that code in or help in any way with that, we would certainly most appreciate it. Time being our main limiting factor with the project, so any help is appreciated. You can submit ticket and any code/patch on Rubyforge for the project or simply email to me (or this list). We do try to have tests for as much code as possible, so if you could we'd certainly appreciate tests for it as well. It also helps document its usage, etc. If you get stuck, let me know and I will try to help point you in the right direction. Jeff On 1/7/07, Reza Primardiansyah wrote: > > Jeff, > do you plan to add associative fields like selectbox > for belongs_to and childtable for has_many in your > generator? > May I add it (taking from streamlined or autoadmin)? > Where can I put it? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070108/e5177ef8/attachment.html From reza_prima77 at yahoo.com Mon Jan 8 08:14:53 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Mon, 8 Jan 2007 05:14:53 -0800 (PST) Subject: [Masterview-users] Help about publish without gem Message-ID: <537871.66723.qm@web53107.mail.yahoo.com> Jeff, How can I publish my site on a server that don't have masterview gems? Any hints? Thanks in advance __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From djlewis at acm.org Mon Jan 8 09:55:37 2007 From: djlewis at acm.org (Deb Lewis) Date: Mon, 8 Jan 2007 06:55:37 -0800 Subject: [Masterview-users] Help about publish without gem In-Reply-To: <537871.66723.qm@web53107.mail.yahoo.com> Message-ID: <20070108145541.OOMC3976.fed1rmmtao07.cox.net@fed1rmimpo02.cox.net> You just need to install a copy of the masterview plugin in your rails app. There's instructions on the standard ways to do this in the Installation documentation: http://masterview.org/installation.html#install_plugin ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of Reza Primardiansyah Sent: Monday, January 08, 2007 5:15 AM To: masterview-users at rubyforge.org Subject: [Masterview-users] Help about publish without gem Jeff, How can I publish my site on a server that don't have masterview gems? Any hints? Thanks in advance From jeff.barczewski at gmail.com Mon Jan 8 10:18:49 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 8 Jan 2007 09:18:49 -0600 Subject: [Masterview-users] Help about publish without gem In-Reply-To: <537871.66723.qm@web53107.mail.yahoo.com> References: <537871.66723.qm@web53107.mail.yahoo.com> Message-ID: <19cda190701080718m202768c0k84e36b6021ac4fde@mail.gmail.com> Reza, There are several ways to do this. First, you can use the plugin version of MasterView which doesn't require any gems. We release it in two forms for just that reason. To install the complete version as a plugin you do the following cd toyourrailsapp ruby script/plugin install svn://rubyforge.org/var/svn/masterview/tags/masterview This will install the latest release version of masterview. You could also change this url to pull other versions, but typically the latest release version is what you want. That's it. Everything should work as you would expect. Note that the MasterView admin screens are by default secured to only be available in dev mode and when accessed from localhost, so you won't be able to get to them on a remote host, but not a big deal if you do development elsewhere and then just deploy to remote server. We are planning on making this security a little more configurable when we have a chance. or Another option is to have MasterView generate the rhtml and then just deploy that to the server, nothing else would be needed. To do that you change the config/masterview/settings.rb generate_rhtml_files setting to true and then copy the generated rhtml to your other server. More details are in http://masterview.org/configuration.html#mv_rails_app_options The only disadvantage of this option is that it is a little more messy having all of the rhtml files to deal with and copy around. So it is your preference, either way will get you there. Jeff On 1/8/07, Reza Primardiansyah wrote: > > Jeff, > How can I publish my site on a server that don't have > masterview gems? Any hints? > > Thanks in advance > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070108/a85eda6f/attachment.html From ed.howland at gmail.com Mon Jan 8 11:52:19 2007 From: ed.howland at gmail.com (Ed Howland) Date: Mon, 8 Jan 2007 10:52:19 -0600 Subject: [Masterview-users] how to share header / layout across controllers In-Reply-To: <20070108024502.30973.qmail@web53105.mail.yahoo.com> References: <19cda190701030755q113ad1cl258f51580f3aa267@mail.gmail.com> <20070108024502.30973.qmail@web53105.mail.yahoo.com> Message-ID: <3df642dd0701080852x6aee7e36qc2f1ca0cd384ca5a@mail.gmail.com> On 1/7/07, Reza Primardiansyah wrote: > Thanks Jeff. Work nicely. But must be noted that > script/server must be restarted for the change to > appear. > > > --- Jeff Barczewski wrote: > > > If you want to use the same layout across all > > controllers then you edit the > > list.html template (or which ever master template > > which contains the > > mv:generate="layouts/yourcontroller.rhtml") and you > > will edit this to be > > instead mv:generate="layouts/application.rhtml". > > There would only be one of > > these across all of your MasterView template files, > > all others would use > > import. > > > > In all your other templates you would use > > mv:import="layouts/yourcontroller.rhtml" > > Just a small notation about the documentation on the MV site. It says to use @content_for_layout in the mv:replace (or mv:content sometimes.) The Rails API says this is deprecated in favor of yield. I've tested this with yield and the change is painless so far. Basically, it seems they are eliminating the @content_for subsystem. I guess to speed up rendering. Ed -- Ed Howland http://greenprogrammer.blogspot.com From jeff.barczewski at gmail.com Mon Jan 8 17:18:06 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 8 Jan 2007 16:18:06 -0600 Subject: [Masterview-users] how to share header / layout across controllers In-Reply-To: <3df642dd0701080852x6aee7e36qc2f1ca0cd384ca5a@mail.gmail.com> References: <19cda190701030755q113ad1cl258f51580f3aa267@mail.gmail.com> <20070108024502.30973.qmail@web53105.mail.yahoo.com> <3df642dd0701080852x6aee7e36qc2f1ca0cd384ca5a@mail.gmail.com> Message-ID: <19cda190701081418y661da737u4ec992c50d5b0d51@mail.gmail.com> On 1/8/07, Ed Howland wrote: > > > Just a small notation about the documentation on the MV site. It says > to use @content_for_layout in the mv:replace (or mv:content > sometimes.) The Rails API says this is deprecated in favor of yield. > I've tested this with yield and the change is painless so far. > > Basically, it seems they are eliminating the @content_for subsystem. I > guess to speed up rendering. > > Yes, you are correct Ed. Yield is the recommended way to do things now. We'll plan on updating the docs and the generator accordingly. Thanks for mentioning it. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070108/58ecd967/attachment.html From reza_prima77 at yahoo.com Tue Jan 9 03:27:31 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Tue, 9 Jan 2007 00:27:31 -0800 (PST) Subject: [Masterview-users] Help about publish without gem In-Reply-To: <19cda190701080718m202768c0k84e36b6021ac4fde@mail.gmail.com> Message-ID: <20070109082731.48949.qmail@web53106.mail.yahoo.com> Jeff and Deb, I downloaded the tarball plugin and extracted to vendor/plugins but it still show error. Below is the extract from the log file. Can you give me hint about what I'm doing wrong? Additional facts: - My shared hosting use plain CGI. - rake -T don't show mv related tasks. - accessing http:///masterview/ results "MasterviewController: missing default helper path masterview_helper" in log ActionController::MissingTemplate (Missing template ../config/../app/views/barang/list.rhtml): /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:1034:in `assert_existence_of_template_file' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:724:in `render_file' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:648:in `render_with_no_layout' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/layout.rb:253:in `render_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:53:in `render' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:942:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process_pre_mv' /vendor/plugins/masterview_plugin-0.3.1/lib/masterview/rails_ext/action_controller_reparse_checking.rb:24:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' dispatch.cgi:10 Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) --- Jeff Barczewski wrote: > Reza, > > There are several ways to do this. > > First, you can use the plugin version of MasterView > which doesn't require > any gems. We release it in two forms for just that > reason. To install the > complete version as a plugin you do the following > > cd toyourrailsapp > > ruby script/plugin install > svn://rubyforge.org/var/svn/masterview/tags/masterview > > This will install the latest release version of > masterview. You could also > change this url to pull other versions, but > typically the latest release > version is what you want. > > That's it. Everything should work as you would > expect. Note that the > MasterView admin screens are by default secured to > only be available in dev > mode and when accessed from localhost, so you won't > be able to get to them > on a remote host, but not a big deal if you do > development elsewhere and > then just deploy to remote server. We are planning > on making this security a > little more configurable when we have a chance. > > > or > > > Another option is to have MasterView generate the > rhtml and then just deploy > that to the server, nothing else would be needed. To > do that you change the > config/masterview/settings.rb generate_rhtml_files > setting to true and then > copy the generated rhtml to your other server. More > details are in > http://masterview.org/configuration.html#mv_rails_app_options > > The only disadvantage of this option is that it is a > little more messy > having all of the rhtml files to deal with and copy > around. > > So it is your preference, either way will get you > there. > > Jeff > > On 1/8/07, Reza Primardiansyah > wrote: > > > > Jeff, > > How can I publish my site on a server that don't > have > > masterview gems? Any hints? > > > > Thanks in advance > > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From djlewis at acm.org Tue Jan 9 10:32:54 2007 From: djlewis at acm.org (Deb Lewis) Date: Tue, 9 Jan 2007 07:32:54 -0800 Subject: [Masterview-users] Help about publish without gem In-Reply-To: <20070109082731.48949.qmail@web53106.mail.yahoo.com> Message-ID: <20070109153255.QSBK25875.fed1rmmtao11.cox.net@fed1rmimpo01.cox.net> >> accessing http:///masterview/ results in error In the standard configuration, the Masterview admin pages are only enabled in a development environment - the enable_admin_pages config setting is off in production mode. If you turn that option on in your production config, you currently also need to override the authorization check in the MasterviewController class, which by default only allows connections from the local host. This is a security consideration - the admin pages are a developer feature and not generally appropriate to expose on a public site. We intend to make this access check configurable as well, but for the moment you'll need install an override in the authorization check to hook in your own policy, e.g., checks based on a user auth mechanism you've created for your site. ~ Deb # the admin pages restrict access using before-filter :check_authorization class MasterviewController < ApplicationController # Default implementation of authorization check # to restrict access to administrative services def allow_access? # a more general solution might look something like: # current_user && user_has_perm?('mv-admin') # backstop: only allow for developer testing on local machine local_request? end end From reza_prima77 at yahoo.com Tue Jan 9 21:04:44 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Tue, 9 Jan 2007 18:04:44 -0800 (PST) Subject: [Masterview-users] Help about publish without gem In-Reply-To: <20070109153255.QSBK25875.fed1rmmtao11.cox.net@fed1rmimpo01.cox.net> Message-ID: <69980.40831.qm@web53104.mail.yahoo.com> Thanks Deb, But can you give me a hint about the main problem? Apparently it found that the rhtml file doesn't exist but didn't regenerate it. Thanks in advance --- Deb Lewis wrote: > >> accessing http:///masterview/ results in > error > > In the standard configuration, the Masterview admin > pages are only enabled > in a development environment - the > enable_admin_pages config setting is off > in production mode. > > If you turn that option on in your production > config, you currently also > need to override the authorization check in the > MasterviewController class, > which by default only allows connections from the > local host. This is a > security consideration - the admin pages are a > developer feature and not > generally appropriate to expose on a public site. > > We intend to make this access check configurable as > well, but for the moment > you'll need install an override in the authorization > check to hook in your > own policy, e.g., checks based on a user auth > mechanism you've created for > your site. > > ~ Deb > > # the admin pages restrict access using > before-filter :check_authorization > class MasterviewController < ApplicationController > > # Default implementation of authorization check > # to restrict access to administrative services > def allow_access? > # a more general solution might look something > like: > # current_user && user_has_perm?('mv-admin') > # backstop: only allow for developer testing on > local machine > local_request? > end > > end > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From djlewis at acm.org Wed Jan 10 23:27:58 2007 From: djlewis at acm.org (Deb Lewis) Date: Wed, 10 Jan 2007 20:27:58 -0800 Subject: [Masterview-users] Help about publish without gem In-Reply-To: <69980.40831.qm@web53104.mail.yahoo.com> Message-ID: <20070111042800.DAQP15640.fed1rmmtao05.cox.net@fed1rmimpo02.cox.net> Reza - I wasn't able to identify your problem from the original stack trace - masterview shows up in the rendering process, so the plugin was indeed installed and got itself hooked into the rails rendering in order to handle .html templates. If your app's not too big, send me (off the list) a snapshot of your app and config directories and some context about what page/action was being processed and I'll see if I can figure out what's happening so you can get un-stuck. ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of Reza Primardiansyah Sent: Tuesday, January 09, 2007 6:05 PM To: masterview-users at rubyforge.org Subject: Re: [Masterview-users] Help about publish without gem Thanks Deb, But can you give me a hint about the main problem? Apparently it found that the rhtml file doesn't exist but didn't regenerate it. Thanks in advance From reza_prima77 at yahoo.com Fri Jan 12 08:33:26 2007 From: reza_prima77 at yahoo.com (Reza Primardiansyah) Date: Fri, 12 Jan 2007 05:33:26 -0800 (PST) Subject: [Masterview-users] Help about publish without gem In-Reply-To: <20070111042800.DAQP15640.fed1rmmtao05.cox.net@fed1rmimpo02.cox.net> Message-ID: <20070112133326.90281.qmail@web53110.mail.yahoo.com> Deb, I can give you complete source code. tarball perhaps. But the model is in Indonesian language but I think it is nothing to worry about. I developed with gem version, uploaded it, removed all masterview files from vendor/plugin and config, then install the plugin version of masterview from tarball I downloaded from rubyforge. The plugin version don't need config/masterview/* right? I had problem with them exist because mv tried to require 'masterview' (the gem version it seems) --- Deb Lewis wrote: > Reza - I wasn't able to identify your problem from > the original stack trace > - masterview shows up in the rendering process, so > the plugin was indeed > installed and got itself hooked into the rails > rendering in order to handle > .html templates. > > If your app's not too big, send me (off the list) a > snapshot of your app and > config directories and some context about what > page/action was being > processed and I'll see if I can figure out what's > happening so you can get > un-stuck. > > ~ Deb > > -----Original Message----- > From: masterview-users-bounces at rubyforge.org > [mailto:masterview-users-bounces at rubyforge.org] On > Behalf Of Reza > Primardiansyah > Sent: Tuesday, January 09, 2007 6:05 PM > To: masterview-users at rubyforge.org > Subject: Re: [Masterview-users] Help about publish > without gem > > Thanks Deb, > But can you give me a hint about the main problem? > Apparently it found that the rhtml file doesn't > exist but didn't regenerate > it. > > Thanks in advance > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users > ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com From jeff.barczewski at gmail.com Fri Jan 12 11:58:35 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 12 Jan 2007 10:58:35 -0600 Subject: [Masterview-users] Help about publish without gem In-Reply-To: <20070112133326.90281.qmail@web53110.mail.yahoo.com> References: <20070111042800.DAQP15640.fed1rmmtao05.cox.net@fed1rmimpo02.cox.net> <20070112133326.90281.qmail@web53110.mail.yahoo.com> Message-ID: <19cda190701120858t6f72dfb3oecee0cb5aadebce9@mail.gmail.com> On 1/12/07, Reza Primardiansyah wrote: > > Deb, > I can give you complete source code. tarball perhaps. > But the model is in Indonesian language but I think it > is nothing to worry about. > I developed with gem version, uploaded it, removed all > masterview files from vendor/plugin and config, then > install the plugin version of masterview from tarball > I downloaded from rubyforge. The plugin version don't > need config/masterview/* right? I had problem with > them exist because mv tried to > require 'masterview' > (the gem version it seems) > > Both plugin and gem version can use the settings in config/masterview if they exist, but they are not necessary for operation if you want the default settings. However it sounds like there is an issue with MasterView loading in your environment based on the fact that you had errors when config/masterview existed. Can you restore your config/masterview and give us the errors (stack trace) you get when require happens? That might help. And if you want to gzip up the rest of your app then we can try debugging with all your code. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070112/ea6f038a/attachment.html From jeff.barczewski at gmail.com Fri Jan 12 13:19:01 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 12 Jan 2007 12:19:01 -0600 Subject: [Masterview-users] If using Rails 1.2 or edge, and you have a view compile problem in your template, debug page is not shown, here is workaround until we get a fix Message-ID: <19cda190701121019o18d5f1b4hdc247e6cb6a42d2c@mail.gmail.com> Well something in Rails 1.2/Rails edge changed and now if you get a template compile problem (ERB error) the debug output is not currently shown. This was working before, but something has changed. I will be working on a fix for this. In the meantime, you only get a blank screen if there is an error, which doesn't help you at all figure out what the problem was. You can go into your config/masterview/settings.rb and set config.generate_rhtml_files = true This will have MasterView generate the rhtml files to the file system which will allow debugging to work properly. If you decide to switch back later then you will want to clean up the rhtml files that were generated. (I will try to make this a non-manual process in the future too). Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070112/ffde72ab/attachment.html From jeff.barczewski at gmail.com Thu Jan 18 12:50:29 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 18 Jan 2007 11:50:29 -0600 Subject: [Masterview-users] Rails 1.2 is released, MasterView had a defect in showing the debug stack trace against 1.2, I have fixed in trunk will deploy gem tonight Message-ID: <19cda190701180950g2c3f14ccs8750f951738012aa@mail.gmail.com> Rails 1.2 just went live today. I noticed a little while back that MasterView had a defect when encountering a ERB compile error in Rails 1.2. If you weren't configured to generate the rhtml it would just give you a blank screen rathjer than the debug stack trace. I have fixed the code in the trunk if you want to pull the plugin from there or the obvious work around is to set config.generate_rhtml = true to get around this problem if you want to move to Rails 1.2 However I will take one more run through of all the tests and code on Rails 1.2 and make a new MasterView release with the fix. I will try to get this out tonight if possible. I will notify the list when it is ready. Blessings, -- Jeff Barczewski, MasterView project founder Inspired Horizons Ruby on Rails Training and Consultancy Next Ruby on Rails plus JRuby workshop Feb 22-24 St. Louis, MO http://inspiredhorizons.com/training/rails Limited seating, register now! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070118/90577982/attachment.html From jeff.barczewski at gmail.com Sat Jan 27 13:32:38 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 27 Jan 2007 12:32:38 -0600 Subject: [Masterview-users] Does anyone use mv:link_to specifying the optional name (which gets discarded anyway)? This is an undocumented usage form Message-ID: <19cda190701271032y10650dafh4b52e1780699a756@mail.gmail.com> MasterView users, I have a quick question. Do any of you use the mv:link_to directive and specify the name (which normally gets discarded anyway)? The reason I ask is that I am wanting to upgrade the functionality of this directive and the optional name argument will cause some headaches. Here is what I mean Most people do this --------------------------------------- Cat which will render <%= link_to( 'Cat', :action => :bar) %> However to make things easy for new MasterView users we also allowed the name to be specified in the link_to directive so that it would have identical signature as the rails helper link_to. Optionally this was supported so you could do this ------------------------------------------------------------------------------- Cat which will also render (it just discards the name and picks it up from the element content) <%= link_to( 'Cat', :action => :bar) %> * It is this usage that I am asking whether people are using. Normally I wouldn't think people would use this since you are passing in an argument that isn't used anywhere, but it was there for syntax compatibility with Rails helpers. The reason I am asking is that I would like to do away with the optional name argument so that I can upgrade the directive to also allow a string url to be specified. Rails link_to allows the options argument to be a hash like {:action => :new} or it can be a string in which case it is used directly. So to support this, I need to get rid of the optional name argument (and discarding code) so that if a string is specified we use it as the url. Note: we can't simply check for a hash since you can specify an optional additional hash in either case. I don't believe our docs mention using the optional name argument and neither does the generator, so I am thinking maybe no one was using that form. So if no one is using it then, I can easily upgrade this without too much worry. We have ideas for doing syntax checks and upgrading compatibility, but these will take some work to implement and if no one is really using this optional form of calling the directive, it would be easier to simply drop that form to allow for the new string url functionality. Thanks, Jeff -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy Next Ruby on Rails plus JRuby workshop Feb 22-24 St. Louis, MO http://inspiredhorizons.com/training/rails/index.html Limited seating, register now! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070127/8167da85/attachment-0001.html From jeff.barczewski at gmail.com Sat Jan 27 13:39:13 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 27 Jan 2007 12:39:13 -0600 Subject: [Masterview-users] I will be speaking about MasterView at the MountainWest Ruby conference March 16th in Salt Lake City UT Message-ID: <19cda190701271039i1021949ej66f06d59a3fcc884@mail.gmail.com> FYI. I will be speaking about MasterView at the MountainWest Ruby conference March 16th in Salt Lake City UT http://mtnwestruby.org/speakers/ I believe I am scheduled to talk at 2pm on Friday Mar 16. If any of you will be there, I would love to meet you in person and discuss how you have been using MasterView, and ideas you might have for the project. Blessings, -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy Next Ruby on Rails plus JRuby workshop Feb 22-24 St. Louis, MO http://inspiredhorizons.com/training/rails/index.html Limited seating, register now! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070127/9b7768bd/attachment.html From ed.howland at gmail.com Mon Jan 29 12:20:29 2007 From: ed.howland at gmail.com (Ed Howland) Date: Mon, 29 Jan 2007 11:20:29 -0600 Subject: [Masterview-users] Does anyone use mv:link_to specifying the optional name (which gets discarded anyway)? This is an undocumented usage form In-Reply-To: <19cda190701271032y10650dafh4b52e1780699a756@mail.gmail.com> References: <19cda190701271032y10650dafh4b52e1780699a756@mail.gmail.com> Message-ID: <3df642dd0701290920p7ebfa45fm75404e6cc0a8b9b2@mail.gmail.com> Fine by us, if you drop the optional argument. Ed On 1/27/07, Jeff Barczewski wrote: > MasterView users, > > I have a quick question. Do any of you use the mv:link_to directive and > specify the name (which normally gets discarded anyway)? The reason I ask is > that I am wanting to upgrade the functionality of this directive and the > optional name argument will cause some headaches. > > Here is what I mean > > Most people do this > --------------------------------------- > Cat > > which will render > > <%= link_to( 'Cat', :action => :bar) %> > > > However to make things easy for new MasterView users we also allowed the > name to be specified in the link_to directive so that it would have > identical signature as the rails helper link_to. > > Optionally this was supported so you could do this > ------------------------------------------------------------------------------- > Cat > > which will also render (it just discards the name and picks it up from the > element content) > > <%= link_to( 'Cat', :action => :bar) %> > > * It is this usage that I am asking whether people are using. Normally I > wouldn't think people would use this since you are passing in an argument > that isn't used anywhere, but it was there for syntax compatibility with > Rails helpers. > > > The reason I am asking is that I would like to do away with the optional > name argument so that I can upgrade the directive to also allow a string url > to be specified. Rails link_to allows the options argument to be a hash like > {:action => :new} or it can be a string in which case it is used directly. > > So to support this, I need to get rid of the optional name argument (and > discarding code) so that if a string is specified we use it as the url. > > Note: we can't simply check for a hash since you can specify an optional > additional hash in either case. > > > I don't believe our docs mention using the optional name argument and > neither does the generator, so I am thinking maybe no one was using that > form. > > So if no one is using it then, I can easily upgrade this without too much > worry. We have ideas for doing syntax checks and upgrading compatibility, > but these will take some work to implement and if no one is really using > this optional form of calling the directive, it would be easier to simply > drop that form to allow for the new string url functionality. > > Thanks, > > Jeff > > -- > Jeff Barczewski, MasterView core team > Inspired Horizons Ruby on Rails Training and Consultancy > Next Ruby on Rails plus JRuby workshop Feb 22-24 St. Louis, MO > http://inspiredhorizons.com/training/rails/index.html > Limited seating, register now! > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users > > -- Ed Howland http://greenprogrammer.blogspot.com From ed.howland at gmail.com Wed Jan 31 05:36:24 2007 From: ed.howland at gmail.com (Ed Howland) Date: Wed, 31 Jan 2007 04:36:24 -0600 Subject: [Masterview-users] problem with mv:attr and erb evaluated code. Message-ID: <3df642dd0701310236s148564fbs70c21167a4175d5b@mail.gmail.com> I ran into this before, but I can't find any email from me about it. Sorry if this is a repeat, but the problem persists in MV 0.3.1 If you have a helper method that you want to evaluate in a construct like:
it legitimately renders it so:
But if you increase the argument count to more than 1, e.g.:
It renders:
You can try this in the interactive render. Perhaps it has something to do with the commas? In any case, the bit between the '#{' and '}' should be dropped as is into the erb output. No parsing at all should be done on this string. In my case, I could not create an array for the args because it was a mv:attr at the same level as the mv:block and one of the args was the bound variable ({|arg2| ...} of the block. In the end, I created a closure with the other arg and called p.call(arg2) I don't think I should have had to do that. It only seems to occur with commas. Periods and other Ruby punctuation seem unaffected. My guess, w/o scouring the code, is you are looking for a comma separating the key=>value pairs int the attribute hash. This is a serious problem for me, as it crops up all the time. We create a series of elements (divs, trs etc.,) in a block, then combine the block variable with something else to dynamically generate an id (that we use later in a form or with some RJS call.) I can trick it in most cases, but I want to DRY it with a helper. I should be able to pass any number of args to my helper. Also, I could, I suppose, use
but that looks ugly in the designer, and I'd rather not. Ed -- Ed Howland http://greenprogrammer.blogspot.com From jeff.barczewski at gmail.com Wed Jan 31 11:25:11 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Wed, 31 Jan 2007 10:25:11 -0600 Subject: [Masterview-users] problem with mv:attr and erb evaluated code. In-Reply-To: <3df642dd0701310236s148564fbs70c21167a4175d5b@mail.gmail.com> References: <3df642dd0701310236s148564fbs70c21167a4175d5b@mail.gmail.com> Message-ID: <19cda190701310825l291979c2w5f11f1e6e9e1be0e@mail.gmail.com> On 1/31/07, Ed Howland wrote: > > I ran into this before, but I can't find any email from me about it. > Sorry if this is a repeat, but the problem persists in MV 0.3.1 > > If you have a helper method that you want to evaluate in a construct like: > >
> > it legitimately renders it so: >
> > But if you increase the argument count to more than 1, e.g.: >
> > It renders: >
> > You can try this in the interactive render. Perhaps it has something > to do with the commas? In any case, the bit between the '#{' and '}' > should be dropped as is into the erb output. No parsing at all should > be done on this string. > > In my case, I could not create an array for the args because it was a > mv:attr at the same level as the mv:block and one of the args was the > bound variable ({|arg2| ...} of the block. In the end, I created a > closure with the other arg and called p.call(arg2) I don't think I > should have had to do that. > > It only seems to occur with commas. Periods and other Ruby punctuation > seem unaffected. My guess, w/o scouring the code, is you are looking > for a comma separating the key=>value pairs int the attribute hash. > > This is a serious problem for me, as it crops up all the time. We > create a series of elements (divs, trs etc.,) in a block, then combine > the block variable with something else to dynamically generate an id > (that we use later in a form or with some RJS call.) I can trick it in > most cases, but I want to DRY it with a helper. I should be able to > pass any number of args to my helper. > > Also, I could, I suppose, use
but > that looks ugly in the designer, and I'd rather not. Thanks for the email Ed. I will try to get the fix in with the others we are preparing right now. Should be out very soon. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070131/a090fb53/attachment.html