webgen 0.3.8 → 0.4.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 +2565 -14
- data/README +4 -6
- data/Rakefile +207 -89
- data/TODO +175 -17
- data/VERSION +1 -1
- data/bin/webgen +1 -2
- data/data/webgen/gallery-creator/default.png +0 -0
- data/data/webgen/gallery_styles/default/README +6 -0
- data/data/webgen/gallery_styles/default/gallery_gallery.template +38 -0
- data/data/webgen/gallery_styles/default/gallery_image.template +30 -0
- data/data/webgen/gallery_styles/default/gallery_main.template +18 -0
- data/data/webgen/gallery_styles/slides/README +18 -0
- data/data/webgen/gallery_styles/slides/collage.rb +334 -0
- data/data/webgen/gallery_styles/slides/gallery_gallery.template +62 -0
- data/data/webgen/gallery_styles/slides/gallery_image.template +53 -0
- data/data/webgen/gallery_styles/slides/gallery_main.template +32 -0
- data/data/webgen/resources/images/generated_by_webgen.png +0 -0
- data/data/webgen/resources/images/webgen_logo.png +0 -0
- data/data/webgen/website_styles/1024px/README +10 -0
- data/data/webgen/website_styles/1024px/default.css +188 -0
- data/data/webgen/website_styles/1024px/default.template +62 -0
- data/data/webgen/website_styles/1024px/images/background.gif +0 -0
- data/data/webgen/website_styles/andreas00/README +10 -0
- data/data/webgen/website_styles/andreas00/default.css +290 -0
- data/data/webgen/website_styles/andreas00/default.template +62 -0
- data/data/webgen/website_styles/andreas00/images/bg.gif +0 -0
- data/data/webgen/website_styles/andreas00/images/front.jpg +0 -0
- data/data/webgen/website_styles/andreas00/images/menubg.gif +0 -0
- data/data/webgen/website_styles/andreas00/images/menubg2.gif +0 -0
- data/data/webgen/website_styles/andreas01/README +11 -0
- data/data/webgen/website_styles/andreas01/default.css +310 -0
- data/data/webgen/website_styles/andreas01/default.template +63 -0
- data/data/webgen/website_styles/andreas01/images/bg.gif +0 -0
- data/data/webgen/website_styles/andreas01/images/front.jpg +0 -0
- data/data/webgen/website_styles/andreas01/print.css +35 -0
- data/data/webgen/website_styles/andreas03/README +11 -0
- data/data/webgen/website_styles/andreas03/default.css +223 -0
- data/data/webgen/website_styles/andreas03/default.template +60 -0
- data/data/webgen/website_styles/andreas03/images/bodybg.png +0 -0
- data/data/webgen/website_styles/andreas03/images/contbg.png +0 -0
- data/data/webgen/website_styles/andreas03/images/footerbg.png +0 -0
- data/data/webgen/website_styles/andreas03/images/gradient1.png +0 -0
- data/data/webgen/website_styles/andreas03/images/gradient2.png +0 -0
- data/data/webgen/website_styles/andreas04/README +12 -0
- data/data/webgen/website_styles/andreas04/default.css +290 -0
- data/data/webgen/website_styles/andreas04/default.template +83 -0
- data/data/webgen/website_styles/andreas04/images/blinkarrow.gif +0 -0
- data/data/webgen/website_styles/andreas04/images/bodybg.png +0 -0
- data/data/webgen/website_styles/andreas04/images/contentbg.png +0 -0
- data/data/webgen/website_styles/andreas04/images/entrybg.png +0 -0
- data/data/webgen/website_styles/andreas04/images/flash.gif +0 -0
- data/data/webgen/website_styles/andreas04/images/flash2.gif +0 -0
- data/data/webgen/website_styles/andreas04/images/globe.gif +0 -0
- data/data/webgen/website_styles/andreas04/images/globebottom.gif +0 -0
- data/data/webgen/website_styles/andreas04/images/linkarrow.gif +0 -0
- data/data/webgen/website_styles/andreas04/images/menuhover.png +0 -0
- data/data/webgen/website_styles/andreas05/README +11 -0
- data/data/webgen/website_styles/andreas05/default.css +33 -0
- data/data/webgen/website_styles/andreas05/default.template +42 -0
- data/data/webgen/website_styles/andreas05/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas05/images/front.png +0 -0
- data/data/webgen/website_styles/andreas06/README +11 -0
- data/data/webgen/website_styles/andreas06/default.css +353 -0
- data/data/webgen/website_styles/andreas06/default.template +72 -0
- data/data/webgen/website_styles/andreas06/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas06/images/boxbg.gif +0 -0
- data/data/webgen/website_styles/andreas06/images/greypx.gif +0 -0
- data/data/webgen/website_styles/andreas06/images/header.jpg +0 -0
- data/data/webgen/website_styles/andreas06/images/innerbg.gif +0 -0
- data/data/webgen/website_styles/andreas06/images/leaves.jpg +0 -0
- data/data/webgen/website_styles/andreas06/images/tabs.gif +0 -0
- data/data/webgen/website_styles/andreas07/README +12 -0
- data/data/webgen/website_styles/andreas07/browserfix.css +7 -0
- data/data/webgen/website_styles/andreas07/default.css +92 -0
- data/data/webgen/website_styles/andreas07/default.template +44 -0
- data/data/webgen/website_styles/andreas07/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas07/images/sidebarbg.gif +0 -0
- data/data/webgen/website_styles/andreas08/README +11 -0
- data/data/webgen/website_styles/andreas08/default.css +224 -0
- data/data/webgen/website_styles/andreas08/default.template +53 -0
- data/data/webgen/website_styles/andreas09/README +11 -0
- data/data/webgen/website_styles/andreas09/default.css +308 -0
- data/data/webgen/website_styles/andreas09/default.template +70 -0
- data/data/webgen/website_styles/andreas09/images/bodybg-black.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/bodybg-green.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/bodybg-orange.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/bodybg-purple.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/bodybg-red.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/bodybg.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/footerbg.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/menuhover-black.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/menuhover-green.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/menuhover-orange.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/menuhover-purple.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/menuhover-red.jpg +0 -0
- data/data/webgen/website_styles/andreas09/images/menuhover.jpg +0 -0
- data/data/webgen/website_styles/default/README +6 -0
- data/data/webgen/website_styles/default/default.css +1 -1
- data/data/webgen/website_styles/default/default.template +9 -3
- data/data/webgen/website_styles/plain/README +12 -0
- data/data/webgen/website_styles/plain/default.css +244 -0
- data/data/webgen/website_styles/plain/default.template +63 -0
- data/data/webgen/website_styles/plain/images/a_hover.jpg +0 -0
- data/data/webgen/website_styles/plain/images/desc.jpg +0 -0
- data/data/webgen/website_styles/plain/images/li.gif +0 -0
- data/data/webgen/website_styles/plain/images/mainbar.jpg +0 -0
- data/data/webgen/website_styles/plain/images/menu.jpg +0 -0
- data/data/webgen/website_styles/plain/images/submenua.gif +0 -0
- data/data/webgen/website_styles/plain/images/submenua_hover.jpg +0 -0
- data/data/webgen/website_templates/default/README +7 -5
- data/data/webgen/website_templates/personal_hp/README +7 -5
- data/data/webgen/website_templates/project/README +8 -6
- data/doc/config.yaml +2 -2
- data/doc/examples/website_styles/1024px/README +9 -0
- data/doc/examples/website_styles/1024px/config.yaml +2 -0
- data/doc/examples/website_styles/1024px/src/about.page +12 -0
- data/doc/examples/website_styles/1024px/src/default.css +188 -0
- data/doc/examples/website_styles/1024px/src/default.template +62 -0
- data/doc/examples/website_styles/1024px/src/download.page +15 -0
- data/doc/examples/website_styles/1024px/src/features.page +8 -0
- data/doc/examples/website_styles/1024px/src/images/background.gif +0 -0
- data/doc/examples/website_styles/1024px/src/index.page +9 -0
- data/doc/examples/website_styles/1024px/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas00/README +9 -0
- data/doc/examples/website_styles/andreas00/config.yaml +2 -0
- data/doc/examples/website_styles/andreas00/src/about.page +12 -0
- data/doc/examples/website_styles/andreas00/src/default.css +290 -0
- data/doc/examples/website_styles/andreas00/src/default.template +62 -0
- data/doc/examples/website_styles/andreas00/src/download.page +15 -0
- data/doc/examples/website_styles/andreas00/src/features.page +8 -0
- data/doc/examples/website_styles/andreas00/src/images/bg.gif +0 -0
- data/doc/examples/website_styles/andreas00/src/images/front.jpg +0 -0
- data/doc/examples/website_styles/andreas00/src/images/menubg.gif +0 -0
- data/doc/examples/website_styles/andreas00/src/images/menubg2.gif +0 -0
- data/doc/examples/website_styles/andreas00/src/index.page +9 -0
- data/doc/examples/website_styles/andreas00/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas01/README +9 -0
- data/doc/examples/website_styles/andreas01/config.yaml +2 -0
- data/doc/examples/website_styles/andreas01/src/about.page +12 -0
- data/doc/examples/website_styles/andreas01/src/default.css +310 -0
- data/doc/examples/website_styles/andreas01/src/default.template +63 -0
- data/doc/examples/website_styles/andreas01/src/download.page +15 -0
- data/doc/examples/website_styles/andreas01/src/features.page +8 -0
- data/doc/examples/website_styles/andreas01/src/images/bg.gif +0 -0
- data/doc/examples/website_styles/andreas01/src/images/front.jpg +0 -0
- data/doc/examples/website_styles/andreas01/src/index.page +9 -0
- data/doc/examples/website_styles/andreas01/src/print.css +35 -0
- data/doc/examples/website_styles/andreas01/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas03/README +9 -0
- data/doc/examples/website_styles/andreas03/config.yaml +2 -0
- data/doc/examples/website_styles/andreas03/src/about.page +12 -0
- data/doc/examples/website_styles/andreas03/src/default.css +223 -0
- data/doc/examples/website_styles/andreas03/src/default.template +60 -0
- data/doc/examples/website_styles/andreas03/src/download.page +15 -0
- data/doc/examples/website_styles/andreas03/src/features.page +8 -0
- data/doc/examples/website_styles/andreas03/src/images/bodybg.png +0 -0
- data/doc/examples/website_styles/andreas03/src/images/contbg.png +0 -0
- data/doc/examples/website_styles/andreas03/src/images/footerbg.png +0 -0
- data/doc/examples/website_styles/andreas03/src/images/gradient1.png +0 -0
- data/doc/examples/website_styles/andreas03/src/images/gradient2.png +0 -0
- data/doc/examples/website_styles/andreas03/src/index.page +9 -0
- data/doc/examples/website_styles/andreas03/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas04/README +9 -0
- data/doc/examples/website_styles/andreas04/config.yaml +2 -0
- data/doc/examples/website_styles/andreas04/src/about.page +12 -0
- data/doc/examples/website_styles/andreas04/src/default.css +290 -0
- data/doc/examples/website_styles/andreas04/src/default.template +83 -0
- data/doc/examples/website_styles/andreas04/src/download.page +15 -0
- data/doc/examples/website_styles/andreas04/src/features.page +8 -0
- data/doc/examples/website_styles/andreas04/src/images/blinkarrow.gif +0 -0
- data/doc/examples/website_styles/andreas04/src/images/bodybg.png +0 -0
- data/doc/examples/website_styles/andreas04/src/images/contentbg.png +0 -0
- data/doc/examples/website_styles/andreas04/src/images/entrybg.png +0 -0
- data/doc/examples/website_styles/andreas04/src/images/flash.gif +0 -0
- data/doc/examples/website_styles/andreas04/src/images/flash2.gif +0 -0
- data/doc/examples/website_styles/andreas04/src/images/globe.gif +0 -0
- data/doc/examples/website_styles/andreas04/src/images/globebottom.gif +0 -0
- data/doc/examples/website_styles/andreas04/src/images/linkarrow.gif +0 -0
- data/doc/examples/website_styles/andreas04/src/images/menuhover.png +0 -0
- data/doc/examples/website_styles/andreas04/src/index.page +9 -0
- data/doc/examples/website_styles/andreas04/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas05/README +9 -0
- data/doc/examples/website_styles/andreas05/config.yaml +2 -0
- data/doc/examples/website_styles/andreas05/src/about.page +12 -0
- data/doc/examples/website_styles/andreas05/src/default.css +33 -0
- data/doc/examples/website_styles/andreas05/src/default.template +42 -0
- data/doc/examples/website_styles/andreas05/src/download.page +15 -0
- data/doc/examples/website_styles/andreas05/src/features.page +8 -0
- data/doc/examples/website_styles/andreas05/src/images/bodybg.gif +0 -0
- data/doc/examples/website_styles/andreas05/src/images/front.png +0 -0
- data/doc/examples/website_styles/andreas05/src/index.page +9 -0
- data/doc/examples/website_styles/andreas05/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas06/README +9 -0
- data/doc/examples/website_styles/andreas06/config.yaml +2 -0
- data/doc/examples/website_styles/andreas06/src/about.page +12 -0
- data/doc/examples/website_styles/andreas06/src/default.css +353 -0
- data/doc/examples/website_styles/andreas06/src/default.template +72 -0
- data/doc/examples/website_styles/andreas06/src/download.page +15 -0
- data/doc/examples/website_styles/andreas06/src/features.page +8 -0
- data/doc/examples/website_styles/andreas06/src/images/bodybg.gif +0 -0
- data/doc/examples/website_styles/andreas06/src/images/boxbg.gif +0 -0
- data/doc/examples/website_styles/andreas06/src/images/greypx.gif +0 -0
- data/doc/examples/website_styles/andreas06/src/images/header.jpg +0 -0
- data/doc/examples/website_styles/andreas06/src/images/innerbg.gif +0 -0
- data/doc/examples/website_styles/andreas06/src/images/leaves.jpg +0 -0
- data/doc/examples/website_styles/andreas06/src/images/tabs.gif +0 -0
- data/doc/examples/website_styles/andreas06/src/index.page +9 -0
- data/doc/examples/website_styles/andreas06/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas07/README +9 -0
- data/doc/examples/website_styles/andreas07/config.yaml +2 -0
- data/doc/examples/website_styles/andreas07/src/about.page +12 -0
- data/doc/examples/website_styles/andreas07/src/browserfix.css +7 -0
- data/doc/examples/website_styles/andreas07/src/default.css +92 -0
- data/doc/examples/website_styles/andreas07/src/default.template +44 -0
- data/doc/examples/website_styles/andreas07/src/download.page +15 -0
- data/doc/examples/website_styles/andreas07/src/features.page +8 -0
- data/doc/examples/website_styles/andreas07/src/images/bodybg.gif +0 -0
- data/doc/examples/website_styles/andreas07/src/images/sidebarbg.gif +0 -0
- data/doc/examples/website_styles/andreas07/src/index.page +9 -0
- data/doc/examples/website_styles/andreas07/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas08/README +9 -0
- data/doc/examples/website_styles/andreas08/config.yaml +2 -0
- data/doc/examples/website_styles/andreas08/src/about.page +12 -0
- data/doc/examples/website_styles/andreas08/src/default.css +224 -0
- data/doc/examples/website_styles/andreas08/src/default.template +53 -0
- data/doc/examples/website_styles/andreas08/src/download.page +15 -0
- data/doc/examples/website_styles/andreas08/src/features.page +8 -0
- data/doc/examples/website_styles/andreas08/src/index.page +9 -0
- data/doc/examples/website_styles/andreas08/src/screenshots.page +18 -0
- data/doc/examples/website_styles/andreas09/README +9 -0
- data/doc/examples/website_styles/andreas09/config.yaml +2 -0
- data/doc/examples/website_styles/andreas09/src/about.page +12 -0
- data/doc/examples/website_styles/andreas09/src/default.css +308 -0
- data/doc/examples/website_styles/andreas09/src/default.template +70 -0
- data/doc/examples/website_styles/andreas09/src/download.page +15 -0
- data/doc/examples/website_styles/andreas09/src/features.page +8 -0
- data/doc/examples/website_styles/andreas09/src/images/bodybg-black.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/bodybg-green.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/bodybg-orange.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/bodybg-purple.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/bodybg-red.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/bodybg.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/footerbg.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/menuhover-black.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/menuhover-green.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/menuhover-orange.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/menuhover-purple.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/menuhover-red.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/images/menuhover.jpg +0 -0
- data/doc/examples/website_styles/andreas09/src/index.page +9 -0
- data/doc/examples/website_styles/andreas09/src/screenshots.page +18 -0
- data/doc/examples/website_styles/default/README +9 -0
- data/doc/examples/website_styles/default/config.yaml +2 -0
- data/doc/examples/website_styles/default/src/about.page +12 -0
- data/doc/examples/website_styles/default/src/default.css +84 -0
- data/doc/examples/website_styles/default/src/default.template +38 -0
- data/doc/examples/website_styles/default/src/download.page +15 -0
- data/doc/examples/website_styles/default/src/features.page +8 -0
- data/doc/examples/website_styles/default/src/index.page +9 -0
- data/doc/examples/website_styles/default/src/screenshots.page +18 -0
- data/doc/examples/website_styles/plain/README +9 -0
- data/doc/examples/website_styles/plain/config.yaml +2 -0
- data/doc/examples/website_styles/plain/src/about.page +12 -0
- data/doc/examples/website_styles/plain/src/default.css +244 -0
- data/doc/examples/website_styles/plain/src/default.template +63 -0
- data/doc/examples/website_styles/plain/src/download.page +15 -0
- data/doc/examples/website_styles/plain/src/features.page +8 -0
- data/doc/examples/website_styles/plain/src/images/a_hover.jpg +0 -0
- data/doc/examples/website_styles/plain/src/images/desc.jpg +0 -0
- data/doc/examples/website_styles/plain/src/images/li.gif +0 -0
- data/doc/examples/website_styles/plain/src/images/mainbar.jpg +0 -0
- data/doc/examples/website_styles/plain/src/images/menu.jpg +0 -0
- data/doc/examples/website_styles/plain/src/images/submenua.gif +0 -0
- data/doc/examples/website_styles/plain/src/images/submenua_hover.jpg +0 -0
- data/doc/examples/website_styles/plain/src/index.page +9 -0
- data/doc/examples/website_styles/plain/src/screenshots.page +18 -0
- data/doc/examples/website_templates/default/README +8 -0
- data/doc/examples/website_templates/default/config.yaml +2 -0
- data/doc/examples/website_templates/default/src/default.css +84 -0
- data/doc/examples/website_templates/default/src/default.template +38 -0
- data/doc/examples/website_templates/default/src/index.page +8 -0
- data/doc/examples/website_templates/personal_hp/README +8 -0
- data/doc/examples/website_templates/personal_hp/config.yaml +2 -0
- data/doc/examples/website_templates/personal_hp/src/about.page +12 -0
- data/doc/examples/website_templates/personal_hp/src/default.css +84 -0
- data/doc/examples/website_templates/personal_hp/src/default.template +38 -0
- data/doc/examples/website_templates/personal_hp/src/index.page +9 -0
- data/doc/examples/website_templates/personal_hp/src/links.page +22 -0
- data/doc/examples/website_templates/personal_hp/src/projects.page +20 -0
- data/doc/examples/website_templates/project/README +9 -0
- data/doc/examples/website_templates/project/config.yaml +2 -0
- data/doc/examples/website_templates/project/src/about.page +12 -0
- data/doc/examples/website_templates/project/src/default.css +84 -0
- data/doc/examples/website_templates/project/src/default.template +38 -0
- data/doc/examples/website_templates/project/src/download.page +15 -0
- data/doc/examples/website_templates/project/src/features.page +8 -0
- data/doc/examples/website_templates/project/src/index.page +9 -0
- data/doc/examples/website_templates/project/src/screenshots.page +18 -0
- data/doc/metainfo.yaml +85 -0
- data/doc/plugin/emoticon.rb +19 -21
- data/doc/plugin/extension.rb +134 -55
- data/doc/plugin/gallery/slides/collage.rb +334 -0
- data/doc/plugin/listpluginparameters.rb +24 -26
- data/doc/plugin/resources.rb +20 -22
- data/doc/src/default.css +333 -154
- data/doc/src/default.template +92 -39
- data/doc/src/documentation/extending_webgen.page +1 -2
- data/doc/src/documentation/gettingstarted.page +161 -44
- data/doc/src/documentation/index.page +15 -28
- data/doc/src/documentation/plugins/contentconverter/default.page +15 -0
- data/doc/src/documentation/plugins/contentconverter/html.page +10 -0
- data/doc/src/documentation/plugins/contentconverter/markdown.page +21 -0
- data/doc/src/documentation/plugins/contentconverter/rdoc.page +11 -0
- data/doc/src/documentation/plugins/contentconverter/textile.page +21 -0
- data/doc/src/documentation/plugins/contentconverter/xmlbuilder.page +61 -0
- data/doc/src/documentation/plugins/core/configuration.page +11 -0
- data/doc/src/documentation/plugins/core/filehandler.page +214 -0
- data/doc/src/documentation/plugins/core/index.page +11 -0
- data/doc/src/documentation/plugins/core/resourcemanager.page +46 -0
- data/doc/src/documentation/plugins/core/tagprocessor.page +17 -0
- data/doc/src/documentation/plugins/file/copyhandler.page +26 -0
- data/doc/src/documentation/plugins/file/defaulthandler.page +15 -0
- data/doc/src/documentation/plugins/file/directoryhandler.page +37 -0
- data/doc/src/documentation/plugins/file/galleryhandler.page +181 -0
- data/doc/src/documentation/plugins/file/pagehandler.page +154 -0
- data/doc/src/documentation/plugins/file/templatehandler.page +34 -0
- data/doc/src/documentation/plugins/file/thumbnailwriter.page +39 -0
- data/doc/src/documentation/plugins/htmlvalidator/default.page +12 -0
- data/doc/src/documentation/plugins/htmlvalidator/xmllint.page +12 -0
- data/doc/src/documentation/plugins/index.page +32 -11
- data/doc/src/documentation/plugins/menustyle/default.page +19 -0
- data/doc/src/documentation/plugins/menustyle/horizontal.page +32 -0
- data/doc/src/documentation/plugins/{menustyles → menustyle}/horizontaldropdown.page +25 -19
- data/doc/src/documentation/plugins/menustyle/section.page +34 -0
- data/doc/src/documentation/plugins/menustyle/vertical.page +48 -0
- data/doc/src/documentation/plugins/menustyle/verticaldropdown.page +29 -0
- data/doc/src/documentation/plugins/misc/index.page +9 -0
- data/doc/src/documentation/plugins/{miscplugins → misc}/smileyreplacer.page +15 -14
- data/doc/src/documentation/plugins/misc/syntaxhighlighter.page +26 -0
- data/doc/src/documentation/plugins/tag/block.page +29 -0
- data/doc/src/documentation/plugins/tag/breadcrumbtrail.page +29 -0
- data/doc/src/documentation/plugins/tag/date.page +34 -0
- data/doc/src/documentation/plugins/tag/default.page +27 -0
- data/doc/src/documentation/plugins/tag/download.page +60 -0
- data/doc/src/documentation/plugins/tag/executecommand.page +29 -0
- data/doc/src/documentation/plugins/tag/includefile.page +30 -0
- data/doc/src/documentation/plugins/{tags → tag}/langbar.de.page +1 -1
- data/doc/src/documentation/plugins/tag/langbar.fr.page +6 -0
- data/doc/src/documentation/plugins/tag/langbar.page +41 -0
- data/doc/src/documentation/plugins/tag/menu.page +78 -0
- data/doc/src/documentation/plugins/{tags → tag}/meta.page +8 -7
- data/doc/src/documentation/plugins/tag/relocatable.page +46 -0
- data/doc/src/documentation/plugins/tag/resource.page +35 -0
- data/doc/src/documentation/plugins/tag/sitemap.page +35 -0
- data/doc/src/documentation/plugins/tag/wikilink.page +33 -0
- data/doc/src/documentation/references/index.page +0 -1
- data/doc/src/documentation/references/meta_info_reference.page +90 -13
- data/doc/src/documentation/references/parameter_reference.page +0 -1
- data/doc/src/documentation/references/webpage_format.page +249 -0
- data/doc/src/download.page +50 -21
- data/doc/src/examples/gallery_styles/default/default.gallery +78 -0
- data/doc/src/examples/gallery_styles/default/gallery_gallery.template +38 -0
- data/doc/src/examples/gallery_styles/default/gallery_image.template +30 -0
- data/doc/src/examples/gallery_styles/default/gallery_main.template +18 -0
- data/doc/src/examples/gallery_styles/index.page +22 -0
- data/doc/src/examples/gallery_styles/slides/gallery_gallery.template +62 -0
- data/doc/src/examples/gallery_styles/slides/gallery_image.template +53 -0
- data/doc/src/examples/gallery_styles/slides/gallery_main.template +32 -0
- data/doc/src/examples/gallery_styles/slides/slides.gallery +79 -0
- data/doc/src/examples/images/image01.jpg +0 -0
- data/doc/src/examples/images/image02.jpg +0 -0
- data/doc/src/examples/images/image03.jpg +0 -0
- data/doc/src/examples/images/image04.jpg +0 -0
- data/doc/src/examples/images/image05.jpg +0 -0
- data/doc/src/examples/images/image06.jpg +0 -0
- data/doc/src/examples/images/image07.jpg +0 -0
- data/doc/src/examples/images/image08.jpg +0 -0
- data/doc/src/examples/images/image09.jpg +0 -0
- data/doc/src/examples/images/image10.jpg +0 -0
- data/doc/src/examples/images/image11.jpg +0 -0
- data/doc/src/examples/images/image12.jpg +0 -0
- data/doc/src/examples/images/image13.jpg +0 -0
- data/doc/src/examples/images/image14.jpg +0 -0
- data/doc/src/examples/images/image15.jpg +0 -0
- data/doc/src/examples/images/image16.jpg +0 -0
- data/doc/src/examples/images/image17.jpg +0 -0
- data/doc/src/examples/images/image18.jpg +0 -0
- data/doc/src/examples/index.page +18 -0
- data/doc/src/examples/website_styles/1024px.page +5 -0
- data/doc/src/examples/website_styles/andreas00.page +5 -0
- data/doc/src/examples/website_styles/andreas01.page +5 -0
- data/doc/src/examples/website_styles/andreas03.page +5 -0
- data/doc/src/examples/website_styles/andreas04.page +5 -0
- data/doc/src/examples/website_styles/andreas05.page +5 -0
- data/doc/src/examples/website_styles/andreas06.page +5 -0
- data/doc/src/examples/website_styles/andreas07.page +5 -0
- data/doc/src/examples/website_styles/andreas08.page +5 -0
- data/doc/src/examples/website_styles/andreas09.page +5 -0
- data/doc/src/examples/website_styles/default.page +5 -0
- data/doc/src/examples/website_styles/index.page +71 -0
- data/doc/src/examples/website_styles/plain.page +5 -0
- data/doc/src/examples/website_templates/default.page +5 -0
- data/doc/src/examples/website_templates/index.page +24 -0
- data/doc/src/examples/website_templates/personal_hp.page +5 -0
- data/doc/src/examples/website_templates/project.page +5 -0
- data/doc/src/features.page +16 -14
- data/doc/src/images/bodybg.jpg +0 -0
- data/doc/src/images/footerbg.jpg +0 -0
- data/doc/src/images/menuhover.jpg +0 -0
- data/doc/src/images/node_diagram.svg +7132 -0
- data/doc/src/images/thumb_example.jpg +0 -0
- data/doc/src/images/thumb_example_cropped.jpg +0 -0
- data/doc/src/images/thumb_example_normal.jpg +0 -0
- data/doc/src/index.page +14 -102
- data/doc/src/news.page +154 -0
- data/doc/src/plugin.template +10 -0
- data/lib/webgen/cli.rb +427 -0
- data/lib/webgen/composite.rb +11 -11
- data/lib/webgen/config.rb +52 -0
- data/lib/webgen/content.rb +172 -0
- data/lib/webgen/extcommand.rb +23 -0
- data/lib/webgen/languages.rb +110 -0
- data/lib/webgen/listener.rb +1 -1
- data/lib/webgen/node.rb +196 -124
- data/lib/webgen/plugin.rb +480 -144
- data/lib/webgen/plugins/{contenthandlers → contentconverters}/default.rb +10 -9
- data/lib/webgen/plugins/{contenthandlers → contentconverters}/html.rb +11 -8
- data/lib/webgen/plugins/contentconverters/markdown.rb +54 -0
- data/lib/webgen/plugins/{contenthandlers → contentconverters}/rdoc.rb +16 -12
- data/lib/webgen/plugins/{contenthandlers → contentconverters}/textile.rb +18 -13
- data/lib/webgen/plugins/contentconverters/xmlbuilder.rb +58 -0
- data/lib/webgen/plugins/coreplugins/configuration.rb +11 -102
- data/lib/webgen/plugins/coreplugins/resourcemanager.rb +95 -74
- data/lib/webgen/plugins/filehandlers/copy.rb +41 -19
- data/lib/webgen/plugins/filehandlers/directory.rb +52 -50
- data/lib/webgen/plugins/filehandlers/filehandler.rb +370 -123
- data/lib/webgen/plugins/filehandlers/gallery.rb +368 -117
- data/lib/webgen/plugins/filehandlers/page.rb +160 -146
- data/lib/webgen/plugins/filehandlers/template.rb +65 -52
- data/lib/webgen/plugins/htmlvalidators/default.rb +9 -7
- data/lib/webgen/plugins/htmlvalidators/xmllint.rb +17 -33
- data/lib/webgen/plugins/menustyles/default.rb +27 -25
- data/lib/webgen/plugins/menustyles/horizontal.rb +22 -41
- data/lib/webgen/plugins/menustyles/horizontal_dropdown.rb +25 -39
- data/lib/webgen/plugins/menustyles/section.rb +68 -0
- data/lib/webgen/plugins/menustyles/vertical.rb +36 -56
- data/lib/webgen/plugins/menustyles/vertical_dropdown.rb +24 -32
- data/lib/webgen/plugins/miscplugins/smileyreplacer.rb +20 -17
- data/lib/webgen/plugins/miscplugins/syntax_highlighter.rb +72 -0
- data/lib/webgen/plugins/miscplugins/treewalker.rb +9 -36
- data/lib/webgen/plugins/tags/block.rb +65 -0
- data/lib/webgen/plugins/tags/breadcrumbtrail.rb +15 -11
- data/lib/webgen/plugins/tags/date.rb +11 -7
- data/lib/webgen/plugins/tags/download.rb +38 -38
- data/lib/webgen/plugins/tags/executecommand.rb +30 -15
- data/lib/webgen/plugins/tags/includefile.rb +26 -13
- data/lib/webgen/plugins/tags/langbar.rb +23 -18
- data/lib/webgen/plugins/tags/menu.rb +49 -70
- data/lib/webgen/plugins/tags/meta.rb +12 -9
- data/lib/webgen/plugins/tags/relocatable.rb +41 -13
- data/lib/webgen/plugins/tags/sitemap.rb +32 -28
- data/lib/webgen/plugins/tags/tag_processor.rb +279 -0
- data/lib/webgen/plugins/tags/wikilink.rb +25 -20
- data/lib/webgen/test.rb +202 -0
- data/lib/webgen/website.rb +310 -0
- data/test/fixtures/sample_site/src/chained.template +3 -0
- data/test/fixtures/sample_site/src/default.template +3 -0
- data/test/fixtures/sample_site/src/dir1/dir11/file111.de.page +3 -0
- data/test/fixtures/sample_site/src/dir1/dir11/file111.page +3 -0
- data/test/fixtures/sample_site/src/dir1/dir11/index.page +3 -0
- data/test/fixtures/sample_site/src/dir1/file11.page +3 -0
- data/test/fixtures/sample_site/src/dir2/file21.page +3 -0
- data/test/fixtures/sample_site/src/embedded.rhtml +1 -0
- data/test/fixtures/sample_site/src/file1.page +8 -0
- data/test/fixtures/sample_site/src/file2.de.page +6 -0
- data/test/fixtures/sample_site/src/index.de.page +4 -0
- data/test/fixtures/sample_site/src/index.en.page +1 -0
- data/test/fixtures/sample_site/src/invalid.template +3 -0
- data/test/fixtures/sample_site/src/test.jpg +1 -0
- data/test/fixtures/sample_site/src/test.template +3 -0
- data/test/fixtures/tc_content/blocks.yaml +40 -0
- data/test/fixtures/tc_content/correct.yaml +65 -0
- data/test/fixtures/tc_content/incorrect.yaml +42 -0
- data/test/fixtures/tc_filehandler_filehandler/backing/metainfo.yaml +9 -0
- data/test/fixtures/tc_filehandler_filehandler/backing_empty/metainfo.yaml +6 -0
- data/test/fixtures/tc_filehandler_filehandler/sample_plugin.rb +49 -0
- data/test/fixtures/tc_filehandler_filehandler/unmodified +0 -0
- data/test/fixtures/tc_filehandler_gallery/test.gallery +2 -0
- data/test/fixtures/tc_filehandler_gallery/test1.gallery +2 -0
- data/test/fixtures/tc_filehandler_gallery/test1.jpg +0 -0
- data/test/fixtures/tc_filehandler_gallery/test2.jpg +0 -0
- data/test/fixtures/tc_filehandler_gallery/test3.jpg +0 -0
- data/test/fixtures/tc_filehandler_gallery/test4.jpg +0 -0
- data/test/fixtures/tc_filehandler_page/testdata.yaml +10 -0
- data/test/fixtures/tc_menustyles_default/menustyle.rb +7 -0
- data/test/fixtures/tc_node/nodes.yaml +64 -0
- data/test/fixtures/tc_plugin/handlerplugin.rb +15 -0
- data/test/fixtures/tc_plugin/plugin1.rb +33 -0
- data/test/fixtures/tc_plugin/plugin2.rb +8 -0
- data/test/fixtures/tc_tags_includefile/testfile +1 -0
- data/test/fixtures/tc_tags_tag_processor/test_file1 +1 -0
- data/test/fixtures/tc_tags_tag_processor/testtag.rb +17 -0
- data/test/fixtures/tc_website/correct.yaml +6 -0
- data/test/fixtures/tc_website/incorrect_structure.yaml +2 -0
- data/test/fixtures/tc_website/incorrect_yaml.yaml +5 -0
- data/test/fixtures/tc_website/meta_info_test.yaml +10 -0
- data/test/fixtures/tc_website/testdir/README +1 -0
- data/test/fixtures/tc_website/testdir/falsedir/README +1 -0
- data/test/runtests.rb +2 -0
- data/test/unittests/tc_composite.rb +82 -0
- data/test/unittests/tc_config.rb +18 -0
- data/test/unittests/tc_content.rb +88 -0
- data/test/unittests/tc_contentconverters_default.rb +13 -0
- data/test/unittests/tc_contentconverters_html.rb +16 -0
- data/test/unittests/tc_contentconverters_markdown.rb +22 -0
- data/test/unittests/tc_contentconverters_rdoc.rb +16 -0
- data/test/unittests/tc_contentconverters_textile.rb +22 -0
- data/test/unittests/tc_contentconverters_xmlbuilder.rb +22 -0
- data/test/unittests/tc_filehandler_copy.rb +65 -0
- data/test/unittests/tc_filehandler_directory.rb +134 -0
- data/test/unittests/tc_filehandler_filehandler.rb +294 -0
- data/test/unittests/tc_filehandler_gallery.rb +165 -0
- data/test/unittests/tc_filehandler_page.rb +183 -0
- data/test/unittests/tc_filehandler_template.rb +60 -0
- data/test/unittests/tc_htmlvalidators_default.rb +12 -0
- data/test/unittests/tc_htmlvalidators_xmllint.rb +19 -0
- data/test/unittests/tc_languages.rb +57 -0
- data/test/unittests/tc_listener.rb +72 -0
- data/test/unittests/tc_menustyles_default.rb +51 -0
- data/test/unittests/tc_menustyles_horizontal.rb +18 -0
- data/test/unittests/tc_menustyles_horizontal_dropdown.rb +18 -0
- data/test/unittests/tc_menustyles_section.rb +59 -0
- data/test/unittests/tc_menustyles_vertical.rb +79 -0
- data/test/unittests/tc_menustyles_vertical_dropdown.rb +18 -0
- data/test/unittests/tc_node.rb +202 -0
- data/test/unittests/tc_plugin.rb +214 -0
- data/test/unittests/tc_resourcemanager.rb +42 -0
- data/test/unittests/tc_smileyreplacer.rb +25 -0
- data/test/unittests/tc_syntax_highlighter.rb +30 -0
- data/test/unittests/tc_tags_block.rb +27 -0
- data/test/unittests/tc_tags_breadcrumbtrail.rb +22 -0
- data/test/unittests/tc_tags_date.rb +15 -0
- data/test/unittests/tc_tags_download.rb +32 -0
- data/test/unittests/tc_tags_executecommand.rb +37 -0
- data/test/unittests/tc_tags_includefile.rb +53 -0
- data/test/unittests/tc_tags_langbar.rb +42 -0
- data/test/unittests/tc_tags_menu.rb +50 -0
- data/test/unittests/tc_tags_meta.rb +19 -0
- data/test/unittests/tc_tags_relocatable.rb +66 -0
- data/test/unittests/tc_tags_sitemap.rb +33 -0
- data/test/unittests/tc_tags_tag_processor.rb +107 -0
- data/test/unittests/tc_tags_wikilink.rb +22 -0
- data/test/unittests/tc_treewalker.rb +44 -0
- data/test/unittests/tc_website.rb +188 -0
- metadata +829 -312
- data/bin/webgen-gallery-editor +0 -654
- data/bin/webgen-gui +0 -10
- data/data/webgen/website_templates/default/config.yaml +0 -2
- data/doc/plugin/clidesc.rb +0 -46
- data/doc/plugin/source.rb +0 -21
- data/doc/src/about.page +0 -22
- data/doc/src/documentation/cli.page +0 -12
- data/doc/src/documentation/plugins/contenthandlers/html.page +0 -11
- data/doc/src/documentation/plugins/contenthandlers/index.page +0 -7
- data/doc/src/documentation/plugins/contenthandlers/markdown.page +0 -11
- data/doc/src/documentation/plugins/contenthandlers/rdoc.page +0 -11
- data/doc/src/documentation/plugins/contenthandlers/textile.page +0 -11
- data/doc/src/documentation/plugins/coreplugins/configuration.page +0 -12
- data/doc/src/documentation/plugins/coreplugins/index.page +0 -7
- data/doc/src/documentation/plugins/coreplugins/logging.page +0 -13
- data/doc/src/documentation/plugins/coreplugins/resourcemanager.page +0 -34
- data/doc/src/documentation/plugins/filehandlers/backing.page +0 -46
- data/doc/src/documentation/plugins/filehandlers/copy.page +0 -12
- data/doc/src/documentation/plugins/filehandlers/directoryhandler.page +0 -35
- data/doc/src/documentation/plugins/filehandlers/gallery.page +0 -86
- data/doc/src/documentation/plugins/filehandlers/index.page +0 -34
- data/doc/src/documentation/plugins/filehandlers/page.page +0 -170
- data/doc/src/documentation/plugins/filehandlers/template.page +0 -21
- data/doc/src/documentation/plugins/gallerylayouters/index.page +0 -18
- data/doc/src/documentation/plugins/htmlvalidators/index.page +0 -6
- data/doc/src/documentation/plugins/htmlvalidators/xmllint.page +0 -14
- data/doc/src/documentation/plugins/menustyles/horizontal.page +0 -21
- data/doc/src/documentation/plugins/menustyles/index.page +0 -12
- data/doc/src/documentation/plugins/menustyles/partial.page +0 -27
- data/doc/src/documentation/plugins/menustyles/vertical.page +0 -32
- data/doc/src/documentation/plugins/menustyles/verticaldropdown.page +0 -23
- data/doc/src/documentation/plugins/miscplugins/index.page +0 -7
- data/doc/src/documentation/plugins/tags/breadcrumbtrail.page +0 -20
- data/doc/src/documentation/plugins/tags/date.page +0 -19
- data/doc/src/documentation/plugins/tags/download.page +0 -23
- data/doc/src/documentation/plugins/tags/executecommand.page +0 -18
- data/doc/src/documentation/plugins/tags/includefile.page +0 -15
- data/doc/src/documentation/plugins/tags/index.page +0 -44
- data/doc/src/documentation/plugins/tags/langbar.page +0 -27
- data/doc/src/documentation/plugins/tags/menu.de.page +0 -12
- data/doc/src/documentation/plugins/tags/menu.page +0 -19
- data/doc/src/documentation/plugins/tags/multilang.de.page +0 -4
- data/doc/src/documentation/plugins/tags/multilang.fr.page +0 -4
- data/doc/src/documentation/plugins/tags/multilang.page +0 -4
- data/doc/src/documentation/plugins/tags/relocatable.page +0 -16
- data/doc/src/documentation/plugins/tags/resource.page +0 -22
- data/doc/src/documentation/plugins/tags/sitemap.page +0 -17
- data/doc/src/documentation/plugins/tags/wikilink.page +0 -18
- data/doc/src/documentation/webgen_gallery_editor.page +0 -82
- data/doc/src/images/screenshots/wge-image.png +0 -0
- data/doc/src/images/screenshots/wge-layout-preview.png +0 -0
- data/doc/src/images/screenshots/wge-main-disabled.png +0 -0
- data/doc/src/images/screenshots/wge-main.png +0 -0
- data/doc/src/meta.info +0 -30
- data/doc/src/screenshots.gallery +0 -33
- data/install.rb +0 -19
- data/lib/webgen.rb +0 -277
- data/lib/webgen/plugins/contenthandlers/markdown.rb +0 -50
- data/lib/webgen/plugins/coreplugins/logging.rb +0 -101
- data/lib/webgen/plugins/filehandlers/backing.rb +0 -159
- data/lib/webgen/plugins/gallerylayouters/default.rb +0 -152
- data/lib/webgen/plugins/menustyles/partial.rb +0 -95
- data/lib/webgen/plugins/tags/tags.rb +0 -254
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
#--
|
|
3
3
|
#
|
|
4
|
-
# $Id: wikilink.rb
|
|
4
|
+
# $Id: wikilink.rb 563 2006-12-29 08:59:41Z thomas $
|
|
5
5
|
#
|
|
6
6
|
# webgen: template based static website generator
|
|
7
7
|
# Copyright (C) 2004 Thomas Leitner
|
|
@@ -20,36 +20,41 @@
|
|
|
20
20
|
#++
|
|
21
21
|
#
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
load_plugin 'webgen/plugins/tags/tag_processor'
|
|
24
24
|
|
|
25
25
|
module Tags
|
|
26
26
|
|
|
27
27
|
class WikiLinkTag < DefaultTag
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
infos( :name => 'Tag/WikiLink',
|
|
30
|
+
:author => Webgen::AUTHOR,
|
|
31
|
+
:summary => 'Adds a link to a wiki page'
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
param 'linkText', nil, 'The text of the link. If it is not specified, the title of the current page is used.'
|
|
35
|
+
param 'rootURL', '/wiki/wiki.pl?', 'The root URL for the wiki link, ie. the path to the wiki CGI.'
|
|
36
|
+
param 'relURL', nil, 'The relativ URL for the wiki link (the varying part that is appended to rootURL). ' +
|
|
37
|
+
'If it is not specified, the title of the current page is used.'
|
|
38
|
+
param 'invalidChars', ' &;', 'The characters which are invalid in wiki URLs.'
|
|
39
|
+
param 'replacementChar', '_', 'The character(s) which should be used instead of the invalid characters.'
|
|
40
|
+
set_mandatory 'rootURL'
|
|
41
|
+
set_mandatory 'invalidChars'
|
|
42
|
+
set_mandatory 'replacementChar'
|
|
43
|
+
|
|
44
|
+
register_tag 'wikilink'
|
|
45
|
+
|
|
46
|
+
def process_tag( tag, chain )
|
|
47
|
+
"<a href=\"#{link( chain.last )}\">#{param( 'linkText' ) || chain.last['title']}</a>"
|
|
43
48
|
end
|
|
44
49
|
|
|
45
50
|
#######
|
|
46
51
|
private
|
|
47
52
|
#######
|
|
48
53
|
|
|
49
|
-
def
|
|
50
|
-
|
|
51
|
-
relURL =
|
|
52
|
-
|
|
54
|
+
def link( node )
|
|
55
|
+
rootURL = param( 'rootURL' )
|
|
56
|
+
relURL = param( 'relURL' ) || node['title']
|
|
57
|
+
rootURL + relURL.tr( param( 'invalidChars' ), param( 'replacementChar' ) )
|
|
53
58
|
end
|
|
54
59
|
|
|
55
60
|
end
|
data/lib/webgen/test.rb
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
require 'webgen/config'
|
|
2
|
+
|
|
3
|
+
Webgen::LOAD_DEFAULT_PLUGINS = false
|
|
4
|
+
|
|
5
|
+
require 'test/unit'
|
|
6
|
+
require 'webgen/plugin'
|
|
7
|
+
|
|
8
|
+
module Webgen
|
|
9
|
+
|
|
10
|
+
# Base class for all webgen test cases. It specifies some auxilary methods helpful when developing
|
|
11
|
+
# tests.
|
|
12
|
+
class TestCase < Test::Unit::TestCase
|
|
13
|
+
|
|
14
|
+
# Sets the base fixture path and the fixture path for the test case.
|
|
15
|
+
def self.inherited( klass )
|
|
16
|
+
path = caller[0][/^.*?:/][0..-2]
|
|
17
|
+
dir, file = File.split( path )
|
|
18
|
+
parent_path, unit_tests = File.split( dir )
|
|
19
|
+
|
|
20
|
+
fpath = if dir == '.'
|
|
21
|
+
File.join( '..', 'fixtures' )
|
|
22
|
+
else
|
|
23
|
+
File.join( parent_path, 'fixtures' )
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
klass.instance_variable_set( :@fixture_path, File.join( fpath, File.basename( file, '.*' ) ) )
|
|
27
|
+
klass.instance_variable_set( :@base_fixture_path, fpath + '/' )
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Reimplemented to hide the base test case.
|
|
31
|
+
def self.suite
|
|
32
|
+
if self == TestCase
|
|
33
|
+
return Test::Unit::TestSuite.new('Webgen::TestCase')
|
|
34
|
+
else
|
|
35
|
+
super
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Helper method for retrieving a path name with an optionally appended filename.
|
|
40
|
+
def self.path_helper( var, filename = nil )
|
|
41
|
+
var = instance_variable_get( var )
|
|
42
|
+
(filename.nil? ? var : File.join( var, filename ) )
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# If +filename+ is not specified, returns the fixture path for the test case. If +filename+ is
|
|
46
|
+
# specified, it is appended to the fixture path.
|
|
47
|
+
def self.fixture_path( filename = nil )
|
|
48
|
+
path_helper( :@fixture_path, filename )
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# See TestCase.fixture_path
|
|
52
|
+
def fixture_path( filename = nil )
|
|
53
|
+
self.class.fixture_path( filename )
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns the base fixture path for the test case. If +filename+ is specified, it is appended to
|
|
57
|
+
# the base fixture path.
|
|
58
|
+
def self.base_fixture_path( filename = nil )
|
|
59
|
+
path_helper( :@base_fixture_path, filename )
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# See TestCase.base_fixture_path
|
|
63
|
+
def base_fixture_path( filename = nil )
|
|
64
|
+
self.class.base_fixture_path( filename )
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# Base class for all plugin test cases. It ensures that all needed plugins are loaded and
|
|
71
|
+
# initalized before each test and that the original environment is restored afterwards.
|
|
72
|
+
class PluginTestCase < TestCase
|
|
73
|
+
|
|
74
|
+
class << self
|
|
75
|
+
|
|
76
|
+
# Specifies +files+ as the plugin files which define the plugin which should be tested and its
|
|
77
|
+
# dependencies.
|
|
78
|
+
def plugin_files( files = nil )
|
|
79
|
+
(files.nil? ? @plugin_files.to_a + ['webgen/plugins/coreplugins/configuration.rb'] : @plugin_files = files )
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# The name of the plugin which should be tested.
|
|
83
|
+
def plugin_to_test( plugin = nil )
|
|
84
|
+
@plugin_name ||= nil
|
|
85
|
+
(plugin.nil? ? @plugin_name : @plugin_name = plugin )
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# required stdlib files sothat no warnings etc. are shown when re-requiring files
|
|
91
|
+
require 'set'
|
|
92
|
+
require 'fileutils'
|
|
93
|
+
|
|
94
|
+
def setup
|
|
95
|
+
@loader = PluginLoader.new( @wrapper = Module.new )
|
|
96
|
+
|
|
97
|
+
begin
|
|
98
|
+
self.class.plugin_files.each {|p| @loader.load_from_file( p ) }
|
|
99
|
+
rescue Exception => e
|
|
100
|
+
puts "Caught exception during loading of plugins in #setup: #{e.message} - #{e.backtrace.first}"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
@manager = PluginManager.new( [@loader], @loader.plugin_classes )
|
|
104
|
+
if $VERBOSE
|
|
105
|
+
@manager.logger = Webgen::Logger.new
|
|
106
|
+
@manager.logger.level = ::Logger::DEBUG
|
|
107
|
+
end
|
|
108
|
+
@manager.plugin_config = self
|
|
109
|
+
@manager.init
|
|
110
|
+
|
|
111
|
+
if !@manager.plugins.has_key?( 'ContentConverter/Default' )
|
|
112
|
+
x = @manager.plugins['ContentConverter/Default'] = Object.new
|
|
113
|
+
def x.registered_handlers
|
|
114
|
+
formatters = Hash.new {|h, k| h[k] = proc {|c| c} }
|
|
115
|
+
def formatters.has_key?( value ); true; end
|
|
116
|
+
formatters
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
@plugin = @manager[self.class.plugin_to_test] if self.class.plugin_to_test
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def teardown
|
|
124
|
+
@manager = nil
|
|
125
|
+
@loader = nil
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def self.sample_site( filename = '' )
|
|
129
|
+
path_helper( :@base_fixture_path, File.join( 'sample_site', filename ) )
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def sample_site( filename = '' )
|
|
133
|
+
self.class.sample_site( filename )
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def param_for_plugin( plugin_name, param )
|
|
137
|
+
case [plugin_name, param]
|
|
138
|
+
when ['Core/Configuration', 'srcDir'] then sample_site( Webgen::SRC_DIR )
|
|
139
|
+
when ['Core/Configuration', 'outDir'] then sample_site( 'out' )
|
|
140
|
+
when ['Core/Configuration', 'websiteDir'] then sample_site
|
|
141
|
+
else PluginParamValueNotFound
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def find_in_sample_site
|
|
146
|
+
files = Set.new
|
|
147
|
+
Find.find( sample_site( Webgen::SRC_DIR ) ) do |path|
|
|
148
|
+
Find.prune if File.basename( path ) =~ /^\./
|
|
149
|
+
path += '/' if FileTest.directory?(path)
|
|
150
|
+
files << path if yield( path )
|
|
151
|
+
end
|
|
152
|
+
files
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def remove_consts( obj, constants )
|
|
156
|
+
constants.each do |c|
|
|
157
|
+
obj.remove_const( c )
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def self.suite
|
|
162
|
+
if self == PluginTestCase
|
|
163
|
+
return Test::Unit::TestSuite.new('Webgen::TestCase')
|
|
164
|
+
else
|
|
165
|
+
super
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
# Base class for all plugin test cases. It ensures that all needed plugins are loaded and
|
|
173
|
+
# initalized before each test and that the original environment is restored afterwards.
|
|
174
|
+
class TagTestCase < PluginTestCase
|
|
175
|
+
|
|
176
|
+
def self.suite
|
|
177
|
+
if self == TagTestCase
|
|
178
|
+
return Test::Unit::TestSuite.new('Webgen::TestCase')
|
|
179
|
+
else
|
|
180
|
+
super
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def set_config( config )
|
|
185
|
+
@plugin.set_tag_config( config, Dummy.new )
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
class Dummy
|
|
191
|
+
|
|
192
|
+
def method_missing( name, *args, &block )
|
|
193
|
+
Dummy.new
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
class Module
|
|
201
|
+
public :remove_const
|
|
202
|
+
end
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
#
|
|
2
|
+
#--
|
|
3
|
+
#
|
|
4
|
+
# $Id: website.rb 576 2007-01-03 19:41:12Z thomas $
|
|
5
|
+
#
|
|
6
|
+
# webgen: template based static website generator
|
|
7
|
+
# Copyright (C) 2004 Thomas Leitner
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
|
10
|
+
# General Public License as published by the Free Software Foundation; either version 2 of the
|
|
11
|
+
# License, or (at your option) any later version.
|
|
12
|
+
#
|
|
13
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
|
14
|
+
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15
|
+
# General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU General Public License along with this program; if not,
|
|
18
|
+
# write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
19
|
+
#
|
|
20
|
+
#++
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
require 'pathname'
|
|
24
|
+
require 'yaml'
|
|
25
|
+
require 'fileutils'
|
|
26
|
+
require 'webgen/config'
|
|
27
|
+
require 'webgen/plugin'
|
|
28
|
+
|
|
29
|
+
module Webgen
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# Base class for directories which have a README file with information stored in YAML format.
|
|
33
|
+
# Should not be used directly, use its child classes!
|
|
34
|
+
class DirectoryInfo
|
|
35
|
+
|
|
36
|
+
# The unique name.
|
|
37
|
+
attr_reader :name
|
|
38
|
+
|
|
39
|
+
# Contains additional information, like a description or the creator.
|
|
40
|
+
attr_reader :infos
|
|
41
|
+
|
|
42
|
+
# Returns a new object for the given +name+.
|
|
43
|
+
def initialize( name )
|
|
44
|
+
@name = name
|
|
45
|
+
raise ArgumentError.new( "'#{name}' is not a directory!" ) if !File.directory?( path )
|
|
46
|
+
@infos = YAML::load( File.read( File.join( path, 'README' ) ) )
|
|
47
|
+
raise ArgumentError.new( "'#{name}/README' does not contain key-value pairs in YAML format!" ) unless @infos.kind_of?( Hash )
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# The absolute directory path. Requires that child classes have defined a constant +BASE_PATH+.
|
|
51
|
+
def path
|
|
52
|
+
File.expand_path( File.join( self.class::BASE_PATH, name ) )
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# The files under the directory.
|
|
56
|
+
def files
|
|
57
|
+
Dir[File.join( path, '**', '*' )]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Copies the files returned by +#files+ into the directory +dest+, preserving the directory
|
|
61
|
+
# hierarchy.
|
|
62
|
+
def copy_to( dest )
|
|
63
|
+
files.collect do |file|
|
|
64
|
+
destpath = File.join( dest, File.dirname( file ).sub( /^#{path}/, '' ) )
|
|
65
|
+
FileUtils.mkdir_p( File.dirname( destpath ) )
|
|
66
|
+
if File.directory?( file )
|
|
67
|
+
FileUtils.mkdir_p( File.join( destpath, File.basename( file ) ) )
|
|
68
|
+
else
|
|
69
|
+
FileUtils.cp( file, destpath )
|
|
70
|
+
end
|
|
71
|
+
File.join( destpath, File.basename( file ) )
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all available entries.
|
|
76
|
+
def self.entries
|
|
77
|
+
unless defined?( @entries )
|
|
78
|
+
@entries = {}
|
|
79
|
+
Dir[File.join( self::BASE_PATH, '*' )].each do |f|
|
|
80
|
+
next unless File.directory?( f )
|
|
81
|
+
name = File.basename( f );
|
|
82
|
+
@entries[name] = self.new( name )
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
@entries
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# A Web site template is a collection of files which provide a starting point for a Web site.
|
|
92
|
+
# These files provide stubs for the content and should not contain any style information.
|
|
93
|
+
class WebSiteTemplate < DirectoryInfo
|
|
94
|
+
|
|
95
|
+
# Base path for the templates.
|
|
96
|
+
BASE_PATH = File.join( Webgen.data_dir, 'website_templates' )
|
|
97
|
+
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# A Web site style provides style information for a Web site. This means it contains, at least, a
|
|
102
|
+
# template file and a CSS file.
|
|
103
|
+
class WebSiteStyle < DirectoryInfo
|
|
104
|
+
|
|
105
|
+
# Base path for the styles.
|
|
106
|
+
BASE_PATH = File.join( Webgen.data_dir, 'website_styles' )
|
|
107
|
+
|
|
108
|
+
# See DirectoryInfo#files
|
|
109
|
+
def files
|
|
110
|
+
super.select {|f| f != File.join( path, 'README' )}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# A gallery style provides style information for gallery pages. It should contains the files
|
|
117
|
+
# +gallery_main.template+, +gallery_gallery.template+ and +gallery_image.template+ and an optional
|
|
118
|
+
# readme file.
|
|
119
|
+
class GalleryStyle < DirectoryInfo
|
|
120
|
+
|
|
121
|
+
# Base path for the styles.
|
|
122
|
+
BASE_PATH = File.join( Webgen.data_dir, 'gallery_styles' )
|
|
123
|
+
|
|
124
|
+
# See DirectoryInfo#files
|
|
125
|
+
def files
|
|
126
|
+
super.select {|f| f != File.join( path, 'README' )} - plugin_files
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def plugin_files
|
|
130
|
+
plugin_files = []
|
|
131
|
+
@infos['plugin files'].each do |pfile|
|
|
132
|
+
plugin_files += Dir[File.join( path, pfile )]
|
|
133
|
+
end if @infos['plugin files']
|
|
134
|
+
plugin_files
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
# A WebSite object represents a webgen website directory and is used for manipulating it.
|
|
141
|
+
class WebSite
|
|
142
|
+
|
|
143
|
+
# The website directory.
|
|
144
|
+
attr_reader :directory
|
|
145
|
+
|
|
146
|
+
# The logger used for the website
|
|
147
|
+
attr_reader :logger
|
|
148
|
+
|
|
149
|
+
# The plugin manager used for this website.
|
|
150
|
+
attr_reader :manager
|
|
151
|
+
|
|
152
|
+
# Creates a new WebSite object for the given +directory+ and loads its plugins. If the
|
|
153
|
+
# +plugin_config+ parameter is given, it is used to resolve the values for plugin parameters.
|
|
154
|
+
# Otherwise, a ConfigurationFile instance is used as plugin configuration.
|
|
155
|
+
def initialize( directory = Dir.pwd, plugin_config = nil )
|
|
156
|
+
@directory = File.expand_path( directory )
|
|
157
|
+
@logger = Webgen::Logger.new
|
|
158
|
+
|
|
159
|
+
wrapper_mod = Module.new
|
|
160
|
+
wrapper_mod.module_eval { include DEFAULT_WRAPPER_MODULE }
|
|
161
|
+
@loader = PluginLoader.new( wrapper_mod )
|
|
162
|
+
@loader.load_from_dir( File.join( @directory, Webgen::PLUGIN_DIR ) )
|
|
163
|
+
|
|
164
|
+
@manager = PluginManager.new( [DEFAULT_PLUGIN_LOADER, @loader], DEFAULT_PLUGIN_LOADER.plugin_classes + @loader.plugin_classes )
|
|
165
|
+
@manager.logger = @logger
|
|
166
|
+
set_plugin_config( plugin_config )
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Returns a modified value for Configuration:srcDir, Configuration:outDir and Configuration:websiteDir.
|
|
170
|
+
def param_for_plugin( plugin_name, param )
|
|
171
|
+
case [plugin_name, param]
|
|
172
|
+
when ['Core/Configuration', 'srcDir'] then @srcDir
|
|
173
|
+
when ['Core/Configuration', 'outDir'] then @outDir
|
|
174
|
+
when ['Core/Configuration', 'websiteDir'] then @directory
|
|
175
|
+
else
|
|
176
|
+
(@plugin_config ? @plugin_config.param_for_plugin( plugin_name, param ) : PluginParamValueNotFound)
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Initializes all plugins and renders the website.
|
|
181
|
+
def render( files = [] )
|
|
182
|
+
@logger.level = @manager.param_for_plugin( 'Core/Configuration', 'loggerLevel' )
|
|
183
|
+
@manager.init
|
|
184
|
+
|
|
185
|
+
@logger.info( 'WebSite#render' ) { "Starting rendering of website <#{directory}>..." }
|
|
186
|
+
if files.empty?
|
|
187
|
+
@manager['Core/FileHandler'].render_site
|
|
188
|
+
else
|
|
189
|
+
@manager['Core/FileHandler'].render_files( files )
|
|
190
|
+
end
|
|
191
|
+
@logger.info( 'WebSite#render' ) { "Rendering of website <#{directory}> finished" }
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Loads the configuration file from the +directory+.
|
|
195
|
+
def self.load_config_file( directory = Dir.pwd )
|
|
196
|
+
begin
|
|
197
|
+
ConfigurationFile.new( File.join( directory, 'config.yaml' ) )
|
|
198
|
+
rescue ConfigurationFileInvalid => e
|
|
199
|
+
nil
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Create a website in the +directory+, using the template +template_name+ and the style +style_name+.
|
|
204
|
+
def self.create_website( directory, template_name = 'default', style_name = 'default' )
|
|
205
|
+
template = WebSiteTemplate.entries[template_name]
|
|
206
|
+
style = WebSiteStyle.entries[style_name]
|
|
207
|
+
raise ArgumentError.new( "Invalid website template '#{template}'" ) if template.nil?
|
|
208
|
+
raise ArgumentError.new( "Invalid website style '#{style}'" ) if style.nil?
|
|
209
|
+
|
|
210
|
+
raise ArgumentError.new( "Directory <#{directory}> does already exist!") if File.exists?( directory )
|
|
211
|
+
FileUtils.mkdir( directory )
|
|
212
|
+
return template.copy_to( directory ) + style.copy_to( File.join( directory, Webgen::SRC_DIR) )
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Copies the style files for +style+ to the source directory of the website +directory+
|
|
216
|
+
# overwritting exisiting files.
|
|
217
|
+
def self.use_website_style( directory, style_name )
|
|
218
|
+
style = WebSiteStyle.entries[style_name]
|
|
219
|
+
raise ArgumentError.new( "Invalid website style '#{style_name}'" ) if style.nil?
|
|
220
|
+
src_dir = File.join( directory, Webgen::SRC_DIR )
|
|
221
|
+
raise ArgumentError.new( "Directory <#{src_dir}> does not exist!") unless File.exists?( src_dir )
|
|
222
|
+
return style.copy_to( src_dir )
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Copies the gallery style files for +style+ to the source directory of the website +directory+
|
|
226
|
+
# overwritting exisiting files.
|
|
227
|
+
def self.use_gallery_style( directory, style_name )
|
|
228
|
+
style = GalleryStyle.entries[style_name]
|
|
229
|
+
raise ArgumentError.new( "Invalid gallery style '#{style_name}'" ) if style.nil?
|
|
230
|
+
src_dir = File.join( directory, Webgen::SRC_DIR )
|
|
231
|
+
plugin_dir = File.join( directory, Webgen::PLUGIN_DIR )
|
|
232
|
+
raise ArgumentError.new( "Directory <#{src_dir}> does not exist!") unless File.exists?( src_dir )
|
|
233
|
+
plugin_files = style.plugin_files
|
|
234
|
+
FileUtils.mkdir( plugin_dir ) unless File.exists?( plugin_dir )
|
|
235
|
+
FileUtils.cp( plugin_files, plugin_dir )
|
|
236
|
+
return style.copy_to( src_dir ) + plugin_files.collect {|f| File.join( plugin_dir, File.basename( f ) )}
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
#######
|
|
240
|
+
private
|
|
241
|
+
#######
|
|
242
|
+
|
|
243
|
+
def set_plugin_config( plugin_config )
|
|
244
|
+
@manager.plugin_config = ( plugin_config ? plugin_config : self.class.load_config_file( @directory ) )
|
|
245
|
+
@srcDir = File.join( @directory, Webgen::SRC_DIR )
|
|
246
|
+
outDir = @manager.param_for_plugin( 'Core/Configuration', 'outDir' )
|
|
247
|
+
@outDir = (/^(\/|[A-Za-z]:)/ =~ outDir ? outDir : File.join( @directory, outDir ) )
|
|
248
|
+
@plugin_config = @manager.plugin_config
|
|
249
|
+
@manager.plugin_config = self
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
# Raised when a configuration file has an invalid structure
|
|
256
|
+
class ConfigurationFileInvalid < RuntimeError; end
|
|
257
|
+
|
|
258
|
+
# Represents the configuration file of a website.
|
|
259
|
+
class ConfigurationFile
|
|
260
|
+
|
|
261
|
+
# Returns the whole configuration.
|
|
262
|
+
attr_reader :config
|
|
263
|
+
|
|
264
|
+
# Reads the content of the given configuration file and initialize a new object with it.
|
|
265
|
+
def initialize( config_file )
|
|
266
|
+
if File.exists?( config_file )
|
|
267
|
+
begin
|
|
268
|
+
@config = YAML::load( File.read( config_file ) )
|
|
269
|
+
rescue ArgumentError => e
|
|
270
|
+
raise ConfigurationFileInvalid, e.message
|
|
271
|
+
end
|
|
272
|
+
else
|
|
273
|
+
@config = {}
|
|
274
|
+
end
|
|
275
|
+
check_config
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# See PluginManager#param_for_plugin .
|
|
279
|
+
def param_for_plugin( plugin_name, param )
|
|
280
|
+
if @config.has_key?( plugin_name ) && @config[plugin_name].has_key?( param )
|
|
281
|
+
@config[plugin_name][param]
|
|
282
|
+
else
|
|
283
|
+
PluginParamValueNotFound
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
#######
|
|
288
|
+
private
|
|
289
|
+
#######
|
|
290
|
+
|
|
291
|
+
def check_config
|
|
292
|
+
if !@config.kind_of?( Hash ) || !@config.all? {|k,v| v.kind_of?( Hash )}
|
|
293
|
+
raise ConfigurationFileInvalid.new( 'Structure of config file is not valid, has to be a Hash of Hashes' )
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if !@config.has_key?( 'Core/FileHandler' ) || !@config['Core/FileHandler'].has_key?( 'defaultMetaInfo' )
|
|
297
|
+
@config.each_key do |plugin_name|
|
|
298
|
+
next unless plugin_name =~ /File\//
|
|
299
|
+
if @config[plugin_name]['defaultMetaInfo'].kind_of?( Hash )
|
|
300
|
+
((@config['Core/FileHandler'] ||= {})['defaultMetaInfo'] ||= {})[plugin_name] = @config[plugin_name]['defaultMetaInfo']
|
|
301
|
+
@config[plugin_name].delete( 'defaultMetaInfo' )
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
end
|