spiderfw 0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +4 -0
- data/Rakefile +74 -0
- data/apps/cas_server/_init.rb +23 -0
- data/apps/cas_server/config/options.rb +9 -0
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +353 -0
- data/apps/cas_server/lib/cas.rb +329 -0
- data/apps/cas_server/lib/utils.rb +30 -0
- data/apps/cas_server/models/login_ticket.rb +11 -0
- data/apps/cas_server/models/mixins/consumable.rb +10 -0
- data/apps/cas_server/models/proxy_granting_ticket.rb +12 -0
- data/apps/cas_server/models/proxy_ticket.rb +12 -0
- data/apps/cas_server/models/service_ticket.rb +22 -0
- data/apps/cas_server/models/ticket.rb +20 -0
- data/apps/cas_server/models/ticket_granting_ticket.rb +15 -0
- data/apps/cas_server/views/logout.shtml +3 -0
- data/apps/core/admin/_init.rb +23 -0
- data/apps/core/admin/admin.rb +17 -0
- data/apps/core/admin/controllers/admin_controller.rb +15 -0
- data/apps/core/admin/views/index.shtml +1 -0
- data/apps/core/admin/views/spider_admin.layout.shtml +23 -0
- data/apps/core/admin/widgets/admin_menu/admin_menu.rb +17 -0
- data/apps/core/auth/_init.rb +42 -0
- data/apps/core/auth/controllers/login_controller.rb +94 -0
- data/apps/core/auth/controllers/mixins/auth_helper.rb +114 -0
- data/apps/core/auth/controllers/mixins/http_basic_auth.rb +24 -0
- data/apps/core/auth/controllers/mixins/http_digest_auth.rb +26 -0
- data/apps/core/auth/lib/authenticable.rb +86 -0
- data/apps/core/auth/lib/authenticator.rb +11 -0
- data/apps/core/auth/lib/digest_authenticator.rb +44 -0
- data/apps/core/auth/lib/login_authenticator.rb +27 -0
- data/apps/core/auth/models/digest_user.rb +34 -0
- data/apps/core/auth/models/group.rb +22 -0
- data/apps/core/auth/models/login_user.rb +15 -0
- data/apps/core/auth/models/mixins/access_control.rb +71 -0
- data/apps/core/auth/models/mixins/authentication_tracking.rb +19 -0
- data/apps/core/auth/models/super_user.rb +8 -0
- data/apps/core/auth/models/user.rb +15 -0
- data/apps/core/auth/po/it/spider_auth.po +33 -0
- data/apps/core/auth/po/spider_auth.pot +31 -0
- data/apps/core/auth/views/login.shtml +25 -0
- data/apps/core/components/_init.rb +21 -0
- data/apps/core/components/po/it/spider_components.po +52 -0
- data/apps/core/components/po/spider_components.pot +53 -0
- data/apps/core/components/public/css/admin.css +73 -0
- data/apps/core/components/public/css/crud.css +58 -0
- data/apps/core/components/public/css/img/add.gif +0 -0
- data/apps/core/components/public/css/img/ajax-loader.gif +0 -0
- data/apps/core/components/public/css/img/back.gif +0 -0
- data/apps/core/components/public/css/img/bg_header.png +0 -0
- data/apps/core/components/public/css/img/body_bg.jpg +0 -0
- data/apps/core/components/public/css/img/gray_gradient.gif +0 -0
- data/apps/core/components/public/css/img/li_bg.png +0 -0
- data/apps/core/components/public/css/img/li_bg_active.png +0 -0
- data/apps/core/components/public/css/img/li_bg_hover.png +0 -0
- data/apps/core/components/public/css/img/logo.png +0 -0
- data/apps/core/components/public/css/img/menu_bg.png +0 -0
- data/apps/core/components/public/css/img/menu_bottom.png +0 -0
- data/apps/core/components/public/css/img/menu_top.png +0 -0
- data/apps/core/components/public/css/img/section-bottom.jpg +0 -0
- data/apps/core/components/public/css/list.css +7 -0
- data/apps/core/components/public/css/menu.css +47 -0
- data/apps/core/components/public/css/spider.css +9 -0
- data/apps/core/components/public/css/switcher.css +13 -0
- data/apps/core/components/public/css/table.css +99 -0
- data/apps/core/components/public/js/inheritance.js +71 -0
- data/apps/core/components/public/js/jquery/jquery-1.3.2.js +4376 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/AUTHORS.txt +30 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/GPL-LICENSE.txt +278 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/MIT-LICENSE.txt +25 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/ChangeLog.txt +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/META.json +32 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.js +100 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.min.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.pack.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/test/index.html +197 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.js +97 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.min.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.pack.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.zip +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/jsdiff/jsdiff.js +159 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testrunner.js +780 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testsuite.css +120 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/simulate/jquery.simulate.js +152 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/jquery-1.3.2.js +4376 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.all.css +2 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.base.css +8 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.datepicker.css +62 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.slider.css +17 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.tabs.css +11 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.theme.css +245 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.all.css +2 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.base.css +8 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.datepicker.css +62 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.slider.css +17 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.tabs.css +11 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.theme.css +247 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.blind.js +49 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.bounce.js +78 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.clip.js +54 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.core.js +545 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.drop.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.explode.js +79 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.fold.js +56 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.highlight.js +48 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.pulsate.js +56 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.scale.js +180 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.shake.js +57 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.slide.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.transfer.js +45 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/jquery-ui-i18n.js +771 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ar.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-bg.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ca.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-cs.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-da.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-de.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-el.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-eo.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-es.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fa.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fi.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-he.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hu.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hy.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-id.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-is.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-it.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ja.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ko.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-lt.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-lv.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ms.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-nl.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-no.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-pl.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-pt-BR.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ro.js +22 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ru.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sk.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sl.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sq.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr-SR.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sv.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-th.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-tr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-uk.js +25 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-CN.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-TW.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js +9133 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.accordion.js +477 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.core.js +519 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.datepicker.js +1636 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.dialog.js +671 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.draggable.js +766 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.droppable.js +282 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.progressbar.js +116 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.resizable.js +800 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.selectable.js +257 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.slider.js +558 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.sortable.js +1019 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.tabs.js +685 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/version.txt +1 -0
- data/apps/core/components/public/js/jquery/jquery-ui/index.html +367 -0
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-1.3.2.min.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-ui-1.7.2.custom.min.js +298 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/changelog.txt +27 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.css +48 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.js +808 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.min.js +13 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.pack.js +12 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.ajaxQueue.js +116 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.bgiframe.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.js +3558 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox-compressed.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox.css +163 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/todo +166 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.form.js +653 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.query-2.1.6.js +224 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.url.js +214 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +187 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +1 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +193 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/changelog.txt +35 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/ajax-loader.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/file.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/folder-closed.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/folder.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/minus.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/plus.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-black-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-black.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-default-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-default.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-famfamfam-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-famfamfam.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-gray-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-gray.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-red-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-red.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.async.js +110 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.css +74 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.edit.js +37 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.js +256 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.min.js +15 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.pack.js +16 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.sortable.js +386 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/lib/jquery.cookie.js +92 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/lib/jquery.js +3534 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/todo +8 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/LICENSE +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/README +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.css +34 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.js +1413 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/222222_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/2e83ff_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/454545_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/888888_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/aaaaaa_40x100_textures_01_flat_0.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/cccccc_40x100_textures_03_highlight_soft_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/cd0a0a_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/dadada_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/e6e6e6_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/fbf9ee_40x100_textures_02_glass_55.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/fef1ec_40x100_textures_05_inset_soft_95.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/ffffff_40x100_textures_02_glass_65.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/ffffff_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.all.css +4 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.allplugins.css +7 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.datepicker.css +60 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.slider.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.tabs.css +9 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.theme.css +238 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.timepickr.css +44 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/ui.timepickr.js +2307 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/ui.timepickr.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/body-bg.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/btn-hover.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/btn.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/buttons.psd +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/index.html +326 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.anchorHandler.js +44 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.strings.js +290 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.ui.all.js +518 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.utils.js +255 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.utils.ui.min.js +26 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo-ff.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo-ie.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo.psd +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/package.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/reset.css +48 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/script_code.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/styles.css +308 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/themeroller_ready_black_200px.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/weather_sun.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/css/ui.dropslide.css +26 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/css/ui.timepickr.css +18 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/ui.dropslide.js +132 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/ui.timepickr.js +217 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/data/testrunner.js +1 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/index.html +34 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/otherlibs/jquery/1.2.1/jquery.js +11 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/otherlibs/jquery/1.2.3/jquery.js +11 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/qunit/testrunner.js +780 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/qunit/testsuite.css +120 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/styles.css +201 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/test.js +41 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/unit/ui.timepickr.js +154 -0
- data/apps/core/components/public/js/list.js +234 -0
- data/apps/core/components/public/js/spider.js +484 -0
- data/apps/core/components/public/widgets/search_table.js +10 -0
- data/apps/core/components/public/widgets/table.js +9 -0
- data/apps/core/components/widgets/admin/admin.rb +75 -0
- data/apps/core/components/widgets/admin/admin.shtml +16 -0
- data/apps/core/components/widgets/confirm/confirm.rb +37 -0
- data/apps/core/components/widgets/confirm/confirm.shtml +9 -0
- data/apps/core/components/widgets/crud/crud.rb +119 -0
- data/apps/core/components/widgets/crud/crud.shtml +59 -0
- data/apps/core/components/widgets/crud/form_table/form_table.rb +13 -0
- data/apps/core/components/widgets/crud/form_table/form_table.shtml +3 -0
- data/apps/core/components/widgets/list/list.rb +294 -0
- data/apps/core/components/widgets/list/list.shtml +38 -0
- data/apps/core/components/widgets/list/plugins/exportable/exportable_list.rb +19 -0
- data/apps/core/components/widgets/list/plugins/exportable/exportable_list.shtml +5 -0
- data/apps/core/components/widgets/menu/menu.rb +20 -0
- data/apps/core/components/widgets/menu/menu.shtml +13 -0
- data/apps/core/components/widgets/search_table/search_table.rb +22 -0
- data/apps/core/components/widgets/search_table/search_table.shtml +11 -0
- data/apps/core/components/widgets/switcher/switcher.rb +68 -0
- data/apps/core/components/widgets/switcher/switcher.shtml +17 -0
- data/apps/core/components/widgets/table/table.rb +153 -0
- data/apps/core/components/widgets/table/table.shtml +41 -0
- data/apps/core/components/widgets/tabs/tabs.rb +38 -0
- data/apps/core/components/widgets/tabs/tabs.shtml +2 -0
- data/apps/core/forms/_init.rb +22 -0
- data/apps/core/forms/po/it/spider_forms.po +36 -0
- data/apps/core/forms/po/spider_forms.pot +37 -0
- data/apps/core/forms/public/date_time.js +23 -0
- data/apps/core/forms/public/form.css +81 -0
- data/apps/core/forms/public/form.js +19 -0
- data/apps/core/forms/public/input.js +30 -0
- data/apps/core/forms/public/search_select.js +123 -0
- data/apps/core/forms/public/select.js +11 -0
- data/apps/core/forms/tags/element_label.erb +1 -0
- data/apps/core/forms/tags/element_row.erb +4 -0
- data/apps/core/forms/tags/row.erb +4 -0
- data/apps/core/forms/widgets/form/form.rb +430 -0
- data/apps/core/forms/widgets/form/form.shtml +47 -0
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.rb +13 -0
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +3 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.rb +48 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +4 -0
- data/apps/core/forms/widgets/inputs/hidden/hidden.rb +8 -0
- data/apps/core/forms/widgets/inputs/hidden/hidden.shtml +3 -0
- data/apps/core/forms/widgets/inputs/input/input.rb +105 -0
- data/apps/core/forms/widgets/inputs/input/input.shtml +3 -0
- data/apps/core/forms/widgets/inputs/input/readonly.shtml +6 -0
- data/apps/core/forms/widgets/inputs/password/password.rb +24 -0
- data/apps/core/forms/widgets/inputs/password/password.shtml +5 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.rb +168 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +42 -0
- data/apps/core/forms/widgets/inputs/select/select.rb +126 -0
- data/apps/core/forms/widgets/inputs/select/select.shtml +8 -0
- data/apps/core/forms/widgets/inputs/subform/subform.rb +10 -0
- data/apps/core/forms/widgets/inputs/subform/subform.shtml +5 -0
- data/apps/core/forms/widgets/inputs/text/text.rb +9 -0
- data/apps/core/forms/widgets/inputs/text/text.shtml +3 -0
- data/apps/core/forms/widgets/inputs/text_area/text_area.rb +10 -0
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +1 -0
- data/apps/drb_server/_init.rb +8 -0
- data/apps/drb_server/lib/model_server.rb +41 -0
- data/apps/drb_server/script/start_server.rb +19 -0
- data/apps/hippo/_init.rb +10 -0
- data/apps/hippo/models/mixins/hippo_struct.rb +210 -0
- data/apps/hippo/models/security_group.rb +21 -0
- data/apps/hippo/models/security_user.rb +29 -0
- data/apps/messenger/_init.rb +24 -0
- data/apps/messenger/config/options.rb +15 -0
- data/apps/messenger/config/worker.rb +3 -0
- data/apps/messenger/controllers/messenger_controller.rb +80 -0
- data/apps/messenger/controllers/mixins/messenger_controller_mixin.rb +54 -0
- data/apps/messenger/lib/backends/email/smtp.rb +0 -0
- data/apps/messenger/messenger.rb +94 -0
- data/apps/messenger/models/email.rb +22 -0
- data/apps/messenger/models/message.rb +44 -0
- data/apps/messenger/po/it/spider_messenger.po +77 -0
- data/apps/messenger/po/spider_messenger.pot +77 -0
- data/apps/messenger/views/index.shtml +13 -0
- data/apps/messenger/views/list.shtml +5 -0
- data/apps/messenger/views/messenger.layout.shtml +4 -0
- data/apps/messenger/views/queue.shtml +8 -0
- data/apps/messenger/views/tags/sent_messages.shtml +1 -0
- data/apps/soap/_init.rb +16 -0
- data/apps/soap/controllers/soap_controller.rb +334 -0
- data/apps/soap/doc/examples/example.rb +28 -0
- data/apps/soap/lib/soap.rb +217 -0
- data/apps/sso/_init.rb +16 -0
- data/apps/sso/config/options.rb +13 -0
- data/apps/sso/controllers/mixins/saml2_mixin.rb +149 -0
- data/apps/sso/lib/saml2/backend.rb +16 -0
- data/apps/sso/lib/saml2/lasso_backend.rb +88 -0
- data/apps/sso/lib/saml2.rb +112 -0
- data/apps/sso/views/saml2_post.shtml +19 -0
- data/apps/webdav/_init.rb +15 -0
- data/apps/webdav/controllers/webdav_controller.rb +862 -0
- data/apps/webdav/lib/locking.rb +193 -0
- data/apps/webdav/lib/vfs/abstract.rb +78 -0
- data/apps/webdav/lib/vfs/local.rb +126 -0
- data/apps/webdav/lib/vfs/mapped.rb +235 -0
- data/apps/webdav/lib/vfs/properties.rb +41 -0
- data/apps/worker/_init.rb +13 -0
- data/apps/worker/cmd.rb +65 -0
- data/apps/worker/config/options.rb +9 -0
- data/apps/worker/lib/runner.rb +43 -0
- data/apps/worker/lib/task.rb +9 -0
- data/apps/worker/models/job.rb +20 -0
- data/apps/worker/worker.rb +168 -0
- data/bin/spider +9 -0
- data/blueprints/app/_init.rb +10 -0
- data/blueprints/app/controllers/__APP___controller.rb +14 -0
- data/blueprints/app/views/__APP__.layout.shtml +8 -0
- data/blueprints/app/views/index.shtml +3 -0
- data/blueprints/install/config/config.yml +14 -0
- data/blueprints/install/init.rb +3 -0
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_messenger.mo +0 -0
- data/lib/spiderfw/app.rb +186 -0
- data/lib/spiderfw/autoload.rb +12 -0
- data/lib/spiderfw/cache/template_cache.rb +136 -0
- data/lib/spiderfw/cmd/cmd.rb +72 -0
- data/lib/spiderfw/cmd/commands/cert.rb +427 -0
- data/lib/spiderfw/cmd/commands/console.rb +27 -0
- data/lib/spiderfw/cmd/commands/init.rb +52 -0
- data/lib/spiderfw/cmd/commands/model.rb +131 -0
- data/lib/spiderfw/cmd/commands/setup.rb +54 -0
- data/lib/spiderfw/cmd/commands/test.rb +61 -0
- data/lib/spiderfw/cmd/commands/webserver.rb +93 -0
- data/lib/spiderfw/config/configurable.rb +38 -0
- data/lib/spiderfw/config/configuration.rb +281 -0
- data/lib/spiderfw/config/options/spider.rb +122 -0
- data/lib/spiderfw/controller/app_controller.rb +14 -0
- data/lib/spiderfw/controller/controller.rb +321 -0
- data/lib/spiderfw/controller/controller_exceptions.rb +27 -0
- data/lib/spiderfw/controller/controller_io.rb +26 -0
- data/lib/spiderfw/controller/controller_mixin.rb +12 -0
- data/lib/spiderfw/controller/cookie.rb +20 -0
- data/lib/spiderfw/controller/cookies.rb +17 -0
- data/lib/spiderfw/controller/dispatcher.rb +269 -0
- data/lib/spiderfw/controller/first_responder.rb +59 -0
- data/lib/spiderfw/controller/formats/html.rb +90 -0
- data/lib/spiderfw/controller/helpers/widget_helper.rb +73 -0
- data/lib/spiderfw/controller/home_controller.rb +26 -0
- data/lib/spiderfw/controller/http_controller.rb +112 -0
- data/lib/spiderfw/controller/mixins/http_mixin.rb +228 -0
- data/lib/spiderfw/controller/mixins/static_content.rb +90 -0
- data/lib/spiderfw/controller/mixins/visual.rb +489 -0
- data/lib/spiderfw/controller/page_controller.rb +39 -0
- data/lib/spiderfw/controller/request.rb +48 -0
- data/lib/spiderfw/controller/response.rb +50 -0
- data/lib/spiderfw/controller/router.rb +9 -0
- data/lib/spiderfw/controller/scene.rb +27 -0
- data/lib/spiderfw/controller/session/file_session.rb +83 -0
- data/lib/spiderfw/controller/session/flash_hash.rb +56 -0
- data/lib/spiderfw/controller/session/memory_session.rb +62 -0
- data/lib/spiderfw/controller/session/transient_hash.rb +18 -0
- data/lib/spiderfw/controller/session.rb +106 -0
- data/lib/spiderfw/controller/spider_controller.rb +20 -0
- data/lib/spiderfw/create.rb +64 -0
- data/lib/spiderfw/env.rb +17 -0
- data/lib/spiderfw/exceptions.rb +2 -0
- data/lib/spiderfw/home.rb +26 -0
- data/lib/spiderfw/http/adapters/cgi.rb +62 -0
- data/lib/spiderfw/http/adapters/cgi_io.rb +27 -0
- data/lib/spiderfw/http/adapters/fcgi.rb +62 -0
- data/lib/spiderfw/http/adapters/mongrel.rb +207 -0
- data/lib/spiderfw/http/adapters/rack.rb +152 -0
- data/lib/spiderfw/http/adapters/thin.rb +38 -0
- data/lib/spiderfw/http/adapters/webrick.rb +176 -0
- data/lib/spiderfw/http/http.rb +297 -0
- data/lib/spiderfw/http/server.rb +40 -0
- data/lib/spiderfw/i18n/cldr.rb +114 -0
- data/lib/spiderfw/i18n/gettext.rb +8 -0
- data/lib/spiderfw/i18n/i18n.rb +120 -0
- data/lib/spiderfw/i18n/provider.rb +12 -0
- data/lib/spiderfw/i18n/rails.rb +89 -0
- data/lib/spiderfw/i18n/shtml_parser.rb +41 -0
- data/lib/spiderfw/model/active_record.rb +335 -0
- data/lib/spiderfw/model/base_model.rb +2068 -0
- data/lib/spiderfw/model/condition.rb +416 -0
- data/lib/spiderfw/model/data_type.rb +75 -0
- data/lib/spiderfw/model/datatypes/binary.rb +10 -0
- data/lib/spiderfw/model/datatypes/bool.rb +10 -0
- data/lib/spiderfw/model/datatypes/decimal.rb +22 -0
- data/lib/spiderfw/model/datatypes/email.rb +13 -0
- data/lib/spiderfw/model/datatypes/password.rb +63 -0
- data/lib/spiderfw/model/datatypes/serialized_object.rb +32 -0
- data/lib/spiderfw/model/datatypes/text.rb +10 -0
- data/lib/spiderfw/model/datatypes/uuid.rb +29 -0
- data/lib/spiderfw/model/datatypes.rb +19 -0
- data/lib/spiderfw/model/element.rb +250 -0
- data/lib/spiderfw/model/extended_models/managed.rb +43 -0
- data/lib/spiderfw/model/identity_mapper.rb +89 -0
- data/lib/spiderfw/model/inline_model.rb +37 -0
- data/lib/spiderfw/model/mappers/db_mapper.rb +1126 -0
- data/lib/spiderfw/model/mappers/hash_mapper.rb +114 -0
- data/lib/spiderfw/model/mappers/mapper.rb +926 -0
- data/lib/spiderfw/model/mappers/mappers.rb +7 -0
- data/lib/spiderfw/model/mappers/proxy_mapper.rb +25 -0
- data/lib/spiderfw/model/mappers/vfs/flat_file.rb +31 -0
- data/lib/spiderfw/model/mixins/converted.rb +110 -0
- data/lib/spiderfw/model/mixins/list.rb +135 -0
- data/lib/spiderfw/model/mixins/mixins.rb +7 -0
- data/lib/spiderfw/model/mixins/state_machine.rb +81 -0
- data/lib/spiderfw/model/mixins/synchronized.rb +88 -0
- data/lib/spiderfw/model/mixins/tree.rb +296 -0
- data/lib/spiderfw/model/mixins/versioned.rb +147 -0
- data/lib/spiderfw/model/model.rb +226 -0
- data/lib/spiderfw/model/model_hash.rb +50 -0
- data/lib/spiderfw/model/proxy_model.rb +37 -0
- data/lib/spiderfw/model/query.rb +147 -0
- data/lib/spiderfw/model/query_funcs.rb +99 -0
- data/lib/spiderfw/model/query_set.rb +700 -0
- data/lib/spiderfw/model/request.rb +80 -0
- data/lib/spiderfw/model/storage/base_storage.rb +110 -0
- data/lib/spiderfw/model/storage/db/adapters/mssql.rb +129 -0
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +436 -0
- data/lib/spiderfw/model/storage/db/adapters/oci8.rb +533 -0
- data/lib/spiderfw/model/storage/db/adapters/sqlite.rb +163 -0
- data/lib/spiderfw/model/storage/db/connectors/odbc.rb +213 -0
- data/lib/spiderfw/model/storage/db/db.rb +13 -0
- data/lib/spiderfw/model/storage/db/db_connection_pool.rb +126 -0
- data/lib/spiderfw/model/storage/db/db_connector.rb +9 -0
- data/lib/spiderfw/model/storage/db/db_schema.rb +233 -0
- data/lib/spiderfw/model/storage/db/db_storage.rb +872 -0
- data/lib/spiderfw/model/storage/db/dialects/no_total_rows.rb +18 -0
- data/lib/spiderfw/model/storage/db/reflector.rb +36 -0
- data/lib/spiderfw/model/storage/null_storage.rb +18 -0
- data/lib/spiderfw/model/storage/schema.rb +19 -0
- data/lib/spiderfw/model/storage.rb +72 -0
- data/lib/spiderfw/model/sync.rb +94 -0
- data/lib/spiderfw/model/type.rb +13 -0
- data/lib/spiderfw/model/unit_of_work.rb +75 -0
- data/lib/spiderfw/requires.rb +21 -0
- data/lib/spiderfw/resource.rb +18 -0
- data/lib/spiderfw/setup/setup_task.rb +44 -0
- data/lib/spiderfw/tag/tag.rb +28 -0
- data/lib/spiderfw/templates/blocks/attr_if.rb +32 -0
- data/lib/spiderfw/templates/blocks/comment.rb +38 -0
- data/lib/spiderfw/templates/blocks/debugger.rb +16 -0
- data/lib/spiderfw/templates/blocks/each.rb +51 -0
- data/lib/spiderfw/templates/blocks/html.rb +70 -0
- data/lib/spiderfw/templates/blocks/if.rb +35 -0
- data/lib/spiderfw/templates/blocks/pass.rb +16 -0
- data/lib/spiderfw/templates/blocks/render.rb +23 -0
- data/lib/spiderfw/templates/blocks/run.rb +30 -0
- data/lib/spiderfw/templates/blocks/tag.rb +21 -0
- data/lib/spiderfw/templates/blocks/tag_if.rb +29 -0
- data/lib/spiderfw/templates/blocks/text.rb +43 -0
- data/lib/spiderfw/templates/blocks/widget.rb +58 -0
- data/lib/spiderfw/templates/blocks/yield.rb +18 -0
- data/lib/spiderfw/templates/layout.rb +44 -0
- data/lib/spiderfw/templates/resources/less.rb +14 -0
- data/lib/spiderfw/templates/template.rb +625 -0
- data/lib/spiderfw/templates/template_blocks.rb +185 -0
- data/lib/spiderfw/utils/annotations.rb +201 -0
- data/lib/spiderfw/utils/fork.rb +75 -0
- data/lib/spiderfw/utils/hash_comparison.rb +8 -0
- data/lib/spiderfw/utils/inflector.rb +42 -0
- data/lib/spiderfw/utils/logger.rb +92 -0
- data/lib/spiderfw/utils/monkey/class.rb +59 -0
- data/lib/spiderfw/utils/monkey/date_time.rb +34 -0
- data/lib/spiderfw/utils/monkey/debugger.rb +25 -0
- data/lib/spiderfw/utils/monkey/exception.rb +23 -0
- data/lib/spiderfw/utils/monkey/kernel.rb +12 -0
- data/lib/spiderfw/utils/monkey/module.rb +12 -0
- data/lib/spiderfw/utils/monkey/symbol.rb +7 -0
- data/lib/spiderfw/utils/monkey/time.rb +17 -0
- data/lib/spiderfw/utils/multi_level_hash.rb +33 -0
- data/lib/spiderfw/utils/periodic_runner.rb +50 -0
- data/lib/spiderfw/utils/rails.rb +78 -0
- data/lib/spiderfw/utils/rails_app.rb +53 -0
- data/lib/spiderfw/utils/sanitizer.rb +178 -0
- data/lib/spiderfw/utils/setup_task.rb +35 -0
- data/lib/spiderfw/utils/shared_store/file_shared_store.rb +73 -0
- data/lib/spiderfw/utils/shared_store/memory_shared_store.rb +46 -0
- data/lib/spiderfw/utils/shared_store.rb +47 -0
- data/lib/spiderfw/utils/test_case.rb +24 -0
- data/lib/spiderfw/utils/thread_out.rb +24 -0
- data/lib/spiderfw/version.rb +3 -0
- data/lib/spiderfw/widget/rest_model.rb +20 -0
- data/lib/spiderfw/widget/widget.rb +671 -0
- data/lib/spiderfw/widget/widget_attributes.rb +54 -0
- data/lib/spiderfw/widget/widget_plugin.rb +37 -0
- data/lib/spiderfw.rb +509 -0
- data/spider.gemspec +43 -0
- data/views/errors/404.shtml +6 -0
- data/views/errors/error.layout.shtml +70 -0
- data/views/errors/error_generic.shtml +6 -0
- metadata +800 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spiderfw'
|
2
|
+
require 'apps/drb_server/lib/model_server'
|
3
|
+
|
4
|
+
unless ARGV.length == 2
|
5
|
+
puts "Usage: ruby start_server.rb type druby://bind_address:port"
|
6
|
+
exit
|
7
|
+
end
|
8
|
+
|
9
|
+
server_type = ARGV.shift
|
10
|
+
uri = ARGV.shift
|
11
|
+
|
12
|
+
case server_type
|
13
|
+
when 'model'
|
14
|
+
server = SpiderApps::DrbServer::ModelServer.new(uri)
|
15
|
+
server.start
|
16
|
+
else
|
17
|
+
puts "Unrecognized server #{type}"
|
18
|
+
exit
|
19
|
+
end
|
data/apps/hippo/_init.rb
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
module Hippo
|
2
|
+
|
3
|
+
class SecurityUser < Spider::Model::BaseModel; end
|
4
|
+
class SecurityGroup < Spider::Model::BaseModel; end
|
5
|
+
|
6
|
+
module HippoStruct
|
7
|
+
|
8
|
+
def self.included(mod)
|
9
|
+
mod.extend(ClassMethods)
|
10
|
+
mod.mapper_include(Mapper)
|
11
|
+
mod.element :id, Fixnum, :primary_key => true
|
12
|
+
mod.element :cr_date, DateTime
|
13
|
+
mod.element :mod_date, DateTime
|
14
|
+
mod.element :cr_user, Hippo::SecurityUser
|
15
|
+
mod.element :mod_user, Hippo::SecurityUser
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.base_elements
|
19
|
+
[:id, :cr_date, :mod_date, :cr_user, :mod_user]
|
20
|
+
end
|
21
|
+
|
22
|
+
module ClassMethods
|
23
|
+
|
24
|
+
def element(name, type, attributes={}, &proc)
|
25
|
+
el = super
|
26
|
+
if (el.attributes[:junction])
|
27
|
+
el.model.elements[:id].attributes[:primary_key] = false
|
28
|
+
el.model.elements[el.attributes[:reverse]].attributes[:primary_key] = true
|
29
|
+
el.model.elements[el.attributes[:junction_their_element]].attributes[:primary_key] = true
|
30
|
+
end
|
31
|
+
return el
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
def binding(val=nil)
|
36
|
+
if val
|
37
|
+
@binding = val
|
38
|
+
elements_array.select{ |el| el.attributes[:added_reverse] }.each do |el|
|
39
|
+
reverse = el.attributes[:reverse]
|
40
|
+
if (el.type.binding && el.type.binding[:elements][reverse.to_s])
|
41
|
+
el_b = el.type.binding[:elements][reverse.to_s]
|
42
|
+
if (el_b[:type] == "mmbind")
|
43
|
+
@binding[:elements][el.name.to_s] = {
|
44
|
+
:type => "mmbind",
|
45
|
+
:table => el_b[:table],
|
46
|
+
:local_id => el_b[:remote_id],
|
47
|
+
:remote_id => el_b[:local_id]
|
48
|
+
}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
self.mapper.schema # generates the schema
|
53
|
+
end
|
54
|
+
return @binding
|
55
|
+
end
|
56
|
+
|
57
|
+
def convert_type(type)
|
58
|
+
return type.inspect if (type.is_a?(Hash))
|
59
|
+
convert = {
|
60
|
+
'text' => String,
|
61
|
+
'longText' => Spider::DataTypes::Text,
|
62
|
+
'dateTime' => DateTime,
|
63
|
+
'int' => Fixnum,
|
64
|
+
'order' => Fixnum,
|
65
|
+
'bool' => Spider::DataTypes::Bool,
|
66
|
+
'real' => Float,
|
67
|
+
'password' => Spider::DataTypes::Password,
|
68
|
+
'html' => Spider::DataTypes::Text,
|
69
|
+
'richText' => Spider::DataTypes::Text
|
70
|
+
}
|
71
|
+
return convert[type] if (convert[type])
|
72
|
+
return convert_struct_name(type)
|
73
|
+
end
|
74
|
+
|
75
|
+
def convert_struct_name(struct_name)
|
76
|
+
ns, local = struct_name.split('::')
|
77
|
+
unless local
|
78
|
+
local = ns
|
79
|
+
ns = 'hippo'
|
80
|
+
end
|
81
|
+
local = local[1..-1] if local[0].chr == '_'
|
82
|
+
if @ns_mappings[ns]
|
83
|
+
app = @ns_mappings[ns]
|
84
|
+
else
|
85
|
+
app = Spider::Inflector.camelize(ns)
|
86
|
+
end
|
87
|
+
model_name = Spider::Inflector.camelize(local)
|
88
|
+
return "#{app}::#{model_name}"
|
89
|
+
end
|
90
|
+
|
91
|
+
def extend_model(model, params={})
|
92
|
+
integrated_name = (self.parent_module == model.parent_module) ? model.short_name : model.name
|
93
|
+
integrated_name = Spider::Inflector.underscore(integrated_name).gsub('/', '_')
|
94
|
+
integrated_name = integrated_name.to_sym
|
95
|
+
@extended_models ||= {}
|
96
|
+
@extended_models[model] = integrated_name
|
97
|
+
attributes = {}
|
98
|
+
attributes[:hidden] = true
|
99
|
+
attributes[:delete_cascade] = params[:delete_cascade]
|
100
|
+
|
101
|
+
# create junction
|
102
|
+
orig_type = model
|
103
|
+
assoc_type_name = Spider::Inflector.camelize(model.name).split('::')[1]
|
104
|
+
|
105
|
+
attributes[:junction] = true
|
106
|
+
attributes[:junction_id] ||= :id
|
107
|
+
self_name = self.short_name.gsub('/', '_').downcase.to_sym
|
108
|
+
attributes[:reverse] = self_name
|
109
|
+
other_name = Spider::Inflector.underscore(orig_type.short_name == self.short_name ? orig_type.name : orig_type.short_name).gsub('/', '_').downcase.to_sym
|
110
|
+
other_name = :"#{other_name}_ref" if (orig_type.elements[other_name])
|
111
|
+
attributes[:junction_their_element] = other_name
|
112
|
+
assoc_type = const_set(assoc_type_name, Class.new(Spider::Model::BaseModel)) # FIXME: maybe should extend self, not the type
|
113
|
+
assoc_type.attributes[:sub_model] = self
|
114
|
+
#assoc_type.element(attributes[:junction_id], Fixnum, :primary_key => true, :autoincrement => true, :hidden => true)
|
115
|
+
assoc_type.element(self_name, self, :hidden => true, :reverse => name, :primary_key => true) # FIXME: must check if reverse exists?
|
116
|
+
# FIXME! fix in case of clashes with existent elements
|
117
|
+
assoc_type.element(other_name, orig_type, :primary_key => true)
|
118
|
+
assoc_type.integrate(other_name, :hidden => true, :no_pks => true)
|
119
|
+
attributes[:association_type] = assoc_type
|
120
|
+
integrated = element(integrated_name, model, attributes)
|
121
|
+
integrate(integrated_name, :no_pks => true) # scazza perché prende le pks da sopra
|
122
|
+
end
|
123
|
+
|
124
|
+
def get_storage(storage_string='default')
|
125
|
+
storage = super
|
126
|
+
storage.extend(HippoStorage)
|
127
|
+
return storage
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
module Mapper
|
133
|
+
|
134
|
+
def generate_schema(schema=nil)
|
135
|
+
return super unless @model.binding
|
136
|
+
schema = Spider::Model::Storage::Db::DbSchema.new
|
137
|
+
schema.table = @model.binding[:table]
|
138
|
+
@model.binding[:elements].each do |el, binding|
|
139
|
+
element = @model.elements[el.to_sym]
|
140
|
+
next unless element
|
141
|
+
if (binding[:type] == 'mmbind')
|
142
|
+
junction = element.model.mapper.schema
|
143
|
+
junction.table = binding[:table]
|
144
|
+
junction.foreign_keys[element.attributes[:reverse]] ||= {}
|
145
|
+
junction.foreign_keys[element.attributes[:reverse]][@model.primary_keys[0].name] ||= {}
|
146
|
+
junction.foreign_keys[element.attributes[:reverse]][@model.primary_keys[0].name][:name] = binding[:local_id]
|
147
|
+
junction.foreign_keys[element.attributes[:junction_their_element]] ||= {}
|
148
|
+
junction.foreign_keys[element.attributes[:junction_their_element]][element.type.primary_keys[0].name] ||= {}
|
149
|
+
junction.foreign_keys[element.attributes[:junction_their_element]][element.type.primary_keys[0].name][:name] = binding[:remote_id]
|
150
|
+
elsif (element.model? && !element.multiple?)
|
151
|
+
schema.foreign_keys[element.name] ||= {}
|
152
|
+
schema.foreign_keys[element.name][element.model.primary_keys[0].name] ||= {}
|
153
|
+
schema.foreign_keys[element.name][element.model.primary_keys[0].name][:name] = binding[:field]
|
154
|
+
else
|
155
|
+
schema.columns[element.name] ||= {}
|
156
|
+
schema.columns[element.name][:name] = binding[:field]
|
157
|
+
end
|
158
|
+
end
|
159
|
+
if (@model.binding[:parent_ref])
|
160
|
+
pr = @model.binding[:parent_ref]
|
161
|
+
extended = nil
|
162
|
+
@model.extended_models.each { |k, v| extended = k; break }
|
163
|
+
element = @model.elements[@model.extended_models[extended]]
|
164
|
+
schema.foreign_keys.delete(@model.extended_models[extended])
|
165
|
+
junction = element.model.mapper.schema
|
166
|
+
junction.table = pr[:table]
|
167
|
+
junction.foreign_keys[element.attributes[:reverse]] ||= {}
|
168
|
+
junction.foreign_keys[element.attributes[:reverse]][@model.primary_keys[0].name] ||= {}
|
169
|
+
junction.foreign_keys[element.attributes[:reverse]][@model.primary_keys[0].name][:name] = pr[:child_id]
|
170
|
+
junction.foreign_keys[element.attributes[:junction_their_element]] ||= {}
|
171
|
+
junction.foreign_keys[element.attributes[:junction_their_element]][element.type.primary_keys[0].name] ||= {}
|
172
|
+
junction.foreign_keys[element.attributes[:junction_their_element]][element.type.primary_keys[0].name][:name] = pr[:parent_id]
|
173
|
+
end
|
174
|
+
@model.elements_array.each do |el|
|
175
|
+
unless @model.binding[:elements][el.name.to_s] || HippoStruct.base_elements.include?(el.name)
|
176
|
+
schema.pass[el.name] = true
|
177
|
+
end
|
178
|
+
end
|
179
|
+
# debugger if @model.name.to_s == "AgendaHippo::Ordine"
|
180
|
+
return super(schema)
|
181
|
+
end
|
182
|
+
|
183
|
+
end
|
184
|
+
|
185
|
+
module HippoStorage
|
186
|
+
|
187
|
+
def column_type(type, attributes)
|
188
|
+
return super(String, attributes) if (type == DateTime)
|
189
|
+
return super
|
190
|
+
end
|
191
|
+
|
192
|
+
def value_to_mapper(type, value)
|
193
|
+
return value unless value
|
194
|
+
case type.name
|
195
|
+
when 'DateTime'
|
196
|
+
begin
|
197
|
+
return DateTime.parse(value)
|
198
|
+
rescue ArgumentError
|
199
|
+
return nil
|
200
|
+
end
|
201
|
+
end
|
202
|
+
return super
|
203
|
+
end
|
204
|
+
|
205
|
+
end
|
206
|
+
|
207
|
+
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Hippo
|
2
|
+
|
3
|
+
class SecurityGroup < Spider::Model::BaseModel
|
4
|
+
include HippoStruct
|
5
|
+
|
6
|
+
element :name, String
|
7
|
+
# element :parent, Hippo::SecurityGroup
|
8
|
+
|
9
|
+
use_storage 'hippo'
|
10
|
+
# binding({
|
11
|
+
# :table => '_SECURITY_GROUP',
|
12
|
+
# :elements => {
|
13
|
+
# "name" => {:field => "NAME"},
|
14
|
+
# "parent" => {:field => "ID_PARENT"}
|
15
|
+
# }
|
16
|
+
#
|
17
|
+
# })
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'apps/hippo/models/security_group'
|
2
|
+
|
3
|
+
module Hippo
|
4
|
+
|
5
|
+
class SecurityUser < Spider::Model::BaseModel
|
6
|
+
include HippoStruct
|
7
|
+
|
8
|
+
element :login, String, :required => true
|
9
|
+
element :password, Spider::DataTypes::Password
|
10
|
+
element :groups, Hippo::SecurityGroup, :multiple => true, :label => "Gruppi"
|
11
|
+
|
12
|
+
use_storage 'hippo'
|
13
|
+
binding({
|
14
|
+
:table => '_SECURITY_USER',
|
15
|
+
:elements => {
|
16
|
+
"login" => {:field => "LOGIN"},
|
17
|
+
"password" => {:field => "PASSWORD"},
|
18
|
+
"groups" => {
|
19
|
+
:type=>"mmbind",
|
20
|
+
:local_id=>"ID__SECURITY_USER",
|
21
|
+
:remote_id=>"ID__SECURITY_GROUP",
|
22
|
+
:table=>"_SECURITY_GROUP_REF__SECURITY_USER"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
})
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Spider.load_app('core/admin')
|
2
|
+
Spider.load_app('worker')
|
3
|
+
|
4
|
+
module Spider
|
5
|
+
|
6
|
+
module Messenger
|
7
|
+
|
8
|
+
@description = ""
|
9
|
+
@version = 0.1
|
10
|
+
@path = File.dirname(__FILE__)
|
11
|
+
@controller = :MessengerController
|
12
|
+
include Spider::App
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
Spider::Admin.add(Messenger)
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'apps/messenger/messenger'
|
21
|
+
require 'apps/messenger/controllers/messenger_controller'
|
22
|
+
require 'apps/messenger/controllers/mixins/messenger_controller_mixin'
|
23
|
+
|
24
|
+
# gem dependencies: mailfactory for sending email from templates
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Spider
|
2
|
+
|
3
|
+
config_option 'messenger.smtp.address', _("SMTP address to use when sending mail"), :default => 'localhost'
|
4
|
+
config_option 'messenger.smtp.port', _("SMTP port"), :default => 25
|
5
|
+
config_option 'messenger.smtp.domain', _("HELO domain"), :default => 'localhost'
|
6
|
+
config_option 'messenger.smtp.username', _("SMTP authentication username"), :default => nil
|
7
|
+
config_option 'messenger.smtp.password', _("SMTP authentication password"), :default => nil
|
8
|
+
config_option 'messenger.smtp.auth_scheme', _("SMTP authentication scheme"), :default => nil, :type => Symbol,
|
9
|
+
:choices => [nil, :plain, :login, :cram_md5]
|
10
|
+
|
11
|
+
config_option 'messenger.email.retries', :type => Fixnum, :default => 5
|
12
|
+
config_option 'messenger.email.retry_time', _("Seconds to wait until retry (will be incremented at each retry)"),
|
13
|
+
:type => Fixnum, :default => 10
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
module Spider; module Messenger
|
2
|
+
|
3
|
+
class MessengerController < Spider::PageController
|
4
|
+
layout [:spider_admin, 'messenger.layout']
|
5
|
+
|
6
|
+
Messenger.queues.keys.each do |queue|
|
7
|
+
route queue.to_s, self, :do => lambda{ |action| @queue = @dispatch_action }
|
8
|
+
end
|
9
|
+
|
10
|
+
def before(action='', *params)
|
11
|
+
if (@queue)
|
12
|
+
q = Messenger.queues[@queue.to_sym]
|
13
|
+
raise NotFound(action) unless q
|
14
|
+
@queue_model = q[:model]
|
15
|
+
@scene.queue_model = @queue_model
|
16
|
+
end
|
17
|
+
super
|
18
|
+
@response.headers['Content-Type'] = 'text/html'
|
19
|
+
end
|
20
|
+
|
21
|
+
def execute(action='', *params)
|
22
|
+
return super unless @queue
|
23
|
+
# debugger
|
24
|
+
# raise NotFound.new(action) unless @queue
|
25
|
+
super
|
26
|
+
end
|
27
|
+
|
28
|
+
def index
|
29
|
+
return queue if (@queue)
|
30
|
+
@scene.queues = []
|
31
|
+
@scene.queue_info = {}
|
32
|
+
Messenger.queues.each do |name, details|
|
33
|
+
@scene.queues << name
|
34
|
+
model = details[:model]
|
35
|
+
@scene.queue_info[name] = {
|
36
|
+
:label => details[:label],
|
37
|
+
:sent => model.sent_messages.total_rows,
|
38
|
+
:queued => model.queued_messages.total_rows,
|
39
|
+
:failed => model.failed_messages.total_rows
|
40
|
+
}
|
41
|
+
end
|
42
|
+
render 'index'
|
43
|
+
end
|
44
|
+
|
45
|
+
def queue
|
46
|
+
q = Messenger.queues[@queue.to_sym]
|
47
|
+
@scene.title = q[:label]
|
48
|
+
@scene.queued = q[:model].queued_messages
|
49
|
+
@scene.sent = q[:model].sent_messages
|
50
|
+
@scene.failed = q[:model].failed_messages
|
51
|
+
render 'queue'
|
52
|
+
end
|
53
|
+
|
54
|
+
def failed
|
55
|
+
end
|
56
|
+
|
57
|
+
def sent
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def list(queryset=nil)
|
63
|
+
render 'list'
|
64
|
+
#
|
65
|
+
# tmpl = init_template('list')
|
66
|
+
# tmpl.init(@scene)
|
67
|
+
# tmpl.exec
|
68
|
+
# tmpl.render(@scene)
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
end; end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'erb'
|
2
|
+
require 'mailfactory'
|
3
|
+
|
4
|
+
Spider.register_resource_type(:email, :extensions => ['erb'], :path => 'templates/email')
|
5
|
+
|
6
|
+
module Spider; module Messenger
|
7
|
+
|
8
|
+
module MessengerControllerMixin
|
9
|
+
|
10
|
+
# Compiles an e-mail from given template and scene, and sends it using
|
11
|
+
# #Messenger::email
|
12
|
+
# template is the template name (found in templates/email), without the extension
|
13
|
+
# will use template.html.erb and template.txt.erb if they exist, template.erb otherwise.
|
14
|
+
# attachments must be an array of hashes like
|
15
|
+
# {:file => '/full/file/path', :type => 'mime type', :file_name => 'optional email file name',
|
16
|
+
# :headers => 'optional string or array of additional headers'}
|
17
|
+
def email(template, scene, from, to, headers={}, attachments=[], params={})
|
18
|
+
path_txt = self.class.find_resource_path(:email, template+'.txt')
|
19
|
+
path_txt = nil unless File.exist?(path_txt)
|
20
|
+
path_html = self.class.find_resource_path(:email, template+'.txt')
|
21
|
+
path_html = nil unless File.exist?(path_html)
|
22
|
+
scene_binding = scene.instance_eval{ binding }
|
23
|
+
if (path_txt || path_html)
|
24
|
+
text = ERB.new(IO.read(path_txt)).result(scene_binding) if path_txt
|
25
|
+
html = ERB.new(IO.read(path_html)).result(scene_binding) if path_html
|
26
|
+
else
|
27
|
+
path = self.class.find_resource_path(:email, template)
|
28
|
+
text = ERB.new(IO.read(path)).result(scene_binding)
|
29
|
+
end
|
30
|
+
mail = MailFactory.new
|
31
|
+
mail.To = to
|
32
|
+
mail.From = from
|
33
|
+
headers.each do |key, value|
|
34
|
+
mail.add_header(key, value)
|
35
|
+
end
|
36
|
+
mail.html = html if html
|
37
|
+
mail.text = text if text
|
38
|
+
debugger
|
39
|
+
if (attachments && !attachments.empty?)
|
40
|
+
attachments.each do |att|
|
41
|
+
if (att[:file_name])
|
42
|
+
mail.add_attachment_as(att[:file], att[:file_name], att[:type], att[:headers])
|
43
|
+
else
|
44
|
+
mail.add_attachment(att[:file], att[:type], att[:headers])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
mail_headers, mail_body = mail.to_s.split("\r\n\r\n")
|
49
|
+
Messenger.email(from, to, mail_headers, mail_body, params)
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end; end
|
File without changes
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require 'apps/messenger/models/email'
|
2
|
+
|
3
|
+
|
4
|
+
module Spider
|
5
|
+
|
6
|
+
module Messenger
|
7
|
+
|
8
|
+
def self.queues
|
9
|
+
{
|
10
|
+
:email => {
|
11
|
+
:label => _("Email"),
|
12
|
+
:model => Email
|
13
|
+
}
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.process_queue(queue)
|
18
|
+
@mutex ||= Mutex.new
|
19
|
+
return if @mutex.locked?
|
20
|
+
raise ArgumentError, "Queue #{name} not found" unless self.queues[queue]
|
21
|
+
model = self.queues[queue][:model]
|
22
|
+
@mutex.synchronize do
|
23
|
+
now = DateTime.now
|
24
|
+
list = model.where{ (sent == nil) & (next_try <= now) }
|
25
|
+
list.each do |msg|
|
26
|
+
res = false
|
27
|
+
exc = nil
|
28
|
+
begin
|
29
|
+
res = self.send(:"send_#{queue}", msg)
|
30
|
+
rescue => exc
|
31
|
+
end
|
32
|
+
if (res)
|
33
|
+
msg.sent = now
|
34
|
+
msg.next_try = nil
|
35
|
+
msg.backend_response = res
|
36
|
+
msg.save
|
37
|
+
else
|
38
|
+
msg.last_try = now
|
39
|
+
msg.attempts ||= 0
|
40
|
+
msg.attempts += 1
|
41
|
+
if (exc)
|
42
|
+
msg.backend_response = exc.to_s
|
43
|
+
else
|
44
|
+
msg.backend_response = res
|
45
|
+
end
|
46
|
+
if (msg.attempts >= Spider.conf.get("messenger.#{queue}.retries"))
|
47
|
+
msg.next_try = nil
|
48
|
+
else
|
49
|
+
msg.next_try = msg.last_try.to_local_time + (msg.attempts * Spider.conf.get("messenger.#{queue}.retry_time") * 60)
|
50
|
+
end
|
51
|
+
msg.save
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.email(from, to, headers, body, params={})
|
59
|
+
if (headers.is_a?(Hash))
|
60
|
+
headers = headers.inject(""){ |h, p| h += "#{p[0]}: #{p[1]}\n"}
|
61
|
+
elsif(headers.is_a?(Array))
|
62
|
+
headers = headers.join("\n")
|
63
|
+
end
|
64
|
+
headers = "To: #{to}\r\n"+headers unless headers =~ /^To/
|
65
|
+
headers = "From: #{from}\r\n"+headers unless headers =~ /^From/
|
66
|
+
msg = Email.new(
|
67
|
+
:from => from, :to => to, :headers => headers, :body => body
|
68
|
+
)
|
69
|
+
msg.next_try = params[:send_from] || DateTime.now
|
70
|
+
msg.save
|
71
|
+
return msg
|
72
|
+
end
|
73
|
+
|
74
|
+
# Actual SMTP send.
|
75
|
+
def self.send_email(msg)
|
76
|
+
require 'net/smtp'
|
77
|
+
res = false
|
78
|
+
Net::SMTP.start(
|
79
|
+
Spider.conf.get('messenger.smtp.address'),
|
80
|
+
Spider.conf.get('messenger.smpt.port'),
|
81
|
+
Spider.conf.get('messenger.smtp.domain'),
|
82
|
+
Spider.conf.get('messenger.smtp.username'),
|
83
|
+
Spider.conf.get('messenger.smtp.password'),
|
84
|
+
Spider.conf.get('messenger.smtp.auth_scheme')
|
85
|
+
) do |smtp|
|
86
|
+
msg_str = msg.headers+"\r\n"+msg.body
|
87
|
+
res = smtp.send_message msg_str, msg.from, msg.to
|
88
|
+
end
|
89
|
+
return res.string
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'apps/messenger/models/message'
|
2
|
+
|
3
|
+
module Spider; module Messenger
|
4
|
+
|
5
|
+
class Email < Message
|
6
|
+
class_table_inheritance :add_polymorphic => true
|
7
|
+
element :from, String, :label => _("From")
|
8
|
+
element :to, String, :label => _("To")
|
9
|
+
element :headers, Text, :label => _("Headers")
|
10
|
+
element :subject, String, :label => _("Subject"), :computed_from => [:headers]
|
11
|
+
element :body, Text, :label => _("Body")
|
12
|
+
|
13
|
+
def subject
|
14
|
+
if (self.headers =~ /^Subject: (.+)$/)
|
15
|
+
return $1
|
16
|
+
end
|
17
|
+
return ''
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end; end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'uuid'
|
2
|
+
|
3
|
+
module Spider; module Messenger
|
4
|
+
|
5
|
+
class Message < Spider::Model::Managed
|
6
|
+
element :ticket, UUID, :label => _("Ticket")
|
7
|
+
element :last_try, DateTime, :label => _("Last try")
|
8
|
+
element :next_try, DateTime, :label => _("Next try")
|
9
|
+
element :attempts, Fixnum, :label => _("Attempts")
|
10
|
+
element :backend_response, String, :label => _("Last status")
|
11
|
+
element :sent, DateTime, :label => _("Sent at")
|
12
|
+
|
13
|
+
def status
|
14
|
+
if self.sent
|
15
|
+
:sent
|
16
|
+
elsif (self.next_try)
|
17
|
+
:queue
|
18
|
+
else
|
19
|
+
:failed
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.sent_messages
|
24
|
+
self.where{ q.sent .not nil }
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.queued_messages
|
28
|
+
self.where{ (q.sent == nil) & (q.next_try .not nil) }
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.failed_messages
|
32
|
+
self.where{ (q.sent == nil) & (q.next_try .not nil) }
|
33
|
+
end
|
34
|
+
|
35
|
+
with_mapper do
|
36
|
+
def before_save(obj, mode)
|
37
|
+
obj.ticket = ::UUID.generate if mode == :insert
|
38
|
+
super
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
end; end
|