spiderfw 0.5.13 → 0.5.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -0
- data/Rakefile +7 -4
- data/VERSION +1 -1
- data/apps/admin/_init.rb +9 -0
- data/apps/admin/controllers/admin_controller.rb +12 -0
- data/apps/admin/widgets/dashboard_widget/dashboard_widget.rb +8 -0
- data/apps/app_server/app_server.rb +11 -1
- data/apps/app_server/config/options.rb +4 -0
- data/apps/app_server/controllers/app_server_controller.rb +47 -9
- data/apps/app_server/lib/app.rb +3 -1
- data/apps/app_server/lib/git_app.rb +16 -0
- data/apps/app_server/views/app_list.shtml +1 -1
- data/apps/cas_server/config/options.rb +4 -0
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +192 -31
- data/apps/cas_server/lib/cas.rb +31 -9
- data/apps/core/auth/_init.rb +2 -2
- data/apps/core/auth/config/options.rb +6 -0
- data/apps/core/auth/controllers/login_controller.rb +1 -1
- data/apps/core/auth/controllers/mixins/auth_helper.rb +6 -1
- data/apps/core/auth/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
- data/apps/core/auth/lib/login_authenticator.rb +12 -1
- data/apps/core/auth/lib/rbac.rb +25 -0
- data/apps/core/auth/models/group.rb +3 -8
- data/apps/core/auth/models/login_user.rb +11 -1
- data/apps/core/auth/models/mixins/rbac_provider.rb +60 -0
- data/apps/core/auth/po/it/spider_auth.po +19 -3
- data/apps/core/auth/po/spider_auth.pot +18 -2
- data/apps/core/auth/views/login.shtml +1 -0
- data/apps/core/components/_init.rb +2 -0
- data/apps/core/components/assets.rb +112 -0
- data/apps/core/components/po/it/spider_components.po +20 -6
- data/apps/core/components/po/spider_components.pot +16 -4
- data/apps/core/components/public/css/grid/1140.css +80 -0
- data/apps/core/components/public/css/grid/ie.css +43 -0
- data/apps/core/components/public/css/grid/layout.css +32 -0
- data/apps/core/components/public/css/grid/mobile.css +26 -0
- data/apps/core/components/public/css/grid/smallerscreen.css +3 -0
- data/apps/core/components/public/css/grid/typeimg.css +72 -0
- data/apps/core/components/public/js/jquery/{jquery-1.4.2.js → jquery-1.4.3.js} +1524 -881
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/button_bg.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/datepicker.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/icon_sprite.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/progress_bar.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/slider_h_bg.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/slider_handles.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/slider_v_bg.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/tab_bg.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/the_gradient.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/ui-anim_basic_16x16.gif +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/smoothness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/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 → jquery-ui-1.8.4/css/Aristo/jquery-ui.custom.css} +249 -135
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/AUTHORS.txt +2 -2
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/GPL-LICENSE.txt +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/MIT-LICENSE.txt +1 -1
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/ui/i18n/jquery-ui-i18n.js +516 -111
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-af.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ar.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ar.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-az.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-bg.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-bg.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-bs.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ca.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-cs.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-cs.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-da.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-da.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-de.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-de.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-el.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-el.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-en-GB.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-eo.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-eo.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-es.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-es.js} +7 -3
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-et.js +23 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-eu.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-fa.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fa.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-fi.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fi.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fo.js +23 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-fr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fr.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-he.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-he.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-hr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js} +8 -4
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-hu.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-hu.js} +8 -4
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-hy.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-hy.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-id.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-id.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-is.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-is.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-it.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-it.js} +10 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ja.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ja.js} +5 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ko.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ko.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-lt.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-lt.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-lv.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-lv.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ms.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ms.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-nl.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-nl.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-no.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-no.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-pl.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-pl.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-pt-BR.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js} +9 -5
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ro.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ro.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ru.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ru.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sk.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sk.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sl.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sl.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sq.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sq.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr-SR.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sr-SR.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sr.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sv.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sv.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ta.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-th.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-th.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-tr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-tr.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-uk.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-uk.js} +10 -12
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-vi.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-CN.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-TW.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-zh-TW.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.blind.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.blind.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.bounce.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.bounce.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.clip.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.clip.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.core.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.core.js} +390 -221
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.drop.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.drop.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.explode.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.explode.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.fold.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.fold.js} +6 -6
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.effects.highlight.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.effects.pulsate.js +51 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.scale.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.scale.js} +29 -31
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.shake.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.shake.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.slide.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.slide.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.transfer.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.transfer.js} +6 -6
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.accordion.js +598 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.autocomplete.js +550 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.button.js +365 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.core.js +281 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.datepicker.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.datepicker.js} +343 -247
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.dialog.js +827 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.draggable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.draggable.js} +107 -76
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.droppable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.droppable.js} +48 -45
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.mouse.js +151 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.position.js +233 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.progressbar.js +94 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.resizable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.resizable.js} +73 -61
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.selectable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.selectable.js} +42 -33
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.slider.js +680 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.sortable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.sortable.js} +136 -84
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.tabs.js +757 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.widget.js +237 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/version.txt +1 -0
- data/apps/core/components/public/js/jquery/patches/jquery-ui/jquery.ui.autocomplete-001.patch +17 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.datalink.js +258 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.json.js +178 -0
- data/apps/core/components/public/js/plugins/sortable.js +96 -72
- data/apps/core/components/public/js/spider.js +108 -50
- data/apps/core/components/public/js/utils.i18n.json +1 -0
- data/apps/core/components/public/js/utils.js +27 -0
- data/apps/core/components/widgets/admin/admin.rb +1 -1
- data/apps/core/components/widgets/admin/admin.shtml +1 -0
- data/apps/core/components/widgets/crud/crud.rb +6 -2
- data/apps/core/components/widgets/crud/crud.shtml +1 -0
- data/apps/core/components/widgets/list/list.rb +1 -1
- data/apps/core/components/widgets/list/list.shtml +2 -2
- data/apps/core/components/widgets/search_table/search_table.shtml +1 -1
- data/apps/core/components/widgets/switcher/switcher.rb +5 -1
- data/apps/core/components/widgets/table/table.rb +18 -3
- data/apps/core/components/widgets/table/table.shtml +1 -1
- data/apps/core/components/widgets/tabs/tabs.rb +0 -1
- data/apps/core/forms/_init.rb +3 -1
- data/apps/core/forms/public/ckeditor/adapters/jquery.js +6 -0
- data/apps/core/forms/public/ckeditor/ckeditor.js +137 -0
- data/apps/core/forms/public/ckeditor/images/spacer.gif +0 -0
- data/apps/core/forms/public/ckeditor/lang/_languages.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/_translationstatus.txt +60 -0
- data/apps/core/forms/public/ckeditor/lang/af.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ar.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/bg.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/bn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/bs.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ca.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/cs.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/cy.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/da.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/de.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/el.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en-au.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en-ca.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en-gb.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/eo.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/es.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/et.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/eu.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fa.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fi.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fo.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fr-ca.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/gl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/gu.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/hi.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/hr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/hu.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/is.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/it.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ja.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/km.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ko.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/lt.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/lv.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/mn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ms.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/nb.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/nl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/no.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/pl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/pt-br.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/pt.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ro.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ru.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sk.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sr-latn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sv.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/th.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/tr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/uk.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/vi.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/zh-cn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/zh.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/about/dialogs/about.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/autogrow/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/colordialog/dialogs/colordialog.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/apps/core/forms/public/ckeditor/plugins/div/dialogs/div.js +8 -0
- data/apps/core/forms/public/ckeditor/plugins/find/dialogs/find.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/flash/dialogs/flash.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/button.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/checkbox.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/form.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/radio.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/select.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textarea.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textfield.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/iframedialog/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/image/dialogs/image.js +13 -0
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/anchor.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/link.js +11 -0
- data/apps/core/forms/public/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/liststyle/dialogs/liststyle.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/pastefromword/filter/default.js +10 -0
- data/apps/core/forms/public/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/scayt/dialogs/options.js +8 -0
- data/apps/core/forms/public/ckeditor/plugins/scayt/dialogs/toolbar.css +6 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/styles/styles/default.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/table/dialogs/table.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/tableresize/plugin.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/dialogs/templates.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/default.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/yui.js +76 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.js +7 -0
- data/apps/core/forms/public/ckeditor/skins/kama/dialog.css +9 -0
- data/apps/core/forms/public/ckeditor/skins/kama/editor.css +12 -0
- data/apps/core/forms/public/ckeditor/skins/kama/icons.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/mini.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/noimage.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/sprites.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/skin.js +7 -0
- data/apps/core/forms/public/ckeditor/skins/kama/templates.css +6 -0
- data/apps/core/forms/public/ckeditor/themes/default/theme.js +8 -0
- data/apps/core/forms/public/css/form.css +3 -0
- data/apps/core/forms/public/file_input.js +1 -1
- data/apps/core/forms/public/html_area.js +55 -0
- data/apps/core/forms/public/search_select.js +46 -19
- data/apps/core/forms/public/select.js +11 -5
- data/apps/core/forms/widgets/form/form.rb +22 -6
- data/apps/core/forms/widgets/form/form.shtml +2 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.rb +6 -1
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +1 -0
- data/apps/core/forms/widgets/inputs/html_area/html_area.rb +51 -0
- data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +13 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.rb +8 -10
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +7 -7
- data/apps/core/forms/widgets/inputs/select/select.rb +15 -9
- data/apps/core/forms/widgets/inputs/select/select.shtml +1 -1
- data/apps/core/forms/widgets/inputs/time_span/time_span.rb +42 -0
- data/apps/core/forms/widgets/inputs/time_span/time_span.shtml +8 -0
- data/apps/master/_init.rb +18 -0
- data/apps/master/cmd.rb +57 -0
- data/apps/master/config/options.rb +6 -0
- data/apps/master/controllers/login_controller.rb +22 -0
- data/apps/master/controllers/master_controller.rb +261 -10
- data/apps/master/controllers/scout_controller.rb +121 -0
- data/apps/master/controllers/servant_controller.rb +16 -0
- data/apps/master/data/locale/it/LC_MESSAGES/spider_master.mo +0 -0
- data/apps/master/lib/resource.rb +7 -0
- data/apps/master/lib/resources/db_resource.rb +7 -0
- data/apps/master/lib/scout_plugin.rb +89 -0
- data/apps/master/lib/site_type.rb +24 -0
- data/apps/master/master.rb +40 -0
- data/apps/master/models/admin.rb +35 -0
- data/apps/master/models/command.rb +17 -0
- data/apps/master/models/customer.rb +20 -1
- data/apps/master/models/resource.rb +1 -0
- data/apps/master/models/scout_alert.rb +30 -0
- data/apps/master/models/scout_average.rb +23 -0
- data/apps/master/models/scout_error.rb +30 -0
- data/apps/master/models/scout_plugin_info.rb +11 -0
- data/apps/master/models/scout_plugin_instance.rb +303 -0
- data/apps/master/models/scout_plugin_trigger.rb +285 -0
- data/apps/master/models/scout_report.rb +31 -0
- data/apps/master/models/scout_report_field.rb +26 -0
- data/apps/master/models/servant.rb +82 -6
- data/apps/master/plugins/resources/apache/apache.rb +9 -0
- data/apps/master/plugins/resources/mysql/mysql.rb +45 -0
- data/apps/master/plugins/site_types/spider/spider.rb +11 -0
- data/apps/master/po/it/spider_master.po +352 -0
- data/apps/master/po/spider_master.pot +331 -0
- data/apps/master/public/css/img/web.png +0 -0
- data/apps/master/public/css/login.css +51 -0
- data/apps/master/public/css/master.css +290 -0
- data/apps/master/public/css/reset.css +23 -0
- data/apps/master/public/js/charts.js +84 -0
- data/apps/master/public/js/master.js +3 -0
- data/apps/master/templates/email/alert.html.erb +14 -0
- data/apps/master/templates/email/alert.text.erb +4 -0
- data/apps/master/views/admin.layout.shtml +14 -0
- data/apps/master/views/admin.shtml +5 -0
- data/apps/master/views/customer.shtml +37 -14
- data/apps/master/views/customers.shtml +9 -7
- data/apps/master/views/login.layout.shtml +13 -0
- data/apps/master/views/master.layout.shtml +26 -3
- data/apps/master/views/plugin_data.shtml +30 -0
- data/apps/master/views/plugin_edit.shtml +41 -0
- data/apps/master/views/plugin_instance.shtml +43 -0
- data/apps/master/views/servant.shtml +74 -0
- data/apps/master/views/servants.shtml +4 -0
- data/apps/master/views/site.shtml +3 -0
- data/apps/master/views/site_edit.shtml +17 -0
- data/apps/master/views/trigger_edit.shtml +100 -0
- data/apps/messenger/_init.rb +27 -1
- data/apps/messenger/backends/email/smtp.rb +76 -0
- data/apps/messenger/backends/sms/smstools.rb +46 -0
- data/apps/messenger/config/options.rb +28 -2
- data/apps/messenger/controllers/mixins/messenger_helper.rb +9 -5
- data/apps/messenger/lib/email_backend.rb +14 -0
- data/apps/messenger/lib/sms_backend.rb +14 -0
- data/apps/messenger/messenger.rb +32 -41
- data/apps/messenger/models/email.rb +2 -0
- data/apps/messenger/models/message.rb +37 -15
- data/apps/messenger/models/sms.rb +15 -0
- data/apps/servant/bin/spider-servant.rb +2 -1
- data/apps/servant/cmd.rb +62 -0
- data/apps/servant/controllers/servant_controller.rb +12 -0
- data/apps/servant/lib/resource.rb +3 -0
- data/apps/servant/lib/resources/db/mysql.rb +4 -0
- data/apps/servant/lib/resources/db.rb +1 -0
- data/apps/servant/lib/servant.rb +9 -3
- data/apps/worker/cmd.rb +1 -1
- data/apps/worker/models/job.rb +5 -2
- data/apps/worker/worker.rb +7 -5
- data/blueprints/install/config.ru +0 -1
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/lib/spiderfw/app.rb +77 -5
- data/lib/spiderfw/cache/template_cache.rb +15 -5
- data/lib/spiderfw/cmd/cmd.rb +2 -0
- data/lib/spiderfw/cmd/commands/app.rb +159 -0
- data/lib/spiderfw/cmd/commands/config.rb +16 -0
- data/lib/spiderfw/cmd/commands/content.rb +1 -1
- data/lib/spiderfw/cmd/commands/create.rb +13 -0
- data/lib/spiderfw/cmd/commands/model.rb +5 -1
- data/lib/spiderfw/cmd/commands/setup.rb +44 -10
- data/lib/spiderfw/cmd/commands/webserver.rb +15 -1
- data/lib/spiderfw/config/configuration.rb +19 -2
- data/lib/spiderfw/config/configuration_editor.rb +197 -0
- data/lib/spiderfw/config/options/spider.rb +48 -22
- data/lib/spiderfw/{static_content.rb → content_utils.rb} +23 -1
- data/lib/spiderfw/controller/controller.rb +8 -5
- data/lib/spiderfw/controller/controller_mixin.rb +39 -3
- data/lib/spiderfw/controller/cookies.rb +0 -3
- data/lib/spiderfw/controller/dispatcher.rb +1 -1
- data/lib/spiderfw/controller/first_responder.rb +1 -0
- data/lib/spiderfw/controller/home_controller.rb +10 -1
- data/lib/spiderfw/controller/http_controller.rb +105 -6
- data/lib/spiderfw/controller/mixins/http_mixin.rb +0 -1
- data/lib/spiderfw/controller/mixins/static_content.rb +35 -12
- data/lib/spiderfw/controller/mixins/visual.rb +125 -72
- data/lib/spiderfw/controller/request.rb +13 -1
- data/lib/spiderfw/controller/response.rb +14 -8
- data/lib/spiderfw/controller/scene.rb +5 -0
- data/lib/spiderfw/controller/session/file_session.rb +1 -1
- data/lib/spiderfw/create.rb +17 -0
- data/lib/spiderfw/home.rb +20 -8
- data/lib/spiderfw/http/adapters/mongrel.rb +24 -15
- data/lib/spiderfw/http/adapters/rack.rb +8 -3
- data/lib/spiderfw/http/adapters/webrick.rb +1 -0
- data/lib/spiderfw/http/server.rb +1 -0
- data/lib/spiderfw/i18n/cldr.rb +8 -1
- data/lib/spiderfw/i18n/i18n.rb +3 -4
- data/lib/spiderfw/i18n/javascript_parser.rb +54 -0
- data/lib/spiderfw/model/base_model.rb +550 -120
- data/lib/spiderfw/model/condition.rb +11 -2
- data/lib/spiderfw/model/data_type.rb +1 -1
- data/lib/spiderfw/model/datatypes/bool.rb +3 -1
- data/lib/spiderfw/model/datatypes/decimal.rb +4 -0
- data/lib/spiderfw/model/datatypes/password.rb +1 -0
- data/lib/spiderfw/model/datatypes/time_span.rb +26 -0
- data/lib/spiderfw/model/datatypes.rb +1 -0
- data/lib/spiderfw/model/element.rb +29 -28
- data/lib/spiderfw/model/extended_models/managed.rb +15 -0
- data/lib/spiderfw/model/identity_mapper.rb +89 -10
- data/lib/spiderfw/model/inline_model.rb +20 -2
- data/lib/spiderfw/model/integrated_element.rb +41 -0
- data/lib/spiderfw/model/mappers/db_mapper.rb +31 -27
- data/lib/spiderfw/model/mappers/hash_mapper.rb +9 -2
- data/lib/spiderfw/model/mappers/mapper.rb +105 -50
- data/lib/spiderfw/model/mappers/vfs/flat_file.rb +1 -1
- data/lib/spiderfw/model/mixins/state_machine.rb +6 -0
- data/lib/spiderfw/model/mixins/tree.rb +20 -4
- data/lib/spiderfw/model/mixins/versioned.rb +440 -67
- data/lib/spiderfw/model/model.rb +78 -17
- data/lib/spiderfw/model/model_hash.rb +2 -2
- data/lib/spiderfw/model/query.rb +17 -0
- data/lib/spiderfw/model/query_set.rb +86 -14
- data/lib/spiderfw/model/storage/base_storage.rb +1 -0
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +44 -15
- data/lib/spiderfw/model/storage/db/adapters/oracle.rb +8 -7
- data/lib/spiderfw/model/storage/db/connectors/oci8.rb +7 -1
- data/lib/spiderfw/model/storage/db/db_schema.rb +13 -0
- data/lib/spiderfw/model/storage/db/db_storage.rb +25 -5
- data/lib/spiderfw/model/unit_of_work.rb +96 -15
- data/lib/spiderfw/requires.rb +9 -1
- data/lib/spiderfw/setup/app_manager.rb +81 -0
- data/lib/spiderfw/setup/app_server_client.rb +59 -0
- data/lib/spiderfw/setup/setup_task.rb +68 -6
- data/lib/spiderfw/setup/spider_setup_wizard.rb +375 -0
- data/lib/spiderfw/site.rb +53 -0
- data/lib/spiderfw/templates/blocks/attr_if.rb +2 -2
- data/lib/spiderfw/templates/blocks/comment.rb +7 -2
- data/lib/spiderfw/templates/blocks/each.rb +1 -1
- data/lib/spiderfw/templates/blocks/html.rb +7 -0
- data/lib/spiderfw/templates/blocks/layout_assets.rb +20 -0
- data/lib/spiderfw/templates/blocks/output.rb +18 -0
- data/lib/spiderfw/templates/blocks/text.rb +17 -19
- data/lib/spiderfw/templates/blocks/widget.rb +4 -2
- data/lib/spiderfw/templates/layout.rb +269 -2
- data/lib/spiderfw/templates/template.rb +279 -46
- data/lib/spiderfw/templates/template_blocks.rb +31 -37
- data/lib/spiderfw/utils/events/event_source.rb +54 -0
- data/lib/spiderfw/utils/json.rb +39 -0
- data/lib/spiderfw/utils/logger.rb +186 -23
- data/lib/spiderfw/utils/memory.rb +30 -0
- data/lib/spiderfw/utils/monkey/date_time.rb +32 -2
- data/lib/spiderfw/utils/monkey/module.rb +16 -0
- data/lib/spiderfw/utils/monkey/object.rb +8 -0
- data/lib/spiderfw/utils/ordered_hash.rb +148 -0
- data/lib/spiderfw/utils/profiling.rb +36 -0
- data/lib/spiderfw/utils/secure_random.rb +223 -0
- data/lib/spiderfw/version.rb +1 -1
- data/lib/spiderfw/widget/widget.rb +143 -51
- data/lib/spiderfw/widget/widget_plugin.rb +13 -2
- data/lib/spiderfw.rb +117 -35
- data/spider.gemspec +1 -1
- metadata +506 -255
- data/apps/core/components/public/js/jquery/jquery-1.3.2.js +0 -4376
- data/apps/core/components/public/js/jquery/jquery-1.4.2-min.js +0 -154
- 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_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_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 +0 -406
- 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-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/ChangeLog.txt +0 -20
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/META.json +0 -32
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.js +0 -100
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.min.js +0 -10
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.pack.js +0 -10
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/test/index.html +0 -197
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.js +0 -97
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.min.js +0 -10
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.pack.js +0 -10
- 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 +0 -159
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testrunner.js +0 -780
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testsuite.css +0 -120
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/simulate/jquery.simulate.js +0 -152
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/jquery-1.3.2.js +0 -4376
- 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 +0 -9
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.all.css +0 -2
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.base.css +0 -8
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.core.css +0 -37
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.datepicker.css +0 -62
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.dialog.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.progressbar.css +0 -4
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.resizable.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.slider.css +0 -17
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.tabs.css +0 -11
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.theme.css +0 -245
- 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 +0 -406
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.accordion.css +0 -9
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.all.css +0 -2
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.base.css +0 -8
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.core.css +0 -37
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.datepicker.css +0 -62
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.dialog.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.progressbar.css +0 -4
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.resizable.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.slider.css +0 -17
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.tabs.css +0 -11
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.theme.css +0 -247
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.highlight.js +0 -48
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.pulsate.js +0 -56
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js +0 -9133
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.accordion.js +0 -477
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.core.js +0 -519
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.dialog.js +0 -671
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.progressbar.js +0 -116
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.slider.js +0 -558
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.tabs.js +0 -685
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/version.txt +0 -1
- data/apps/core/components/public/js/jquery/jquery-ui/index.html +0 -367
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-1.3.2.min.js +0 -19
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-ui-1.7.2.custom.min.js +0 -298
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/changelog.txt +0 -27
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.css +0 -48
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.js +0 -808
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.min.js +0 -13
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.pack.js +0 -12
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.ajaxQueue.js +0 -116
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.bgiframe.min.js +0 -10
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.js +0 -3558
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox-compressed.js +0 -10
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox.css +0 -163
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/todo +0 -166
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +0 -187
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +0 -1
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +0 -193
- data/apps/core/forms/widgets/inputs/subform/subform.rb +0 -10
- data/apps/core/forms/widgets/inputs/subform/subform.shtml +0 -5
- data/apps/hippo/_init.rb +0 -10
- data/apps/hippo/models/mixins/hippo_struct.rb +0 -226
- data/apps/hippo/models/security_group.rb +0 -21
- data/apps/hippo/models/security_user.rb +0 -29
- data/apps/hippo/script/converti_strutture.rb +0 -335
- data/data/locale/it/LC_MESSAGES/cms.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_files.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_images.mo +0 -0
- data/lib/spiderfw/utils/monkey/hpricot_compat.rb +0 -0
- data/lib/spiderfw/utils/setup_task.rb +0 -35
- data/lib/spiderfw/utils/test_case.rb +0 -24
- /data/apps/core/components/public/js/jquery/{jquery-ui/css/smoothness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- /data/apps/{messenger/lib/backends/email/smtp.rb → servant/lib/commands/discovery.rb} +0 -0
@@ -34,10 +34,12 @@ module Spider
|
|
34
34
|
@uploaded_files = []
|
35
35
|
if (@request.env['QUERY_STRING'])
|
36
36
|
@request.params = Spider::HTTP.parse_query(@request.env['QUERY_STRING'])
|
37
|
+
@request.get = @request.params
|
37
38
|
end
|
38
39
|
if @request.env['REQUEST_METHOD'] == 'POST' && @request.env['HTTP_CONTENT_TYPE']
|
39
40
|
if @request.env['HTTP_CONTENT_TYPE'].include?('application/x-www-form-urlencoded')
|
40
|
-
@request.
|
41
|
+
@request.post = Spider::HTTP.parse_query(@request.read_body)
|
42
|
+
@request.params.merge!(@request.post)
|
41
43
|
elsif @request.env['HTTP_CONTENT_TYPE'] =~ Spider::HTTP::MULTIPART_REGEXP
|
42
44
|
multipart_params, multipart_files = Spider::HTTP.parse_multipart(@request.body, $1, @request.env['CONTENT_LENGTH'].to_i)
|
43
45
|
@request.params.merge!(multipart_params)
|
@@ -47,6 +49,43 @@ module Spider
|
|
47
49
|
|
48
50
|
@request.http_method = @request.env['REQUEST_METHOD'].upcase.to_sym
|
49
51
|
@request.http_host = @request.env['HTTP_HOST']
|
52
|
+
@request.ssl = true if @request.env['HTTPS'] == 'on'
|
53
|
+
if @request.http_host =~ /(.+)\:(\d+)/
|
54
|
+
@request.domain = $1
|
55
|
+
@request.port = $2.to_i
|
56
|
+
else
|
57
|
+
@request.domain = @request.http_host
|
58
|
+
@request.port = @request.ssl? ? 443 : 80
|
59
|
+
end
|
60
|
+
|
61
|
+
unless Spider.site
|
62
|
+
port = @request.ssl? ? nil : @request.port
|
63
|
+
Spider.site = Spider::Site.new(@request.domain, port)
|
64
|
+
Spider.site._auto = true
|
65
|
+
Spider.site.save_cache
|
66
|
+
end
|
67
|
+
if @request.ssl? && Spider.site.auto? && !Spider.site.ssl_port
|
68
|
+
Spider.site.ssl_port = @request.port
|
69
|
+
Spider.site.save_cache
|
70
|
+
end
|
71
|
+
if !@request.ssl? && Spider.site.auto? && !Spider.site.port
|
72
|
+
Spider.site.port = @request.port
|
73
|
+
Spider.site.save_cache
|
74
|
+
end
|
75
|
+
if @request.env['HTTP_CACHE_CONTROL']
|
76
|
+
parts = @request.env['HTTP_CACHE_CONTROL'].split(';')
|
77
|
+
parts.each do |part|
|
78
|
+
if part == 'no-cache'
|
79
|
+
@request.cache_control[:no_cache] = true
|
80
|
+
else
|
81
|
+
key, val = part.split('=')
|
82
|
+
@request.cache_control[key] = val
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
if @request.env['HTTP_PRAGMA'] == 'no-cache'
|
87
|
+
@request.cache_control[:no_cache] = true
|
88
|
+
end
|
50
89
|
Locale.clear
|
51
90
|
Locale.init(:driver => :cgi)
|
52
91
|
Locale.set_request(@request.params['lang'], @request.cookies['lang'], @request.env['HTTP_ACCEPT_LANGUAGE'], @request.env['HTTP_ACCEPT_CHARSET'])
|
@@ -56,6 +95,7 @@ module Spider
|
|
56
95
|
@request.format = $2.to_sym
|
57
96
|
end
|
58
97
|
# Spider.reload_sources if Spider.conf.get('webserver.reload_sources')
|
98
|
+
Spider.logger.info("Request: #{@request.http_method} #{@request.http_host} #{@request.path}")
|
59
99
|
super(action, *arguments)
|
60
100
|
end
|
61
101
|
|
@@ -63,6 +103,8 @@ module Spider
|
|
63
103
|
# FIXME: cache stripped action?
|
64
104
|
action = $1 if (action =~ /(.+)\.(\w+)$/) # strip extension, set format
|
65
105
|
super(action, *arguments)
|
106
|
+
log_done
|
107
|
+
#@response.headers['Date'] ||= Time.now.httpdate
|
66
108
|
end
|
67
109
|
|
68
110
|
def after(action='', *arguments)
|
@@ -75,9 +117,25 @@ module Spider
|
|
75
117
|
def ensure(action='', *arguments)
|
76
118
|
dispatch(:ensure, action, *arguments)
|
77
119
|
$stdout = @previous_stdout
|
78
|
-
@uploaded_files
|
79
|
-
f
|
120
|
+
if @uploaded_files
|
121
|
+
@uploaded_files.each do |f|
|
122
|
+
f.close
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
def log_done
|
128
|
+
Spider::Request.current[:_http_logged_done] = true
|
129
|
+
str = "Done: #{@response.status} #{Spider::HTTP.status_messages[@response.status]}"
|
130
|
+
str += " (static)" if @request.misc[:is_static]
|
131
|
+
str += " in #{(Time.now - Spider::Request.current[:_start])*1000}ms" if Spider::Request.current[:_start]
|
132
|
+
if @request.respond_to?(:user) && @request.user
|
133
|
+
str += " for user #{@request.user.class}(#{@request.user.primary_keys})"
|
134
|
+
end
|
135
|
+
if Spider.conf.get('log.memory')
|
136
|
+
str += " - Memory usage: #{Spider::Memory.get_memory_usage}"
|
80
137
|
end
|
138
|
+
Spider.logger.info(str)
|
81
139
|
end
|
82
140
|
|
83
141
|
|
@@ -88,6 +146,7 @@ module Spider
|
|
88
146
|
end
|
89
147
|
|
90
148
|
def try_rescue(exc)
|
149
|
+
log_done unless Spider::Request.current[:_http_logged_done]
|
91
150
|
if exc.is_a?(Spider::Controller::NotFound)
|
92
151
|
Spider.logger.error("Not found: #{exc.path}")
|
93
152
|
elsif exc.is_a?(Spider::Controller::Forbidden)
|
@@ -98,17 +157,22 @@ module Spider
|
|
98
157
|
end
|
99
158
|
|
100
159
|
module HTTPRequest
|
101
|
-
attr_accessor :http_method, :http_host
|
160
|
+
attr_accessor :http_method, :http_host, :domain, :port, :post, :get
|
102
161
|
|
103
162
|
# Returns PATH_INFO reversing any proxy mappings if needed.
|
104
163
|
def path
|
105
164
|
Spider::ControllerMixins::HTTPMixin.reverse_proxy_mapping(self.env['PATH_INFO'])
|
106
165
|
end
|
107
166
|
|
108
|
-
def
|
167
|
+
def http_path
|
109
168
|
'http://'+self.env['HTTP_HOST']+path
|
110
169
|
end
|
111
170
|
|
171
|
+
def full_path
|
172
|
+
Spider.logger.warn("Request#full_path is deprecated. Use Request#http_path instead")
|
173
|
+
http_path
|
174
|
+
end
|
175
|
+
|
112
176
|
# Returns the REQUEST_URI reversing any proxy mappings if needed
|
113
177
|
def uri
|
114
178
|
Spider::ControllerMixins::HTTPMixin.reverse_proxy_mapping(self.env['REQUEST_URI'])
|
@@ -119,10 +183,45 @@ module Spider
|
|
119
183
|
'http://'+self.env['HTTP_HOST']+uri
|
120
184
|
end
|
121
185
|
|
186
|
+
def client_cert
|
187
|
+
return @client_certificate if @client_cert
|
188
|
+
unless self.env['SSL_CLIENT_CERT'].blank?
|
189
|
+
@client_cert = OpenSSL::X509::Certificate.new(self.env['SSL_CLIENT_CERT'])
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
def cache_control
|
194
|
+
@cache_control ||= {}
|
195
|
+
end
|
196
|
+
|
197
|
+
def ssl=(bool)
|
198
|
+
@ssl = bool
|
199
|
+
end
|
200
|
+
|
201
|
+
def ssl?
|
202
|
+
@ssl
|
203
|
+
end
|
204
|
+
|
205
|
+
def post
|
206
|
+
@post ||= {}
|
207
|
+
end
|
208
|
+
|
209
|
+
def get
|
210
|
+
@get ||= {}
|
211
|
+
end
|
212
|
+
|
213
|
+
def post?
|
214
|
+
self.http_method == :POST
|
215
|
+
end
|
216
|
+
|
217
|
+
def get?
|
218
|
+
self.http_method == :GET
|
219
|
+
end
|
220
|
+
|
122
221
|
end
|
123
222
|
|
124
223
|
|
125
224
|
|
126
225
|
end
|
127
226
|
|
128
|
-
end
|
227
|
+
end
|
@@ -90,7 +90,6 @@ module Spider; module ControllerMixins
|
|
90
90
|
def try_rescue(exc)
|
91
91
|
if (exc.is_a?(Spider::Controller::NotFound))
|
92
92
|
@response.status = Spider::HTTP::NOT_FOUND
|
93
|
-
error("Not found: #{exc.path}")
|
94
93
|
elsif (exc.is_a?(Spider::Controller::BadRequest))
|
95
94
|
@response.status = Spider::HTTP::BAD_REQUEST
|
96
95
|
elsif (exc.is_a?(Spider::Controller::Forbidden))
|
@@ -5,10 +5,11 @@ require 'mime/types'
|
|
5
5
|
module Spider; module ControllerMixins
|
6
6
|
|
7
7
|
module StaticContent
|
8
|
+
include Spider::ControllerMixin
|
8
9
|
include Spider::ControllerMixins::HTTPMixin
|
9
10
|
|
10
11
|
def self.included(klass)
|
11
|
-
|
12
|
+
super
|
12
13
|
klass.route('public/', :serve_static, :do => lambda{ @serving_static = true })
|
13
14
|
klass.route('w/', :serve_widget_static, :do => lambda{ @serving_static = true })
|
14
15
|
if (klass < Visual)
|
@@ -57,7 +58,6 @@ module Spider; module ControllerMixins
|
|
57
58
|
return redirect(url)
|
58
59
|
end
|
59
60
|
full_path = pub_path+'/'+path
|
60
|
-
raise Spider::Controller::NotFound.new(path) unless File.exist?(full_path)
|
61
61
|
output_static(full_path)
|
62
62
|
end
|
63
63
|
|
@@ -66,19 +66,39 @@ module Spider; module ControllerMixins
|
|
66
66
|
parts = path.split('/public/', 2)
|
67
67
|
raise Spider::Controller::NotFound.new(path) unless parts[1]
|
68
68
|
full_path = self.class.app.widgets_path+'/'+parts[0]+'/public/'+parts[1]
|
69
|
-
raise Spider::Controller::NotFound.new(path) unless File.exist?(full_path)
|
70
69
|
output_static(full_path)
|
71
70
|
end
|
72
71
|
|
73
|
-
def output_static(full_path)
|
72
|
+
def output_static(full_path, file_name=nil)
|
73
|
+
file_name ||= File.basename(full_path)
|
74
|
+
@request.misc[:is_static] = true
|
74
75
|
debug("Serving asset: #{full_path}")
|
76
|
+
begin
|
77
|
+
while File.symlink?(full_path)
|
78
|
+
full_path = File.readlink(full_path)
|
79
|
+
end
|
80
|
+
rescue NotImplemented
|
81
|
+
end
|
75
82
|
mode = Spider.conf.get('static_content.mode')
|
76
83
|
raise Spider::Controller::NotFound.new(full_path) unless File.exist?(full_path)
|
77
84
|
stat = File.lstat(full_path)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
85
|
+
mtime = stat.mtime
|
86
|
+
now = Time.now
|
87
|
+
if @request.env['HTTP_IF_MODIFIED_SINCE'] && !@request.cache_control[:no_cache]
|
88
|
+
if_modified = nil
|
89
|
+
begin
|
90
|
+
if_modified = Time.httpdate(@request.env['HTTP_IF_MODIFIED_SINCE'])
|
91
|
+
rescue ArgumentError # Passenger with IE6 has this header wrong
|
92
|
+
if_modified = 0
|
93
|
+
end
|
94
|
+
max_age = nil
|
95
|
+
fresh = true
|
96
|
+
if fresh && mtime <= if_modified
|
97
|
+
debug("Not modified since #{if_modified}: #{full_path}")
|
98
|
+
#@response.status = Spider::HTTP::NOT_MODIFIED
|
99
|
+
@response.headers.delete("Content-Type")
|
100
|
+
@response.headers['Date'] = mtime.httpdate
|
101
|
+
@response.no_cookies
|
82
102
|
raise HTTPStatus.new(Spider::HTTP::NOT_MODIFIED)
|
83
103
|
return
|
84
104
|
end
|
@@ -86,13 +106,14 @@ module Spider; module ControllerMixins
|
|
86
106
|
if File.directory?(full_path)
|
87
107
|
ct = "httpd/unix-directory"
|
88
108
|
else
|
89
|
-
ct = MIME::Types.type_for(
|
109
|
+
ct = MIME::Types.type_for(file_name)
|
110
|
+
ct = ct.first if ct.is_a?(Array)
|
90
111
|
ct = ct.to_s if ct
|
91
112
|
ct ||= "application/octet-stream"
|
92
113
|
end
|
93
114
|
@response.headers['Content-Type'] = ct
|
94
115
|
@response.headers['Content-Length'] = stat.size
|
95
|
-
@response.headers['Last-Modified'] =
|
116
|
+
@response.headers['Last-Modified'] = mtime.httpdate
|
96
117
|
|
97
118
|
if mode == 'x-sendfile'
|
98
119
|
@response.headers['X-Sendfile'] = full_path
|
@@ -112,8 +133,10 @@ module Spider; module ControllerMixins
|
|
112
133
|
return scene
|
113
134
|
end
|
114
135
|
|
115
|
-
def serving_static?
|
116
|
-
@serving_static
|
136
|
+
def serving_static?(action=nil)
|
137
|
+
return @serving_static if @serving_static || !action
|
138
|
+
n = dispatch_next(action)
|
139
|
+
n && n.action == "serve_static"
|
117
140
|
end
|
118
141
|
|
119
142
|
end
|
@@ -21,13 +21,13 @@ module Spider; module ControllerMixins
|
|
21
21
|
@layout ||= @dispatcher_layout
|
22
22
|
format = nil
|
23
23
|
req_format = self.is_a?(Widget) && @is_target && @request.params['_wf'] ? @request.params['_wf'].to_sym : @request.format
|
24
|
-
if (req_format)
|
24
|
+
if (req_format && self.class.output_formats[@executed_method])
|
25
25
|
format = req_format if self.class.output_format?(@executed_method, req_format)
|
26
26
|
if (format)
|
27
27
|
format_params = self.class.output_format_params(@executed_method, format)
|
28
28
|
end
|
29
|
-
if @executed_method && !format || (format_params && format_params[:widgets] &&
|
30
|
-
raise Spider::Controller::NotFound.new("#{action}.#{@request.format}")
|
29
|
+
if @executed_method && !format || (format_params && format_params[:widgets] && !target_mode?)
|
30
|
+
#raise Spider::Controller::NotFound.new("#{action}.#{@request.format}")
|
31
31
|
end
|
32
32
|
end
|
33
33
|
format ||= self.class.output_format(@executed_method)
|
@@ -61,6 +61,10 @@ module Spider; module ControllerMixins
|
|
61
61
|
@visual_params ||= {}
|
62
62
|
end
|
63
63
|
|
64
|
+
def target_mode?
|
65
|
+
!@request.params['_wt'].nil? && !@request.params['_wt'].empty?
|
66
|
+
end
|
67
|
+
|
64
68
|
def init_widgets(template, layout=nil)
|
65
69
|
widget_target = @request.params['_wt']
|
66
70
|
widget_execute = @request.params['_we']
|
@@ -71,7 +75,7 @@ module Spider; module ControllerMixins
|
|
71
75
|
raise Spider::Controller::NotFound.new("Widget #{widget_target}") unless @_widget
|
72
76
|
@_widget.is_target = true unless rest
|
73
77
|
@_widget.set_action(widget_execute) if widget_execute
|
74
|
-
@_widget.
|
78
|
+
@_widget.is_target_ancestor = true
|
75
79
|
@_widget.widget_target = rest
|
76
80
|
end
|
77
81
|
template.do_widgets_before
|
@@ -84,7 +88,7 @@ module Spider; module ControllerMixins
|
|
84
88
|
|
85
89
|
def execute(action='', *params)
|
86
90
|
@visual_params = @executed_format_params
|
87
|
-
@is_target = false if
|
91
|
+
@is_target = false if target_mode? && !self.is_a?(Spider::Widget)
|
88
92
|
if (self.is_a?(Widget) && @is_target && @request.params['_wp'])
|
89
93
|
params = @request.params['_wp']
|
90
94
|
elsif (@visual_params.is_a?(Hash) && @visual_params[:params])
|
@@ -96,7 +100,13 @@ module Spider; module ControllerMixins
|
|
96
100
|
@template = get_template if !@template && @visual_params[:template]
|
97
101
|
init_widgets(@template) if @template
|
98
102
|
if @visual_params[:call]
|
99
|
-
|
103
|
+
meth = self.method(@visual_params[:call])
|
104
|
+
args = params + @executed_method_arguments
|
105
|
+
arity = meth.arity
|
106
|
+
arity = (-arity + 1) if arity < 0
|
107
|
+
args = arity == 0 ? [] : args[0..(arity-1)]
|
108
|
+
args = [nil] if meth.arity == 1 && args.empty?
|
109
|
+
send(@visual_params[:call], *args)
|
100
110
|
end
|
101
111
|
if @visual_params[:template] && !@_widget && !done?
|
102
112
|
if (@template)
|
@@ -108,7 +118,7 @@ module Spider; module ControllerMixins
|
|
108
118
|
if @visual_params[:redirect]
|
109
119
|
redirect(@visual_params[:redirect])
|
110
120
|
end
|
111
|
-
if @executed_format == :json && @visual_params[:scene] || @visual_params[:return] # FIXME: move in JSON mixin?
|
121
|
+
if @executed_format == :json && (@visual_params[:scene] || @visual_params[:return]) # FIXME: move in JSON mixin?
|
112
122
|
if (@visual_params[:return])
|
113
123
|
$out << @visual_params[:return].to_json
|
114
124
|
elsif (@visual_params[:scene].is_a?(Array))
|
@@ -158,7 +168,8 @@ module Spider; module ControllerMixins
|
|
158
168
|
return template
|
159
169
|
end
|
160
170
|
|
161
|
-
def init_template(template, options={})
|
171
|
+
def init_template(template=nil, options={})
|
172
|
+
return get_template(template, nil, options) unless template.is_a?(Spider::Template)
|
162
173
|
prepare_template(template) unless template.owner # if called directly
|
163
174
|
template.init(scene)
|
164
175
|
if (@request.params['_action'])
|
@@ -234,11 +245,12 @@ module Spider; module ControllerMixins
|
|
234
245
|
return obj
|
235
246
|
end
|
236
247
|
|
237
|
-
def try_rescue(exc)
|
248
|
+
def try_rescue(exc)
|
238
249
|
exc.uuid = UUIDTools::UUID.random_create.to_s if exc.respond_to?(:uuid=)
|
239
250
|
format = self.class.output_format(:error) || :html
|
240
251
|
return super unless @executed_format == :html
|
241
252
|
return super unless action_target?
|
253
|
+
return super if target_mode?
|
242
254
|
output_format_headers(format)
|
243
255
|
if (exc.is_a?(Spider::Controller::NotFound))
|
244
256
|
error_page = '404'
|
@@ -258,7 +270,7 @@ module Spider; module ControllerMixins
|
|
258
270
|
@scene.exception_uuid = exc.uuid
|
259
271
|
@scene.email_subject += " (#{exc.uuid})"
|
260
272
|
end
|
261
|
-
@scene.admin_email = Spider.conf.get('site.
|
273
|
+
@scene.admin_email = Spider.conf.get('site.tech_admin.email')
|
262
274
|
if (Spider.runmode == 'devel')
|
263
275
|
begin
|
264
276
|
@scene.devel = true
|
@@ -281,13 +293,37 @@ module Spider; module ControllerMixins
|
|
281
293
|
end
|
282
294
|
end
|
283
295
|
@rendering_error = true
|
296
|
+
@scene.__is_error_page = true
|
297
|
+
if Spider.const_defined?(:Messenger) && Spider.conf.get('errors.send_email') && Spider.conf.get('site.tech_admin.email')
|
298
|
+
begin
|
299
|
+
send_error_email(exc)
|
300
|
+
rescue => exc2
|
301
|
+
end
|
302
|
+
end
|
284
303
|
render "errors/#{error_page}", :layout => "errors/error"
|
285
304
|
super
|
286
305
|
end
|
287
306
|
|
307
|
+
def send_error_email(exc)
|
308
|
+
scene = Spider::Scene.new
|
309
|
+
scene.request = @request.env
|
310
|
+
scene.exception = exc
|
311
|
+
subject = _("Site error")
|
312
|
+
if Spider.conf.get('orgs.default.name')
|
313
|
+
subject = "#{Spider.conf.get('orgs.default.name')} - #{subject}"
|
314
|
+
elsif @request.env.key?('HTTP_HOST')
|
315
|
+
subject = "#{@request.env['HTTP_HOST']} - #{subject}"
|
316
|
+
end
|
317
|
+
headers = {'Subject' => subject}
|
318
|
+
from = Spider.conf.get('orgs.default.auto_from_email') || Spider.conf.get('site.tech_admin.email')
|
319
|
+
Spider::Messenger::MessengerHelper.send_email(
|
320
|
+
self.class, 'error', scene, from, Spider.conf.get('site.tech_admin.email'), headers
|
321
|
+
)
|
322
|
+
end
|
323
|
+
|
288
324
|
def build_backtrace(exc)
|
289
325
|
bt = []
|
290
|
-
if Debugger && Debugger.started? && Debugger.post_mortem?
|
326
|
+
if Object.const_defined?(:Debugger) && Debugger.started? && Debugger.post_mortem?
|
291
327
|
use_debugger = true
|
292
328
|
context = exc.__debug_context
|
293
329
|
ct_first_file = context.frame_file(0)
|
@@ -307,67 +343,70 @@ module Spider; module ControllerMixins
|
|
307
343
|
end
|
308
344
|
context = exc.__debug_context
|
309
345
|
0.upto(Debugger.current_context.stack_size - 2) do |i|
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
346
|
+
begin
|
347
|
+
file = context.frame_file(i)
|
348
|
+
line = context.frame_line(i)
|
349
|
+
klass = context.frame_class(i)
|
350
|
+
method = context.frame_method(i)
|
351
|
+
args = context.frame_args(i)
|
352
|
+
locals = context.frame_locals(i)
|
353
|
+
frame_self = context.frame_self(i)
|
354
|
+
dest = context.frame_self(i-1) unless i == 0
|
355
|
+
ex_method = context.frame_method(i-1) unless i == 0
|
356
|
+
in_method = context.frame_method(i)
|
357
|
+
#s ex_args = context.frame_args(i+1)
|
358
|
+
str = "#{file}:#{line}: in #{in_method}"
|
359
|
+
#str = exc.backtrace[i]
|
323
360
|
|
324
|
-
|
325
|
-
# self_str = "#<#{frame_self.class}:#{frame_self.object_id}>"
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
361
|
+
self_str = frame_self
|
362
|
+
# self_str = "#<#{frame_self.class}:#{frame_self.object_id}>"
|
363
|
+
if (dest)
|
364
|
+
dest_str = dest.is_a?(Class) ? dest.inspect : "#<#{dest.class}:#{dest.object_id}>"
|
365
|
+
else
|
366
|
+
dest_str = ""
|
367
|
+
end
|
368
|
+
self_str = frame_self.is_a?(Class) ? frame_self.inspect : "#<#{frame_self.class}:#{frame_self.object_id}>"
|
369
|
+
if (i == -1)
|
370
|
+
info = ""
|
371
|
+
else
|
372
|
+
# if (frame_self == dest)
|
373
|
+
# info = "#{dest_str}"
|
374
|
+
# else
|
375
|
+
# info = "#{self_str}: #{dest_str}"
|
376
|
+
# end
|
377
|
+
info = "#{self_str}: #{dest_str}"
|
378
|
+
info += ".#{ex_method}("
|
379
|
+
info += args.map{ |arg|
|
380
|
+
val = locals[arg]
|
381
|
+
arg_str = "#{arg}##{val.class}"
|
382
|
+
val_str = nil
|
383
|
+
if (val.is_a?(String))
|
384
|
+
if (val.length > 20)
|
385
|
+
val_str = (val[0..20]+'...').inspect
|
386
|
+
else
|
387
|
+
val_str = val.inspect
|
388
|
+
end
|
389
|
+
elsif (val.is_a?(Symbol) || val.is_a?(Fixnum) || val.is_a?(Float) || val.is_a?(BigDecimal) || val.is_a?(Date) || val.is_a?(Time))
|
350
390
|
val_str = val.inspect
|
351
391
|
end
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
392
|
+
arg_str += "=#{val_str}" if val_str
|
393
|
+
arg_str
|
394
|
+
}.join(', ')
|
395
|
+
info += ")"
|
396
|
+
end
|
397
|
+
if (Spider.conf.get('devel.trace.show_instance_variables'))
|
398
|
+
iv = {}
|
399
|
+
frame_self.instance_variables.each{ |var| iv[var] = frame_self.instance_variable_get(var) }
|
400
|
+
iv.reject{ |k, v| v.nil? }
|
401
|
+
end
|
402
|
+
locals = nil unless Spider.conf.get('devel.trace.show_locals')
|
403
|
+
bt << {
|
404
|
+
:text => str, :info => info,
|
405
|
+
:path => File.expand_path(file), :line => line, :method => method, :klass => klass, :locals => locals,
|
406
|
+
:instance_variables => iv
|
407
|
+
}
|
408
|
+
rescue => exc2
|
364
409
|
end
|
365
|
-
locals = nil unless Spider.conf.get('devel.trace.show_locals')
|
366
|
-
bt << {
|
367
|
-
:text => str, :info => info,
|
368
|
-
:path => File.expand_path(file), :line => line, :method => method, :klass => klass, :locals => locals,
|
369
|
-
:instance_variables => iv
|
370
|
-
}
|
371
410
|
end
|
372
411
|
return bt
|
373
412
|
end
|
@@ -391,6 +430,10 @@ module Spider; module ControllerMixins
|
|
391
430
|
return @output_formats[method][0]
|
392
431
|
end
|
393
432
|
|
433
|
+
def output_formats
|
434
|
+
@output_formats || {}
|
435
|
+
end
|
436
|
+
|
394
437
|
def output_format?(method, format)
|
395
438
|
return false unless @output_formats
|
396
439
|
@output_formats[method] && @output_formats[method].include?(format)
|
@@ -413,9 +456,13 @@ module Spider; module ControllerMixins
|
|
413
456
|
@layouts ||= []
|
414
457
|
end
|
415
458
|
|
459
|
+
def layout_params
|
460
|
+
@layout_params ||= {}
|
461
|
+
end
|
462
|
+
|
416
463
|
def layout(name, params={})
|
417
|
-
|
418
|
-
|
464
|
+
self.layouts << name
|
465
|
+
self.layout_params[name] = params
|
419
466
|
end
|
420
467
|
|
421
468
|
|
@@ -431,8 +478,8 @@ module Spider; module ControllerMixins
|
|
431
478
|
end
|
432
479
|
end
|
433
480
|
action = (action && !action.empty?) ? action.to_sym : self.default_action
|
434
|
-
layouts.each do |
|
435
|
-
|
481
|
+
layouts.each do |name|
|
482
|
+
params = @layout_params[name]
|
436
483
|
if (params[:for])
|
437
484
|
next unless check_action(action, params[:for])
|
438
485
|
end
|
@@ -487,12 +534,14 @@ module Spider; module ControllerMixins
|
|
487
534
|
unless respond_to?(:layout_path)
|
488
535
|
raise NotImplementedError, "The layout_path class method must be implemented by object using the Visual mixin, but #{self} does not"
|
489
536
|
end
|
537
|
+
params = self.layout_params[path] || {}
|
490
538
|
if (path.is_a?(Symbol))
|
491
539
|
path = Spider::Layout.named_layouts[path]
|
492
540
|
end
|
493
541
|
resource = Spider::Template.find_resource(path+'.layout', layout_path, self)
|
494
542
|
layout = Spider::Layout.new(resource.path)
|
495
543
|
layout.definer_class = resource.definer
|
544
|
+
layout.asset_set = params[:assets] if params[:assets]
|
496
545
|
layout
|
497
546
|
end
|
498
547
|
|
@@ -501,6 +550,10 @@ module Spider; module ControllerMixins
|
|
501
550
|
Spider::Inflector.underscore(self.to_s.split('::')[-1])
|
502
551
|
end
|
503
552
|
|
553
|
+
def assets
|
554
|
+
[]
|
555
|
+
end
|
556
|
+
|
504
557
|
end
|
505
558
|
|
506
559
|
end
|
@@ -7,6 +7,18 @@ module Spider
|
|
7
7
|
|
8
8
|
BUFSIZE = 1024*4
|
9
9
|
|
10
|
+
def self.current
|
11
|
+
Thread.current[:spider_request] ||= {}
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.current=(val)
|
15
|
+
Thread.current[:spider_request] = val
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.reset_current
|
19
|
+
Thread.current[:spider_request] = nil
|
20
|
+
end
|
21
|
+
|
10
22
|
|
11
23
|
def initialize(env)
|
12
24
|
Spider::Logger.debug("REQUEST:")
|
@@ -52,4 +64,4 @@ module Spider
|
|
52
64
|
|
53
65
|
end
|
54
66
|
|
55
|
-
end
|
67
|
+
end
|