Jeff Barczewski
2007-Apr-21 18:10 UTC
[Masterview-users] Auto copy feature added to MasterView trunk
MasterView users, I have just added an auto copy feature to the MasterView trunk (which will be in the next release). I clipped this out of the configuration document, let me know if anything is unclear or if there is anything critical missing in this feature. ---------------- config.auto_copy_file_entries controls what MasterView will automatically copy Locations of files that MasterView will autocopy to a runtime location This autocopy feature makes it easy to have prototypes that display properly for WYSIWYG editing and design, using files (images, stylesheets, and javascript) which are not in the standard Rails locations but are automatically copied to proper place for runtime. This is commonly used in conjunction with template_src_dir_path (which changes the location of the source MasterView templates). Developers can have their templates in a non-standard location along with images, stylesheets, and javascript, and then still have everything copied to the proper runtime locations when Rails is fired up. In debug mode, timestamps are checked on every request, in production mode, copy is done only on startup. Each entry is a hash that needs to contain - :source => ''path to source folder'' # absolute or relative to RAILS_ROOT - :destination => ''path to place to copy to'' # absolute or relative to RAILS_ROOT and can optionally have a file extension filter - :extensions => [:gif, :GIF, :jpg, :JPG] # limit files copied to this array of extensions, case sensitive Default: [] # nothing will be auto copied Example usage showing three paths added to be auto copied: config.auto_copy_file_entries << { :source => ''images'', :destination => ''public/images'' } config.auto_copy_file_entries << { :source => ''scripts'', :destination => ''public/javascripts'', :extensions => [:js, :JS] } # only copy js files config.auto_copy_file_entries << { :source => ''css'', :destination => ''public/stylesheets'' } (These examples are also in the latest example settings.rb config file which is installed when using script/generate masterview_plugin) Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070421/008a48a1/attachment-0001.html
David Koontz
2007-Apr-21 18:39 UTC
[Masterview-users] Auto copy feature added to MasterView trunk
Awesome, thanks Jeff!> MasterView users, > > I have just added an auto copy feature to the MasterView trunk (which > will be in the next release). I clipped this out of the configuration > document, let me know if anything is unclear or if there is anything > critical missing in this feature. > > ---------------- > > config.auto_copy_file_entries controls what MasterView will > automatically copy > > Locations of files that MasterView will autocopy to a runtime location > This autocopy feature makes it easy to have prototypes that display > properly for WYSIWYG editing and design, using files (images, > stylesheets, and javascript) which are not in the standard Rails > locations but are automatically copied to proper place for runtime. > This is commonly used in conjunction with template_src_dir_path (which > changes the location of the source MasterView templates). Developers > can have their templates in a non-standard location along with images, > stylesheets, and javascript, and then still have everything copied to > the proper runtime locations when Rails is fired up. > > In debug mode, timestamps are checked on every request, in production > mode, copy is done only on startup. > > Each entry is a hash that needs to contain > > * :source => ''path to source folder'' # absolute or relative to > RAILS_ROOT > * :destination => ''path to place to copy to'' # absolute or > relative to RAILS_ROOT > > and can optionally have a file extension filter > > * :extensions => [:gif, :GIF, :jpg, :JPG] # limit files copied to > this array of extensions, case sensitive > > > Default: [] # nothing will be auto copied > > Example usage showing three paths added to be auto copied: > config.auto_copy_file_entries << { :source => ''images'', :destination > => ''public/images'' } > config.auto_copy_file_entries << { :source => ''scripts'', :destination > => ''public/javascripts'', :extensions => [:js, :JS] } # only copy js files > config.auto_copy_file_entries << { :source => ''css'', :destination => > ''public/stylesheets'' } > > (These examples are also in the latest example settings.rb config file > which is installed when using script/generate masterview_plugin) > > > Thanks, > > Jeff