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
@@ -0,0 +1,223 @@
|
|
1
|
+
#--
|
2
|
+
# From ActiveSupport
|
3
|
+
# Copyright (c) 2005 David Heinemeier Hansson
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
#++
|
24
|
+
|
25
|
+
begin
|
26
|
+
require 'securerandom'
|
27
|
+
rescue LoadError
|
28
|
+
end
|
29
|
+
|
30
|
+
module Spider
|
31
|
+
if defined?(::SecureRandom)
|
32
|
+
# Use Ruby's SecureRandom library if available.
|
33
|
+
SecureRandom = ::SecureRandom # :nodoc:
|
34
|
+
else
|
35
|
+
# = Secure random number generator interface.
|
36
|
+
#
|
37
|
+
# This library is an interface for secure random number generator which is
|
38
|
+
# suitable for generating session key in HTTP cookies, etc.
|
39
|
+
#
|
40
|
+
# It supports following secure random number generators.
|
41
|
+
#
|
42
|
+
# * openssl
|
43
|
+
# * /dev/urandom
|
44
|
+
# * Win32
|
45
|
+
#
|
46
|
+
# *Note*: This module is based on the SecureRandom library from Ruby 1.9,
|
47
|
+
# revision 18786, August 23 2008. It's 100% interface-compatible with Ruby 1.9's
|
48
|
+
# SecureRandom library.
|
49
|
+
#
|
50
|
+
# == Example
|
51
|
+
#
|
52
|
+
# # random hexadecimal string.
|
53
|
+
# p SecureRandom.hex(10) # => "52750b30ffbc7de3b362"
|
54
|
+
# p SecureRandom.hex(10) # => "92b15d6c8dc4beb5f559"
|
55
|
+
# p SecureRandom.hex(11) # => "6aca1b5c58e4863e6b81b8"
|
56
|
+
# p SecureRandom.hex(12) # => "94b2fff3e7fd9b9c391a2306"
|
57
|
+
# p SecureRandom.hex(13) # => "39b290146bea6ce975c37cfc23"
|
58
|
+
# ...
|
59
|
+
#
|
60
|
+
# # random base64 string.
|
61
|
+
# p SecureRandom.base64(10) # => "EcmTPZwWRAozdA=="
|
62
|
+
# p SecureRandom.base64(10) # => "9b0nsevdwNuM/w=="
|
63
|
+
# p SecureRandom.base64(10) # => "KO1nIU+p9DKxGg=="
|
64
|
+
# p SecureRandom.base64(11) # => "l7XEiFja+8EKEtY="
|
65
|
+
# p SecureRandom.base64(12) # => "7kJSM/MzBJI+75j8"
|
66
|
+
# p SecureRandom.base64(13) # => "vKLJ0tXBHqQOuIcSIg=="
|
67
|
+
# ...
|
68
|
+
#
|
69
|
+
# # random binary string.
|
70
|
+
# p SecureRandom.random_bytes(10) # => "\016\t{\370g\310pbr\301"
|
71
|
+
# p SecureRandom.random_bytes(10) # => "\323U\030TO\234\357\020\a\337"
|
72
|
+
# ...
|
73
|
+
module SecureRandom
|
74
|
+
# SecureRandom.random_bytes generates a random binary string.
|
75
|
+
#
|
76
|
+
# The argument n specifies the length of the result string.
|
77
|
+
#
|
78
|
+
# If n is not specified, 16 is assumed.
|
79
|
+
# It may be larger in future.
|
80
|
+
#
|
81
|
+
# If secure random number generator is not available,
|
82
|
+
# NotImplementedError is raised.
|
83
|
+
def self.random_bytes(n=nil)
|
84
|
+
n ||= 16
|
85
|
+
|
86
|
+
unless defined? OpenSSL
|
87
|
+
begin
|
88
|
+
require 'openssl'
|
89
|
+
rescue LoadError
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
if defined? OpenSSL::Random
|
94
|
+
return OpenSSL::Random.random_bytes(n)
|
95
|
+
end
|
96
|
+
|
97
|
+
if !defined?(@has_urandom) || @has_urandom
|
98
|
+
flags = File::RDONLY
|
99
|
+
flags |= File::NONBLOCK if defined? File::NONBLOCK
|
100
|
+
flags |= File::NOCTTY if defined? File::NOCTTY
|
101
|
+
flags |= File::NOFOLLOW if defined? File::NOFOLLOW
|
102
|
+
begin
|
103
|
+
File.open("/dev/urandom", flags) {|f|
|
104
|
+
unless f.stat.chardev?
|
105
|
+
raise Errno::ENOENT
|
106
|
+
end
|
107
|
+
@has_urandom = true
|
108
|
+
ret = f.readpartial(n)
|
109
|
+
if ret.length != n
|
110
|
+
raise NotImplementedError, "Unexpected partial read from random device"
|
111
|
+
end
|
112
|
+
return ret
|
113
|
+
}
|
114
|
+
rescue Errno::ENOENT
|
115
|
+
@has_urandom = false
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
if !defined?(@has_win32)
|
120
|
+
begin
|
121
|
+
require 'Win32API'
|
122
|
+
|
123
|
+
crypt_acquire_context = Win32API.new("advapi32", "CryptAcquireContext", 'PPPII', 'L')
|
124
|
+
@crypt_gen_random = Win32API.new("advapi32", "CryptGenRandom", 'LIP', 'L')
|
125
|
+
|
126
|
+
hProvStr = " " * 4
|
127
|
+
prov_rsa_full = 1
|
128
|
+
crypt_verifycontext = 0xF0000000
|
129
|
+
|
130
|
+
if crypt_acquire_context.call(hProvStr, nil, nil, prov_rsa_full, crypt_verifycontext) == 0
|
131
|
+
raise SystemCallError, "CryptAcquireContext failed: #{lastWin32ErrorMessage}"
|
132
|
+
end
|
133
|
+
@hProv, = hProvStr.unpack('L')
|
134
|
+
|
135
|
+
@has_win32 = true
|
136
|
+
rescue LoadError
|
137
|
+
@has_win32 = false
|
138
|
+
end
|
139
|
+
end
|
140
|
+
if @has_win32
|
141
|
+
bytes = " " * n
|
142
|
+
if @crypt_gen_random.call(@hProv, bytes.size, bytes) == 0
|
143
|
+
raise SystemCallError, "CryptGenRandom failed: #{lastWin32ErrorMessage}"
|
144
|
+
end
|
145
|
+
return bytes
|
146
|
+
end
|
147
|
+
|
148
|
+
raise NotImplementedError, "No random device"
|
149
|
+
end
|
150
|
+
|
151
|
+
# SecureRandom.hex generates a random hex string.
|
152
|
+
#
|
153
|
+
# The argument n specifies the length of the random length.
|
154
|
+
# The length of the result string is twice of n.
|
155
|
+
#
|
156
|
+
# If n is not specified, 16 is assumed.
|
157
|
+
# It may be larger in future.
|
158
|
+
#
|
159
|
+
# If secure random number generator is not available,
|
160
|
+
# NotImplementedError is raised.
|
161
|
+
def self.hex(n=nil)
|
162
|
+
random_bytes(n).unpack("H*")[0]
|
163
|
+
end
|
164
|
+
|
165
|
+
# SecureRandom.base64 generates a random base64 string.
|
166
|
+
#
|
167
|
+
# The argument n specifies the length of the random length.
|
168
|
+
# The length of the result string is about 4/3 of n.
|
169
|
+
#
|
170
|
+
# If n is not specified, 16 is assumed.
|
171
|
+
# It may be larger in future.
|
172
|
+
#
|
173
|
+
# If secure random number generator is not available,
|
174
|
+
# NotImplementedError is raised.
|
175
|
+
def self.base64(n=nil)
|
176
|
+
[random_bytes(n)].pack("m*").delete("\n")
|
177
|
+
end
|
178
|
+
|
179
|
+
# SecureRandom.random_number generates a random number.
|
180
|
+
#
|
181
|
+
# If an positive integer is given as n,
|
182
|
+
# SecureRandom.random_number returns an integer:
|
183
|
+
# 0 <= SecureRandom.random_number(n) < n.
|
184
|
+
#
|
185
|
+
# If 0 is given or an argument is not given,
|
186
|
+
# SecureRandom.random_number returns an float:
|
187
|
+
# 0.0 <= SecureRandom.random_number() < 1.0.
|
188
|
+
def self.random_number(n=0)
|
189
|
+
if 0 < n
|
190
|
+
hex = n.to_s(16)
|
191
|
+
hex = '0' + hex if (hex.length & 1) == 1
|
192
|
+
bin = [hex].pack("H*")
|
193
|
+
mask = bin[0]
|
194
|
+
mask |= mask >> 1
|
195
|
+
mask |= mask >> 2
|
196
|
+
mask |= mask >> 4
|
197
|
+
begin
|
198
|
+
rnd = SecureRandom.random_bytes(bin.length)
|
199
|
+
rnd[0] = rnd[0] & mask
|
200
|
+
end until rnd < bin
|
201
|
+
rnd.unpack("H*")[0].hex
|
202
|
+
else
|
203
|
+
# assumption: Float::MANT_DIG <= 64
|
204
|
+
i64 = SecureRandom.random_bytes(8).unpack("Q")[0]
|
205
|
+
Math.ldexp(i64 >> (64-Float::MANT_DIG), -Float::MANT_DIG)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# Following code is based on David Garamond's GUID library for Ruby.
|
210
|
+
def self.lastWin32ErrorMessage # :nodoc:
|
211
|
+
get_last_error = Win32API.new("kernel32", "GetLastError", '', 'L')
|
212
|
+
format_message = Win32API.new("kernel32", "FormatMessageA", 'LPLLPLPPPPPPPP', 'L')
|
213
|
+
format_message_ignore_inserts = 0x00000200
|
214
|
+
format_message_from_system = 0x00001000
|
215
|
+
|
216
|
+
code = get_last_error.call
|
217
|
+
msg = "\0" * 1024
|
218
|
+
len = format_message.call(format_message_ignore_inserts + format_message_from_system, 0, code, 0, msg, 1024, nil, nil, nil, nil, nil, nil, nil, nil)
|
219
|
+
msg[0, len].tr("\r", '').chomp
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
data/lib/spiderfw/version.rb
CHANGED
@@ -11,7 +11,7 @@ module Spider
|
|
11
11
|
include HTTPMixin
|
12
12
|
|
13
13
|
attr_accessor :parent
|
14
|
-
attr_accessor :request, :scene, :widgets, :template, :id, :id_path, :containing_template, :
|
14
|
+
attr_accessor :request, :scene, :widgets, :template, :id, :id_path, :containing_template, :is_target_ancestor, :is_target_descendant
|
15
15
|
attr_reader :attributes, :widget_attributes, :css_classes, :widgets_runtime_content
|
16
16
|
attr_accessor :active
|
17
17
|
|
@@ -26,6 +26,10 @@ module Spider
|
|
26
26
|
def inherited(subclass)
|
27
27
|
subclass.instance_variable_set(:@attributes, attributes.clone)
|
28
28
|
subclass.instance_variable_set(:@scene_attributes, @scene_attributes.clone) if @scene_attributes
|
29
|
+
subclass.instance_variable_set(:@plugins, @plugins.clone) if @plugins
|
30
|
+
subclass.instance_variable_set(:@default_assets, @default_assets.clone) if @default_assets
|
31
|
+
@subclasses ||= []
|
32
|
+
@subclasses << subclass
|
29
33
|
super
|
30
34
|
end
|
31
35
|
|
@@ -169,12 +173,6 @@ module Spider
|
|
169
173
|
end
|
170
174
|
|
171
175
|
Hpricot::Elements[*overrides].remove
|
172
|
-
plugins.each do |plugin|
|
173
|
-
name = plugin['name']
|
174
|
-
mod = self.plugin(name)
|
175
|
-
next unless mod
|
176
|
-
overrides += mod.get_overrides
|
177
|
-
end
|
178
176
|
return [doc.to_s, overrides]
|
179
177
|
end
|
180
178
|
|
@@ -192,6 +190,7 @@ module Spider
|
|
192
190
|
def add_plugin(name, mod)
|
193
191
|
@plugins ||= {}
|
194
192
|
@plugins[name] = mod
|
193
|
+
@subclasses.each{ |sub| sub.add_plugin(name, mod) } if @subclasses
|
195
194
|
end
|
196
195
|
|
197
196
|
def plugin(name)
|
@@ -199,12 +198,41 @@ module Spider
|
|
199
198
|
@plugins[name]
|
200
199
|
end
|
201
200
|
|
201
|
+
def default_asset(ass)
|
202
|
+
@default_assets ||= []
|
203
|
+
@default_assets << ass
|
204
|
+
end
|
205
|
+
|
206
|
+
def assets
|
207
|
+
r = []
|
208
|
+
if @default_assets
|
209
|
+
@default_assets.each do |ass|
|
210
|
+
if ass.is_a?(Hash)
|
211
|
+
ass[:app] ||= self.class.app
|
212
|
+
r << ass
|
213
|
+
else
|
214
|
+
r += Spider::Template.get_named_asset(ass)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
if @plugins
|
219
|
+
@plugins.each do |name, mod|
|
220
|
+
r += mod.get_assets
|
221
|
+
end
|
222
|
+
end
|
223
|
+
r
|
224
|
+
end
|
225
|
+
|
202
226
|
end
|
203
227
|
|
204
228
|
i_attribute :use_template
|
205
229
|
attribute :"sp:target-only"
|
206
230
|
attribute :class
|
207
231
|
|
232
|
+
default_asset 'jquery'
|
233
|
+
default_asset 'spider'
|
234
|
+
|
235
|
+
|
208
236
|
def initialize(request, response, scene=nil)
|
209
237
|
super
|
210
238
|
@is_target = false
|
@@ -213,27 +241,28 @@ module Spider
|
|
213
241
|
@id_path = []
|
214
242
|
@widget_attributes = {}
|
215
243
|
locale = @request.locale.language
|
216
|
-
include_js = [
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
]
|
221
|
-
# include_js << [
|
222
|
-
# '/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js',
|
223
|
-
# #'/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.min.js',
|
224
|
-
# "/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-#{locale}.js"
|
244
|
+
# include_js = [
|
245
|
+
# '/js/jquery/jquery-1.4.2.js', '/js/inheritance.js', '/js/spider.js', '/js/jquery/plugins/jquery.query-2.1.6.js',
|
246
|
+
# '/js/jquery/plugins/jquery.form.js',
|
247
|
+
# '/js/plugins/plugin.js'
|
248
|
+
# ]
|
249
|
+
# # include_js << [
|
250
|
+
# # '/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js',
|
251
|
+
# # #'/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.min.js',
|
252
|
+
# # "/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-#{locale}.js"
|
253
|
+
# # ]
|
254
|
+
# include_css = [
|
255
|
+
# '/css/spider.css', '/js/jquery/jquery-ui/css/smoothness/jquery-ui-1.7.2.custom.css',
|
225
256
|
# ]
|
226
|
-
include_css = [
|
227
|
-
'/css/spider.css', '/js/jquery/jquery-ui/css/smoothness/jquery-ui-1.7.2.custom.css',
|
228
|
-
]
|
229
257
|
@assets = []
|
230
|
-
include_js.each{ |js| @assets << {:type => :js, :src => Spider::Components.pub_url+js, :path => Spider::Components.pub_path+js}}
|
231
|
-
include_css.each{ |css| @assets << {:type => :css, :src => Spider::Components.pub_url+css, :path => Spider::Components.pub_path+css}}
|
232
|
-
|
258
|
+
# include_js.each{ |js| @assets << {:type => :js, :src => Spider::Components.pub_url+js, :path => Spider::Components.pub_path+js}}
|
259
|
+
# include_css.each{ |css| @assets << {:type => :css, :src => Spider::Components.pub_url+css, :path => Spider::Components.pub_path+css}}
|
260
|
+
#
|
233
261
|
@use_template ||= self.class.default_template
|
234
262
|
@css_classes = []
|
235
263
|
@widgets_runtime_content = {}
|
236
264
|
@widget_procs = {}
|
265
|
+
@runtime_overrides = []
|
237
266
|
end
|
238
267
|
|
239
268
|
def full_id
|
@@ -268,31 +297,41 @@ module Spider
|
|
268
297
|
end
|
269
298
|
|
270
299
|
def before(action='')
|
271
|
-
Spider.logger.debug("Widget #{self} before(#{action})")
|
300
|
+
#Spider.logger.debug("Widget #{self} before(#{action})")
|
272
301
|
widget_init(action)
|
273
|
-
|
302
|
+
@before_done = true
|
274
303
|
super
|
275
304
|
end
|
276
305
|
|
277
306
|
def widget_before(action='')
|
278
|
-
Spider.logger.debug("Widget #{self} widget_before(#{action})")
|
307
|
+
#Spider.logger.debug("Widget #{self} widget_before(#{action})")
|
279
308
|
widget_init(action)
|
309
|
+
return unless active?
|
310
|
+
#Spider.logger.debug("Preparing widget #{self}")
|
280
311
|
prepare
|
281
312
|
prepare_scene(@scene)
|
282
313
|
@before_done = true
|
283
314
|
end
|
284
315
|
|
285
316
|
|
317
|
+
# Active widgets get prepared. When calling a deep widget, the ancestors will be active.
|
286
318
|
def active?
|
287
|
-
|
288
|
-
return
|
289
|
-
return
|
290
|
-
return
|
291
|
-
|
319
|
+
return true if @active
|
320
|
+
return true unless target_mode? || attributes[:"sp:target-only"]
|
321
|
+
return true if @is_target || @is_target_ancestor
|
322
|
+
return true if @is_target_descendant && !attributes[:"sp:target-only"]
|
323
|
+
return false
|
324
|
+
end
|
325
|
+
|
326
|
+
# When in target mode, a widget will be run only if it is the target, or one of its subwidgets
|
327
|
+
def run?
|
328
|
+
return true unless target_mode? || attributes[:"sp:target-only"]
|
329
|
+
return true if @is_target # || @is_target_ancestor
|
330
|
+
return true if @is_target_descendant && !attributes[:"sp:target-only"]
|
331
|
+
return false
|
292
332
|
end
|
293
333
|
|
294
334
|
def active=(val)
|
295
|
-
|
296
335
|
@active = val
|
297
336
|
end
|
298
337
|
|
@@ -338,6 +377,7 @@ module Spider
|
|
338
377
|
@css_classes += @attributes[:class].split(/\s+/)
|
339
378
|
end
|
340
379
|
end
|
380
|
+
|
341
381
|
|
342
382
|
# Recursively instantiates the subwidgets.
|
343
383
|
def prepare(action='')
|
@@ -350,8 +390,27 @@ module Spider
|
|
350
390
|
end
|
351
391
|
end
|
352
392
|
|
353
|
-
# Instantiates this widget's own subwidgets.
|
354
393
|
def init_widgets(template=@template)
|
394
|
+
load_widgets(template)
|
395
|
+
@widgets.each do |id, w|
|
396
|
+
w.parent = self
|
397
|
+
w.is_target_descendant = true if @is_target || @is_target_descendant
|
398
|
+
w.active = true if run?
|
399
|
+
end
|
400
|
+
if !@is_target && @widget_target
|
401
|
+
first, rest = @widget_target.split('/', 2)
|
402
|
+
@_widget = find_widget(first)
|
403
|
+
@_widget.is_target_ancestor = true
|
404
|
+
@_widget.widget_target = rest
|
405
|
+
@_widget.is_target = true unless rest
|
406
|
+
@_widget_rest = rest || ''
|
407
|
+
end
|
408
|
+
@init_widgets_done = true
|
409
|
+
|
410
|
+
end
|
411
|
+
|
412
|
+
# Instantiates this widget's own subwidgets.
|
413
|
+
def load_widgets(template=@template)
|
355
414
|
if (self.class.scene_attributes)
|
356
415
|
self.class.scene_attributes.each do |name|
|
357
416
|
@scene[name] = instance_variable_get("@#{name}")
|
@@ -359,14 +418,11 @@ module Spider
|
|
359
418
|
end
|
360
419
|
template.request = @request
|
361
420
|
template.response = @response
|
421
|
+
template.runtime_overrides += @runtime_overrides
|
362
422
|
template.init(@scene)
|
363
423
|
template.widgets.each do |name, w|
|
364
424
|
add_widget(w)
|
365
425
|
end
|
366
|
-
@widgets.each do |id, w|
|
367
|
-
w.parent = self
|
368
|
-
end
|
369
|
-
@init_widgets_done = true
|
370
426
|
end
|
371
427
|
|
372
428
|
def set_widget_attributes
|
@@ -414,10 +470,6 @@ module Spider
|
|
414
470
|
@did_run
|
415
471
|
end
|
416
472
|
|
417
|
-
def run?
|
418
|
-
@is_target || (!@target_mode && !attributes[:"sp:target-only"])
|
419
|
-
end
|
420
|
-
|
421
473
|
def init_widget_done?
|
422
474
|
@init_widget_done
|
423
475
|
end
|
@@ -430,7 +482,7 @@ module Spider
|
|
430
482
|
def render
|
431
483
|
prepare_scene(@scene)
|
432
484
|
set_scene_vars(@scene)
|
433
|
-
@template.render(@scene) unless @
|
485
|
+
@template.render(@scene) unless @is_target_ancestor && !@is_target
|
434
486
|
end
|
435
487
|
|
436
488
|
def execute(action='', *params)
|
@@ -443,15 +495,10 @@ module Spider
|
|
443
495
|
run
|
444
496
|
render
|
445
497
|
end
|
446
|
-
elsif (@
|
447
|
-
first, rest = @widget_target.split('/', 2)
|
448
|
-
@_widget = find_widget(first)
|
449
|
-
@_widget.target_mode = true
|
450
|
-
@_widget.widget_target = rest
|
451
|
-
@_widget.is_target = true unless rest
|
498
|
+
elsif (@_widget)
|
452
499
|
@_widget.set_action(widget_execute)
|
453
|
-
@_widget.before(
|
454
|
-
@_widget.execute(
|
500
|
+
@_widget.before(@_widget_rest, *params)
|
501
|
+
@_widget.execute(@_widget_rest, *params)
|
455
502
|
else
|
456
503
|
super
|
457
504
|
end
|
@@ -496,6 +543,8 @@ module Spider
|
|
496
543
|
end
|
497
544
|
|
498
545
|
def create_widget(klass, id, *params)
|
546
|
+
params.unshift(@response)
|
547
|
+
params.unshift(@request)
|
499
548
|
obj = klass.new(*params)
|
500
549
|
obj.id = id
|
501
550
|
add_widget(obj)
|
@@ -543,7 +592,35 @@ module Spider
|
|
543
592
|
parse_runtime_content(doc, src_path) if doc.children && doc.root && doc.root.children
|
544
593
|
end
|
545
594
|
|
595
|
+
def replace_content_vars(str, scene=nil)
|
596
|
+
scene ||= @parent && @parent.scene ? @parent.scene : @scene
|
597
|
+
res = ""
|
598
|
+
Spider::Template.scan_text(str) do |type, val, full|
|
599
|
+
case type
|
600
|
+
when :plain, :escaped_expr
|
601
|
+
res << full
|
602
|
+
when :expr
|
603
|
+
Spider::Template.scan_scene_vars(val) do |vtype, vval|
|
604
|
+
case vtype
|
605
|
+
when :plain
|
606
|
+
res << vval
|
607
|
+
when :var
|
608
|
+
res << scene[vval.to_sym].to_s
|
609
|
+
end
|
610
|
+
end
|
611
|
+
end
|
612
|
+
end
|
613
|
+
end
|
614
|
+
|
546
615
|
def parse_runtime_content(doc, src_path=nil)
|
616
|
+
doc.search('sp:plugin').each do |plugin|
|
617
|
+
# we don't call add_plugin here because the overrides don't have to be added at runtime, since
|
618
|
+
# they have already been processed when compiling the instance
|
619
|
+
name = plugin['name'].to_sym
|
620
|
+
mod = self.class.plugin(name)
|
621
|
+
next unless mod
|
622
|
+
self.extend(mod)
|
623
|
+
end
|
547
624
|
# doc.search('sp:plugin').each do |plugin|
|
548
625
|
# name = plugin['name']
|
549
626
|
# mod = self.class.plugin(name)
|
@@ -636,7 +713,7 @@ module Spider
|
|
636
713
|
end
|
637
714
|
return w
|
638
715
|
end
|
639
|
-
|
716
|
+
|
640
717
|
def prepare_scene(scene)
|
641
718
|
scene = super
|
642
719
|
|
@@ -649,6 +726,11 @@ module Spider
|
|
649
726
|
if (@parent && @parent.respond_to?(:scene) && @parent.scene)
|
650
727
|
scene._parent = @parent.scene
|
651
728
|
end
|
729
|
+
par = @parent
|
730
|
+
while par && par.is_a?(Widget)
|
731
|
+
par = par.parent
|
732
|
+
end
|
733
|
+
scene.controller_scene = par.scene if par
|
652
734
|
scene.extend(WidgetScene)
|
653
735
|
return scene
|
654
736
|
end
|
@@ -689,12 +771,22 @@ module Spider
|
|
689
771
|
@widget_procs[first.to_sym] ||= []
|
690
772
|
@widget_procs[first.to_sym] << {:target => rest, :proc => proc }
|
691
773
|
end
|
692
|
-
|
774
|
+
|
775
|
+
def add_plugin(name)
|
776
|
+
mod = self.class.plugin(name)
|
777
|
+
return unless mod
|
778
|
+
self.extend(mod)
|
779
|
+
@runtime_overrides << [name, mod.get_overrides, mod.overrides_path]
|
780
|
+
end
|
693
781
|
|
694
782
|
end
|
695
783
|
|
696
784
|
module WidgetScene
|
697
785
|
|
786
|
+
def _wt
|
787
|
+
self[:widget][:id_path].join('/')
|
788
|
+
end
|
789
|
+
|
698
790
|
def widget_target
|
699
791
|
"#{self[:request][:path]}?_wt=#{self[:widget][:id_path].join('/')}"
|
700
792
|
end
|
@@ -9,7 +9,7 @@ module Spider
|
|
9
9
|
|
10
10
|
module ModuleMethods
|
11
11
|
|
12
|
-
def
|
12
|
+
def plugin_name
|
13
13
|
@plugin_name
|
14
14
|
end
|
15
15
|
|
@@ -19,9 +19,13 @@ module Spider
|
|
19
19
|
@path = File.dirname(File.expand_path(caller[0].split(':')[0]))
|
20
20
|
end
|
21
21
|
|
22
|
+
def overrides_path
|
23
|
+
@path+'/'+Inflector.underscore(self.to_s.split('::')[-1])+'.shtml'
|
24
|
+
end
|
25
|
+
|
22
26
|
def get_overrides
|
23
27
|
overrides = []
|
24
|
-
path =
|
28
|
+
path = overrides_path
|
25
29
|
doc = open(path){ |f| Hpricot.XML(f) }
|
26
30
|
doc.root.each_child do |child|
|
27
31
|
next unless child.is_a?(Hpricot::Elem)
|
@@ -30,6 +34,13 @@ module Spider
|
|
30
34
|
return overrides
|
31
35
|
end
|
32
36
|
|
37
|
+
def get_assets
|
38
|
+
path = overrides_path
|
39
|
+
return open(path){ |f| Hpricot.XML(f) }.root.children_of_type('tpl:asset').map{ |el|
|
40
|
+
Spider::Template.parse_asset_element(el)
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
33
44
|
end
|
34
45
|
|
35
46
|
end
|