bloggit 1.0.3
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/History +4 -0
- data/Manifest +422 -0
- data/Rakefile +64 -0
- data/ReadMe +69 -0
- data/Todo +26 -0
- data/bin/bloggit +5 -0
- data/docs/index.html +57 -0
- data/docs/specifications.html +100 -0
- data/docs/src/_layout.rhtml +53 -0
- data/docs/src/index.markdown +5 -0
- data/docs/src/specifications.markdown +48 -0
- data/lib/bloggit.rb +28 -0
- data/lib/bloggit/boilerplate/Rakefile +2 -0
- data/lib/bloggit/boilerplate/pages/about.page +5 -0
- data/lib/bloggit/boilerplate/plugins/haloscan/init.rb +5 -0
- data/lib/bloggit/boilerplate/settings.yml +28 -0
- data/lib/bloggit/boilerplate/themes/default/styles/main.css +145 -0
- data/lib/bloggit/boilerplate/themes/default/templates/archive.rhtml +20 -0
- data/lib/bloggit/boilerplate/themes/default/templates/home.rhtml +6 -0
- data/lib/bloggit/boilerplate/themes/default/templates/layouts/main.rhtml +15 -0
- data/lib/bloggit/boilerplate/themes/default/templates/layouts/two-columns.rhtml +21 -0
- data/lib/bloggit/boilerplate/themes/default/templates/page.rhtml +8 -0
- data/lib/bloggit/boilerplate/themes/default/templates/post.rhtml +3 -0
- data/lib/bloggit/boilerplate/themes/default/templates/snippets/blog_entry.rhtml +16 -0
- data/lib/bloggit/boilerplate/themes/default/templates/snippets/navigation.rhtml +12 -0
- data/lib/bloggit/boilerplate/themes/default/templates/snippets/tag_list.rhtml +9 -0
- data/lib/bloggit/boilerplate/themes/default/templates/tag_archive.rhtml +38 -0
- data/lib/bloggit/checksum.rb +39 -0
- data/lib/bloggit/client/index.html +2 -0
- data/lib/bloggit/client/scripts/adapter/jquery/ext-jquery-adapter.js +12 -0
- data/lib/bloggit/client/scripts/adapter/jquery/jquery-plugins.js +965 -0
- data/lib/bloggit/client/scripts/adapter/jquery/jquery.js +2201 -0
- data/lib/bloggit/client/scripts/adapter/prototype/effects.js +1098 -0
- data/lib/bloggit/client/scripts/adapter/prototype/ext-prototype-adapter.js +12 -0
- data/lib/bloggit/client/scripts/adapter/prototype/prototype.js +2523 -0
- data/lib/bloggit/client/scripts/adapter/prototype/scriptaculous.js +59 -0
- data/lib/bloggit/client/scripts/adapter/yui/ext-yui-adapter.js +12 -0
- data/lib/bloggit/client/scripts/adapter/yui/yui-utilities.js +18 -0
- data/lib/bloggit/client/scripts/app.js +121 -0
- data/lib/bloggit/client/scripts/ext-all.js +256 -0
- data/lib/bloggit/client/scripts/resources/css/README.txt +3 -0
- data/lib/bloggit/client/scripts/resources/css/basic-dialog.css +286 -0
- data/lib/bloggit/client/scripts/resources/css/box.css +111 -0
- data/lib/bloggit/client/scripts/resources/css/button.css +148 -0
- data/lib/bloggit/client/scripts/resources/css/combo.css +46 -0
- data/lib/bloggit/client/scripts/resources/css/core.css +290 -0
- data/lib/bloggit/client/scripts/resources/css/date-picker.css +155 -0
- data/lib/bloggit/client/scripts/resources/css/dd.css +61 -0
- data/lib/bloggit/client/scripts/resources/css/debug.css +55 -0
- data/lib/bloggit/client/scripts/resources/css/ext-all.css +3167 -0
- data/lib/bloggit/client/scripts/resources/css/form.css +359 -0
- data/lib/bloggit/client/scripts/resources/css/grid.css +295 -0
- data/lib/bloggit/client/scripts/resources/css/layout.css +252 -0
- data/lib/bloggit/client/scripts/resources/css/menu.css +116 -0
- data/lib/bloggit/client/scripts/resources/css/panel.css +258 -0
- data/lib/bloggit/client/scripts/resources/css/qtips.css +119 -0
- data/lib/bloggit/client/scripts/resources/css/reset-min.css +9 -0
- data/lib/bloggit/client/scripts/resources/css/resizable.css +143 -0
- data/lib/bloggit/client/scripts/resources/css/tabs.css +134 -0
- data/lib/bloggit/client/scripts/resources/css/toolbar.css +160 -0
- data/lib/bloggit/client/scripts/resources/css/tree.css +179 -0
- data/lib/bloggit/client/scripts/resources/css/window.css +155 -0
- data/lib/bloggit/client/scripts/resources/css/ytheme-aero.css +581 -0
- data/lib/bloggit/client/scripts/resources/css/ytheme-gray.css +438 -0
- data/lib/bloggit/client/scripts/resources/css/ytheme-vista.css +511 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/aero-close-over.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/aero-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/bg-center.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/bg-left.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/bg-right.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/collapse-over.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/expand-over.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/hd-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/basic-dialog/w-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/grid-blue-split.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/grid-hrow.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/grid-split.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/grid-vista-hd.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/pspbrwse.jbf +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/sort-col-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/sort_asc.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/grid/sort_desc.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/ns-collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/ns-expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/panel-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/panel-title-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/panel-title-light-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/tab-close-on.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/layout/tab-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/qtip/bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/s.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/e-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/ne-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/ne-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/nw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/nw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/s-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/se-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/sw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/sizer/sw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-btm-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-btm-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-strip-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-strip-bg.png +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/tabs/tab-strip-btm-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/toolbar/bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/aero/toolbar/tb-btn-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/btn-arrow.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/btn-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/hd-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/progress.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/progress2.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/basic-dialog/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/corners-blue.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/corners.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/l-blue.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/l.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/r-blue.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/r.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/tb-blue.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/box/tb.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/dd/drop-add.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/dd/drop-no.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/dd/drop-yes.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/form/date-trigger.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/form/error-tip-corners.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/form/exclamation.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/form/text-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/form/trigger.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/Thumbs.db +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/arrow-left-white.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/arrow-right-white.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/col-move-bottom.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/col-move-top.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/dirty.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/done.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/drop-no.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/drop-yes.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/footer-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/grid-blue-hd.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/grid-blue-split.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/grid-hrow.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/grid-loading.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/grid-split.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/grid-vista-hd.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hd-pop.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hmenu-asc.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hmenu-desc.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hmenu-lock.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hmenu-lock.png +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hmenu-unlock.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/hmenu-unlock.png +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/invalid_line.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/loading.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/mso-hd.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/nowait.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-first-disabled.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-first.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-last-disabled.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-last.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-next-disabled.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-next.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-prev-disabled.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/page-prev.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/pick-button.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/refresh.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/sort_asc.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/sort_desc.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/grid/wait.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/ns-collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/ns-expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/panel-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/panel-title-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/panel-title-light-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/stick.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/stuck.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/tab-close-on.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/layout/tab-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/menu/checked.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/menu/group-checked.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/menu/menu-parent.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/menu/menu.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/menu/unchecked.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/qtip/bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/qtip/close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/qtip/tip-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/s.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shadow-c.png +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shadow-lr.png +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shadow.png +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shared/calendar.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shared/left-btn.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shared/right-btn.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/shared/warning.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/e-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/ne-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/ne-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/nw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/nw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/s-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/se-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/square.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/sw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/sizer/sw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tabs/tab-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/toolbar/btn-arrow.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/toolbar/btn-over-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/toolbar/gray-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/toolbar/tb-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/drop-add.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/drop-between.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/drop-no.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/drop-over.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/drop-under.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/drop-yes.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-end-minus.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-end-plus.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-end.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-line.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-minus-nl.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-minus.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-plus-nl.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow-plus.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/elbow.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/folder-open.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/folder.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/leaf.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/loading.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/default/tree/s.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/dlg-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/hd-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/basic-dialog/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/grid/grid-hrow.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/ns-collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/ns-expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/panel-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/panel-title-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/panel-title-light-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/stick.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/tab-close-on.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/layout/tab-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/menu/checked.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/menu/group-checked.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/menu/menu-parent.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/menu/menu.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/menu/unchecked.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/qtip/bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/qtip/tip-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/s.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/e-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/ne-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/ne-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/nw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/nw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/s-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/se-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/sw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/sizer/sw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/tabs/tab-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/toolbar/gray-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/bg-center.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/bg-left.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/bg-right.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/dlg-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/hd-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/basic-dialog/w-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/grid/grid-split.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/grid/grid-vista-hd.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/gradient-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/ns-collapse.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/ns-expand.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/panel-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/panel-title-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/panel-title-light-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/stick.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/tab-close-on.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/layout/tab-close.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/qtip/bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/qtip/tip-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/s.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/e-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/e-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/ne-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/ne-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/nw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/nw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/s-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/s-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/se-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/se-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/sw-handle-dark.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/sizer/sw-handle.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/tabs/tab-btm-left-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/tabs/tab-btm-right-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/tabs/tab-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/toolbar/gray-bg.gif +0 -0
- data/lib/bloggit/client/scripts/resources/images/vista/toolbar/tb-btn-sprite.gif +0 -0
- data/lib/bloggit/client/scripts/resources/license.txt +25 -0
- data/lib/bloggit/client/scripts/resources/raw-images/shadow.psd +0 -0
- data/lib/bloggit/client/scripts/resources/resources.jsb +522 -0
- data/lib/bloggit/client/templates/json.rhtml +5 -0
- data/lib/bloggit/client/templates/main.rhtml +109 -0
- data/lib/bloggit/commandline.rb +52 -0
- data/lib/bloggit/commands/page_cmd.rb +17 -0
- data/lib/bloggit/commands/plugin_cmd.rb +89 -0
- data/lib/bloggit/commands/post_cmd.rb +17 -0
- data/lib/bloggit/commands/site_cmd.rb +82 -0
- data/lib/bloggit/commands/theme_cmd.rb +16 -0
- data/lib/bloggit/etc/hash.rb +24 -0
- data/lib/bloggit/etc/string.rb +5 -0
- data/lib/bloggit/generator.rb +331 -0
- data/lib/bloggit/hooks.rb +21 -0
- data/lib/bloggit/media.rb +40 -0
- data/lib/bloggit/page.rb +98 -0
- data/lib/bloggit/plugin.rb +52 -0
- data/lib/bloggit/post.rb +169 -0
- data/lib/bloggit/publisher.rb +115 -0
- data/lib/bloggit/server.rb +102 -0
- data/lib/bloggit/site.rb +183 -0
- data/lib/bloggit/tag.rb +61 -0
- data/lib/bloggit/tasks/client.rb +9 -0
- data/lib/bloggit/tasks/publishing.rb +36 -0
- data/lib/bloggit/tasks/scm.rb +78 -0
- data/lib/bloggit/tasks/specs.rb +128 -0
- data/lib/bloggit/template.rb +334 -0
- data/lib/bloggit/text_formatter.rb +50 -0
- data/lib/util/fixed_hoe.rb +553 -0
- data/test/fixtures/test.blog/Rakefile +7 -0
- data/test/fixtures/test.blog/pages/about.page +7 -0
- data/test/fixtures/test.blog/pages/coming-soon.page +3 -0
- data/test/fixtures/test.blog/pages/todo.page +23 -0
- data/test/fixtures/test.blog/plugins/example/init.rb +69 -0
- data/test/fixtures/test.blog/plugins/haloscan/init.rb +25 -0
- data/test/fixtures/test.blog/plugins/js_search/init.rb +51 -0
- data/test/fixtures/test.blog/plugins/rdoc_formatter/init.rb +14 -0
- data/test/fixtures/test.blog/posts/2004.03.07_to-boldly-go.post +11 -0
- data/test/fixtures/test.blog/posts/2007.03.25_sure-whatever.post +10 -0
- data/test/fixtures/test.blog/posts/2007.03.27_rdoc-anyone.post +13 -0
- data/test/fixtures/test.blog/posts/2010.12.07_35-already.post +5 -0
- data/test/fixtures/test.blog/settings.yml +34 -0
- data/test/fixtures/test.blog/themes/default/styles/main.css +145 -0
- data/test/fixtures/test.blog/themes/default/templates/archive.rhtml +22 -0
- data/test/fixtures/test.blog/themes/default/templates/home.rhtml +9 -0
- data/test/fixtures/test.blog/themes/default/templates/layouts/main.rhtml +17 -0
- data/test/fixtures/test.blog/themes/default/templates/layouts/two-columns.rhtml +21 -0
- data/test/fixtures/test.blog/themes/default/templates/page.rhtml +8 -0
- data/test/fixtures/test.blog/themes/default/templates/post.rhtml +15 -0
- data/test/fixtures/test.blog/themes/default/templates/snippets/blog_entry.rhtml +10 -0
- data/test/fixtures/test.blog/themes/default/templates/snippets/navigation.rhtml +12 -0
- data/test/fixtures/test.blog/themes/default/templates/snippets/tag_list.rhtml +9 -0
- data/test/fixtures/test.blog/themes/default/templates/tag_archive.rhtml +41 -0
- data/test/helpers.rb +25 -0
- data/test/unit/bloggit_test.rb +9 -0
- data/test/unit/page_test.rb +28 -0
- data/test/unit/post_test.rb +36 -0
- data/test/unit/site_test.rb +27 -0
- data/test/unit/template_test.rb +21 -0
- data/test/unit/text_formatter_test.rb +43 -0
- metadata +520 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# See Bloggit::TextFormatter
|
|
2
|
+
|
|
3
|
+
require 'redcloth'
|
|
4
|
+
require 'bluecloth'
|
|
5
|
+
|
|
6
|
+
module Bloggit
|
|
7
|
+
# = TextFormatter
|
|
8
|
+
#
|
|
9
|
+
# Default text formatters are: :textile, :markdown, and :simple
|
|
10
|
+
#
|
|
11
|
+
module TextFormatter
|
|
12
|
+
class << self
|
|
13
|
+
|
|
14
|
+
# Registers a formatter block with a given name.
|
|
15
|
+
#
|
|
16
|
+
# In pages or posts, you can specify the text format in the header using:
|
|
17
|
+
#
|
|
18
|
+
# format: Textile+.
|
|
19
|
+
#
|
|
20
|
+
# Bloggit will look for a TextFormatter that's been registered as :textile
|
|
21
|
+
def register(name, &block)
|
|
22
|
+
name = name.to_s.downcase.to_sym
|
|
23
|
+
@formatters ||= {}
|
|
24
|
+
@formatters[name] = block
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns the processed text using the specified format, or the original text
|
|
28
|
+
# if the format isn't recognized.
|
|
29
|
+
def render(text, format)
|
|
30
|
+
format = format.to_s.downcase.to_sym #unless format.is_a?(Symbol)
|
|
31
|
+
formatter = @formatters.fetch(format, Proc.new {|text| raise "Could not format text as '#{format}'" })
|
|
32
|
+
formatter.call( text )
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
Bloggit::TextFormatter.register :textile do |text|
|
|
41
|
+
RedCloth.new(text).to_html
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
Bloggit::TextFormatter.register :markdown do |text|
|
|
45
|
+
BlueCloth.new(text).to_html
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
Bloggit::TextFormatter.register :simple do |text|
|
|
49
|
+
text.gsub("\n", "<br/>\n")
|
|
50
|
+
end
|
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
# THIS IS A FIXED HOE! It doesn't cater to crappy Windoze by
|
|
2
|
+
# adding '.txt' extensions to all the files. Nor does it add itself
|
|
3
|
+
# as a dependency to the generated gem.
|
|
4
|
+
|
|
5
|
+
=begin
|
|
6
|
+
Copyright (c) 2006 Ryan Davis, Zen Spider Software
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
9
|
+
a copy of this software and associated documentation files (the
|
|
10
|
+
"Software"), to deal in the Software without restriction, including
|
|
11
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
12
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
13
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
14
|
+
the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be
|
|
17
|
+
included in all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
21
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
22
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
23
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
24
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
25
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
+
=end
|
|
27
|
+
|
|
28
|
+
require 'rubygems'
|
|
29
|
+
require 'rake'
|
|
30
|
+
require 'rake/contrib/sshpublisher'
|
|
31
|
+
require 'rake/gempackagetask'
|
|
32
|
+
require 'rake/rdoctask'
|
|
33
|
+
require 'rake/testtask'
|
|
34
|
+
require 'rbconfig'
|
|
35
|
+
require 'rubyforge'
|
|
36
|
+
|
|
37
|
+
##
|
|
38
|
+
# hoe - a tool to help rake
|
|
39
|
+
#
|
|
40
|
+
# Hoe is a simple rake/rubygems helper for project Rakefiles. It
|
|
41
|
+
# generates all the usual tasks for projects including rdoc generation,
|
|
42
|
+
# testing, packaging, and deployment.
|
|
43
|
+
#
|
|
44
|
+
#
|
|
45
|
+
# M@: THIS IS A Fixed HOE! It doesn't cater to Windoze by
|
|
46
|
+
# adding '.txt' extensions to all the files. Nor does it add itself
|
|
47
|
+
# as a dependency to the generated gem.
|
|
48
|
+
#
|
|
49
|
+
# == Using Hoe
|
|
50
|
+
#
|
|
51
|
+
# === Basics
|
|
52
|
+
#
|
|
53
|
+
# Use this as a minimal starting point:
|
|
54
|
+
#
|
|
55
|
+
# require 'hoe'
|
|
56
|
+
#
|
|
57
|
+
# Hoe.new("project_name", '1.0.0') do |p|
|
|
58
|
+
# p.rubyforge_name = "rf_project"
|
|
59
|
+
# # add other details here
|
|
60
|
+
# end
|
|
61
|
+
#
|
|
62
|
+
# # add other tasks here
|
|
63
|
+
#
|
|
64
|
+
# === Tasks Provided:
|
|
65
|
+
#
|
|
66
|
+
# * announce - Generate email announcement file and post to rubyforge.
|
|
67
|
+
# * audit - Run ZenTest against the package
|
|
68
|
+
# * check_manifest - Verify the manifest
|
|
69
|
+
# * clean - Clean up all the extras
|
|
70
|
+
# * config_hoe - Create a fresh ~/.hoerc file
|
|
71
|
+
# * debug_gem - Show information about the gem.
|
|
72
|
+
# * default - Run the default tasks
|
|
73
|
+
# * api_docs - Build the docs HTML Files
|
|
74
|
+
# * email - Generate email announcement file.
|
|
75
|
+
# * install - Install the package. Uses PREFIX and RUBYLIB
|
|
76
|
+
# * install_gem - Install the package as a gem
|
|
77
|
+
# * multi - Run the test suite using multiruby
|
|
78
|
+
# * package - Build all the packages
|
|
79
|
+
# * post_blog - Post announcement to blog.
|
|
80
|
+
# * post_news - Post announcement to rubyforge.
|
|
81
|
+
# * publish_docs - Publish RDoc to RubyForge
|
|
82
|
+
# * release - Package and upload the release to rubyforge.
|
|
83
|
+
# * ridocs - Generate ri locally for testing
|
|
84
|
+
# * test - Run the test suite. Use FILTER to add to the command line.
|
|
85
|
+
# * test_deps - Show which test files fail when run alone.
|
|
86
|
+
# * uninstall - Uninstall the package.
|
|
87
|
+
#
|
|
88
|
+
# === Attributes
|
|
89
|
+
#
|
|
90
|
+
# The attributes that you can provide inside the new block above are:
|
|
91
|
+
#
|
|
92
|
+
# ==== Mandatory
|
|
93
|
+
#
|
|
94
|
+
# * name - The name of the release.
|
|
95
|
+
# * version - The version. Don't hardcode! use a constant in the project.
|
|
96
|
+
#
|
|
97
|
+
# ==== Damn Good to Set
|
|
98
|
+
#
|
|
99
|
+
# * author - The author of the package. (can be array of authors)
|
|
100
|
+
# * changes - A description of the release's latest changes.
|
|
101
|
+
# * description - A description of the project.
|
|
102
|
+
# * email - The author's email address. (can be array of urls)
|
|
103
|
+
# * summary - A short summary of the project.
|
|
104
|
+
# * url - The url of the project.
|
|
105
|
+
#
|
|
106
|
+
# ==== Optional
|
|
107
|
+
#
|
|
108
|
+
# * clean_globs - An array of file patterns to delete on clean.
|
|
109
|
+
# * extra_deps - An array of rubygem dependencies.
|
|
110
|
+
# * need_tar - Should package create a tarball? [default: true]
|
|
111
|
+
# * need_zip - Should package create a zipfile? [default: false]
|
|
112
|
+
# * rdoc_pattern - A regexp to match documentation files against the manifest.
|
|
113
|
+
# * rubyforge_name - The name of the rubyforge project. [default: name.downcase]
|
|
114
|
+
# * spec_extras - A hash of extra values to set in the gemspec.
|
|
115
|
+
# * test_globs - An array of test file patterns [default: test/**/test_*.rb]
|
|
116
|
+
#
|
|
117
|
+
# === Environment Variables
|
|
118
|
+
#
|
|
119
|
+
# * FILTER - Used to add flags to test_unit (e.g., -n test_borked)
|
|
120
|
+
# * PREFIX - Used to specify a custom install location (for rake install).
|
|
121
|
+
# * RUBY_DEBUG - Used to add extra flags to RUBY_FLAGS.
|
|
122
|
+
# * RUBY_FLAGS - Used to specify flags to ruby [has smart default].
|
|
123
|
+
|
|
124
|
+
class FixedHoe #:nodoc:
|
|
125
|
+
VERSION = '1.2.0'
|
|
126
|
+
|
|
127
|
+
rubyprefix = Config::CONFIG['prefix']
|
|
128
|
+
sitelibdir = Config::CONFIG['sitelibdir']
|
|
129
|
+
|
|
130
|
+
PREFIX = ENV['PREFIX'] || rubyprefix
|
|
131
|
+
RUBYLIB = if PREFIX == rubyprefix then
|
|
132
|
+
sitelibdir
|
|
133
|
+
else
|
|
134
|
+
File.join(PREFIX, sitelibdir[rubyprefix.size..-1])
|
|
135
|
+
end
|
|
136
|
+
RUBY_DEBUG = ENV['RUBY_DEBUG']
|
|
137
|
+
RUBY_FLAGS = ENV['RUBY_FLAGS'] ||
|
|
138
|
+
"-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}" +
|
|
139
|
+
(RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
|
|
140
|
+
FILTER = ENV['FILTER'] # for tests (eg FILTER="-n test_blah")
|
|
141
|
+
|
|
142
|
+
attr_accessor :author, :bin_files, :changes, :clean_globs, :description, :email, :extra_deps, :lib_files, :name, :need_tar, :need_zip, :rdoc_pattern, :rubyforge_name, :spec, :spec_extras, :summary, :test_files, :test_globs, :url, :version
|
|
143
|
+
|
|
144
|
+
def initialize(name, version)
|
|
145
|
+
self.name = name
|
|
146
|
+
self.version = version
|
|
147
|
+
|
|
148
|
+
# Defaults
|
|
149
|
+
self.rubyforge_name = name.downcase
|
|
150
|
+
self.url = "http://www.zenspider.com/ZSS/Products/#{name}/"
|
|
151
|
+
self.author = "Ryan Davis"
|
|
152
|
+
self.email = "ryand-ruby@zenspider.com"
|
|
153
|
+
self.clean_globs = %w(diff diff email ri *.gem **/*~)
|
|
154
|
+
self.test_globs = ['test/**/test_*.rb']
|
|
155
|
+
self.changes = "The author was too lazy to write a changeset"
|
|
156
|
+
self.description = "The author was too lazy to write a description"
|
|
157
|
+
self.summary = "The author was too lazy to write a summary"
|
|
158
|
+
self.rdoc_pattern = /^(lib|bin)|txt$/
|
|
159
|
+
self.extra_deps = []
|
|
160
|
+
self.spec_extras = {}
|
|
161
|
+
self.need_tar = true
|
|
162
|
+
self.need_zip = false
|
|
163
|
+
|
|
164
|
+
yield self if block_given?
|
|
165
|
+
|
|
166
|
+
hoe_deps = {
|
|
167
|
+
'rake' => ">= #{RAKEVERSION}",
|
|
168
|
+
'rubyforge' => ">= #{::RubyForge::VERSION}",
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
self.extra_deps = Array(extra_deps) # just in case user used = instead of <<
|
|
172
|
+
self.extra_deps = [extra_deps] unless
|
|
173
|
+
extra_deps.empty? or Array === extra_deps.first
|
|
174
|
+
if name == 'hoe' then
|
|
175
|
+
hoe_deps.each do |pkg, version|
|
|
176
|
+
extra_deps << [pkg, version]
|
|
177
|
+
end
|
|
178
|
+
#else
|
|
179
|
+
# extra_deps << ['hoe', ">= #{VERSION}"] unless hoe_deps.has_key? name
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
define_tasks
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def define_tasks
|
|
186
|
+
desc 'Run the test suite. Use FILTER to add to the command line.'
|
|
187
|
+
task :all_test do
|
|
188
|
+
run_tests
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
desc 'Show which test files fail when run alone.'
|
|
192
|
+
task :test_deps do
|
|
193
|
+
tests = Dir["test/**/test_*.rb"] + Dir["test/**/*_test.rb"]
|
|
194
|
+
|
|
195
|
+
tests.each do |test|
|
|
196
|
+
if not system "ruby -Ibin:lib:test #{test} &> /dev/null" then
|
|
197
|
+
puts "Dependency Issues: #{test}"
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
desc 'Run the test suite using multiruby'
|
|
203
|
+
task :multi do
|
|
204
|
+
run_tests :multi
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
############################################################
|
|
208
|
+
# Packaging and Installing
|
|
209
|
+
|
|
210
|
+
self.spec = Gem::Specification.new do |s|
|
|
211
|
+
s.name = name
|
|
212
|
+
s.version = version
|
|
213
|
+
s.summary = summary
|
|
214
|
+
case author
|
|
215
|
+
when Array
|
|
216
|
+
s.authors = author
|
|
217
|
+
else
|
|
218
|
+
s.author = author
|
|
219
|
+
end
|
|
220
|
+
s.email = email
|
|
221
|
+
s.homepage = Array(url).first
|
|
222
|
+
s.rubyforge_project = rubyforge_name
|
|
223
|
+
|
|
224
|
+
s.description = description
|
|
225
|
+
|
|
226
|
+
extra_deps.each do |dep|
|
|
227
|
+
s.add_dependency(*dep)
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
s.files = File.read("Manifest").split
|
|
231
|
+
s.executables = s.files.grep(/bin/) { |f| File.basename(f) }
|
|
232
|
+
|
|
233
|
+
s.bindir = "bin"
|
|
234
|
+
dirs = Dir['{lib,ext}']
|
|
235
|
+
s.require_paths = dirs unless dirs.empty?
|
|
236
|
+
s.has_rdoc = true
|
|
237
|
+
|
|
238
|
+
if test ?f, "test/test_all.rb" then
|
|
239
|
+
s.test_file = "test/test_all.rb"
|
|
240
|
+
else
|
|
241
|
+
s.test_files = Dir[*test_globs]
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Do any extra stuff the user wants
|
|
245
|
+
spec_extras.each do |msg, val|
|
|
246
|
+
case val
|
|
247
|
+
when Proc
|
|
248
|
+
val.call(s.send(msg))
|
|
249
|
+
else
|
|
250
|
+
s.send "#{msg}=", val
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
desc 'Show information about the gem.'
|
|
256
|
+
task :debug_gem do
|
|
257
|
+
puts spec.to_ruby
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
self.lib_files = spec.files.grep(/^(lib|ext)/)
|
|
261
|
+
self.bin_files = spec.files.grep(/^bin/)
|
|
262
|
+
self.test_files = spec.files.grep(/^test/)
|
|
263
|
+
|
|
264
|
+
Rake::GemPackageTask.new spec do |pkg|
|
|
265
|
+
pkg.need_tar = @need_tar
|
|
266
|
+
pkg.need_zip = @need_zip
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
desc 'Install the package. Uses PREFIX and RUBYLIB'
|
|
270
|
+
task :install do
|
|
271
|
+
[
|
|
272
|
+
[lib_files + test_files, RUBYLIB, 0444],
|
|
273
|
+
[bin_files, File.join(PREFIX, 'bin'), 0555]
|
|
274
|
+
].each do |files, dest, mode|
|
|
275
|
+
FileUtils.mkdir_p dest unless test ?d, dest
|
|
276
|
+
files.each do |file|
|
|
277
|
+
install file, dest, :mode => mode
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
desc 'Install the package as a gem'
|
|
283
|
+
task :install_gem => [:clean, :package] do
|
|
284
|
+
sh "sudo gem install pkg/*.gem"
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
desc 'Uninstall the package.'
|
|
288
|
+
task :uninstall do
|
|
289
|
+
Dir.chdir RUBYLIB do
|
|
290
|
+
rm_f((lib_files + test_files).map { |f| File.basename f })
|
|
291
|
+
end
|
|
292
|
+
Dir.chdir File.join(PREFIX, 'bin') do
|
|
293
|
+
rm_f bin_files.map { |f| File.basename f }
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
desc 'Package and upload the release to rubyforge.'
|
|
298
|
+
task :release => [:clean, :package] do |t|
|
|
299
|
+
v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
|
|
300
|
+
abort "Versions don't match #{v} vs #{version}" if v != version
|
|
301
|
+
pkg = "pkg/#{name}-#{version}"
|
|
302
|
+
|
|
303
|
+
if $DEBUG then
|
|
304
|
+
puts "release_id = rf.add_release #{rubyforge_name.inspect}, #{name.inspect}, #{version.inspect}, \"#{pkg}.tgz\""
|
|
305
|
+
puts "rf.add_file #{rubyforge_name.inspect}, #{name.inspect}, release_id, \"#{pkg}.gem\""
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
rf = RubyForge.new
|
|
309
|
+
puts "Logging in"
|
|
310
|
+
rf.login
|
|
311
|
+
|
|
312
|
+
c = rf.userconfig
|
|
313
|
+
c["release_notes"] = description if description
|
|
314
|
+
c["release_changes"] = changes if changes
|
|
315
|
+
c["preformatted"] = true
|
|
316
|
+
|
|
317
|
+
files = [(@need_tar ? "#{pkg}.tgz" : nil),
|
|
318
|
+
(@need_zip ? "#{pkg}.zip" : nil),
|
|
319
|
+
"#{pkg}.gem"].compact
|
|
320
|
+
|
|
321
|
+
puts "Releasing #{name} v. #{version}"
|
|
322
|
+
rf.add_release rubyforge_name, name, version, *files
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
############################################################
|
|
326
|
+
# Doco
|
|
327
|
+
|
|
328
|
+
Rake::RDocTask.new(:api_docs) do |rd|
|
|
329
|
+
rd.main = "ReadMe"
|
|
330
|
+
rd.options << '-d' if RUBY_PLATFORM !~ /win32/ and `which dot` =~ /\/dot/
|
|
331
|
+
rd.rdoc_dir = 'docs/api_docs'
|
|
332
|
+
files = spec.files.grep(rdoc_pattern)
|
|
333
|
+
files << 'ReadMe'
|
|
334
|
+
files << 'History'
|
|
335
|
+
files -= ['Manifest']
|
|
336
|
+
rd.rdoc_files.push(*files)
|
|
337
|
+
|
|
338
|
+
title = "#{name}-#{version} Documentation"
|
|
339
|
+
title = "#{rubyforge_name}'s " + title if rubyforge_name != title
|
|
340
|
+
|
|
341
|
+
rd.options << "-t #{title}"
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
desc "Generate ri locally for testing"
|
|
345
|
+
task :ridocs => :clean do
|
|
346
|
+
sh %q{ rdoc --ri -o ri . }
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
desc 'Publish RDoc to RubyForge'
|
|
350
|
+
task :publish_docs => [:clean, :api_docs] do
|
|
351
|
+
config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
|
|
352
|
+
host = "#{config["username"]}@rubyforge.org"
|
|
353
|
+
remote_dir = "/var/www/gforge-projects/#{rubyforge_name}/#{name}"
|
|
354
|
+
local_dir = 'docs/api_docs'
|
|
355
|
+
sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}}
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# no doco for this one
|
|
359
|
+
task :publish_on_announce do
|
|
360
|
+
with_config do |rc, path|
|
|
361
|
+
if rc["publish_on_announce"] then
|
|
362
|
+
Rake::Task['publish_docs'].invoke
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
############################################################
|
|
368
|
+
# Misc/Maintenance:
|
|
369
|
+
|
|
370
|
+
def with_config(create=false)
|
|
371
|
+
require 'yaml'
|
|
372
|
+
rc = File.expand_path("~/.hoerc")
|
|
373
|
+
|
|
374
|
+
unless create then
|
|
375
|
+
if test ?f, rc then
|
|
376
|
+
config = YAML.load_file(rc)
|
|
377
|
+
yield(config, rc)
|
|
378
|
+
end
|
|
379
|
+
else
|
|
380
|
+
unless test ?f, rc then
|
|
381
|
+
yield(rc)
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
desc 'Run ZenTest against the package'
|
|
387
|
+
task :audit do
|
|
388
|
+
libs = %w(lib test ext).join(File::PATH_SEPARATOR)
|
|
389
|
+
sh "zentest -I=#{libs} #{spec.files.grep(/^(lib|test)/).join(' ')}"
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
desc 'Clean up all the extras'
|
|
393
|
+
task :clean => [ :clobber_api_docs, :clobber_package ] do
|
|
394
|
+
clean_globs.each do |pattern|
|
|
395
|
+
files = Dir[pattern]
|
|
396
|
+
rm_rf files unless files.empty?
|
|
397
|
+
end
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
desc 'Create a fresh ~/.hoerc file'
|
|
401
|
+
task :config_hoe do
|
|
402
|
+
with_config(:create) do |rc, path|
|
|
403
|
+
blog = {
|
|
404
|
+
"publish_on_announce" => false,
|
|
405
|
+
"blogs" => [ {
|
|
406
|
+
"user" => "user",
|
|
407
|
+
"url" => "url",
|
|
408
|
+
"extra_headers" => {
|
|
409
|
+
"mt_convert_breaks" => "markdown"
|
|
410
|
+
},
|
|
411
|
+
"blog_id" => "blog_id",
|
|
412
|
+
"password"=>"password",
|
|
413
|
+
} ],
|
|
414
|
+
}
|
|
415
|
+
File.open(rc, "w") do |f|
|
|
416
|
+
YAML.dump(blog, f)
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
with_config do |rc, path|
|
|
421
|
+
editor = ENV['EDITOR'] || 'vi'
|
|
422
|
+
system "#{editor} #{path}"
|
|
423
|
+
end
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
desc 'Generate email announcement file.'
|
|
427
|
+
task :email do
|
|
428
|
+
require 'rubyforge'
|
|
429
|
+
subject, title, body, urls = announcement
|
|
430
|
+
|
|
431
|
+
File.open("email", "w") do |mail|
|
|
432
|
+
mail.puts "Subject: [ANN] #{subject}"
|
|
433
|
+
mail.puts
|
|
434
|
+
mail.puts title
|
|
435
|
+
mail.puts
|
|
436
|
+
mail.puts urls
|
|
437
|
+
mail.puts
|
|
438
|
+
mail.puts body
|
|
439
|
+
mail.puts
|
|
440
|
+
mail.puts urls
|
|
441
|
+
end
|
|
442
|
+
puts "Created email"
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
desc 'Post announcement to blog.'
|
|
446
|
+
task :post_blog do
|
|
447
|
+
require 'xmlrpc/client'
|
|
448
|
+
|
|
449
|
+
with_config do |config, path|
|
|
450
|
+
subject, title, body, urls = announcement
|
|
451
|
+
config['blogs'].each do |site|
|
|
452
|
+
server = XMLRPC::Client.new2(site['url'])
|
|
453
|
+
content = site['extra_headers'].merge(:title => title,
|
|
454
|
+
:description => body)
|
|
455
|
+
result = server.call('metaWeblog.newPost',
|
|
456
|
+
site['blog_id'],
|
|
457
|
+
site['user'],
|
|
458
|
+
site['password'],
|
|
459
|
+
content,
|
|
460
|
+
true)
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
desc 'Post announcement to rubyforge.'
|
|
466
|
+
task :post_news do
|
|
467
|
+
require 'rubyforge'
|
|
468
|
+
subject, title, body, urls = announcement
|
|
469
|
+
|
|
470
|
+
rf = RubyForge.new
|
|
471
|
+
rf.login
|
|
472
|
+
rf.post_news(rubyforge_name, subject, "#{title}\n\n#{body}")
|
|
473
|
+
puts "Posted to rubyforge"
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
desc 'Generate email announcement file and post to rubyforge.'
|
|
477
|
+
task :announce => [:email, :post_news, :post_blog, :publish_on_announce ]
|
|
478
|
+
|
|
479
|
+
desc "Verify the manifest"
|
|
480
|
+
task :check_manifest => :clean do
|
|
481
|
+
f = "Manifest.tmp"
|
|
482
|
+
require 'find'
|
|
483
|
+
files = []
|
|
484
|
+
Find.find '.' do |path|
|
|
485
|
+
next unless File.file? path
|
|
486
|
+
next if path =~ /\.svn|tmp$|CVS/
|
|
487
|
+
files << path[2..-1]
|
|
488
|
+
end
|
|
489
|
+
files = files.sort.join "\n"
|
|
490
|
+
File.open f, 'w' do |fp| fp.puts files end
|
|
491
|
+
system "diff -du Manifest #{f}"
|
|
492
|
+
rm f
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
desc "Create the manifest"
|
|
496
|
+
task :create_manifest => :clean do
|
|
497
|
+
f = "Manifest"
|
|
498
|
+
require 'find'
|
|
499
|
+
files = []
|
|
500
|
+
Find.find '.' do |path|
|
|
501
|
+
next unless File.file? path
|
|
502
|
+
next if path =~ /\.svn|tmp$|CVS/
|
|
503
|
+
files << path[2..-1]
|
|
504
|
+
end
|
|
505
|
+
files = files.sort.join "\n"
|
|
506
|
+
File.open f, 'w' do |fp| fp.puts files end
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
end # end define
|
|
510
|
+
|
|
511
|
+
def announcement
|
|
512
|
+
urls = " " + Array(url).map {|s| s.strip}.join("\n ")
|
|
513
|
+
|
|
514
|
+
subject = "#{name} #{version} Released"
|
|
515
|
+
title = "#{name} version #{version} has been released!"
|
|
516
|
+
body = "#{description}\n\nChanges:\n\n#{changes}"
|
|
517
|
+
|
|
518
|
+
return subject, title, body, urls
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
def run_tests(multi=false) # :nodoc:
|
|
522
|
+
msg = multi ? :sh : :ruby
|
|
523
|
+
cmd = if test ?f, 'test/test_all.rb' then
|
|
524
|
+
"#{RUBY_FLAGS} test/test_all.rb #{FILTER}"
|
|
525
|
+
else
|
|
526
|
+
tests = test_globs.map { |g| Dir.glob(g) }.flatten << 'test/unit'
|
|
527
|
+
tests.map! {|f| %Q(require "#{f}")}
|
|
528
|
+
"#{RUBY_FLAGS} -e '#{tests.join("; ")}' #{FILTER}"
|
|
529
|
+
end
|
|
530
|
+
cmd = "multiruby #{cmd}" if multi
|
|
531
|
+
send msg, cmd
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
##
|
|
535
|
+
# Reads a file at +path+ and spits out an array of the +paragraphs+ specified
|
|
536
|
+
#
|
|
537
|
+
# changes = p.paragraphs_of('History', 0..1).join("\n\n")
|
|
538
|
+
# summary, *description = p.paragraphs_of('Readme', 3, 3..8)
|
|
539
|
+
|
|
540
|
+
def paragraphs_of(path, *paragraphs)
|
|
541
|
+
file = File.read(path)
|
|
542
|
+
file.split(/\n\n+/).values_at(*paragraphs)
|
|
543
|
+
end
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
class ::Rake::SshDirPublisher # :nodoc:
|
|
547
|
+
attr_reader :host, :remote_dir, :local_dir
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
if $0 == __FILE__ then
|
|
551
|
+
out = `rake -T | egrep -v "redocs|repackage|clobber|trunk"`
|
|
552
|
+
puts out.gsub(/\#/, '-').gsub(/^rake /, '# * ')
|
|
553
|
+
end
|