spiderfw 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +4 -0
- data/Rakefile +74 -0
- data/apps/cas_server/_init.rb +23 -0
- data/apps/cas_server/config/options.rb +9 -0
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +353 -0
- data/apps/cas_server/lib/cas.rb +329 -0
- data/apps/cas_server/lib/utils.rb +30 -0
- data/apps/cas_server/models/login_ticket.rb +11 -0
- data/apps/cas_server/models/mixins/consumable.rb +10 -0
- data/apps/cas_server/models/proxy_granting_ticket.rb +12 -0
- data/apps/cas_server/models/proxy_ticket.rb +12 -0
- data/apps/cas_server/models/service_ticket.rb +22 -0
- data/apps/cas_server/models/ticket.rb +20 -0
- data/apps/cas_server/models/ticket_granting_ticket.rb +15 -0
- data/apps/cas_server/views/logout.shtml +3 -0
- data/apps/core/admin/_init.rb +23 -0
- data/apps/core/admin/admin.rb +17 -0
- data/apps/core/admin/controllers/admin_controller.rb +15 -0
- data/apps/core/admin/views/index.shtml +1 -0
- data/apps/core/admin/views/spider_admin.layout.shtml +23 -0
- data/apps/core/admin/widgets/admin_menu/admin_menu.rb +17 -0
- data/apps/core/auth/_init.rb +42 -0
- data/apps/core/auth/controllers/login_controller.rb +94 -0
- data/apps/core/auth/controllers/mixins/auth_helper.rb +114 -0
- data/apps/core/auth/controllers/mixins/http_basic_auth.rb +24 -0
- data/apps/core/auth/controllers/mixins/http_digest_auth.rb +26 -0
- data/apps/core/auth/lib/authenticable.rb +86 -0
- data/apps/core/auth/lib/authenticator.rb +11 -0
- data/apps/core/auth/lib/digest_authenticator.rb +44 -0
- data/apps/core/auth/lib/login_authenticator.rb +27 -0
- data/apps/core/auth/models/digest_user.rb +34 -0
- data/apps/core/auth/models/group.rb +22 -0
- data/apps/core/auth/models/login_user.rb +15 -0
- data/apps/core/auth/models/mixins/access_control.rb +71 -0
- data/apps/core/auth/models/mixins/authentication_tracking.rb +19 -0
- data/apps/core/auth/models/super_user.rb +8 -0
- data/apps/core/auth/models/user.rb +15 -0
- data/apps/core/auth/po/it/spider_auth.po +33 -0
- data/apps/core/auth/po/spider_auth.pot +31 -0
- data/apps/core/auth/views/login.shtml +25 -0
- data/apps/core/components/_init.rb +21 -0
- data/apps/core/components/po/it/spider_components.po +52 -0
- data/apps/core/components/po/spider_components.pot +53 -0
- data/apps/core/components/public/css/admin.css +73 -0
- data/apps/core/components/public/css/crud.css +58 -0
- data/apps/core/components/public/css/img/add.gif +0 -0
- data/apps/core/components/public/css/img/ajax-loader.gif +0 -0
- data/apps/core/components/public/css/img/back.gif +0 -0
- data/apps/core/components/public/css/img/bg_header.png +0 -0
- data/apps/core/components/public/css/img/body_bg.jpg +0 -0
- data/apps/core/components/public/css/img/gray_gradient.gif +0 -0
- data/apps/core/components/public/css/img/li_bg.png +0 -0
- data/apps/core/components/public/css/img/li_bg_active.png +0 -0
- data/apps/core/components/public/css/img/li_bg_hover.png +0 -0
- data/apps/core/components/public/css/img/logo.png +0 -0
- data/apps/core/components/public/css/img/menu_bg.png +0 -0
- data/apps/core/components/public/css/img/menu_bottom.png +0 -0
- data/apps/core/components/public/css/img/menu_top.png +0 -0
- data/apps/core/components/public/css/img/section-bottom.jpg +0 -0
- data/apps/core/components/public/css/list.css +7 -0
- data/apps/core/components/public/css/menu.css +47 -0
- data/apps/core/components/public/css/spider.css +9 -0
- data/apps/core/components/public/css/switcher.css +13 -0
- data/apps/core/components/public/css/table.css +99 -0
- data/apps/core/components/public/js/inheritance.js +71 -0
- data/apps/core/components/public/js/jquery/jquery-1.3.2.js +4376 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/AUTHORS.txt +30 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/GPL-LICENSE.txt +278 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/MIT-LICENSE.txt +25 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/ChangeLog.txt +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/META.json +32 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.js +100 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.min.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.pack.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/test/index.html +197 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.js +97 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.min.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.pack.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.zip +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/jsdiff/jsdiff.js +159 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testrunner.js +780 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testsuite.css +120 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/simulate/jquery.simulate.js +152 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/jquery-1.3.2.js +4376 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.all.css +2 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.base.css +8 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.datepicker.css +62 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.slider.css +17 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.tabs.css +11 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.theme.css +245 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.all.css +2 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.base.css +8 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.datepicker.css +62 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.slider.css +17 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.tabs.css +11 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.theme.css +247 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.blind.js +49 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.bounce.js +78 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.clip.js +54 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.core.js +545 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.drop.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.explode.js +79 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.fold.js +56 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.highlight.js +48 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.pulsate.js +56 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.scale.js +180 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.shake.js +57 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.slide.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.transfer.js +45 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/jquery-ui-i18n.js +771 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ar.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-bg.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ca.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-cs.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-da.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-de.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-el.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-eo.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-es.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fa.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fi.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-he.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hu.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hy.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-id.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-is.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-it.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ja.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ko.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-lt.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-lv.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ms.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-nl.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-no.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-pl.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-pt-BR.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ro.js +22 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ru.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sk.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sl.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sq.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr-SR.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sv.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-th.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-tr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-uk.js +25 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-CN.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-TW.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js +9133 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.accordion.js +477 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.core.js +519 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.datepicker.js +1636 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.dialog.js +671 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.draggable.js +766 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.droppable.js +282 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.progressbar.js +116 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.resizable.js +800 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.selectable.js +257 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.slider.js +558 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.sortable.js +1019 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.tabs.js +685 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/version.txt +1 -0
- data/apps/core/components/public/js/jquery/jquery-ui/index.html +367 -0
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-1.3.2.min.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-ui-1.7.2.custom.min.js +298 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/changelog.txt +27 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.css +48 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.js +808 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.min.js +13 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.pack.js +12 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.ajaxQueue.js +116 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.bgiframe.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.js +3558 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox-compressed.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox.css +163 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/todo +166 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.form.js +653 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.query-2.1.6.js +224 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.url.js +214 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +187 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +1 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +193 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/changelog.txt +35 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/ajax-loader.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/file.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/folder-closed.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/folder.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/minus.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/plus.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-black-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-black.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-default-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-default.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-famfamfam-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-famfamfam.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-gray-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-gray.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-red-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-red.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.async.js +110 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.css +74 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.edit.js +37 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.js +256 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.min.js +15 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.pack.js +16 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.sortable.js +386 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/lib/jquery.cookie.js +92 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/lib/jquery.js +3534 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/todo +8 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/LICENSE +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/README +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.css +34 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.js +1413 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/222222_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/2e83ff_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/454545_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/888888_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/aaaaaa_40x100_textures_01_flat_0.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/cccccc_40x100_textures_03_highlight_soft_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/cd0a0a_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/dadada_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/e6e6e6_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/fbf9ee_40x100_textures_02_glass_55.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/fef1ec_40x100_textures_05_inset_soft_95.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/ffffff_40x100_textures_02_glass_65.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/ffffff_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.all.css +4 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.allplugins.css +7 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.datepicker.css +60 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.slider.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.tabs.css +9 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.theme.css +238 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.timepickr.css +44 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/ui.timepickr.js +2307 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/ui.timepickr.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/body-bg.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/btn-hover.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/btn.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/buttons.psd +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/index.html +326 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.anchorHandler.js +44 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.strings.js +290 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.ui.all.js +518 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.utils.js +255 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.utils.ui.min.js +26 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo-ff.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo-ie.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo.psd +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/package.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/reset.css +48 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/script_code.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/styles.css +308 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/themeroller_ready_black_200px.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/weather_sun.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/css/ui.dropslide.css +26 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/css/ui.timepickr.css +18 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/ui.dropslide.js +132 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/ui.timepickr.js +217 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/data/testrunner.js +1 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/index.html +34 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/otherlibs/jquery/1.2.1/jquery.js +11 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/otherlibs/jquery/1.2.3/jquery.js +11 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/qunit/testrunner.js +780 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/qunit/testsuite.css +120 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/styles.css +201 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/test.js +41 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/unit/ui.timepickr.js +154 -0
- data/apps/core/components/public/js/list.js +234 -0
- data/apps/core/components/public/js/spider.js +484 -0
- data/apps/core/components/public/widgets/search_table.js +10 -0
- data/apps/core/components/public/widgets/table.js +9 -0
- data/apps/core/components/widgets/admin/admin.rb +75 -0
- data/apps/core/components/widgets/admin/admin.shtml +16 -0
- data/apps/core/components/widgets/confirm/confirm.rb +37 -0
- data/apps/core/components/widgets/confirm/confirm.shtml +9 -0
- data/apps/core/components/widgets/crud/crud.rb +119 -0
- data/apps/core/components/widgets/crud/crud.shtml +59 -0
- data/apps/core/components/widgets/crud/form_table/form_table.rb +13 -0
- data/apps/core/components/widgets/crud/form_table/form_table.shtml +3 -0
- data/apps/core/components/widgets/list/list.rb +294 -0
- data/apps/core/components/widgets/list/list.shtml +38 -0
- data/apps/core/components/widgets/list/plugins/exportable/exportable_list.rb +19 -0
- data/apps/core/components/widgets/list/plugins/exportable/exportable_list.shtml +5 -0
- data/apps/core/components/widgets/menu/menu.rb +20 -0
- data/apps/core/components/widgets/menu/menu.shtml +13 -0
- data/apps/core/components/widgets/search_table/search_table.rb +22 -0
- data/apps/core/components/widgets/search_table/search_table.shtml +11 -0
- data/apps/core/components/widgets/switcher/switcher.rb +68 -0
- data/apps/core/components/widgets/switcher/switcher.shtml +17 -0
- data/apps/core/components/widgets/table/table.rb +153 -0
- data/apps/core/components/widgets/table/table.shtml +41 -0
- data/apps/core/components/widgets/tabs/tabs.rb +38 -0
- data/apps/core/components/widgets/tabs/tabs.shtml +2 -0
- data/apps/core/forms/_init.rb +22 -0
- data/apps/core/forms/po/it/spider_forms.po +36 -0
- data/apps/core/forms/po/spider_forms.pot +37 -0
- data/apps/core/forms/public/date_time.js +23 -0
- data/apps/core/forms/public/form.css +81 -0
- data/apps/core/forms/public/form.js +19 -0
- data/apps/core/forms/public/input.js +30 -0
- data/apps/core/forms/public/search_select.js +123 -0
- data/apps/core/forms/public/select.js +11 -0
- data/apps/core/forms/tags/element_label.erb +1 -0
- data/apps/core/forms/tags/element_row.erb +4 -0
- data/apps/core/forms/tags/row.erb +4 -0
- data/apps/core/forms/widgets/form/form.rb +430 -0
- data/apps/core/forms/widgets/form/form.shtml +47 -0
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.rb +13 -0
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +3 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.rb +48 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +4 -0
- data/apps/core/forms/widgets/inputs/hidden/hidden.rb +8 -0
- data/apps/core/forms/widgets/inputs/hidden/hidden.shtml +3 -0
- data/apps/core/forms/widgets/inputs/input/input.rb +105 -0
- data/apps/core/forms/widgets/inputs/input/input.shtml +3 -0
- data/apps/core/forms/widgets/inputs/input/readonly.shtml +6 -0
- data/apps/core/forms/widgets/inputs/password/password.rb +24 -0
- data/apps/core/forms/widgets/inputs/password/password.shtml +5 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.rb +168 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +42 -0
- data/apps/core/forms/widgets/inputs/select/select.rb +126 -0
- data/apps/core/forms/widgets/inputs/select/select.shtml +8 -0
- data/apps/core/forms/widgets/inputs/subform/subform.rb +10 -0
- data/apps/core/forms/widgets/inputs/subform/subform.shtml +5 -0
- data/apps/core/forms/widgets/inputs/text/text.rb +9 -0
- data/apps/core/forms/widgets/inputs/text/text.shtml +3 -0
- data/apps/core/forms/widgets/inputs/text_area/text_area.rb +10 -0
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +1 -0
- data/apps/drb_server/_init.rb +8 -0
- data/apps/drb_server/lib/model_server.rb +41 -0
- data/apps/drb_server/script/start_server.rb +19 -0
- data/apps/hippo/_init.rb +10 -0
- data/apps/hippo/models/mixins/hippo_struct.rb +210 -0
- data/apps/hippo/models/security_group.rb +21 -0
- data/apps/hippo/models/security_user.rb +29 -0
- data/apps/messenger/_init.rb +24 -0
- data/apps/messenger/config/options.rb +15 -0
- data/apps/messenger/config/worker.rb +3 -0
- data/apps/messenger/controllers/messenger_controller.rb +80 -0
- data/apps/messenger/controllers/mixins/messenger_controller_mixin.rb +54 -0
- data/apps/messenger/lib/backends/email/smtp.rb +0 -0
- data/apps/messenger/messenger.rb +94 -0
- data/apps/messenger/models/email.rb +22 -0
- data/apps/messenger/models/message.rb +44 -0
- data/apps/messenger/po/it/spider_messenger.po +77 -0
- data/apps/messenger/po/spider_messenger.pot +77 -0
- data/apps/messenger/views/index.shtml +13 -0
- data/apps/messenger/views/list.shtml +5 -0
- data/apps/messenger/views/messenger.layout.shtml +4 -0
- data/apps/messenger/views/queue.shtml +8 -0
- data/apps/messenger/views/tags/sent_messages.shtml +1 -0
- data/apps/soap/_init.rb +16 -0
- data/apps/soap/controllers/soap_controller.rb +334 -0
- data/apps/soap/doc/examples/example.rb +28 -0
- data/apps/soap/lib/soap.rb +217 -0
- data/apps/sso/_init.rb +16 -0
- data/apps/sso/config/options.rb +13 -0
- data/apps/sso/controllers/mixins/saml2_mixin.rb +149 -0
- data/apps/sso/lib/saml2/backend.rb +16 -0
- data/apps/sso/lib/saml2/lasso_backend.rb +88 -0
- data/apps/sso/lib/saml2.rb +112 -0
- data/apps/sso/views/saml2_post.shtml +19 -0
- data/apps/webdav/_init.rb +15 -0
- data/apps/webdav/controllers/webdav_controller.rb +862 -0
- data/apps/webdav/lib/locking.rb +193 -0
- data/apps/webdav/lib/vfs/abstract.rb +78 -0
- data/apps/webdav/lib/vfs/local.rb +126 -0
- data/apps/webdav/lib/vfs/mapped.rb +235 -0
- data/apps/webdav/lib/vfs/properties.rb +41 -0
- data/apps/worker/_init.rb +13 -0
- data/apps/worker/cmd.rb +65 -0
- data/apps/worker/config/options.rb +9 -0
- data/apps/worker/lib/runner.rb +43 -0
- data/apps/worker/lib/task.rb +9 -0
- data/apps/worker/models/job.rb +20 -0
- data/apps/worker/worker.rb +168 -0
- data/bin/spider +9 -0
- data/blueprints/app/_init.rb +10 -0
- data/blueprints/app/controllers/__APP___controller.rb +14 -0
- data/blueprints/app/views/__APP__.layout.shtml +8 -0
- data/blueprints/app/views/index.shtml +3 -0
- data/blueprints/install/config/config.yml +14 -0
- data/blueprints/install/init.rb +3 -0
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_messenger.mo +0 -0
- data/lib/spiderfw/app.rb +186 -0
- data/lib/spiderfw/autoload.rb +12 -0
- data/lib/spiderfw/cache/template_cache.rb +136 -0
- data/lib/spiderfw/cmd/cmd.rb +72 -0
- data/lib/spiderfw/cmd/commands/cert.rb +427 -0
- data/lib/spiderfw/cmd/commands/console.rb +27 -0
- data/lib/spiderfw/cmd/commands/init.rb +52 -0
- data/lib/spiderfw/cmd/commands/model.rb +131 -0
- data/lib/spiderfw/cmd/commands/setup.rb +54 -0
- data/lib/spiderfw/cmd/commands/test.rb +61 -0
- data/lib/spiderfw/cmd/commands/webserver.rb +93 -0
- data/lib/spiderfw/config/configurable.rb +38 -0
- data/lib/spiderfw/config/configuration.rb +281 -0
- data/lib/spiderfw/config/options/spider.rb +122 -0
- data/lib/spiderfw/controller/app_controller.rb +14 -0
- data/lib/spiderfw/controller/controller.rb +321 -0
- data/lib/spiderfw/controller/controller_exceptions.rb +27 -0
- data/lib/spiderfw/controller/controller_io.rb +26 -0
- data/lib/spiderfw/controller/controller_mixin.rb +12 -0
- data/lib/spiderfw/controller/cookie.rb +20 -0
- data/lib/spiderfw/controller/cookies.rb +17 -0
- data/lib/spiderfw/controller/dispatcher.rb +269 -0
- data/lib/spiderfw/controller/first_responder.rb +59 -0
- data/lib/spiderfw/controller/formats/html.rb +90 -0
- data/lib/spiderfw/controller/helpers/widget_helper.rb +73 -0
- data/lib/spiderfw/controller/home_controller.rb +26 -0
- data/lib/spiderfw/controller/http_controller.rb +112 -0
- data/lib/spiderfw/controller/mixins/http_mixin.rb +228 -0
- data/lib/spiderfw/controller/mixins/static_content.rb +90 -0
- data/lib/spiderfw/controller/mixins/visual.rb +489 -0
- data/lib/spiderfw/controller/page_controller.rb +39 -0
- data/lib/spiderfw/controller/request.rb +48 -0
- data/lib/spiderfw/controller/response.rb +50 -0
- data/lib/spiderfw/controller/router.rb +9 -0
- data/lib/spiderfw/controller/scene.rb +27 -0
- data/lib/spiderfw/controller/session/file_session.rb +83 -0
- data/lib/spiderfw/controller/session/flash_hash.rb +56 -0
- data/lib/spiderfw/controller/session/memory_session.rb +62 -0
- data/lib/spiderfw/controller/session/transient_hash.rb +18 -0
- data/lib/spiderfw/controller/session.rb +106 -0
- data/lib/spiderfw/controller/spider_controller.rb +20 -0
- data/lib/spiderfw/create.rb +64 -0
- data/lib/spiderfw/env.rb +17 -0
- data/lib/spiderfw/exceptions.rb +2 -0
- data/lib/spiderfw/home.rb +26 -0
- data/lib/spiderfw/http/adapters/cgi.rb +62 -0
- data/lib/spiderfw/http/adapters/cgi_io.rb +27 -0
- data/lib/spiderfw/http/adapters/fcgi.rb +62 -0
- data/lib/spiderfw/http/adapters/mongrel.rb +207 -0
- data/lib/spiderfw/http/adapters/rack.rb +152 -0
- data/lib/spiderfw/http/adapters/thin.rb +38 -0
- data/lib/spiderfw/http/adapters/webrick.rb +176 -0
- data/lib/spiderfw/http/http.rb +297 -0
- data/lib/spiderfw/http/server.rb +40 -0
- data/lib/spiderfw/i18n/cldr.rb +114 -0
- data/lib/spiderfw/i18n/gettext.rb +8 -0
- data/lib/spiderfw/i18n/i18n.rb +120 -0
- data/lib/spiderfw/i18n/provider.rb +12 -0
- data/lib/spiderfw/i18n/rails.rb +89 -0
- data/lib/spiderfw/i18n/shtml_parser.rb +41 -0
- data/lib/spiderfw/model/active_record.rb +335 -0
- data/lib/spiderfw/model/base_model.rb +2068 -0
- data/lib/spiderfw/model/condition.rb +416 -0
- data/lib/spiderfw/model/data_type.rb +75 -0
- data/lib/spiderfw/model/datatypes/binary.rb +10 -0
- data/lib/spiderfw/model/datatypes/bool.rb +10 -0
- data/lib/spiderfw/model/datatypes/decimal.rb +22 -0
- data/lib/spiderfw/model/datatypes/email.rb +13 -0
- data/lib/spiderfw/model/datatypes/password.rb +63 -0
- data/lib/spiderfw/model/datatypes/serialized_object.rb +32 -0
- data/lib/spiderfw/model/datatypes/text.rb +10 -0
- data/lib/spiderfw/model/datatypes/uuid.rb +29 -0
- data/lib/spiderfw/model/datatypes.rb +19 -0
- data/lib/spiderfw/model/element.rb +250 -0
- data/lib/spiderfw/model/extended_models/managed.rb +43 -0
- data/lib/spiderfw/model/identity_mapper.rb +89 -0
- data/lib/spiderfw/model/inline_model.rb +37 -0
- data/lib/spiderfw/model/mappers/db_mapper.rb +1126 -0
- data/lib/spiderfw/model/mappers/hash_mapper.rb +114 -0
- data/lib/spiderfw/model/mappers/mapper.rb +926 -0
- data/lib/spiderfw/model/mappers/mappers.rb +7 -0
- data/lib/spiderfw/model/mappers/proxy_mapper.rb +25 -0
- data/lib/spiderfw/model/mappers/vfs/flat_file.rb +31 -0
- data/lib/spiderfw/model/mixins/converted.rb +110 -0
- data/lib/spiderfw/model/mixins/list.rb +135 -0
- data/lib/spiderfw/model/mixins/mixins.rb +7 -0
- data/lib/spiderfw/model/mixins/state_machine.rb +81 -0
- data/lib/spiderfw/model/mixins/synchronized.rb +88 -0
- data/lib/spiderfw/model/mixins/tree.rb +296 -0
- data/lib/spiderfw/model/mixins/versioned.rb +147 -0
- data/lib/spiderfw/model/model.rb +226 -0
- data/lib/spiderfw/model/model_hash.rb +50 -0
- data/lib/spiderfw/model/proxy_model.rb +37 -0
- data/lib/spiderfw/model/query.rb +147 -0
- data/lib/spiderfw/model/query_funcs.rb +99 -0
- data/lib/spiderfw/model/query_set.rb +700 -0
- data/lib/spiderfw/model/request.rb +80 -0
- data/lib/spiderfw/model/storage/base_storage.rb +110 -0
- data/lib/spiderfw/model/storage/db/adapters/mssql.rb +129 -0
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +436 -0
- data/lib/spiderfw/model/storage/db/adapters/oci8.rb +533 -0
- data/lib/spiderfw/model/storage/db/adapters/sqlite.rb +163 -0
- data/lib/spiderfw/model/storage/db/connectors/odbc.rb +213 -0
- data/lib/spiderfw/model/storage/db/db.rb +13 -0
- data/lib/spiderfw/model/storage/db/db_connection_pool.rb +126 -0
- data/lib/spiderfw/model/storage/db/db_connector.rb +9 -0
- data/lib/spiderfw/model/storage/db/db_schema.rb +233 -0
- data/lib/spiderfw/model/storage/db/db_storage.rb +872 -0
- data/lib/spiderfw/model/storage/db/dialects/no_total_rows.rb +18 -0
- data/lib/spiderfw/model/storage/db/reflector.rb +36 -0
- data/lib/spiderfw/model/storage/null_storage.rb +18 -0
- data/lib/spiderfw/model/storage/schema.rb +19 -0
- data/lib/spiderfw/model/storage.rb +72 -0
- data/lib/spiderfw/model/sync.rb +94 -0
- data/lib/spiderfw/model/type.rb +13 -0
- data/lib/spiderfw/model/unit_of_work.rb +75 -0
- data/lib/spiderfw/requires.rb +21 -0
- data/lib/spiderfw/resource.rb +18 -0
- data/lib/spiderfw/setup/setup_task.rb +44 -0
- data/lib/spiderfw/tag/tag.rb +28 -0
- data/lib/spiderfw/templates/blocks/attr_if.rb +32 -0
- data/lib/spiderfw/templates/blocks/comment.rb +38 -0
- data/lib/spiderfw/templates/blocks/debugger.rb +16 -0
- data/lib/spiderfw/templates/blocks/each.rb +51 -0
- data/lib/spiderfw/templates/blocks/html.rb +70 -0
- data/lib/spiderfw/templates/blocks/if.rb +35 -0
- data/lib/spiderfw/templates/blocks/pass.rb +16 -0
- data/lib/spiderfw/templates/blocks/render.rb +23 -0
- data/lib/spiderfw/templates/blocks/run.rb +30 -0
- data/lib/spiderfw/templates/blocks/tag.rb +21 -0
- data/lib/spiderfw/templates/blocks/tag_if.rb +29 -0
- data/lib/spiderfw/templates/blocks/text.rb +43 -0
- data/lib/spiderfw/templates/blocks/widget.rb +58 -0
- data/lib/spiderfw/templates/blocks/yield.rb +18 -0
- data/lib/spiderfw/templates/layout.rb +44 -0
- data/lib/spiderfw/templates/resources/less.rb +14 -0
- data/lib/spiderfw/templates/template.rb +625 -0
- data/lib/spiderfw/templates/template_blocks.rb +185 -0
- data/lib/spiderfw/utils/annotations.rb +201 -0
- data/lib/spiderfw/utils/fork.rb +75 -0
- data/lib/spiderfw/utils/hash_comparison.rb +8 -0
- data/lib/spiderfw/utils/inflector.rb +42 -0
- data/lib/spiderfw/utils/logger.rb +92 -0
- data/lib/spiderfw/utils/monkey/class.rb +59 -0
- data/lib/spiderfw/utils/monkey/date_time.rb +34 -0
- data/lib/spiderfw/utils/monkey/debugger.rb +25 -0
- data/lib/spiderfw/utils/monkey/exception.rb +23 -0
- data/lib/spiderfw/utils/monkey/kernel.rb +12 -0
- data/lib/spiderfw/utils/monkey/module.rb +12 -0
- data/lib/spiderfw/utils/monkey/symbol.rb +7 -0
- data/lib/spiderfw/utils/monkey/time.rb +17 -0
- data/lib/spiderfw/utils/multi_level_hash.rb +33 -0
- data/lib/spiderfw/utils/periodic_runner.rb +50 -0
- data/lib/spiderfw/utils/rails.rb +78 -0
- data/lib/spiderfw/utils/rails_app.rb +53 -0
- data/lib/spiderfw/utils/sanitizer.rb +178 -0
- data/lib/spiderfw/utils/setup_task.rb +35 -0
- data/lib/spiderfw/utils/shared_store/file_shared_store.rb +73 -0
- data/lib/spiderfw/utils/shared_store/memory_shared_store.rb +46 -0
- data/lib/spiderfw/utils/shared_store.rb +47 -0
- data/lib/spiderfw/utils/test_case.rb +24 -0
- data/lib/spiderfw/utils/thread_out.rb +24 -0
- data/lib/spiderfw/version.rb +3 -0
- data/lib/spiderfw/widget/rest_model.rb +20 -0
- data/lib/spiderfw/widget/widget.rb +671 -0
- data/lib/spiderfw/widget/widget_attributes.rb +54 -0
- data/lib/spiderfw/widget/widget_plugin.rb +37 -0
- data/lib/spiderfw.rb +509 -0
- data/spider.gemspec +43 -0
- data/views/errors/404.shtml +6 -0
- data/views/errors/error.layout.shtml +70 -0
- data/views/errors/error_generic.shtml +6 -0
- metadata +800 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
require 'fileutils'
|
|
2
|
+
require 'sync'
|
|
3
|
+
|
|
4
|
+
module Spider
|
|
5
|
+
|
|
6
|
+
class TemplateCache
|
|
7
|
+
include Logger
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def initialize(root_path)
|
|
11
|
+
FileUtils.mkpath(root_path)
|
|
12
|
+
@path = root_path
|
|
13
|
+
@invalid = {}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def fetch(path, &block)
|
|
17
|
+
return refresh(path, &block) unless fresh?(path)
|
|
18
|
+
return load_cache(path)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def get_location(path, &block)
|
|
22
|
+
refresh(path, &block) if (block && !fresh?(path))
|
|
23
|
+
return @path+'/'+path
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def fresh?(path)
|
|
27
|
+
if Spider.config.get('template.cache.disable')
|
|
28
|
+
debug("Cache disabled, recreating #{path}")
|
|
29
|
+
return false
|
|
30
|
+
end
|
|
31
|
+
full_path = get_location(path)
|
|
32
|
+
exists = File.exist?(full_path)
|
|
33
|
+
if (Spider.config.get('template.cache.no_check') && exists)
|
|
34
|
+
return true
|
|
35
|
+
end
|
|
36
|
+
return false if @invalid[path]
|
|
37
|
+
global_reload_file = "#{Spider.paths[:tmp]}/templates_reload.txt"
|
|
38
|
+
check_file = "#{full_path}/check"
|
|
39
|
+
return false unless File.exist?(check_file)
|
|
40
|
+
if (File.exist?("#{Spider.paths[:tmp]}/templates_reload.txt"))
|
|
41
|
+
return false if (File.mtime(global_reload_file) > File.mtime(check))
|
|
42
|
+
end
|
|
43
|
+
return true unless Spider.conf.get('template.cache.check_files')
|
|
44
|
+
lock_file = File.new(full_path)
|
|
45
|
+
lock_file.flock(File::LOCK_SH)
|
|
46
|
+
File.new(full_path).flock(File::LOCK_SH)
|
|
47
|
+
# TODO: maybe insert here an (optional) tamper check
|
|
48
|
+
# that looks if the cache mtime is later then the saved time
|
|
49
|
+
Marshal.load(IO.read(check_file)).each do |check, time|
|
|
50
|
+
debug("Template file #{check} changed, refreshing cache")
|
|
51
|
+
return false if File.mtime(check) > time
|
|
52
|
+
end
|
|
53
|
+
lock_file.flock(File::LOCK_UN)
|
|
54
|
+
return true
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def invalidate(path)
|
|
58
|
+
@invalid[path] = true
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def refresh(path, &block)
|
|
62
|
+
debug("Refreshing cache for #{path}")
|
|
63
|
+
res = block.call()
|
|
64
|
+
write_cache(path, res)
|
|
65
|
+
return res
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def get_compiled_template(path)
|
|
69
|
+
compiled = Spider::CompiledTemplate.new
|
|
70
|
+
compiled.cache_path = path
|
|
71
|
+
init_code = IO.read(path+'/init.rb')
|
|
72
|
+
run_code = IO.read(path+'/run.rb')
|
|
73
|
+
block = Spider::TemplateBlocks::CompiledBlock.new(init_code, run_code)
|
|
74
|
+
compiled.block = block
|
|
75
|
+
Dir.new(path).each do |entry|
|
|
76
|
+
next if entry[0].chr == '.'
|
|
77
|
+
sub_path = "#{path}/#{entry}"
|
|
78
|
+
next if entry == '__info'
|
|
79
|
+
next unless File.directory?(sub_path)
|
|
80
|
+
compiled.subtemplates[entry] = get_compiled_template(sub_path)
|
|
81
|
+
end
|
|
82
|
+
return compiled
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def load_cache(template_path)
|
|
86
|
+
debug("Using cached #{template_path}")
|
|
87
|
+
full_path = get_location(template_path)
|
|
88
|
+
lock_file = File.new(full_path)
|
|
89
|
+
lock_file.flock(File::LOCK_SH)
|
|
90
|
+
compiled = get_compiled_template(full_path)
|
|
91
|
+
lock_file.flock(File::LOCK_UN)
|
|
92
|
+
return compiled
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def write_compiled_template(compiled, path)
|
|
96
|
+
compiled.cache_path = path
|
|
97
|
+
File.open(path+'/init.rb', 'w') do |file|
|
|
98
|
+
file.puts(compiled.block.init_code)
|
|
99
|
+
end
|
|
100
|
+
File.open(path+'/run.rb', 'w') do |file|
|
|
101
|
+
file.puts(compiled.block.run_code)
|
|
102
|
+
end
|
|
103
|
+
compiled.subtemplates.each do |id, sub|
|
|
104
|
+
sub_path = "#{path}/#{id}"
|
|
105
|
+
FileUtils.mkpath(sub_path)
|
|
106
|
+
write_compiled_template(sub, sub_path)
|
|
107
|
+
end
|
|
108
|
+
compiled.devel_info.each do |name, val|
|
|
109
|
+
FileUtils.mkpath("#{path}/__info")
|
|
110
|
+
sub_path = "#{path}/__info/#{name}"
|
|
111
|
+
File.open(sub_path, 'w') do |f|
|
|
112
|
+
f.puts(val)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def write_cache(template_path, compiled_template)
|
|
118
|
+
full_path = get_location(template_path)
|
|
119
|
+
FileUtils.mkpath(full_path)
|
|
120
|
+
lock_file = File.new(full_path+'/lock', 'w')
|
|
121
|
+
lock_file.flock(File::LOCK_EX)
|
|
122
|
+
write_compiled_template(compiled_template, full_path)
|
|
123
|
+
modified = compiled_template.collect_mtimes
|
|
124
|
+
File.open(full_path+'/check', 'w') do |file|
|
|
125
|
+
file.puts(Marshal.dump(modified))
|
|
126
|
+
end
|
|
127
|
+
lock_file.flock(File::LOCK_UN)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'spiderfw/i18n/gettext'
|
|
3
|
+
require 'cmdparse'
|
|
4
|
+
require 'spiderfw/cmd/commands/webserver'
|
|
5
|
+
require 'spiderfw/cmd/commands/init'
|
|
6
|
+
require 'spiderfw/cmd/commands/console'
|
|
7
|
+
require 'spiderfw/cmd/commands/test'
|
|
8
|
+
require 'spiderfw/cmd/commands/setup'
|
|
9
|
+
require 'spiderfw/cmd/commands/model'
|
|
10
|
+
|
|
11
|
+
module Spider; module CommandLine
|
|
12
|
+
|
|
13
|
+
class Cmd
|
|
14
|
+
|
|
15
|
+
def initialize
|
|
16
|
+
@cmd = CmdParse::CommandParser.new( true, true )
|
|
17
|
+
@cmd.program_name = "spider"
|
|
18
|
+
@cmd.options = CmdParse::OptionParserWrapper.new do |opt|
|
|
19
|
+
opt.separator _("Global options:")
|
|
20
|
+
opt.on("--verbose", _("Be verbose when outputting info"), "-v" ) {|t| $verbose = true }
|
|
21
|
+
opt.on("--chdir", _("Cd to a directory before running"), "-c"){ |c| Dir.chdir(c) }
|
|
22
|
+
opt.on("--sets SETS", Array, _("Include configuration sets"), "-s"){ |sets|
|
|
23
|
+
$SPIDER_CONFIG_SETS = sets
|
|
24
|
+
}
|
|
25
|
+
opt.on("--devel", _("Set runmode to devel"), "-d") do
|
|
26
|
+
$SPIDER_RUNMODE = 'devel'
|
|
27
|
+
Spider.runmode = 'devel' if Spider && Spider.respond_to?(:runmode=)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
@cmd.add_command(CmdParse::HelpCommand.new, true)
|
|
32
|
+
@cmd.add_command(WebServerCommand.new)
|
|
33
|
+
@cmd.add_command(InitCommand.new)
|
|
34
|
+
@cmd.add_command(ConsoleCommand.new)
|
|
35
|
+
begin
|
|
36
|
+
require 'spiderfw/cmd/commands/cert'
|
|
37
|
+
@cmd.add_command(CertCommand.new)
|
|
38
|
+
rescue LoadError
|
|
39
|
+
end
|
|
40
|
+
@cmd.add_command(TestCommand.new)
|
|
41
|
+
@cmd.add_command(SetupCommand.new)
|
|
42
|
+
@cmd.add_command(ModelCommand.new)
|
|
43
|
+
# @cmd.add_command(ScaffoldCommand.new)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def parse
|
|
47
|
+
cmd_name = nil
|
|
48
|
+
0.upto(ARGV.length) do |i|
|
|
49
|
+
if (ARGV[i] && ARGV[i] != 'help' && ARGV[i][0].chr != '-')
|
|
50
|
+
cmd_name = ARGV[i]
|
|
51
|
+
break
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
cmd_name ||= 'help'
|
|
55
|
+
require 'ruby-debug'
|
|
56
|
+
if !@cmd.main_command.commands[cmd_name]
|
|
57
|
+
require 'spiderfw'
|
|
58
|
+
if Spider.apps_by_short_name[cmd_name] && Spider.apps_by_short_name[cmd_name].const_defined?(:Cmd)
|
|
59
|
+
app_cmd = Spider.apps_by_short_name[cmd_name].const_get(:Cmd).new
|
|
60
|
+
@cmd.add_command(app_cmd)
|
|
61
|
+
# app_cmd.add_command(CmdParse::HelpCommand.new, true)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
@cmd.parse
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
end; end
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
require 'openssl'
|
|
2
|
+
|
|
3
|
+
class CertCommand < CmdParse::Command
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
super( 'cert', true, true )
|
|
8
|
+
@short_desc = _("Manage certificates")
|
|
9
|
+
# @description = _("")
|
|
10
|
+
|
|
11
|
+
# start
|
|
12
|
+
generate = CmdParse::Command.new( 'generate', false )
|
|
13
|
+
generate.short_desc = _("Generate new X.509")
|
|
14
|
+
generate.options = CmdParse::OptionParserWrapper.new do |opt|
|
|
15
|
+
opt.on("--path path", _("Where to generate the certificate"), "-p") { |path|
|
|
16
|
+
@path = path
|
|
17
|
+
}
|
|
18
|
+
opt.on("--org label", _("Name of the organization to generate the certificate for"), "-o"){ |org|
|
|
19
|
+
@org = org
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
generate.set_execution_block do |args|
|
|
23
|
+
require 'spiderfw'
|
|
24
|
+
@path ||= Spider.paths[:certs]
|
|
25
|
+
@org ||= 'default'
|
|
26
|
+
path = @path+'/'+@org
|
|
27
|
+
orgs = Spider.conf.get('orgs')
|
|
28
|
+
o = orgs[@org] if orgs
|
|
29
|
+
raise _("You have to configure the organization '#{@org}' to generate a certificate") unless o
|
|
30
|
+
raise _("You have to set the organization name for '#{@org}' in configuration") unless o['name']
|
|
31
|
+
raise _("You have to set the organization country code for '#{@org}' in configuration") unless o['country_code']
|
|
32
|
+
raise _("You have to set the organization state for '#{@org}' in configuration") unless o['state']
|
|
33
|
+
raise _("You have to set the organization city for '#{@org}' in configuration") unless o['city']
|
|
34
|
+
raise _("You have to set the organization common name for '#{@org}' in configuration") unless o['common_name']
|
|
35
|
+
raise _("You have to set the organization email address for '#{@org}' in configuration") unless o['email']
|
|
36
|
+
id = "/C=#{o['country_code']}/ST=#{o['state']}/L=#{o['city']}"
|
|
37
|
+
id += "/OU=#{o['organizational_unit']}" if o['organizational_unit']
|
|
38
|
+
id += "/CN=#{o['common_name']}/emailAddress=#{o['email']}"
|
|
39
|
+
FileUtils.mkpath(path+'/private')
|
|
40
|
+
key = OpenSSL::PKey::RSA.generate(4096)
|
|
41
|
+
pub = key.public_key
|
|
42
|
+
# O => organization (Example company)
|
|
43
|
+
# OU => organizational unit (Test department)
|
|
44
|
+
# CN => common name (my company name)
|
|
45
|
+
# /C=US/ST=Florida/L=Miami/O=Waitingf/OU=Poopstat/CN=waitingf.org/emailAddress=bkerley@brycekerley.net
|
|
46
|
+
ca = OpenSSL::X509::Name.parse(id)
|
|
47
|
+
cert = OpenSSL::X509::Certificate.new
|
|
48
|
+
cert.version = 2
|
|
49
|
+
cert.serial = 1
|
|
50
|
+
cert.subject = ca
|
|
51
|
+
cert.issuer = ca
|
|
52
|
+
cert.public_key = pub
|
|
53
|
+
cert.not_before = Time.now
|
|
54
|
+
cert.not_after = Time.now + (60*60*24*356*3)
|
|
55
|
+
cert.sign(key, OpenSSL::Digest::SHA1.new)
|
|
56
|
+
File.open(path+"/public.pem", "w"){ |f| f.write pub.to_pem }
|
|
57
|
+
File.open(path+"/private/key.pem", "w") { |f| f.write key.to_pem }
|
|
58
|
+
File.open(path+"/cert.pem", "w") { |f| f.write cert.to_pem }
|
|
59
|
+
end
|
|
60
|
+
self.add_command( generate )
|
|
61
|
+
|
|
62
|
+
# stop
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Documentation:
|
|
72
|
+
#
|
|
73
|
+
# require "openssl"
|
|
74
|
+
# require "test/unit"
|
|
75
|
+
#
|
|
76
|
+
# module OpenSSL::TestUtils
|
|
77
|
+
# TEST_KEY_RSA1024 = OpenSSL::PKey::RSA.new <<-_end_of_pem_
|
|
78
|
+
# -----BEGIN RSA PRIVATE KEY-----
|
|
79
|
+
# MIICXgIBAAKBgQDLwsSw1ECnPtT+PkOgHhcGA71nwC2/nL85VBGnRqDxOqjVh7Cx
|
|
80
|
+
# aKPERYHsk4BPCkE3brtThPWc9kjHEQQ7uf9Y1rbCz0layNqHyywQEVLFmp1cpIt/
|
|
81
|
+
# Q3geLv8ZD9pihowKJDyMDiN6ArYUmZczvW4976MU3+l54E6lF/JfFEU5hwIDAQAB
|
|
82
|
+
# AoGBAKSl/MQarye1yOysqX6P8fDFQt68VvtXkNmlSiKOGuzyho0M+UVSFcs6k1L0
|
|
83
|
+
# maDE25AMZUiGzuWHyaU55d7RXDgeskDMakD1v6ZejYtxJkSXbETOTLDwUWTn618T
|
|
84
|
+
# gnb17tU1jktUtU67xK/08i/XodlgnQhs6VoHTuCh3Hu77O6RAkEA7+gxqBuZR572
|
|
85
|
+
# 74/akiW/SuXm0SXPEviyO1MuSRwtI87B02D0qgV8D1UHRm4AhMnJ8MCs1809kMQE
|
|
86
|
+
# JiQUCrp9mQJBANlt2ngBO14us6NnhuAseFDTBzCHXwUUu1YKHpMMmxpnGqaldGgX
|
|
87
|
+
# sOZB3lgJsT9VlGf3YGYdkLTNVbogQKlKpB8CQQDiSwkb4vyQfDe8/NpU5Not0fII
|
|
88
|
+
# 8jsDUCb+opWUTMmfbxWRR3FBNu8wnym/m19N4fFj8LqYzHX4KY0oVPu6qvJxAkEA
|
|
89
|
+
# wa5snNekFcqONLIE4G5cosrIrb74sqL8GbGb+KuTAprzj5z1K8Bm0UW9lTjVDjDi
|
|
90
|
+
# qRYgZfZSL+x1P/54+xTFSwJAY1FxA/N3QPCXCjPh5YqFxAMQs2VVYTfg+t0MEcJD
|
|
91
|
+
# dPMQD5JX6g5HKnHFg2mZtoXQrWmJSn7p8GJK8yNTopEErA==
|
|
92
|
+
# -----END RSA PRIVATE KEY-----
|
|
93
|
+
# _end_of_pem_
|
|
94
|
+
#
|
|
95
|
+
# TEST_KEY_RSA2048 = OpenSSL::PKey::RSA.new <<-_end_of_pem_
|
|
96
|
+
# -----BEGIN RSA PRIVATE KEY-----
|
|
97
|
+
# MIIEpAIBAAKCAQEAuV9ht9J7k4NBs38jOXvvTKY9gW8nLICSno5EETR1cuF7i4pN
|
|
98
|
+
# s9I1QJGAFAX0BEO4KbzXmuOvfCpD3CU+Slp1enenfzq/t/e/1IRW0wkJUJUFQign
|
|
99
|
+
# 4CtrkJL+P07yx18UjyPlBXb81ApEmAB5mrJVSrWmqbjs07JbuS4QQGGXLc+Su96D
|
|
100
|
+
# kYKmSNVjBiLxVVSpyZfAY3hD37d60uG+X8xdW5v68JkRFIhdGlb6JL8fllf/A/bl
|
|
101
|
+
# NwdJOhVr9mESHhwGjwfSeTDPfd8ZLE027E5lyAVX9KZYcU00mOX+fdxOSnGqS/8J
|
|
102
|
+
# DRh0EPHDL15RcJjV2J6vZjPb0rOYGDoMcH+94wIDAQABAoIBAAzsamqfYQAqwXTb
|
|
103
|
+
# I0CJtGg6msUgU7HVkOM+9d3hM2L791oGHV6xBAdpXW2H8LgvZHJ8eOeSghR8+dgq
|
|
104
|
+
# PIqAffo4x1Oma+FOg3A0fb0evyiACyrOk+EcBdbBeLo/LcvahBtqnDfiUMQTpy6V
|
|
105
|
+
# seSoFCwuN91TSCeGIsDpRjbG1vxZgtx+uI+oH5+ytqJOmfCksRDCkMglGkzyfcl0
|
|
106
|
+
# Xc5CUhIJ0my53xijEUQl19rtWdMnNnnkdbG8PT3LZlOta5Do86BElzUYka0C6dUc
|
|
107
|
+
# VsBDQ0Nup0P6rEQgy7tephHoRlUGTYamsajGJaAo1F3IQVIrRSuagi7+YpSpCqsW
|
|
108
|
+
# wORqorkCgYEA7RdX6MDVrbw7LePnhyuaqTiMK+055/R1TqhB1JvvxJ1CXk2rDL6G
|
|
109
|
+
# 0TLHQ7oGofd5LYiemg4ZVtWdJe43BPZlVgT6lvL/iGo8JnrncB9Da6L7nrq/+Rvj
|
|
110
|
+
# XGjf1qODCK+LmreZWEsaLPURIoR/Ewwxb9J2zd0CaMjeTwafJo1CZvcCgYEAyCgb
|
|
111
|
+
# aqoWvUecX8VvARfuA593Lsi50t4MEArnOXXcd1RnXoZWhbx5rgO8/ATKfXr0BK/n
|
|
112
|
+
# h2GF9PfKzHFm/4V6e82OL7gu/kLy2u9bXN74vOvWFL5NOrOKPM7Kg+9I131kNYOw
|
|
113
|
+
# Ivnr/VtHE5s0dY7JChYWE1F3vArrOw3T00a4CXUCgYEA0SqY+dS2LvIzW4cHCe9k
|
|
114
|
+
# IQqsT0yYm5TFsUEr4sA3xcPfe4cV8sZb9k/QEGYb1+SWWZ+AHPV3UW5fl8kTbSNb
|
|
115
|
+
# v4ng8i8rVVQ0ANbJO9e5CUrepein2MPL0AkOATR8M7t7dGGpvYV0cFk8ZrFx0oId
|
|
116
|
+
# U0PgYDotF/iueBWlbsOM430CgYEAqYI95dFyPI5/AiSkY5queeb8+mQH62sdcCCr
|
|
117
|
+
# vd/w/CZA/K5sbAo4SoTj8dLk4evU6HtIa0DOP63y071eaxvRpTNqLUOgmLh+D6gS
|
|
118
|
+
# Cc7TfLuFrD+WDBatBd5jZ+SoHccVrLR/4L8jeodo5FPW05A+9gnKXEXsTxY4LOUC
|
|
119
|
+
# 9bS4e1kCgYAqVXZh63JsMwoaxCYmQ66eJojKa47VNrOeIZDZvd2BPVf30glBOT41
|
|
120
|
+
# gBoDG3WMPZoQj9pb7uMcrnvs4APj2FIhMU8U15LcPAj59cD6S6rWnAxO8NFK7HQG
|
|
121
|
+
# 4Jxg3JNNf8ErQoCHb1B3oVdXJkmbJkARoDpBKmTCgKtP8ADYLmVPQw==
|
|
122
|
+
# -----END RSA PRIVATE KEY-----
|
|
123
|
+
# _end_of_pem_
|
|
124
|
+
#
|
|
125
|
+
# TEST_KEY_DSA256 = OpenSSL::PKey::DSA.new <<-_end_of_pem_
|
|
126
|
+
# -----BEGIN DSA PRIVATE KEY-----
|
|
127
|
+
# MIH3AgEAAkEAhk2libbY2a8y2Pt21+YPYGZeW6wzaW2yfj5oiClXro9XMR7XWLkE
|
|
128
|
+
# 9B7XxLNFCS2gmCCdMsMW1HulaHtLFQmB2wIVAM43JZrcgpu6ajZ01VkLc93gu/Ed
|
|
129
|
+
# AkAOhujZrrKV5CzBKutKLb0GVyVWmdC7InoNSMZEeGU72rT96IjM59YzoqmD0pGM
|
|
130
|
+
# 3I1o4cGqg1D1DfM1rQlnN1eSAkBq6xXfEDwJ1mLNxF6q8Zm/ugFYWR5xcX/3wFiT
|
|
131
|
+
# b4+EjHP/DbNh9Vm5wcfnDBJ1zKvrMEf2xqngYdrV/3CiGJeKAhRvL57QvJZcQGvn
|
|
132
|
+
# ISNX5cMzFHRW3Q==
|
|
133
|
+
# -----END DSA PRIVATE KEY-----
|
|
134
|
+
# _end_of_pem_
|
|
135
|
+
#
|
|
136
|
+
# TEST_KEY_DSA512 = OpenSSL::PKey::DSA.new <<-_end_of_pem_
|
|
137
|
+
# -----BEGIN DSA PRIVATE KEY-----
|
|
138
|
+
# MIH4AgEAAkEA5lB4GvEwjrsMlGDqGsxrbqeFRh6o9OWt6FgTYiEEHaOYhkIxv0Ok
|
|
139
|
+
# RZPDNwOG997mDjBnvDJ1i56OmS3MbTnovwIVAJgub/aDrSDB4DZGH7UyarcaGy6D
|
|
140
|
+
# AkB9HdFw/3td8K4l1FZHv7TCZeJ3ZLb7dF3TWoGUP003RCqoji3/lHdKoVdTQNuR
|
|
141
|
+
# S/m6DlCwhjRjiQ/lBRgCLCcaAkEAjN891JBjzpMj4bWgsACmMggFf57DS0Ti+5++
|
|
142
|
+
# Q1VB8qkJN7rA7/2HrCR3gTsWNb1YhAsnFsoeRscC+LxXoXi9OAIUBG98h4tilg6S
|
|
143
|
+
# 55jreJD3Se3slps=
|
|
144
|
+
# -----END DSA PRIVATE KEY-----
|
|
145
|
+
# _end_of_pem_
|
|
146
|
+
#
|
|
147
|
+
# module_function
|
|
148
|
+
#
|
|
149
|
+
# def issue_cert(dn, key, serial, not_before, not_after, extensions,
|
|
150
|
+
# issuer, issuer_key, digest)
|
|
151
|
+
# cert = OpenSSL::X509::Certificate.new
|
|
152
|
+
# issuer = cert unless issuer
|
|
153
|
+
# issuer_key = key unless issuer_key
|
|
154
|
+
# cert.version = 2
|
|
155
|
+
# cert.serial = serial
|
|
156
|
+
# cert.subject = dn
|
|
157
|
+
# cert.issuer = issuer.subject
|
|
158
|
+
# cert.public_key = key.public_key
|
|
159
|
+
# cert.not_before = not_before
|
|
160
|
+
# cert.not_after = not_after
|
|
161
|
+
# ef = OpenSSL::X509::ExtensionFactory.new
|
|
162
|
+
# ef.subject_certificate = cert
|
|
163
|
+
# ef.issuer_certificate = issuer
|
|
164
|
+
# extensions.each{|oid, value, critical|
|
|
165
|
+
# cert.add_extension(ef.create_extension(oid, value, critical))
|
|
166
|
+
# }
|
|
167
|
+
# cert.sign(issuer_key, digest)
|
|
168
|
+
# cert
|
|
169
|
+
# end
|
|
170
|
+
#
|
|
171
|
+
# def issue_crl(revoke_info, serial, lastup, nextup, extensions,
|
|
172
|
+
# issuer, issuer_key, digest)
|
|
173
|
+
# crl = OpenSSL::X509::CRL.new
|
|
174
|
+
# crl.issuer = issuer.subject
|
|
175
|
+
# crl.version = 1
|
|
176
|
+
# crl.last_update = lastup
|
|
177
|
+
# crl.next_update = nextup
|
|
178
|
+
# revoke_info.each{|serial, time, reason_code|
|
|
179
|
+
# revoked = OpenSSL::X509::Revoked.new
|
|
180
|
+
# revoked.serial = serial
|
|
181
|
+
# revoked.time = time
|
|
182
|
+
# enum = OpenSSL::ASN1::Enumerated(reason_code)
|
|
183
|
+
# ext = OpenSSL::X509::Extension.new("CRLReason", enum)
|
|
184
|
+
# revoked.add_extension(ext)
|
|
185
|
+
# crl.add_revoked(revoked)
|
|
186
|
+
# }
|
|
187
|
+
# ef = OpenSSL::X509::ExtensionFactory.new
|
|
188
|
+
# ef.issuer_certificate = issuer
|
|
189
|
+
# ef.crl = crl
|
|
190
|
+
# crlnum = OpenSSL::ASN1::Integer(serial)
|
|
191
|
+
# crl.add_extension(OpenSSL::X509::Extension.new("crlNumber", crlnum))
|
|
192
|
+
# extensions.each{|oid, value, critical|
|
|
193
|
+
# crl.add_extension(ef.create_extension(oid, value, critical))
|
|
194
|
+
# }
|
|
195
|
+
# crl.sign(issuer_key, digest)
|
|
196
|
+
# crl
|
|
197
|
+
# end
|
|
198
|
+
#
|
|
199
|
+
# def get_subject_key_id(cert)
|
|
200
|
+
# asn1_cert = OpenSSL::ASN1.decode(cert)
|
|
201
|
+
# tbscert = asn1_cert.value[0]
|
|
202
|
+
# pkinfo = tbscert.value[6]
|
|
203
|
+
# publickey = pkinfo.value[1]
|
|
204
|
+
# pkvalue = publickey.value
|
|
205
|
+
# OpenSSL::Digest::SHA1.hexdigest(pkvalue).scan(/../).join(":").upcase
|
|
206
|
+
# end
|
|
207
|
+
# end
|
|
208
|
+
#
|
|
209
|
+
#
|
|
210
|
+
# # Test
|
|
211
|
+
#
|
|
212
|
+
#
|
|
213
|
+
# if defined?(OpenSSL)
|
|
214
|
+
#
|
|
215
|
+
# class OpenSSL::TestX509CRL < Test::Unit::TestCase
|
|
216
|
+
# def setup
|
|
217
|
+
# @rsa1024 = OpenSSL::TestUtils::TEST_KEY_RSA1024
|
|
218
|
+
# @rsa2048 = OpenSSL::TestUtils::TEST_KEY_RSA2048
|
|
219
|
+
# @dsa256 = OpenSSL::TestUtils::TEST_KEY_DSA256
|
|
220
|
+
# @dsa512 = OpenSSL::TestUtils::TEST_KEY_DSA512
|
|
221
|
+
# @ca = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=CA")
|
|
222
|
+
# @ee1 = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=EE1")
|
|
223
|
+
# @ee2 = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=EE2")
|
|
224
|
+
# end
|
|
225
|
+
#
|
|
226
|
+
# def teardown
|
|
227
|
+
# end
|
|
228
|
+
#
|
|
229
|
+
# def issue_crl(*args)
|
|
230
|
+
# OpenSSL::TestUtils.issue_crl(*args)
|
|
231
|
+
# end
|
|
232
|
+
#
|
|
233
|
+
# def issue_cert(*args)
|
|
234
|
+
# OpenSSL::TestUtils.issue_cert(*args)
|
|
235
|
+
# end
|
|
236
|
+
#
|
|
237
|
+
# def test_basic
|
|
238
|
+
# now = Time.at(Time.now.to_i)
|
|
239
|
+
#
|
|
240
|
+
# cert = issue_cert(@ca, @rsa2048, 1, now, now+3600, [],
|
|
241
|
+
# nil, nil, OpenSSL::Digest::SHA1.new)
|
|
242
|
+
# crl = issue_crl([], 1, now, now+1600, [],
|
|
243
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
244
|
+
# assert_equal(1, crl.version)
|
|
245
|
+
# assert_equal(cert.issuer.to_der, crl.issuer.to_der)
|
|
246
|
+
# assert_equal(now, crl.last_update)
|
|
247
|
+
# assert_equal(now+1600, crl.next_update)
|
|
248
|
+
#
|
|
249
|
+
# crl = OpenSSL::X509::CRL.new(crl.to_der)
|
|
250
|
+
# assert_equal(1, crl.version)
|
|
251
|
+
# assert_equal(cert.issuer.to_der, crl.issuer.to_der)
|
|
252
|
+
# assert_equal(now, crl.last_update)
|
|
253
|
+
# assert_equal(now+1600, crl.next_update)
|
|
254
|
+
# end
|
|
255
|
+
#
|
|
256
|
+
# def test_revoked
|
|
257
|
+
#
|
|
258
|
+
# # CRLReason ::= ENUMERATED {
|
|
259
|
+
# # unspecified (0),
|
|
260
|
+
# # keyCompromise (1),
|
|
261
|
+
# # cACompromise (2),
|
|
262
|
+
# # affiliationChanged (3),
|
|
263
|
+
# # superseded (4),
|
|
264
|
+
# # cessationOfOperation (5),
|
|
265
|
+
# # certificateHold (6),
|
|
266
|
+
# # removeFromCRL (8),
|
|
267
|
+
# # privilegeWithdrawn (9),
|
|
268
|
+
# # aACompromise (10) }
|
|
269
|
+
#
|
|
270
|
+
# now = Time.at(Time.now.to_i)
|
|
271
|
+
# revoke_info = [
|
|
272
|
+
# [1, Time.at(0), 1],
|
|
273
|
+
# [2, Time.at(0x7fffffff), 2],
|
|
274
|
+
# [3, now, 3],
|
|
275
|
+
# [4, now, 4],
|
|
276
|
+
# [5, now, 5],
|
|
277
|
+
# ]
|
|
278
|
+
# cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [],
|
|
279
|
+
# nil, nil, OpenSSL::Digest::SHA1.new)
|
|
280
|
+
# crl = issue_crl(revoke_info, 1, Time.now, Time.now+1600, [],
|
|
281
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
282
|
+
# revoked = crl.revoked
|
|
283
|
+
# assert_equal(5, revoked.size)
|
|
284
|
+
# assert_equal(1, revoked[0].serial)
|
|
285
|
+
# assert_equal(2, revoked[1].serial)
|
|
286
|
+
# assert_equal(3, revoked[2].serial)
|
|
287
|
+
# assert_equal(4, revoked[3].serial)
|
|
288
|
+
# assert_equal(5, revoked[4].serial)
|
|
289
|
+
#
|
|
290
|
+
# assert_equal(Time.at(0), revoked[0].time)
|
|
291
|
+
# assert_equal(Time.at(0x7fffffff), revoked[1].time)
|
|
292
|
+
# assert_equal(now, revoked[2].time)
|
|
293
|
+
# assert_equal(now, revoked[3].time)
|
|
294
|
+
# assert_equal(now, revoked[4].time)
|
|
295
|
+
#
|
|
296
|
+
# assert_equal("CRLReason", revoked[0].extensions[0].oid)
|
|
297
|
+
# assert_equal("CRLReason", revoked[1].extensions[0].oid)
|
|
298
|
+
# assert_equal("CRLReason", revoked[2].extensions[0].oid)
|
|
299
|
+
# assert_equal("CRLReason", revoked[3].extensions[0].oid)
|
|
300
|
+
# assert_equal("CRLReason", revoked[4].extensions[0].oid)
|
|
301
|
+
#
|
|
302
|
+
# assert_equal("Key Compromise", revoked[0].extensions[0].value)
|
|
303
|
+
# assert_equal("CA Compromise", revoked[1].extensions[0].value)
|
|
304
|
+
# assert_equal("Affiliation Changed", revoked[2].extensions[0].value)
|
|
305
|
+
# assert_equal("Superseded", revoked[3].extensions[0].value)
|
|
306
|
+
# assert_equal("Cessation Of Operation", revoked[4].extensions[0].value)
|
|
307
|
+
#
|
|
308
|
+
# assert_equal(false, revoked[0].extensions[0].critical?)
|
|
309
|
+
# assert_equal(false, revoked[1].extensions[0].critical?)
|
|
310
|
+
# assert_equal(false, revoked[2].extensions[0].critical?)
|
|
311
|
+
# assert_equal(false, revoked[3].extensions[0].critical?)
|
|
312
|
+
# assert_equal(false, revoked[4].extensions[0].critical?)
|
|
313
|
+
#
|
|
314
|
+
# crl = OpenSSL::X509::CRL.new(crl.to_der)
|
|
315
|
+
# assert_equal("Key Compromise", revoked[0].extensions[0].value)
|
|
316
|
+
# assert_equal("CA Compromise", revoked[1].extensions[0].value)
|
|
317
|
+
# assert_equal("Affiliation Changed", revoked[2].extensions[0].value)
|
|
318
|
+
# assert_equal("Superseded", revoked[3].extensions[0].value)
|
|
319
|
+
# assert_equal("Cessation Of Operation", revoked[4].extensions[0].value)
|
|
320
|
+
#
|
|
321
|
+
# revoke_info = (1..1000).collect{|i| [i, now, 0] }
|
|
322
|
+
# crl = issue_crl(revoke_info, 1, Time.now, Time.now+1600, [],
|
|
323
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
324
|
+
# revoked = crl.revoked
|
|
325
|
+
# assert_equal(1000, revoked.size)
|
|
326
|
+
# assert_equal(1, revoked[0].serial)
|
|
327
|
+
# assert_equal(1000, revoked[999].serial)
|
|
328
|
+
# end
|
|
329
|
+
#
|
|
330
|
+
# def test_extension
|
|
331
|
+
# cert_exts = [
|
|
332
|
+
# ["basicConstraints", "CA:TRUE", true],
|
|
333
|
+
# ["subjectKeyIdentifier", "hash", false],
|
|
334
|
+
# ["authorityKeyIdentifier", "keyid:always", false],
|
|
335
|
+
# ["subjectAltName", "email:xyzzy@ruby-lang.org", false],
|
|
336
|
+
# ["keyUsage", "cRLSign, keyCertSign", true],
|
|
337
|
+
# ]
|
|
338
|
+
# crl_exts = [
|
|
339
|
+
# ["authorityKeyIdentifier", "keyid:always", false],
|
|
340
|
+
# ["issuerAltName", "issuer:copy", false],
|
|
341
|
+
# ]
|
|
342
|
+
#
|
|
343
|
+
# cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, cert_exts,
|
|
344
|
+
# nil, nil, OpenSSL::Digest::SHA1.new)
|
|
345
|
+
# crl = issue_crl([], 1, Time.now, Time.now+1600, crl_exts,
|
|
346
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
347
|
+
# exts = crl.extensions
|
|
348
|
+
# assert_equal(3, exts.size)
|
|
349
|
+
# assert_equal("1", exts[0].value)
|
|
350
|
+
# assert_equal("crlNumber", exts[0].oid)
|
|
351
|
+
# assert_equal(false, exts[0].critical?)
|
|
352
|
+
#
|
|
353
|
+
# assert_equal("authorityKeyIdentifier", exts[1].oid)
|
|
354
|
+
# keyid = OpenSSL::TestUtils.get_subject_key_id(cert)
|
|
355
|
+
# assert_match(/^keyid:#{keyid}/, exts[1].value)
|
|
356
|
+
# assert_equal(false, exts[1].critical?)
|
|
357
|
+
#
|
|
358
|
+
# assert_equal("issuerAltName", exts[2].oid)
|
|
359
|
+
# assert_equal("email:xyzzy@ruby-lang.org", exts[2].value)
|
|
360
|
+
# assert_equal(false, exts[2].critical?)
|
|
361
|
+
#
|
|
362
|
+
# crl = OpenSSL::X509::CRL.new(crl.to_der)
|
|
363
|
+
# exts = crl.extensions
|
|
364
|
+
# assert_equal(3, exts.size)
|
|
365
|
+
# assert_equal("1", exts[0].value)
|
|
366
|
+
# assert_equal("crlNumber", exts[0].oid)
|
|
367
|
+
# assert_equal(false, exts[0].critical?)
|
|
368
|
+
#
|
|
369
|
+
# assert_equal("authorityKeyIdentifier", exts[1].oid)
|
|
370
|
+
# keyid = OpenSSL::TestUtils.get_subject_key_id(cert)
|
|
371
|
+
# assert_match(/^keyid:#{keyid}/, exts[1].value)
|
|
372
|
+
# assert_equal(false, exts[1].critical?)
|
|
373
|
+
#
|
|
374
|
+
# assert_equal("issuerAltName", exts[2].oid)
|
|
375
|
+
# assert_equal("email:xyzzy@ruby-lang.org", exts[2].value)
|
|
376
|
+
# assert_equal(false, exts[2].critical?)
|
|
377
|
+
# end
|
|
378
|
+
#
|
|
379
|
+
# def test_crlnumber
|
|
380
|
+
# cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [],
|
|
381
|
+
# nil, nil, OpenSSL::Digest::SHA1.new)
|
|
382
|
+
# crl = issue_crl([], 1, Time.now, Time.now+1600, [],
|
|
383
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
384
|
+
# assert_match(1.to_s, crl.extensions[0].value)
|
|
385
|
+
# assert_match(/X509v3 CRL Number:\s+#{1}/m, crl.to_text)
|
|
386
|
+
#
|
|
387
|
+
# crl = issue_crl([], 2**32, Time.now, Time.now+1600, [],
|
|
388
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
389
|
+
# assert_match((2**32).to_s, crl.extensions[0].value)
|
|
390
|
+
# assert_match(/X509v3 CRL Number:\s+#{2**32}/m, crl.to_text)
|
|
391
|
+
#
|
|
392
|
+
# crl = issue_crl([], 2**100, Time.now, Time.now+1600, [],
|
|
393
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
394
|
+
# assert_match(/X509v3 CRL Number:\s+#{2**100}/m, crl.to_text)
|
|
395
|
+
# assert_match((2**100).to_s, crl.extensions[0].value)
|
|
396
|
+
# end
|
|
397
|
+
#
|
|
398
|
+
# def test_sign_and_verify
|
|
399
|
+
# cert = issue_cert(@ca, @rsa2048, 1, Time.now, Time.now+3600, [],
|
|
400
|
+
# nil, nil, OpenSSL::Digest::SHA1.new)
|
|
401
|
+
# crl = issue_crl([], 1, Time.now, Time.now+1600, [],
|
|
402
|
+
# cert, @rsa2048, OpenSSL::Digest::SHA1.new)
|
|
403
|
+
# assert_equal(false, crl.verify(@rsa1024))
|
|
404
|
+
# assert_equal(true, crl.verify(@rsa2048))
|
|
405
|
+
# assert_equal(false, crl.verify(@dsa256))
|
|
406
|
+
# assert_equal(false, crl.verify(@dsa512))
|
|
407
|
+
# crl.version = 0
|
|
408
|
+
# assert_equal(false, crl.verify(@rsa2048))
|
|
409
|
+
#
|
|
410
|
+
# cert = issue_cert(@ca, @dsa512, 1, Time.now, Time.now+3600, [],
|
|
411
|
+
# nil, nil, OpenSSL::Digest::DSS1.new)
|
|
412
|
+
# crl = issue_crl([], 1, Time.now, Time.now+1600, [],
|
|
413
|
+
# cert, @dsa512, OpenSSL::Digest::DSS1.new)
|
|
414
|
+
# assert_equal(false, crl.verify(@rsa1024))
|
|
415
|
+
# assert_equal(false, crl.verify(@rsa2048))
|
|
416
|
+
# assert_equal(false, crl.verify(@dsa256))
|
|
417
|
+
# assert_equal(true, crl.verify(@dsa512))
|
|
418
|
+
# crl.version = 0
|
|
419
|
+
# assert_equal(false, crl.verify(@dsa512))
|
|
420
|
+
# end
|
|
421
|
+
# end
|
|
422
|
+
#
|
|
423
|
+
# end
|
|
424
|
+
#
|
|
425
|
+
#
|
|
426
|
+
#
|
|
427
|
+
#
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class ConsoleCommand < CmdParse::Command
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def initialize
|
|
5
|
+
super( 'console', false )
|
|
6
|
+
@short_desc = _("Open a console")
|
|
7
|
+
# @description = _("")
|
|
8
|
+
@opts = {:irb => 'irb'}
|
|
9
|
+
|
|
10
|
+
self.options = CmdParse::OptionParserWrapper.new do |opt|
|
|
11
|
+
opt.on("--irb",
|
|
12
|
+
_("Irb executable to use"),
|
|
13
|
+
"-i"){ |irb|
|
|
14
|
+
@opts[:irb] = irb
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
set_execution_block do
|
|
19
|
+
ENV['SPIDER_RUNMODE'] = $SPIDER_RUNMODE if ($SPIDER_RUNMODE)
|
|
20
|
+
ENV['SPIDER_CONFIG_SETS'] = $SPIDER_CONFIG_SETS.join(',') if ($SPIDER_CONFIG_SETS)
|
|
21
|
+
exec("#{@opts[:irb]} -I #{$SPIDER_LIB} -r spiderfw")
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|