rottenegg 1.2.5.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/.rvmrc +1 -0
- data/Gemfile +14 -0
- data/README.rdoc +47 -0
- data/Rakefile +2 -0
- data/bin/rottenegg +4 -0
- data/bin/rottenegg_gen +55 -0
- data/lib/rotten_egg.rb +14 -0
- data/lib/rotten_egg/app_setting.rb +76 -0
- data/lib/rotten_egg/application.rb +299 -0
- data/lib/rotten_egg/message_logger.rb +36 -0
- data/lib/rotten_egg/scm.rb +229 -0
- data/lib/rotten_egg/server.rb +238 -0
- data/lib/rotten_egg/user.rb +30 -0
- data/lib/rotten_egg/util.rb +381 -0
- data/lib/rotten_egg/version.rb +4 -0
- data/public/javascripts/extjs4/bootstrap.js +58 -0
- data/public/javascripts/extjs4/ext-all.js +7 -0
- data/public/javascripts/extjs4/ext.js +7 -0
- data/public/javascripts/extjs4/resources/css/ext-all.css +1 -0
- data/public/javascripts/extjs4/resources/themes/images/default/boundlist/trigger-arrow.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-disabled-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-focus-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-focus-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-focus-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-pressed-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-pressed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-pressed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-disabled-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-focus-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-focus-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-focus-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-pressed-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-pressed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-pressed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-disabled-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-focus-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-focus-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-focus-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-pressed-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-pressed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-pressed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-focus-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-focus-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-focus-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-focus-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-focus-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-focus-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/arrow.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/btn.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/group-cs.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/group-lr.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/group-tb.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-b-noline.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-b.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-bo.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-light.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-noline.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-o.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-footer-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-footer-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-header-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-header-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/dd/drop-add.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/dd/drop-no.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/dd/drop-yes.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/editor/tb-sprite.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/checkbox.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/clear-trigger.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/date-trigger.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/error-tip-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/exclamation.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/radio.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/search-trigger.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/spinner-small.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/spinner.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/text-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/trigger-square.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/trigger-tpl.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/form/trigger.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/arrow-left-white.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/arrow-right-white.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-selected-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-selected-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/checked.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/col-move-bottom.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/col-move-top.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-over-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/columns.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-left.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-left.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-right.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-right.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/dirty.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/done.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/drop-no.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/drop-yes.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/footer-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-blue-hd.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-blue-split.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-hrow.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-loading.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-split.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-vista-hd.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-hd-btn.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-hrow-over.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-hrow.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-rowheader.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/group-by.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/group-collapse.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/group-expand-sprite.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/group-expand.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hd-pop.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-asc.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-desc.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-lock.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-lock.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-unlock.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-unlock.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/invalid_line.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/loading.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/mso-hd.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/nowait.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-first-disabled.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-first.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-last-disabled.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-last.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-next-disabled.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-next.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-prev-disabled.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/page-prev.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/pick-button.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/property-cell-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/property-cell-selected-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/refresh-disabled.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/refresh.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/row-check-sprite.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/row-expand-sprite.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/row-over.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/row-sel.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/sort-hd.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/sort_asc.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/sort_desc.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/unchecked.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/grid/wait.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-bottom.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-left.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-right.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-top.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/menu/checked.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/menu/group-checked.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/menu/item-over.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/menu/menu-parent.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/menu/menu.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/menu/unchecked.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-bottom-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-left-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-left-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-left-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-right-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-right-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-right-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-top-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-top-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-top-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-left-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-right-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-top-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel/panel-default-framed-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/panel/panel-default-framed-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/progress/progress-default-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/blue-loading.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/calendar.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/glass-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/hd-sprite.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-error.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-info.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-question.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-warning.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/large-loading.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/left-btn.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/loading-balls.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/right-btn.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/shadow-c.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/shadow-lr.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/shadow.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/shared/warning.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/e-handle-dark.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/e-handle.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/ne-handle-dark.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/ne-handle.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/nw-handle-dark.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/nw-handle.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/s-handle-dark.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/s-handle.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/se-handle-dark.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/se-handle.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/square.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/sw-handle-dark.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/sizer/sw-handle.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-thumb.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-thumb.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-bg.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-thumb.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-thumb.png +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab-bar/scroll-left.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab-bar/scroll-right.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab-bar/tab-bar-default-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-active-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-active-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-active-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-disabled-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-close.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-active-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-active-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-active-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-disabled-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-disabled-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-disabled-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-over-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-over-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-over-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tip/tip-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tip/tip-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/toolbar/more.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/toolbar/scroll-left.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/toolbar/scroll-right.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/toolbar/toolbar-default-bg.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tools/tool-sprite-tpl.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tools/tool-sprites.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tools/tools-sprites-trans.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/arrows.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-above.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-add.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-append.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-below.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-between.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-no.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-over.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-under.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-yes.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-minus-nl.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-minus.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-plus-nl.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-plus.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-line.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-minus-nl.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-minus.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-plus-nl.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-plus.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/folder-open.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/folder.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/leaf.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/loading.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/tree/s.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-bottom.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-left.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-right.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-top.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-bottom-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-bottom-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-left-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-left-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-right-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-right-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-top-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-top-sides.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window/window-default-corners.gif +0 -0
- data/public/javascripts/extjs4/resources/themes/images/default/window/window-default-sides.gif +0 -0
- data/rotten_egg.gemspec +36 -0
- data/views/index.haml +490 -0
- data/views/layout.haml +8 -0
- data/views/session/login.haml +108 -0
- metadata +537 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module RottenEgg
|
4
|
+
|
5
|
+
class MessageLogger
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@messages = []
|
9
|
+
end
|
10
|
+
|
11
|
+
def counts
|
12
|
+
@messages.length
|
13
|
+
end
|
14
|
+
|
15
|
+
def add(msg)
|
16
|
+
@messages << msg
|
17
|
+
end
|
18
|
+
|
19
|
+
def clear!
|
20
|
+
@messages.clear
|
21
|
+
end
|
22
|
+
|
23
|
+
def tops(size=0)
|
24
|
+
size = 0 if size < 0
|
25
|
+
@messages.slice!(0..size).compact
|
26
|
+
end
|
27
|
+
|
28
|
+
def first
|
29
|
+
tops
|
30
|
+
end
|
31
|
+
|
32
|
+
def pop_all
|
33
|
+
tops(counts-1)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'nokogiri'
|
4
|
+
|
5
|
+
module RottenEgg
|
6
|
+
class Scm
|
7
|
+
TOOLS = %w(git svn).freeze
|
8
|
+
|
9
|
+
def self.get_changes(scm)
|
10
|
+
case scm[:tool]
|
11
|
+
when "git"
|
12
|
+
Git.get_changes(scm)
|
13
|
+
when "svn"
|
14
|
+
Svn.get_changes(scm)
|
15
|
+
else
|
16
|
+
[]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class Git < Scm
|
21
|
+
#Actions: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R),Changed (T), Unmerged (U), Unknown (X)
|
22
|
+
|
23
|
+
FILE_ACTIONS = %w(A D M).freeze
|
24
|
+
|
25
|
+
CMD_PROC = proc do |config, block|
|
26
|
+
aim_branch = config[:branch]
|
27
|
+
Dir.chdir(config[:repository]) do
|
28
|
+
no_remote = `git remote`.chomp.empty?
|
29
|
+
branches = `git branch`.chomp.split("\n")
|
30
|
+
current_branch = branches.reject { |branch| branch[0].chr != "*" }.first.gsub("*", '').strip
|
31
|
+
branches.collect! { |branch| branch.gsub('*', '').strip }
|
32
|
+
if branches.include? aim_branch
|
33
|
+
`git checkout #{aim_branch}` if current_branch != aim_branch
|
34
|
+
else
|
35
|
+
if no_remote
|
36
|
+
raise RuntimeError, "fatal: no #{aim_branch} branch"
|
37
|
+
else
|
38
|
+
`git checkout -b #{aim_branch} origin/#{aim_branch}`
|
39
|
+
branches = `git branch`.chomp.split("\n")
|
40
|
+
current_branch = branches.reject { |branch| branch[0].chr != "*" }.first.gsub("*", '').strip
|
41
|
+
raise RuntimeError, "fatal: git checkout branch #{aim_branch} from origin/#{aim_branch}" if current_branch != aim_branch
|
42
|
+
end
|
43
|
+
end
|
44
|
+
`git pull` unless no_remote
|
45
|
+
|
46
|
+
if config[:first_commit]
|
47
|
+
latest_commit = `git log -1 --format="%H"`.chomp
|
48
|
+
config.update(:latest_commit => latest_commit)
|
49
|
+
else
|
50
|
+
commits = `git log --format="%H"`.chomp.split("\n")
|
51
|
+
latest_commit, first_commit = commits.first, commits.last
|
52
|
+
config.update(:latest_commit => latest_commit, :first_commit => first_commit)
|
53
|
+
end
|
54
|
+
block.call(config) if block
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.exec(config, &block)
|
59
|
+
CMD_PROC.call(config, block)
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.get_changes(scm)
|
63
|
+
files = Git.exec(scm) do |cfg|
|
64
|
+
if cfg[:remote_commit]
|
65
|
+
if cfg[:remote_commit] == cfg[:latest_commit]
|
66
|
+
[]
|
67
|
+
else
|
68
|
+
log = `git log --pretty=format: --name-status #{cfg[:remote_commit]}..#{cfg[:latest_commit]}`.chomp
|
69
|
+
files = log.split("\n")
|
70
|
+
files.delete ""
|
71
|
+
files.reverse!
|
72
|
+
|
73
|
+
end
|
74
|
+
else
|
75
|
+
log = `git log --pretty=format: --name-status #{cfg[:first_commit]}..#{cfg[:latest_commit]}`.chomp
|
76
|
+
files = log.split("\n")
|
77
|
+
files.delete ""
|
78
|
+
files.reverse!
|
79
|
+
end
|
80
|
+
end # - exec do block
|
81
|
+
|
82
|
+
files.compact!
|
83
|
+
|
84
|
+
unless files.empty?
|
85
|
+
|
86
|
+
inject_result = files.inject({:file_final_status => {}, :file_names => []}) do |inj_for, item|
|
87
|
+
action, filename = item.split("\t")
|
88
|
+
filename = filename.chomp
|
89
|
+
inj_for[:file_final_status][filename] = action.chomp.upcase
|
90
|
+
inj_for[:file_names].delete filename if inj_for[:file_names].index(filename)
|
91
|
+
inj_for[:file_names] << filename
|
92
|
+
inj_for
|
93
|
+
end
|
94
|
+
|
95
|
+
file_hash, files_name = inject_result.delete(:file_final_status), inject_result.delete(:file_names)
|
96
|
+
|
97
|
+
files = files_name.collect do |filename|
|
98
|
+
if file_hash[filename].nil?
|
99
|
+
nil
|
100
|
+
else
|
101
|
+
if Git::FILE_ACTIONS.include?(file_hash[filename])
|
102
|
+
{:action => file_hash[filename], :filename => filename, :status => :pending}
|
103
|
+
else
|
104
|
+
nil
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end.compact
|
108
|
+
end # - unless files.empty?
|
109
|
+
files
|
110
|
+
end
|
111
|
+
|
112
|
+
end # - Git class
|
113
|
+
|
114
|
+
# currently no svn:externals support TODO?
|
115
|
+
class Svn < Scm
|
116
|
+
#Actions: Added (A), Deleted (D), Modified (M), Replaced (R)
|
117
|
+
|
118
|
+
FILE_ACTIONS = %w(A D M R).freeze
|
119
|
+
|
120
|
+
CMD_PROC = proc do |config, block|
|
121
|
+
Dir.chdir(config[:repository]) do
|
122
|
+
# SVN UP ERROR === TODO
|
123
|
+
# svn: OPTIONS of 'http://svn.51hejia.com/51hejia/repos/brands/trunk': could not connect to server (http://svn.51hejia.com)
|
124
|
+
svn_up = Svn.build_command("svn up", config)
|
125
|
+
`#{svn_up}`
|
126
|
+
if config[:first_commit]
|
127
|
+
latest_commit = Svn.latest_revision(config)
|
128
|
+
config.update(:latest_commit => latest_commit)
|
129
|
+
else
|
130
|
+
latest_commit, first_commit = Svn.latest_revision(config), Svn.first_revision(config)
|
131
|
+
config.update(:latest_commit => latest_commit, :first_commit => first_commit)
|
132
|
+
end
|
133
|
+
block.call(config) if block
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def self.exec(config, &block)
|
138
|
+
CMD_PROC.call(config, block)
|
139
|
+
end
|
140
|
+
|
141
|
+
def self.build_command(cmd, config)
|
142
|
+
cmd << " --username=#{config[:user]} --password=#{config[:password]} --no-auth-cache" if config[:authorize]
|
143
|
+
cmd
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.first_revision(config={})
|
147
|
+
cmd = build_command("svn log -q -r 0:HEAD --limit=1", config)
|
148
|
+
result = `#{cmd}`.chomp!
|
149
|
+
lines = result.split("\n").reverse
|
150
|
+
line = lines[1]
|
151
|
+
line.nil? ? '' : line.scan(/\Ar\d+/).first.to_s.gsub("r", '')
|
152
|
+
end
|
153
|
+
|
154
|
+
def self.latest_revision(config={})
|
155
|
+
cmd = build_command("svn info -r HEAD", config)
|
156
|
+
result = `#{cmd}`.chomp!
|
157
|
+
lines = result.split("\n").reverse
|
158
|
+
line = lines[1]
|
159
|
+
line.nil? ? '' : line.scan(/\d+/).first.to_s
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.parse_log(xml, sanitize_paths)
|
163
|
+
paths = sanitize_paths.split("|")
|
164
|
+
xml_doc = Nokogiri::XML(xml)
|
165
|
+
files = xml_doc.xpath("//path").collect do |node|
|
166
|
+
if node["kind"] == "file"
|
167
|
+
file_path = node.text.to_s
|
168
|
+
file_path = file_path.gsub(%r(\A#{paths.join("|")}), '').strip
|
169
|
+
file_path.empty? ? nil : "#{node["action"]}\t#{file_path}"
|
170
|
+
else
|
171
|
+
nil
|
172
|
+
end
|
173
|
+
end.compact
|
174
|
+
files
|
175
|
+
end
|
176
|
+
|
177
|
+
def self.get_changes(scm)
|
178
|
+
files = Svn.exec(scm) do |cfg|
|
179
|
+
if cfg[:remote_commit]
|
180
|
+
if cfg[:remote_commit] == cfg[:latest_commit]
|
181
|
+
[]
|
182
|
+
else
|
183
|
+
cmd = Svn.build_command("svn log -v -r #{cfg[:remote_commit]}:#{cfg[:latest_commit]} --xml", cfg)
|
184
|
+
log = `#{cmd}`.chomp
|
185
|
+
Svn.parse_log(log, cfg[:sanitize_path_prefix])
|
186
|
+
end
|
187
|
+
else
|
188
|
+
cmd = Svn.build_command("svn log -v -r #{cfg[:first_commit]}:#{cfg[:latest_commit]} --xml", cfg)
|
189
|
+
log = `#{cmd}`.chomp
|
190
|
+
Svn.parse_log(log, cfg[:sanitize_path_prefix])
|
191
|
+
end
|
192
|
+
end # - exec do block
|
193
|
+
|
194
|
+
files.compact!
|
195
|
+
|
196
|
+
unless files.empty?
|
197
|
+
|
198
|
+
inject_result = files.inject({:file_final_status => {}, :file_names => []}) do |inj_for, item|
|
199
|
+
action, filename = item.split("\t")
|
200
|
+
filename = filename.chomp
|
201
|
+
inj_for[:file_final_status][filename] = action.chomp.upcase
|
202
|
+
inj_for[:file_names].delete filename if inj_for[:file_names].index(filename)
|
203
|
+
inj_for[:file_names] << filename
|
204
|
+
inj_for
|
205
|
+
end
|
206
|
+
|
207
|
+
file_hash, files_name = inject_result.delete(:file_final_status), inject_result.delete(:file_names)
|
208
|
+
|
209
|
+
files = files_name.collect do |filename|
|
210
|
+
if file_hash[filename].nil?
|
211
|
+
nil
|
212
|
+
else
|
213
|
+
if Svn::FILE_ACTIONS.include?(file_hash[filename])
|
214
|
+
# replace 'Replaced(R)' to 'Modified(M)'
|
215
|
+
{:action => (file_hash[filename] == "R" ? "M" : file_hash[filename]), :filename => filename, :status => :pending}
|
216
|
+
else
|
217
|
+
nil
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end.compact
|
221
|
+
end # - unless files.empty?
|
222
|
+
|
223
|
+
files
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end # - Scm class
|
229
|
+
end # - RottenEgg module
|
@@ -0,0 +1,238 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'yaml'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
module RottenEgg
|
8
|
+
class Server
|
9
|
+
|
10
|
+
# server start up options
|
11
|
+
class Options
|
12
|
+
def parse!(args)
|
13
|
+
options = {}
|
14
|
+
opt_parser = OptionParser.new("", 40, ' ') do |opts|
|
15
|
+
opts.banner = "Usage: rotten_egg options"
|
16
|
+
|
17
|
+
opts.separator ""
|
18
|
+
opts.separator "options:"
|
19
|
+
|
20
|
+
# lineno = 1
|
21
|
+
# opts.on("-e", "--eval LINE", "evaluate a LINE of code") { |line|
|
22
|
+
# eval line, TOPLEVEL_BINDING, "-e", lineno
|
23
|
+
# lineno += 1
|
24
|
+
# }
|
25
|
+
|
26
|
+
# opts.on("-d", "--debug", "set debugging flags (set $DEBUG to true)") {
|
27
|
+
# options[:debug] = true
|
28
|
+
# }
|
29
|
+
#
|
30
|
+
# opts.on("-w", "--warn", "turn warnings on for your script") {
|
31
|
+
# options[:warn] = true
|
32
|
+
# }
|
33
|
+
|
34
|
+
# opts.on("-s", "--server SERVER", "serve using SERVER (thin)") { |s|
|
35
|
+
# options[:server] = s
|
36
|
+
# }
|
37
|
+
|
38
|
+
opts.on("-o", "--host HOST", "listen on HOST (default: 0.0.0.0)") { |host|
|
39
|
+
options[:host] = host
|
40
|
+
}
|
41
|
+
|
42
|
+
opts.on("-p", "--port PORT", "use PORT (default: 17420)") { |port|
|
43
|
+
options[:port] = port
|
44
|
+
}
|
45
|
+
|
46
|
+
opts.on("-e", "--env ENVIRONMENT", "use ENVIRONMENT (default: development)") { |e|
|
47
|
+
options[:environment] = e.to_sym
|
48
|
+
}
|
49
|
+
|
50
|
+
opts.on("-C", "--config FILE", "app config file (default: rotten_egg.yml)") { |c|
|
51
|
+
options[:config] = c
|
52
|
+
}
|
53
|
+
|
54
|
+
opts.on("-A", "--auth FILE", "app auth file (if nil default auth: user:'rotten' password:'egg')") { |a|
|
55
|
+
options[:auth_file] = a
|
56
|
+
}
|
57
|
+
|
58
|
+
opts.on("-W", "--working_directory DIRECTORY", "app working directory") { |w|
|
59
|
+
options[:working_directory] = w
|
60
|
+
}
|
61
|
+
|
62
|
+
opts.on("-m", "--paging_size SIZE", "max perpage for paginate") { |ps|
|
63
|
+
options[:paging_size] = ps
|
64
|
+
}
|
65
|
+
|
66
|
+
opts.separator ""
|
67
|
+
opts.separator "Daemonize options:"
|
68
|
+
|
69
|
+
opts.on("-D", "--daemonize", "run daemonized in the background") { |d|
|
70
|
+
options[:daemonize] = d ? true : false
|
71
|
+
}
|
72
|
+
|
73
|
+
opts.on("-u", "--user NAME", "User to run daemon as (use with -g)") { |u|
|
74
|
+
options[:user] = u
|
75
|
+
}
|
76
|
+
|
77
|
+
opts.on("-g", "--group NAME", "Group to run daemon as (use with -u)") { |g|
|
78
|
+
options[:group] = g
|
79
|
+
}
|
80
|
+
|
81
|
+
opts.on("-P", "--pid FILE", "file to store PID (default: rotten_egg.pid)") { |f|
|
82
|
+
options[:pid] = f
|
83
|
+
}
|
84
|
+
|
85
|
+
opts.on("-l", "--log FILE", "file to store log") { |l|
|
86
|
+
options[:log] = l
|
87
|
+
}
|
88
|
+
|
89
|
+
opts.separator ""
|
90
|
+
opts.separator "Common options:"
|
91
|
+
|
92
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
93
|
+
puts opts
|
94
|
+
exit
|
95
|
+
end
|
96
|
+
|
97
|
+
opts.on_tail("--version", "Show version") do
|
98
|
+
puts "RottenEgg #{RottenEgg.version}, release #{RottenEgg.release}"
|
99
|
+
exit
|
100
|
+
end
|
101
|
+
end
|
102
|
+
opt_parser.parse! args
|
103
|
+
unless options[:config]
|
104
|
+
options[:config] = args.last if args.last
|
105
|
+
end
|
106
|
+
options
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
attr_writer :options
|
111
|
+
|
112
|
+
def initialize(options)
|
113
|
+
@options = options
|
114
|
+
end
|
115
|
+
|
116
|
+
def options
|
117
|
+
@options ||= parse_options(ARGV)
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.start(options = nil)
|
121
|
+
new(options).start
|
122
|
+
end
|
123
|
+
|
124
|
+
def default_options
|
125
|
+
{
|
126
|
+
:environment => :development,
|
127
|
+
:pid => nil,
|
128
|
+
:daemonize => false,
|
129
|
+
:server => "thin",
|
130
|
+
:port => 14720,
|
131
|
+
:host => "0.0.0.0",
|
132
|
+
:log => nil,
|
133
|
+
:config => nil,
|
134
|
+
:auth_file => nil,
|
135
|
+
:working_directory => ENV['PWD'],
|
136
|
+
:page_size => 50
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
def start
|
141
|
+
# if options[:debug]
|
142
|
+
# $DEBUG = true
|
143
|
+
# require 'pp'
|
144
|
+
# p options[:server]
|
145
|
+
# pp wrapped_app
|
146
|
+
# pp app
|
147
|
+
# end
|
148
|
+
#
|
149
|
+
# if options[:warn]
|
150
|
+
# $-w = true
|
151
|
+
# end
|
152
|
+
|
153
|
+
options[:working_directory] = File.expand_path options[:working_directory], ENV['PWD']
|
154
|
+
options[:working_directory] = Util.format_path options[:working_directory]
|
155
|
+
|
156
|
+
options[:paging_size] = options[:paging_size].to_i <= 0 ? 50 : options[:paging_size].to_i
|
157
|
+
|
158
|
+
Application.set :apps_setting, {}
|
159
|
+
Application.set :paging_size, options[:paging_size]
|
160
|
+
if options[:config]
|
161
|
+
unless File.exist? options[:config]
|
162
|
+
abort "app configuration #{options[:config]} not found"
|
163
|
+
else
|
164
|
+
setting = begin
|
165
|
+
AppSetting.parse! options[:config], true
|
166
|
+
rescue Exception => e
|
167
|
+
abort "#{e.message}"
|
168
|
+
end
|
169
|
+
name = setting.delete(:name)
|
170
|
+
Application.apps_setting[name] = setting
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
if options[:auth_file]
|
175
|
+
unless File.exist? options[:auth_file]
|
176
|
+
abort "app auth file #{options[:auth_file]} not found"
|
177
|
+
else
|
178
|
+
Application.set :auth_user, YAML::load_file(options[:auth_file])
|
179
|
+
end
|
180
|
+
else
|
181
|
+
Application.set :auth_user, {"user" => "rotten", "password" => "egg"}
|
182
|
+
end
|
183
|
+
|
184
|
+
options.delete :auth_file
|
185
|
+
|
186
|
+
daemonize_app if options[:daemonize]
|
187
|
+
write_pid if options[:pid]
|
188
|
+
|
189
|
+
FileUtils.mkdir_p options[:working_directory] unless File.directory? options[:working_directory]
|
190
|
+
options[:log] = "#{options[:working_directory]}/#{options[:environment]}.log" unless options[:log]
|
191
|
+
log_file = options[:log]
|
192
|
+
FileUtils.mkdir_p File.dirname(log_file) unless File.directory? File.dirname(log_file)
|
193
|
+
|
194
|
+
if options[:daemonize] or options[:environment].to_s == "production"
|
195
|
+
$old_stdout = $stdout # in case you want to turn off traces
|
196
|
+
$stdout = File.new(log_file, 'w')
|
197
|
+
$stdout.sync = true
|
198
|
+
$stderr.reopen($stdout)
|
199
|
+
$stderr = $stdout
|
200
|
+
end
|
201
|
+
|
202
|
+
Application.run! options
|
203
|
+
end
|
204
|
+
|
205
|
+
private
|
206
|
+
|
207
|
+
def parse_options(args)
|
208
|
+
options = default_options
|
209
|
+
options.merge! opt_parser.parse! args
|
210
|
+
ENV["RACK_ENV"] = options[:environment].to_s
|
211
|
+
options
|
212
|
+
end
|
213
|
+
|
214
|
+
def opt_parser
|
215
|
+
Options.new
|
216
|
+
end
|
217
|
+
|
218
|
+
def daemonize_app
|
219
|
+
if RUBY_VERSION < "1.9"
|
220
|
+
exit if fork
|
221
|
+
Process.setsid
|
222
|
+
exit if fork
|
223
|
+
Dir.chdir "/"
|
224
|
+
File.umask 0000
|
225
|
+
STDIN.reopen "/dev/null"
|
226
|
+
STDOUT.reopen "/dev/null", "a"
|
227
|
+
STDERR.reopen "/dev/null", "a"
|
228
|
+
else
|
229
|
+
Process.daemon
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
def write_pid
|
234
|
+
File.open(options[:pid], 'w') { |f| f.write("#{Process.pid}") }
|
235
|
+
at_exit { File.delete(options[:pid]) if File.exist?(options[:pid]) }
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|