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,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module RottenEgg
|
3
|
+
class User
|
4
|
+
@@users = {}
|
5
|
+
attr_accessor :id
|
6
|
+
attr_reader :name
|
7
|
+
|
8
|
+
def initialize(name="rotten")
|
9
|
+
@name = name
|
10
|
+
@id = 14720
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.authenticate(username, password)
|
14
|
+
if username == Application.auth_user["user"] && password == Application.auth_user["password"]
|
15
|
+
usr = User.new(username)
|
16
|
+
@@users[usr.id] = usr
|
17
|
+
else
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.auth?(username, password)
|
23
|
+
username == Application.auth_user["user"] && password == Application.auth_user["password"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.find(id)
|
27
|
+
@@users[id]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,381 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rbconfig'
|
4
|
+
require 'thread'
|
5
|
+
require 'net/ftp'
|
6
|
+
#require 'net/sftp'
|
7
|
+
require 'fileutils'
|
8
|
+
|
9
|
+
module RottenEgg
|
10
|
+
|
11
|
+
module Util
|
12
|
+
|
13
|
+
MS_ECHO_PATH = "echo %PATH%".freeze
|
14
|
+
NX_ECHO_PATH = "echo $PATH".freeze
|
15
|
+
MS_BIN_TYPE = ["", ".exe", ".cmd"].freeze
|
16
|
+
NX_BIN_TYPE = [].freeze
|
17
|
+
MS_PATH_DELIMITER = ";".freeze
|
18
|
+
NX_PATH_DELIMITER = ":".freeze
|
19
|
+
|
20
|
+
class FtpTool #:nodoc: internal use only
|
21
|
+
|
22
|
+
attr_accessor :verbose
|
23
|
+
attr_reader :server, :port, :user, :password
|
24
|
+
|
25
|
+
def initialize(server, port, user, password, options={})
|
26
|
+
@server = server
|
27
|
+
@port = port
|
28
|
+
@user = user
|
29
|
+
@password = password
|
30
|
+
@connection = nil
|
31
|
+
@verbose = options[:verbose] || false
|
32
|
+
@passive = options[:passive] || false
|
33
|
+
@msg_logger = options[:msg_logger]
|
34
|
+
@lock = Mutex.new
|
35
|
+
end
|
36
|
+
|
37
|
+
def pull_files(local_path, file_list)
|
38
|
+
@lock.synchronize do
|
39
|
+
return {} unless connect!
|
40
|
+
file_list = [file_list.to_s] unless file_list.is_a? Array
|
41
|
+
file_list.uniq!
|
42
|
+
result = file_list.inject({}) do |hash, f|
|
43
|
+
status = if file_exist?(f)
|
44
|
+
local_dir = File.join(local_path, File.dirname(f))
|
45
|
+
FileUtils.mkdir_p local_dir unless File.exist?(local_dir)
|
46
|
+
local_file = File.join(local_dir, File.basename(f))
|
47
|
+
origin_local_file = local_file + ".origin"
|
48
|
+
|
49
|
+
if File.exist? local_file
|
50
|
+
FileUtils.mv local_file, origin_local_file
|
51
|
+
|
52
|
+
# still exist! FileUtils # rename_cannot_overwrite_file?
|
53
|
+
FileUtils.rm local_file if File.exist? local_file
|
54
|
+
end
|
55
|
+
pull_result = pull_file f, File.join(local_dir, File.basename(f))
|
56
|
+
if pull_result
|
57
|
+
FileUtils.rm origin_local_file if File.exist?(origin_local_file)
|
58
|
+
:success
|
59
|
+
else
|
60
|
+
FileUtils.mv origin_local_file, local_file
|
61
|
+
:failure
|
62
|
+
end
|
63
|
+
else
|
64
|
+
:not_exist # file not exist !
|
65
|
+
end # - file_exist? f
|
66
|
+
hash[f] = status
|
67
|
+
hash
|
68
|
+
end # - file_list inject
|
69
|
+
close!
|
70
|
+
result
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# download version file
|
75
|
+
def download_version_file(local_path, file)
|
76
|
+
result = pull_files local_path, file
|
77
|
+
if result.empty?
|
78
|
+
log "ftp connect failure"
|
79
|
+
:ftp_connect_failure
|
80
|
+
else
|
81
|
+
case result[file]
|
82
|
+
when :success
|
83
|
+
:success
|
84
|
+
when :failure
|
85
|
+
log 'download remove version file failed'
|
86
|
+
:failure
|
87
|
+
when :not_exist
|
88
|
+
:initial
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
#
|
94
|
+
# Pull a supplied list of files from the remote ftp path into the local path
|
95
|
+
#
|
96
|
+
def apply_changes(local_path, file_lists)
|
97
|
+
@lock.synchronize do
|
98
|
+
return false if file_lists.empty? or !connect!
|
99
|
+
result = true
|
100
|
+
file_lists.each do |item|
|
101
|
+
file = item[:filename]
|
102
|
+
action = item[:action]
|
103
|
+
item_index = file_lists.index(item)
|
104
|
+
file_dir = File.dirname(file)
|
105
|
+
case action
|
106
|
+
when "A", "M"
|
107
|
+
pull_status = push_file "#{local_path}#{file}", file_dir, file
|
108
|
+
if pull_status
|
109
|
+
status = :success
|
110
|
+
else
|
111
|
+
status = :failed
|
112
|
+
result = pull_status
|
113
|
+
end
|
114
|
+
file_lists[item_index].update(:status => status)
|
115
|
+
when "D"
|
116
|
+
file_dir = "/" if file_dir == "." or file_dir == ""
|
117
|
+
if file_exist?(file)
|
118
|
+
if delete_file(file)
|
119
|
+
delete_dir(file_dir) if dir_empty?(file_dir) #remove remote dir
|
120
|
+
end
|
121
|
+
file_lists[item_index].update(:status => :success)
|
122
|
+
else # no remote file set true
|
123
|
+
file_lists[item_index].update(:status => :success)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
close!
|
128
|
+
result
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# upload version file
|
133
|
+
def update_version_file(local_file, remote_file=File.basename(local_file))
|
134
|
+
@lock.synchronize do
|
135
|
+
return false unless connect!
|
136
|
+
file_dir = File.dirname(remote_file)
|
137
|
+
result = push_file "#{local_file}", file_dir, remote_file
|
138
|
+
close!
|
139
|
+
result
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
private
|
144
|
+
# open connection
|
145
|
+
def connect!
|
146
|
+
begin
|
147
|
+
Timeout.timeout(15) do
|
148
|
+
log "Connection to #{@server}..."
|
149
|
+
@connection ||= Net::FTP.new()
|
150
|
+
@connection.passive = @passive
|
151
|
+
@connection.connect(@server, @port)
|
152
|
+
@connection.login(@user, @password)
|
153
|
+
log "Opened connection to #{@server}"
|
154
|
+
return true
|
155
|
+
end
|
156
|
+
rescue Timeout::Error
|
157
|
+
log "Open connection to #{@server}:#{@port} time out"
|
158
|
+
return false
|
159
|
+
rescue Net::FTPConnectionError
|
160
|
+
@connection = nil
|
161
|
+
log "Connect to #{@server} connection error"
|
162
|
+
return false
|
163
|
+
rescue Errno::ECONNREFUSED
|
164
|
+
log "Connect to #{@server} refused"
|
165
|
+
return false
|
166
|
+
rescue Net::FTPPermError
|
167
|
+
log "Connect to #{@server} permission denied"
|
168
|
+
return false
|
169
|
+
rescue
|
170
|
+
log "Connect to #{@server} error"
|
171
|
+
return false
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# close connection
|
176
|
+
def close!
|
177
|
+
begin
|
178
|
+
@connection.close
|
179
|
+
@connection = nil
|
180
|
+
log "Closed Connection to #{@server}"
|
181
|
+
rescue
|
182
|
+
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# check remote directory exist?
|
187
|
+
def dir_exist?(dir)
|
188
|
+
return false if server_down?
|
189
|
+
|
190
|
+
status = begin
|
191
|
+
@connection.chdir(dir)
|
192
|
+
true
|
193
|
+
rescue
|
194
|
+
log "Remote directory #{dir} not exist"
|
195
|
+
false
|
196
|
+
end
|
197
|
+
@connection.chdir('/') if status
|
198
|
+
status
|
199
|
+
end
|
200
|
+
|
201
|
+
# check remote dir empty?
|
202
|
+
def dir_empty?(dir)
|
203
|
+
return false if server_down?
|
204
|
+
|
205
|
+
if dir_exist?(dir)
|
206
|
+
files = @connection.nlst(dir)
|
207
|
+
files.any?
|
208
|
+
else
|
209
|
+
true
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# create directory
|
214
|
+
def create_dir(dir)
|
215
|
+
return false if server_down?
|
216
|
+
|
217
|
+
begin
|
218
|
+
@connection.mkdir(dir)
|
219
|
+
true
|
220
|
+
rescue
|
221
|
+
log "Create remote directory #{dir}"
|
222
|
+
false
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# create directory
|
227
|
+
def delete_dir(dir)
|
228
|
+
return false if server_down?
|
229
|
+
|
230
|
+
begin
|
231
|
+
@connection.rmdir(dir)
|
232
|
+
true
|
233
|
+
rescue
|
234
|
+
log "Remote remote directory #{dir} error"
|
235
|
+
false
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# create directories
|
240
|
+
def create_dirs(path, base = '/')
|
241
|
+
return false if server_down?
|
242
|
+
|
243
|
+
base = '' if base == '/'
|
244
|
+
parent = base
|
245
|
+
path_list = path.split("/")
|
246
|
+
path_list.each do |item|
|
247
|
+
parent = "#{parent}/#{item}"
|
248
|
+
unless dir_exist?(parent)
|
249
|
+
return false unless create_dir(parent)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
true
|
253
|
+
end
|
254
|
+
|
255
|
+
# download single file
|
256
|
+
def pull_file(remote_file, local_file)
|
257
|
+
return false if server_down?
|
258
|
+
|
259
|
+
begin
|
260
|
+
log "Pulling #{remote_file} to #{local_file}..."
|
261
|
+
@connection.get remote_file, local_file
|
262
|
+
log "Pulled #{remote_file} to #{local_file}..."
|
263
|
+
true
|
264
|
+
rescue
|
265
|
+
log "Pull #{remote_file} error reading..."
|
266
|
+
false
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
# upload single file
|
271
|
+
def push_file(local_file, remote_dir = "/", remote_file=File.basename(local_file))
|
272
|
+
return false if server_down?
|
273
|
+
|
274
|
+
unless File.exist?(local_file)
|
275
|
+
log "local file #{local_file} not exist"
|
276
|
+
return true# local file not exist then return true not false
|
277
|
+
end
|
278
|
+
|
279
|
+
remote_dir = "/" if remote_dir == "." or remote_dir == ""
|
280
|
+
unless dir_exist?(remote_dir)
|
281
|
+
return false unless create_dirs(remote_dir)
|
282
|
+
end
|
283
|
+
|
284
|
+
begin
|
285
|
+
@connection.chdir(remote_dir) unless remote_dir == "/"
|
286
|
+
log "Pushing #{local_file} to remote..."
|
287
|
+
@connection.put local_file, File.basename(remote_file)
|
288
|
+
@connection.chdir("/")
|
289
|
+
log "Pushed #{local_file} to remote"
|
290
|
+
true
|
291
|
+
rescue
|
292
|
+
@connection.chdir("/")
|
293
|
+
log "Push #{local_file} to remote error"
|
294
|
+
false
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
# delete single file
|
299
|
+
def delete_file(remote_file)
|
300
|
+
return false if server_down?
|
301
|
+
|
302
|
+
begin
|
303
|
+
@connection.delete remote_file
|
304
|
+
log "Remote file #{local_file} successfully deleted"
|
305
|
+
true
|
306
|
+
rescue
|
307
|
+
log "Delete remote file: #{remote_file} error"
|
308
|
+
false
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
# check remote file exist?
|
313
|
+
def file_exist?(file_path)
|
314
|
+
return false if server_down?
|
315
|
+
|
316
|
+
path, file_name = File.dirname(file_path), File.basename(file_path)
|
317
|
+
if dir_exist?(path)
|
318
|
+
files = @connection.nlst(path)
|
319
|
+
if files.include?(file_name)
|
320
|
+
true
|
321
|
+
else
|
322
|
+
log "Remote file #{file_path} not exist"
|
323
|
+
false
|
324
|
+
end
|
325
|
+
else
|
326
|
+
log "Remote file #{file_path} not exist"
|
327
|
+
false
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
def server_down?
|
332
|
+
begin
|
333
|
+
@connection.chdir("/")
|
334
|
+
false
|
335
|
+
rescue
|
336
|
+
log "<。)#)))≦ ~~~~~ Remote ftp server is down!"
|
337
|
+
true
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
# log message
|
342
|
+
def log(msg)
|
343
|
+
@msg_logger.add(msg) if @msg_logger
|
344
|
+
puts msg if @verbose
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
module_function
|
349
|
+
|
350
|
+
def mswin?
|
351
|
+
Config::CONFIG['target_os'] =~ /mswin32|mingw32/ ? true : false
|
352
|
+
end
|
353
|
+
|
354
|
+
def format_path(path)
|
355
|
+
path = path.chomp.gsub("\\", "/") if mswin?
|
356
|
+
path = "#{path}/" if path[-1].chr != "/"
|
357
|
+
path
|
358
|
+
end
|
359
|
+
|
360
|
+
def check_scm(scm)
|
361
|
+
#send "check_#{scm}".to_sym
|
362
|
+
# not by scm --version
|
363
|
+
if mswin?
|
364
|
+
paths = `#{MS_ECHO_PATH}`.split(MS_PATH_DELIMITER)
|
365
|
+
bin_path = MS_BIN_TYPE.inject([]) do |ary, type|
|
366
|
+
ary << paths.reject { |path| !File.exist?("#{path.chomp.gsub("\\", "/")}/#{scm}#{type}") }
|
367
|
+
end.collect { |path| path.any? ? path.first : nil }.compact.first.to_s
|
368
|
+
|
369
|
+
raise "Please install #{scm}." if bin_path.empty?
|
370
|
+
{:bin_path => bin_path}
|
371
|
+
else
|
372
|
+
bin_path = `which #{scm}`.chomp
|
373
|
+
raise "Please install #{scm}." if bin_path.empty?
|
374
|
+
{:bin_path => bin_path}
|
375
|
+
end
|
376
|
+
end # - check_scm
|
377
|
+
|
378
|
+
|
379
|
+
end # - Util
|
380
|
+
|
381
|
+
end # - RottenEgg
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/**
|
2
|
+
* Load the library located at the same path with this file
|
3
|
+
*
|
4
|
+
* Will automatically load ext-all-debug.js if any of these conditions is true:
|
5
|
+
* - Current hostname is localhost
|
6
|
+
* - Current hostname is an IP v4 address
|
7
|
+
* - Current protocol is "file:"
|
8
|
+
*
|
9
|
+
* Will load ext-all.js (minified) otherwise
|
10
|
+
*/
|
11
|
+
(function() {
|
12
|
+
|
13
|
+
var scripts = document.getElementsByTagName('script'),
|
14
|
+
localhostTests = [
|
15
|
+
/^localhost$/,
|
16
|
+
/\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:\d{1,5})?\b/ // IP v4
|
17
|
+
],
|
18
|
+
host = window.location.hostname,
|
19
|
+
isDevelopment = null,
|
20
|
+
queryString = window.location.search,
|
21
|
+
test, path, i, ln, scriptSrc, match;
|
22
|
+
|
23
|
+
for (i = 0, ln = scripts.length; i < ln; i++) {
|
24
|
+
scriptSrc = scripts[i].src;
|
25
|
+
|
26
|
+
match = scriptSrc.match(/bootstrap\.js$/);
|
27
|
+
|
28
|
+
if (match) {
|
29
|
+
path = scriptSrc.substring(0, scriptSrc.length - match[0].length);
|
30
|
+
break;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
if (queryString.match('(\\?|&)debug') !== null) {
|
35
|
+
isDevelopment = true;
|
36
|
+
}
|
37
|
+
else if (queryString.match('(\\?|&)nodebug') !== null) {
|
38
|
+
isDevelopment = false;
|
39
|
+
}
|
40
|
+
|
41
|
+
if (isDevelopment === null) {
|
42
|
+
for (i = 0, ln = localhostTests.length; i < ln; i++) {
|
43
|
+
test = localhostTests[i];
|
44
|
+
|
45
|
+
if (host.search(test) !== -1) {
|
46
|
+
isDevelopment = true;
|
47
|
+
break;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
if (isDevelopment === null && window.location.protocol === 'file:') {
|
53
|
+
isDevelopment = true;
|
54
|
+
}
|
55
|
+
|
56
|
+
document.write('<script type="text/javascript" src="' + path + 'ext-all' + ((isDevelopment) ? '-debug' : '') + '.js"></script>');
|
57
|
+
|
58
|
+
})();
|