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
@@ -1,20 +1,42 @@
|
|
1
1
|
require 'digest/sha1'
|
2
|
+
require 'yaml'
|
2
3
|
|
3
4
|
module Spider; module Model
|
4
5
|
|
5
6
|
module Versioned
|
6
7
|
|
8
|
+
|
7
9
|
def self.included(model)
|
8
10
|
model.extend(ClassMethods)
|
9
11
|
model.mapper_include(Mapper)
|
12
|
+
model.remove_element(:v_sha1) if model.elements[:v_sha1] && model.elements[:v_sha1].integrated?
|
13
|
+
unless model.elements[:v_sha1] #|| model.attributes[:sub_model]
|
14
|
+
model.element(:v_sha1, String, :length => 40, :hidden => true)
|
15
|
+
end
|
16
|
+
|
10
17
|
#model.versioning
|
11
|
-
|
12
|
-
|
13
|
-
|
18
|
+
par = model.containing_module
|
19
|
+
local_name = model.name.sub(par.name+'::', '')
|
20
|
+
unless par.const_defined?(:Versioned)
|
21
|
+
par.const_set(:Versioned, Module.new)
|
14
22
|
end
|
15
|
-
|
23
|
+
versioned_module = par.const_get(:Versioned)
|
24
|
+
vmod = Versioned.create_version_model(model)
|
25
|
+
versioned_module.const_set_full(local_name, vmod)
|
16
26
|
model.set_version_model(nil, vmod)
|
17
|
-
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.create_version_model(model)
|
30
|
+
vmod = Class.new(model)
|
31
|
+
vmod.class_eval{ include VersionModel }
|
32
|
+
vmod.remove_element(:v_sha1)
|
33
|
+
vmod.primary_keys.each do |pk|
|
34
|
+
vmod.element_attributes(pk.name, :primary_key => false)
|
35
|
+
end
|
36
|
+
vmod.element(:v_sha1, String, :primary_key => true, :length => 40, :version_pk => true, :hidden => true)
|
37
|
+
local_pk = "id_versioned_#{model.short_name.downcase}"
|
38
|
+
vmod.element(local_pk, Fixnum, :autoincrement => true, :local_pk => true, :hidden => true)
|
39
|
+
vmod
|
18
40
|
end
|
19
41
|
|
20
42
|
module ClassMethods
|
@@ -22,58 +44,117 @@ module Spider; module Model
|
|
22
44
|
def versioning(branch=nil)
|
23
45
|
@version_models ||= {}
|
24
46
|
@version_elements ||= {}
|
47
|
+
par = self.containing_module
|
48
|
+
local_name = self.name.sub(par.name, '')
|
49
|
+
versioned_module = par.const_get(:Versioned)
|
25
50
|
unless @version_models[branch]
|
26
|
-
vmod =
|
27
|
-
vmod_name =
|
51
|
+
vmod = Versioned.create_version_model(self)
|
52
|
+
vmod_name = local_name.to_s
|
28
53
|
vmod_name += Spider::Inflector.camelize(branch) if branch
|
29
|
-
|
54
|
+
versioned_module.const_set_full(vmod_name, vmod)
|
30
55
|
@version_models[branch] = vmod
|
31
56
|
end
|
32
57
|
vmod = @version_models[branch]
|
58
|
+
if self.attributes[:sub_model] && self.attributes[:sub_model].respond_to?(:version_model)
|
59
|
+
vmod.attributes[:sub_model] = self.attributes[:sub_model].version_model
|
60
|
+
end
|
61
|
+
if @polymorphic_models
|
62
|
+
@polymorphic_models.each do |pmod, options|
|
63
|
+
pmod = pmod.version_model if pmod.respond_to?(:version_model)
|
64
|
+
vmod.polymorphic(pmod, options)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
vmod.attributes[:version_model] = true
|
33
68
|
vmod.primary_keys.each do |pk|
|
34
|
-
vmod.remove_element(pk.name)
|
69
|
+
vmod.remove_element(pk.name) unless pk.attributes[:version_pk] # FIXME
|
35
70
|
end
|
36
71
|
vmod.elements_array.each do |el|
|
37
72
|
el.attributes[:autoincrement] = false
|
38
73
|
end
|
39
|
-
vmod.remove_element(:v_sha1)
|
40
|
-
|
41
|
-
vmod.
|
42
|
-
vmod.element(:v_sha1, String, :primary_key => true, :length => 40)
|
43
|
-
vmod.element(:v_original, self, :add_multiple_reverse => :history)
|
74
|
+
# vmod.remove_element(:v_sha1)
|
75
|
+
self.remove_element(:history) # may exist from superclass
|
76
|
+
vmod.element(:v_original, self, :add_multiple_reverse => {:name => :history, :version_history => true, :hidden => true}, :hidden => true)
|
44
77
|
vmod.element(:version_date, DateTime)
|
78
|
+
vmod.element(:version_comment, String)
|
79
|
+
vmod.remove_element(:history)
|
45
80
|
self.elements_array.each do |el|
|
81
|
+
next if el.name == :v_sha1
|
46
82
|
elh = dump_element(el)
|
47
|
-
|
83
|
+
if el.integrated?
|
84
|
+
if el.integrated_from.type < Versioned && vmod.elements[el.name] && vmod.elements[el.name].model? && \
|
85
|
+
!vmod.elements[el.name].integrated_from.type.attributes[:version_model]
|
86
|
+
vmod.remove_element(el)
|
87
|
+
end
|
88
|
+
next
|
89
|
+
end
|
48
90
|
next unless elh
|
49
91
|
# elh[:attributes][:primary_key] = false
|
50
92
|
# debugger if elh[:attributes][:junction]
|
51
93
|
# vmod.send(elh[:method], elh[:name], elh[:type], elh[:attributes])
|
52
94
|
if (el.model?)
|
53
|
-
if
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
95
|
+
if elh[:attributes][:integrated_model]
|
96
|
+
|
97
|
+
elh[:type].elements.each do |ielname, iel|
|
98
|
+
i = vmod.elements[ielname]
|
99
|
+
vmod.remove_element(ielname) if i && i.integrated? && i.integrated_from.name == el.name
|
100
|
+
end
|
101
|
+
elh[:attributes][:integrate] = true
|
102
|
+
end
|
103
|
+
if el.attributes[:add_reverse] || el.attributes[:add_multiple_reverse]
|
104
|
+
rev = el.attributes[:add_reverse] || el.attributes[:add_multiple_reverse]
|
105
|
+
el.type.version_model.remove_element(rev[:name]) if el.type.respond_to?(:version_model)
|
106
|
+
end
|
107
|
+
if vmod.elements[el.name] && elh[:attributes][:reverse] && !(el.model < Spider::Model::Versioned)
|
108
|
+
vmod.elements[el.name].attributes.delete(:reverse)
|
109
|
+
end
|
110
|
+
if el.multiple? && !el.attributes[:junction] && !(el.model < Spider::Model::Versioned)
|
111
|
+
elh[:attributes].delete(:reverse)
|
112
|
+
elh[:attributes].delete(:add_reverse)
|
113
|
+
elh[:attributes].delete(:add_multiple_reverse)
|
114
|
+
vmod.remove_element(el.name)
|
115
|
+
vmod.send(elh[:method], el.name, el.type, elh[:attributes])
|
116
|
+
elsif (!el.attributes[:added_reverse] && el.model < Spider::Model::Versioned)
|
117
|
+
vmod.remove_element(el.name)
|
118
|
+
if elh[:method] == :tree
|
119
|
+
vmod.remove_element(elh[:attributes][:reverse])
|
120
|
+
vmod.remove_element(elh[:attributes][:tree_left])
|
121
|
+
vmod.remove_element(elh[:attributes][:tree_right])
|
122
|
+
vmod.remove_element(elh[:attributes][:tree_depth])
|
123
|
+
vmod.tree(el.name, elh[:attributes])
|
124
|
+
else
|
125
|
+
vmod.send(elh[:method], el.name, el.type.version_model, elh[:attributes])
|
126
|
+
end
|
127
|
+
@version_elements[el.name] = el.name
|
128
|
+
elsif (el.attributes[:junction] && el.attributes[:owned])
|
62
129
|
# elh[:attributes][:has_single_reverse] = (el.attributes[:reverse] && !el.type.elements[el.attributes[:reverse]].multiple?)
|
63
|
-
junction = el.attributes[:association_type]
|
64
|
-
unless junction < Spider::Model::Versioned
|
65
|
-
junction.module_eval{ include Spider::Model::Versioned }
|
130
|
+
junction = vmod.elements[el.name].attributes[:association_type]
|
131
|
+
unless junction < Spider::Model::Versioned
|
132
|
+
junction.module_eval{ include Spider::Model::Versioned }
|
66
133
|
junction.versioning(branch)
|
67
134
|
end
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
135
|
+
unless vmod.elements[el.name].model.attributes[:version_model]
|
136
|
+
elh[:attributes][:through] = junction.version_model
|
137
|
+
elh[:attributes][:junction_our_element] = "#{elh[:attributes][:reverse]}".to_sym
|
138
|
+
elh[:attributes][:junction_their_element] = "#{elh[:attributes][:junction_their_element]}".to_sym
|
139
|
+
vmod.remove_element(el.name)
|
140
|
+
junction_type = nil
|
141
|
+
if el.type.respond_to?(:version_model)
|
142
|
+
junction_type = el.type.version_model
|
143
|
+
else
|
144
|
+
junction_type = el.type
|
145
|
+
elh[:attributes].delete(:reverse)
|
146
|
+
elh[:attributes].delete(:add_reverse)
|
147
|
+
elh[:attributes].delete(:add_multiple_reverse)
|
148
|
+
end
|
149
|
+
vmod.send(elh[:method], el.name, junction_type, elh[:attributes])
|
150
|
+
|
151
|
+
junction.version_model.integrate(elh[:attributes][:junction_their_element]) if junction.attributes[:sub_model] == self
|
152
|
+
end
|
153
|
+
@version_elements[el.name] = el.name
|
74
154
|
end
|
75
155
|
end
|
76
156
|
end
|
157
|
+
vmod.elements_array.each{ |el| el.attributes[:unique] = false if el.attributes[:unique] }
|
77
158
|
end
|
78
159
|
|
79
160
|
def version_element(el=nil)
|
@@ -91,60 +172,352 @@ module Spider; module Model
|
|
91
172
|
@version_models ||= {}
|
92
173
|
@version_models[branch] = model
|
93
174
|
end
|
175
|
+
|
176
|
+
# Returns the elements that concurr to define the objects version
|
177
|
+
def version_contents
|
178
|
+
#no_content_assocs = [:choice, :multiple_choice]
|
179
|
+
no_content_assocs = []
|
180
|
+
|
181
|
+
self.elements_array.select{ |el|
|
182
|
+
el.attributes[:version_content] || mapper.have_references?(el.name) || (!el.attributes[:added_reverse] && !no_content_assocs.include?(el.association))
|
183
|
+
}.reject{ |el| el.model? && !(el.model < Spider::Model::Versioned) }
|
184
|
+
end
|
185
|
+
|
186
|
+
def version_ignored_elements
|
187
|
+
[:v_sha1, :history, :obj_created, :obj_modified]
|
188
|
+
end
|
189
|
+
|
190
|
+
def version?
|
191
|
+
false
|
192
|
+
end
|
94
193
|
|
95
194
|
end
|
96
195
|
|
97
196
|
module Mapper
|
98
|
-
|
99
|
-
def save_done(obj, mode)
|
100
|
-
obj.set(obj.class.version_element, obj.version_sha1)
|
101
|
-
obj.reset_modified_elements
|
102
|
-
obj.set_modified(:v_sha1 => true)
|
103
|
-
obj.mapper.do_update(obj)
|
104
|
-
super
|
105
|
-
end
|
106
197
|
|
198
|
+
def get_dependencies(obj, action)
|
199
|
+
|
200
|
+
deps = []
|
201
|
+
version_contents = obj.class.version_contents
|
202
|
+
task = MapperTask.new(obj, action)
|
203
|
+
case action
|
204
|
+
when :save_version
|
205
|
+
#Spider.logger.debug("PROCESSING DEPS ON #{obj}")
|
206
|
+
version_contents.each do |vc|
|
207
|
+
next unless vc.model?
|
208
|
+
next if vc.integrated?
|
209
|
+
set = obj.send(vc.name)
|
210
|
+
next unless set
|
211
|
+
set = obj.prepare_version_object(vc.name, set) if obj.respond_to?(:prepare_version_object)
|
212
|
+
next if set == self
|
213
|
+
set = self.instance_variable_get("@#{vc.name}_junction") if vc.junction? && !vc.attributes[:keep_junction]
|
214
|
+
next unless set
|
215
|
+
set = [set] unless vc.multiple?
|
216
|
+
set.each do |set_obj|
|
217
|
+
s_obj = set_obj
|
218
|
+
if have_references?(vc)
|
219
|
+
#Spider.logger.debug("Version on #{obj} (#{obj.class}) depends on #{set_obj} (#{set_obj.class})")
|
220
|
+
deps << [task, MapperTask.new(set_obj, :save_version)]
|
221
|
+
elsif vc.junction?
|
222
|
+
dejunct = set_obj.get(vc.attributes[:junction_their_element])
|
223
|
+
dejunct = obj.class.prepare_junction_version_object(vc.name, dejunct) if obj.class.respond_to?(:prepare_junction_version_object)
|
224
|
+
dejunct_task = MapperTask.new(dejunct, :save_version)
|
225
|
+
junction_task = MapperTask.new(set_obj, :save_version)
|
226
|
+
deps << [junction_task, dejunct_task] if dejunct.class < Spider::Model::Versioned
|
227
|
+
deps << [junction_task, task]
|
228
|
+
else
|
229
|
+
#Spider.logger.debug("Version on #{set_obj} (#{set_obj.class}) depends on #{obj} (#{obj.class})")
|
230
|
+
deps << [MapperTask.new(set_obj, :save_version), task]
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
else
|
235
|
+
return super
|
236
|
+
end
|
237
|
+
deps
|
238
|
+
end
|
239
|
+
|
240
|
+
def execute_action(action, object, params) # :nodoc:
|
241
|
+
return super unless [:save_version, :save_junction_version].include?(action)
|
242
|
+
@unit_of_work_task = true
|
243
|
+
case action
|
244
|
+
when :save_version
|
245
|
+
save_version(object)
|
246
|
+
when :save_junction_version
|
247
|
+
save_junction_version(object)
|
248
|
+
end
|
249
|
+
@unit_of_work_task = false
|
250
|
+
end
|
251
|
+
|
252
|
+
def save_version(object)
|
253
|
+
mod = @model
|
254
|
+
vmod = mod.version_model
|
255
|
+
vobj = vmod.static()
|
256
|
+
ve = mod.version_element
|
257
|
+
current_sha1 = object.get(ve)
|
258
|
+
new_sha1 = object.version_sha1
|
259
|
+
# debugger
|
260
|
+
# debugger
|
261
|
+
return if current_sha1 == new_sha1
|
262
|
+
# debugger
|
263
|
+
object.v_sha1 = new_sha1
|
264
|
+
vobj = Spider::Model.get(vmod, :v_sha1 => new_sha1)
|
265
|
+
vobj.autoload(false)
|
266
|
+
object.populate_version_object(vobj)
|
267
|
+
vobj.autoload(false)
|
268
|
+
|
269
|
+
vobj.set(mod.elements[:history].reverse, object)
|
270
|
+
vobj.set(:version_date, DateTime.now)
|
271
|
+
# vobj.set(:version_comment, comment)
|
272
|
+
object.mapper.do_update(object)
|
273
|
+
begin
|
274
|
+
vobj.mapper.insert(vobj)
|
275
|
+
#vobj.insert
|
276
|
+
rescue Spider::Model::Storage::DuplicateKey
|
277
|
+
Spider.logger.error("Duplicate version for #{self}")
|
278
|
+
end
|
279
|
+
object.autoload(true)
|
280
|
+
object.trigger(:version_saved)
|
281
|
+
end
|
282
|
+
|
283
|
+
def save_junction_version(object)
|
284
|
+
vmod = @model.version_model
|
285
|
+
vobj = vmod.static
|
286
|
+
object.class.elements_array.select{ |el| el.attributes[:junction_reference] }.each do |el|
|
287
|
+
val = object.get(el)
|
288
|
+
vobj.set(el, val.get(:v_sha1))
|
289
|
+
end
|
290
|
+
vobj.mapper.do_insert(vobj)
|
291
|
+
end
|
292
|
+
|
107
293
|
end
|
108
294
|
|
109
295
|
def version_sha1
|
110
|
-
yaml = self.
|
296
|
+
yaml = YAML::dump(self.version_flatout)
|
111
297
|
sha1 = Digest::SHA1.hexdigest(yaml)
|
112
298
|
end
|
113
299
|
|
114
|
-
def
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
300
|
+
def version_sha1_getnew
|
301
|
+
yaml = YAML::dump(self.get_new.version_flatout)
|
302
|
+
sha1 = Digest::SHA1.hexdigest(yaml)
|
303
|
+
end
|
304
|
+
|
305
|
+
def version_flatout(params={})
|
306
|
+
h = {}
|
307
|
+
def v_obj_pks(obj, klass, use_sha)
|
308
|
+
if use_sha && obj.respond_to?(:v_sha1)
|
309
|
+
return obj.v_sha1
|
310
|
+
else
|
311
|
+
unless obj
|
312
|
+
return klass.primary_keys.length > 1 ? [] : nil
|
313
|
+
end
|
314
|
+
pks = obj.primary_keys
|
315
|
+
return pks[0] if pks.length == 1
|
316
|
+
return pks
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
version_contents = self.class.version_contents
|
321
|
+
exclude_elements = self.class.version_ignored_elements
|
322
|
+
self.class.elements_array.each do |el|
|
323
|
+
next if exclude_elements.include?(el.name)
|
324
|
+
next if el.name == :v_sha1
|
325
|
+
next if el.name == :history
|
326
|
+
next if params[:except] && params[:except].include?(el.name)
|
327
|
+
next if el.integrated?
|
328
|
+
if (el.model?)
|
329
|
+
is_version_content = version_contents.include?(el)
|
330
|
+
obj = get(el)
|
331
|
+
unless obj
|
332
|
+
h[el.name] = obj
|
333
|
+
next
|
334
|
+
end
|
335
|
+
if self.class.attributes[:sub_model] && self.class.attributes[:sub_model].respond_to?(:prepare_junction_version_object)
|
336
|
+
obj = self.class.attributes[:sub_model].prepare_junction_version_object(self.class.attributes[:sub_model_element], obj)
|
337
|
+
elsif self.respond_to?(:prepare_version_object)
|
338
|
+
obj = self.prepare_version_object(el.name, obj)
|
339
|
+
end
|
340
|
+
if is_version_content && self.class.mapper.have_references?(el)
|
341
|
+
if (el.multiple?)
|
342
|
+
h[el.name] = obj.map{ |o| o.v_sha1 }
|
343
|
+
else
|
344
|
+
h[el.name] = obj.v_sha1
|
345
|
+
end
|
346
|
+
elsif is_version_content && el.type < Spider::Model::Versioned
|
347
|
+
if (el.multiple?)
|
348
|
+
h[el.name] = obj.map{ |o| o.version_content_hash(:except_objects => [self]) }
|
349
|
+
else
|
350
|
+
h[el.name] = obj.version_content_hash(:except_objects => [self])
|
351
|
+
end
|
352
|
+
elsif (el.multiple?)
|
353
|
+
h[el.name] = obj.map{ |o| v_obj_pks(o, el.model, false) }
|
354
|
+
else
|
355
|
+
h[el.name] = v_obj_pks(obj, el.model, false)
|
356
|
+
end
|
357
|
+
else
|
358
|
+
h[el.name] = get(el)
|
359
|
+
end
|
360
|
+
end
|
361
|
+
return h
|
362
|
+
end
|
363
|
+
|
364
|
+
def version_content_hash(params={})
|
365
|
+
h = {:class => self.class.name}
|
366
|
+
version_contents = self.class.version_contents
|
367
|
+
exclude_elements = self.class.version_ignored_elements
|
368
|
+
params[:except_objects] ||= []
|
369
|
+
except_objects = params[:except_objects].clone
|
370
|
+
except_objects << self
|
371
|
+
self.class.elements_array.each do |el|
|
372
|
+
next if exclude_elements.include?(el.name)
|
373
|
+
next if el.name == :v_sha1
|
374
|
+
next if el.name == :history
|
375
|
+
next if params[:except] && params[:except].include?(el.name)
|
376
|
+
next if el.integrated?
|
377
|
+
if el.model?
|
378
|
+
obj = get(el)
|
379
|
+
next unless obj
|
380
|
+
if el.multiple?
|
381
|
+
obj.each{ |o| except_objects << o }
|
382
|
+
else
|
383
|
+
except_objects << obj
|
384
|
+
end
|
385
|
+
end
|
123
386
|
end
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
if
|
128
|
-
|
129
|
-
|
130
|
-
|
387
|
+
self.class.elements_array.each do |el|
|
388
|
+
next if exclude_elements.include?(el.name)
|
389
|
+
next if el.name == :v_sha1
|
390
|
+
next if el.name == :history
|
391
|
+
next if params[:except] && params[:except].include?(el.name)
|
392
|
+
next if el.integrated?
|
393
|
+
|
394
|
+
if (el.model?)
|
395
|
+
obj = get(el)
|
396
|
+
next if params[:except_objects].include?(obj)
|
397
|
+
if self.class.attributes[:sub_model] && self.class.attributes[:sub_model].respond_to?(:prepare_junction_version_object)
|
398
|
+
obj = self.class.attributes[:sub_model].prepare_junction_version_object(self.class.attributes[:sub_model_element], obj)
|
399
|
+
elsif self.respond_to?(:prepare_version_object)
|
400
|
+
obj = self.prepare_version_object(el.name, obj)
|
401
|
+
end
|
402
|
+
next if params[:except_objects].include?(obj)
|
403
|
+
|
404
|
+
if !obj
|
405
|
+
h[el.name] = nil
|
406
|
+
elsif el.type.method_defined?(:version_content_hash)
|
407
|
+
if (el.multiple?)
|
408
|
+
h[el.name] = obj.reject{ |o|
|
409
|
+
params[:except_objects].include?(o)
|
410
|
+
}.map{ |o| o.version_content_hash(:except_objects => except_objects) }
|
411
|
+
else
|
412
|
+
h[el.name] = obj.version_content_hash(:except_objects => except_objects)
|
413
|
+
end
|
131
414
|
else
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
415
|
+
if (el.multiple?)
|
416
|
+
h[el.name] = obj.reject{ |o|
|
417
|
+
params[:except_objects].include?(o)
|
418
|
+
}.map{ |o| params[:except_objects] << o; o.to_yaml_h(:except => exclude_elements + [el.reverse]) }
|
419
|
+
else
|
420
|
+
h[el.name] = obj.to_yaml_h(:except => exclude_elements + [el.reverse])
|
137
421
|
end
|
138
422
|
end
|
423
|
+
else
|
424
|
+
h[el.name] = get(el)
|
139
425
|
end
|
140
426
|
end
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
427
|
+
h
|
428
|
+
end
|
429
|
+
|
430
|
+
def populate_version_object(vobj)
|
431
|
+
mod = self.class
|
432
|
+
vmod = mod.version_model
|
433
|
+
version_contents = self.class.version_contents
|
434
|
+
|
435
|
+
self.class.elements_array.each do |el|
|
436
|
+
next unless vmod.elements[el.name]
|
437
|
+
next if el.model? && el.type.attributes[:version_model]
|
438
|
+
next if el.integrated?
|
439
|
+
next if el.multiple? && el.model.respond_to?(:version_element)
|
440
|
+
is_version_content = version_contents.include?(el)
|
441
|
+
#debugger if el.name == :news_list
|
442
|
+
el_val = self.get(el)
|
443
|
+
if self.respond_to?(:prepare_version_object)
|
444
|
+
el_val = self.prepare_version_object(el.name, el_val)
|
445
|
+
end
|
446
|
+
#next unless mod.mapper.have_references?(el)
|
447
|
+
if el_val && el.multiple?
|
448
|
+
if !el.model.respond_to?(:version_element)
|
449
|
+
el_val.each do |v|
|
450
|
+
vobj.get(el.name) << v
|
451
|
+
end
|
452
|
+
end
|
453
|
+
elsif el.model? && el_val && el.model.respond_to?(:version_element) # && is_version_content
|
454
|
+
|
455
|
+
vobj.set(el.name, el_val.get(el.model.version_element))
|
456
|
+
# if self.class.attributes[:sub_model] && self.class.attributes[:sub_model].respond_to?(:prepare_junction_version_object)
|
457
|
+
# prep_val = self.class.attributes[:sub_model].prepare_junction_version_object(self.class.attributes[:sub_model_element], el_val)
|
458
|
+
# prep_val.save_version
|
459
|
+
# end
|
460
|
+
else
|
461
|
+
vobj.set(el.name, el_val)
|
462
|
+
end
|
463
|
+
end
|
464
|
+
end
|
465
|
+
|
466
|
+
def save_version(comment=nil)
|
467
|
+
obj = nil
|
468
|
+
Spider::Model.in_unit do |uow|
|
469
|
+
obj = Spider::Model.identity_mapper.put(self)
|
470
|
+
uow.add(obj, :save_version)
|
471
|
+
end
|
472
|
+
end
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
def version_modified?
|
477
|
+
self.version_sha1 != self.get(self.class.version_element)
|
478
|
+
end
|
479
|
+
|
480
|
+
def version?
|
481
|
+
false
|
482
|
+
end
|
483
|
+
|
484
|
+
def polymorphic_become(model)
|
485
|
+
return super unless model < Spider::Model::VersionModel
|
486
|
+
obj = super
|
487
|
+
el = self.class.polymorphic_models[model][:through]
|
488
|
+
super_obj = obj.get(el)
|
489
|
+
return model.where(el => super_obj).order_by(:version_date, :desc).limit(1)[0]
|
490
|
+
end
|
491
|
+
|
492
|
+
def previous_version(back=1)
|
493
|
+
self.class.version_model.where{ |s|
|
494
|
+
(s.v_original == self) & (s.v_sha1 .not self.v_sha1)
|
495
|
+
}.order_by(:version_date, :desc).limit(1).offset(back-1)[0]
|
496
|
+
end
|
497
|
+
|
498
|
+
def last_version
|
499
|
+
self.class.version_model.where{ |s|
|
500
|
+
(s.v_original == self)
|
501
|
+
}.order_by(:version_date, :desc).limit(1)[0]
|
502
|
+
end
|
503
|
+
|
504
|
+
|
505
|
+
end
|
506
|
+
|
507
|
+
module VersionModel
|
508
|
+
def self.included(model)
|
509
|
+
model.extend(ClassMethods)
|
510
|
+
end
|
511
|
+
|
512
|
+
module ClassMethods
|
513
|
+
def version?
|
514
|
+
true
|
145
515
|
end
|
146
516
|
end
|
147
517
|
|
518
|
+
def version?
|
519
|
+
true
|
520
|
+
end
|
148
521
|
end
|
149
522
|
|
150
523
|
end; end
|