javascriptmvc 3.0.0.pre15
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/README.markdown +15 -0
- data/Rakefile +17 -0
- data/VERSION +1 -0
- data/bin/jmvc-build +4 -0
- data/bin/jmvc-gen +4 -0
- data/bin/jmvc-get +4 -0
- data/bin/jmvc-init +4 -0
- data/bin/jmvc-update +4 -0
- data/lib/javascriptmvc.rb +97 -0
- data/lib/javascriptmvc/documentjs/README +0 -0
- data/lib/javascriptmvc/documentjs/add.js +76 -0
- data/lib/javascriptmvc/documentjs/application.js +285 -0
- data/lib/javascriptmvc/documentjs/attribute.js +61 -0
- data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
- data/lib/javascriptmvc/documentjs/class.js +141 -0
- data/lib/javascriptmvc/documentjs/constructor.js +145 -0
- data/lib/javascriptmvc/documentjs/directives.js +394 -0
- data/lib/javascriptmvc/documentjs/distance.js +49 -0
- data/lib/javascriptmvc/documentjs/document +21 -0
- data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
- data/lib/javascriptmvc/documentjs/file.js +55 -0
- data/lib/javascriptmvc/documentjs/function.js +112 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
- data/lib/javascriptmvc/documentjs/json.js +172 -0
- data/lib/javascriptmvc/documentjs/page.js +107 -0
- data/lib/javascriptmvc/documentjs/pair.js +302 -0
- data/lib/javascriptmvc/documentjs/prototype.js +13 -0
- data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
- data/lib/javascriptmvc/documentjs/static.js +25 -0
- data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
- data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
- data/lib/javascriptmvc/documentjs/test/something.js +8 -0
- data/lib/javascriptmvc/documentjs/test/test.html +6 -0
- data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
- data/lib/javascriptmvc/documentjs/update +5 -0
- data/lib/javascriptmvc/funcunit/README +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
- data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
- data/lib/javascriptmvc/funcunit/build.js +54 -0
- data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
- data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
- data/lib/javascriptmvc/funcunit/envjs +13 -0
- data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
- data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
- data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
- data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
- data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
- data/lib/javascriptmvc/funcunit/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
- data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
- data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
- data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
- data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
- data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
- data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
- data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
- data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
- data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
- data/lib/javascriptmvc/funcunit/settings.js +10 -0
- data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
- data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
- data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
- data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
- data/lib/javascriptmvc/funcunit/template.html +18 -0
- data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
- data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
- data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
- data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
- data/lib/javascriptmvc/funcunit/update +5 -0
- data/lib/javascriptmvc/jquery/README +24 -0
- data/lib/javascriptmvc/jquery/build.js +73 -0
- data/lib/javascriptmvc/jquery/class/class.html +109 -0
- data/lib/javascriptmvc/jquery/class/class.js +627 -0
- data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
- data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
- data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
- data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
- data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
- data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
- data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
- data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
- data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
- data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
- data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
- data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
- data/lib/javascriptmvc/jquery/error/background.png +0 -0
- data/lib/javascriptmvc/jquery/error/error.html +31 -0
- data/lib/javascriptmvc/jquery/error/error.js +227 -0
- data/lib/javascriptmvc/jquery/error/setup.js +4 -0
- data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
- data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
- data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
- data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
- data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
- data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
- data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
- data/lib/javascriptmvc/jquery/event/event.js +6 -0
- data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
- data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
- data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
- data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
- data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
- data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
- data/lib/javascriptmvc/jquery/generate/app +23 -0
- data/lib/javascriptmvc/jquery/generate/controller +21 -0
- data/lib/javascriptmvc/jquery/generate/model +26 -0
- data/lib/javascriptmvc/jquery/generate/page +20 -0
- data/lib/javascriptmvc/jquery/generate/plugin +20 -0
- data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/jquery.js +6360 -0
- data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
- data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
- data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
- data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
- data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
- data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
- data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
- data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
- data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
- data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
- data/lib/javascriptmvc/jquery/model/model.js +537 -0
- data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
- data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
- data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
- data/lib/javascriptmvc/jquery/update +5 -0
- data/lib/javascriptmvc/jquery/view/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
- data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
- data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
- data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
- data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
- data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
- data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
- data/lib/javascriptmvc/jquery/view/view.html +65 -0
- data/lib/javascriptmvc/jquery/view/view.js +296 -0
- data/lib/javascriptmvc/js +56 -0
- data/lib/javascriptmvc/js.bat +57 -0
- data/lib/javascriptmvc/steal/README +26 -0
- data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
- data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
- data/lib/javascriptmvc/steal/build/build.js +281 -0
- data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
- data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
- data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
- data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
- data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
- data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
- data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
- data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
- data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
- data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
- data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
- data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
- data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
- data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
- data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
- data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
- data/lib/javascriptmvc/steal/build/test/run.js +57 -0
- data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/test.js +3 -0
- data/lib/javascriptmvc/steal/buildjs +21 -0
- data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
- data/lib/javascriptmvc/steal/clean/clean.js +179 -0
- data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
- data/lib/javascriptmvc/steal/clean/test.js +7 -0
- data/lib/javascriptmvc/steal/cleanjs +5 -0
- data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
- data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
- data/lib/javascriptmvc/steal/dev/dev.js +83 -0
- data/lib/javascriptmvc/steal/end.js +1 -0
- data/lib/javascriptmvc/steal/generate/app +23 -0
- data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
- data/lib/javascriptmvc/steal/generate/generate.js +211 -0
- data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
- data/lib/javascriptmvc/steal/generate/system.js +33 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
- data/lib/javascriptmvc/steal/get/get.js +163 -0
- data/lib/javascriptmvc/steal/get/gets.json +10 -0
- data/lib/javascriptmvc/steal/get/getter.js +115 -0
- data/lib/javascriptmvc/steal/get/github.js +134 -0
- data/lib/javascriptmvc/steal/get/json.js +172 -0
- data/lib/javascriptmvc/steal/getjs +5 -0
- data/lib/javascriptmvc/steal/js +56 -0
- data/lib/javascriptmvc/steal/js.bat +57 -0
- data/lib/javascriptmvc/steal/less/less.js +117 -0
- data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
- data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
- data/lib/javascriptmvc/steal/rhino/build.js +31 -0
- data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
- data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
- data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
- data/lib/javascriptmvc/steal/rhino/file.js +299 -0
- data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
- data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
- data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
- data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
- data/lib/javascriptmvc/steal/rhino/test.js +16 -0
- data/lib/javascriptmvc/steal/steal.js +1317 -0
- data/lib/javascriptmvc/steal/steal.production.js +23 -0
- data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
- data/lib/javascriptmvc/steal/test/another/two.js +2 -0
- data/lib/javascriptmvc/steal/test/one/four.js +1 -0
- data/lib/javascriptmvc/steal/test/one/one.js +6 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
- data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
- data/lib/javascriptmvc/steal/test/run.js +12 -0
- data/lib/javascriptmvc/steal/test/steal.html +37 -0
- data/lib/javascriptmvc/steal/test/test.js +82 -0
- data/lib/javascriptmvc/steal/test/three.js +3 -0
- data/lib/javascriptmvc/steal/testing/test.html +20 -0
- data/lib/javascriptmvc/steal/testing/testing.js +48 -0
- data/lib/javascriptmvc/steal/update +5 -0
- metadata +622 -0
@@ -0,0 +1,299 @@
|
|
1
|
+
;(function(steal){
|
2
|
+
|
3
|
+
var extend = steal.extend;
|
4
|
+
|
5
|
+
if(!steal.File){
|
6
|
+
steal.File = function(path){
|
7
|
+
if(this.constructor != steal.File){
|
8
|
+
return new steal.File(path)
|
9
|
+
}
|
10
|
+
this.path = path;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
var copy = function(jFile1, jFile2){
|
14
|
+
var fin = new java.io.FileInputStream(jFile1);
|
15
|
+
var fout = new java.io.FileOutputStream(jFile2);
|
16
|
+
|
17
|
+
// Transfer bytes from in to out
|
18
|
+
var data = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
|
19
|
+
var len = 0;
|
20
|
+
while ((len = fin.read(data)) > 0) {
|
21
|
+
fout.write(data, 0, len);
|
22
|
+
}
|
23
|
+
fin.close();
|
24
|
+
fout.close();
|
25
|
+
}
|
26
|
+
var addDir = function(dirObj, out, replacePath) {
|
27
|
+
var files = dirObj.listFiles();
|
28
|
+
var tmpBuf = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
|
29
|
+
|
30
|
+
for (var i = 0; i < files.length; i++) {
|
31
|
+
if (files[i].isDirectory()) {
|
32
|
+
addDir(files[i], out, replacePath);
|
33
|
+
continue;
|
34
|
+
}
|
35
|
+
var inarr = new java.io.FileInputStream(files[i].getAbsolutePath());
|
36
|
+
var zipPath = files[i].getPath().replace(replacePath, "").replace("\\", "/")
|
37
|
+
if(/^\.git/.test(zipPath)) continue;
|
38
|
+
print(zipPath)
|
39
|
+
out.putNextEntry(new java.util.zip.ZipEntry(zipPath));
|
40
|
+
var len;
|
41
|
+
while ((len = inarr.read(tmpBuf)) > 0) {
|
42
|
+
out.write(tmpBuf, 0, len);
|
43
|
+
}
|
44
|
+
out.closeEntry();
|
45
|
+
inarr.close();
|
46
|
+
}
|
47
|
+
}
|
48
|
+
extend(steal.File.prototype, {
|
49
|
+
/**
|
50
|
+
* Removes hash and params
|
51
|
+
* @return {String}
|
52
|
+
*/
|
53
|
+
clean: function() {
|
54
|
+
return this.path.match(/([^\?#]*)/)[1];
|
55
|
+
},
|
56
|
+
/**
|
57
|
+
* Returns everything before the last /
|
58
|
+
*/
|
59
|
+
dir: function() {
|
60
|
+
var last = this.clean().lastIndexOf('/'),
|
61
|
+
dir = (last != -1) ? this.clean().substring(0,last) : '',
|
62
|
+
parts = dir != '' && dir.match( /^(https?:\/|file:\/)$/ );
|
63
|
+
return parts && parts[1] ? this.clean() : dir;
|
64
|
+
},
|
65
|
+
/**
|
66
|
+
* Returns the domain for the current path.
|
67
|
+
* Returns null if the domain is a file.
|
68
|
+
*/
|
69
|
+
domain: function() {
|
70
|
+
if(this.path.indexOf('file:') == 0 ) return null;
|
71
|
+
var http = this.path.match(/^(?:https?:\/\/)([^\/]*)/);
|
72
|
+
return http ? http[1] : null;
|
73
|
+
},
|
74
|
+
protocol: function() {
|
75
|
+
return this.path.match( /^(https?:|file:)/ )[1]
|
76
|
+
},
|
77
|
+
/**
|
78
|
+
* Joins url onto path
|
79
|
+
* @param {Object} url
|
80
|
+
*/
|
81
|
+
join: function( url ) {
|
82
|
+
return new steal.File(url).joinFrom(this.path);
|
83
|
+
},
|
84
|
+
/**
|
85
|
+
* Returns the path of this file referenced form another url.
|
86
|
+
* @codestart
|
87
|
+
* new steal.File('a/b.c').joinFrom('/d/e')//-> /d/e/a/b.c
|
88
|
+
* @codeend
|
89
|
+
* @param {Object} url
|
90
|
+
* @param {Object} expand
|
91
|
+
* @return {String}
|
92
|
+
*/
|
93
|
+
joinFrom: function( url, expand ) {
|
94
|
+
if(this.isDomainAbsolute()){
|
95
|
+
var u = new File(url);
|
96
|
+
if(this.domain() && this.domain() == u.domain() )
|
97
|
+
return this.afterDomain();
|
98
|
+
else if(this.domain() == u.domain()) { // we are from a file
|
99
|
+
return this.toReferenceFromSameDomain(url);
|
100
|
+
}else
|
101
|
+
return this.path;
|
102
|
+
}else if(url == steal.pageDir && !expand){
|
103
|
+
return this.path;
|
104
|
+
}else if(this.isLocalAbsolute()){
|
105
|
+
var u = new File(url);
|
106
|
+
if(!u.domain()) return this.path;
|
107
|
+
return u.protocol()+"//"+u.domain() + this.path;
|
108
|
+
}
|
109
|
+
else{
|
110
|
+
|
111
|
+
if(url == '') return this.path.replace(/\/$/,'');
|
112
|
+
var urls = url.split('/'), paths = this.path.split('/'), path = paths[0];
|
113
|
+
if(url.match(/\/$/) ) urls.pop();
|
114
|
+
while(path == '..' && paths.length > 0){
|
115
|
+
paths.shift();
|
116
|
+
urls.pop();
|
117
|
+
path =paths[0];
|
118
|
+
}
|
119
|
+
return urls.concat(paths).join('/');
|
120
|
+
}
|
121
|
+
},
|
122
|
+
/**
|
123
|
+
* Returns true if the file is relative
|
124
|
+
*/
|
125
|
+
relative: function() { return this.path.match(/^(https?:|file:|\/)/) == null;},
|
126
|
+
/**
|
127
|
+
* Returns the part of the path that is after the domain part
|
128
|
+
*/
|
129
|
+
after_domain: function() { return this.path.match(/(?:https?:\/\/[^\/]*)(.*)/)[1];},
|
130
|
+
/**
|
131
|
+
*
|
132
|
+
* @param {Object} url
|
133
|
+
*/
|
134
|
+
toReferenceFromSameDomain: function( url ) {
|
135
|
+
var parts = this.path.split('/'), other_parts = url.split('/'), result = '';
|
136
|
+
while(parts.length > 0 && other_parts.length >0 && parts[0] == other_parts[0]){
|
137
|
+
parts.shift(); other_parts.shift();
|
138
|
+
}
|
139
|
+
for(var i = 0; i< other_parts.length; i++) result += '../';
|
140
|
+
return result+ parts.join('/');
|
141
|
+
},
|
142
|
+
/**
|
143
|
+
* Is the file on the same domain as our page.
|
144
|
+
*/
|
145
|
+
is_cross_domain: function() {
|
146
|
+
if(this.isLocalAbsolute()) return false;
|
147
|
+
return this.domain() != new steal.File(location.href).domain();
|
148
|
+
},
|
149
|
+
isLocalAbsolute: function() { return this.path.indexOf('/') === 0},
|
150
|
+
isDomainAbsolute: function() {return this.path.match(/^(https?:|file:)/) != null},
|
151
|
+
/**
|
152
|
+
* For a given path, a given working directory, and file location, update the path so
|
153
|
+
* it points to the right location.
|
154
|
+
*/
|
155
|
+
|
156
|
+
|
157
|
+
mkdir: function() {
|
158
|
+
var out = new java.io.File( this.path )
|
159
|
+
out.mkdir();
|
160
|
+
},
|
161
|
+
mkdirs: function() {
|
162
|
+
var out = new java.io.File( this.path )
|
163
|
+
out.mkdirs();
|
164
|
+
},
|
165
|
+
exists: function() {
|
166
|
+
var exists = (new java.io.File(this.path)).exists();
|
167
|
+
return exists;
|
168
|
+
},
|
169
|
+
copyTo: function( dest, ignore ) {
|
170
|
+
var me = new java.io.File(this.path)
|
171
|
+
var you = new java.io.File(dest);
|
172
|
+
if (me.isDirectory()) {
|
173
|
+
var children = me.list();
|
174
|
+
for (var i=0; i<children.length; i++) {
|
175
|
+
var newMe = new java.io.File(me, children[i]);
|
176
|
+
var newYou = new java.io.File(you, children[i]);
|
177
|
+
if (ignore && ignore.indexOf(""+newYou.getName()) != -1) {
|
178
|
+
continue;
|
179
|
+
}
|
180
|
+
if (newMe.isDirectory()) {
|
181
|
+
newYou.mkdir();
|
182
|
+
new steal.File(newMe.path).copyTo(newYou.path, ignore)
|
183
|
+
} else {
|
184
|
+
copy(newMe, newYou)
|
185
|
+
}
|
186
|
+
}
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
copy(me, you)
|
190
|
+
},
|
191
|
+
save: function( src, encoding ) {
|
192
|
+
var fout = new java.io.FileOutputStream(new java.io.File( this.path ));
|
193
|
+
|
194
|
+
var out = new java.io.OutputStreamWriter(fout, "UTF-8");
|
195
|
+
var s = new java.lang.String(src || "");
|
196
|
+
|
197
|
+
var text = new java.lang.String( (s).getBytes(), encoding || "UTF-8" );
|
198
|
+
out.write( text, 0, text.length() );
|
199
|
+
out.flush();
|
200
|
+
out.close();
|
201
|
+
},
|
202
|
+
download_from: function( address ) {
|
203
|
+
var input =
|
204
|
+
new java.io.BufferedInputStream(
|
205
|
+
new java.net.URL(address).openStream()
|
206
|
+
);
|
207
|
+
|
208
|
+
bout = new java.io.BufferedOutputStream(
|
209
|
+
new java.io.FileOutputStream(this.path),
|
210
|
+
1024
|
211
|
+
);
|
212
|
+
var data = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
|
213
|
+
var num_read = 0;
|
214
|
+
while( (num_read = input.read(data,0,1024) ) >= 0 ) {
|
215
|
+
bout.write(data, 0 , num_read);
|
216
|
+
}
|
217
|
+
bout.close();
|
218
|
+
},
|
219
|
+
basename: function() {
|
220
|
+
return this.path.match(/\/?([^\/]*)\/?$/)[1];
|
221
|
+
},
|
222
|
+
remove: function() {
|
223
|
+
var file = new java.io.File( this.path );
|
224
|
+
file["delete"]();
|
225
|
+
},
|
226
|
+
removeDir: function() {
|
227
|
+
var me = new java.io.File(this.path)
|
228
|
+
if( me.exists() ) {
|
229
|
+
var files = me.listFiles();
|
230
|
+
for(var i=0; i<files.length; i++) {
|
231
|
+
if(files[i].isDirectory()) {
|
232
|
+
new steal.File(files[i]).removeDir();
|
233
|
+
} else {
|
234
|
+
files[i]["delete"]();
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
me["delete"]()
|
239
|
+
},
|
240
|
+
zipDir: function( name, replacePath ) {
|
241
|
+
var dirObj = new java.io.File(this.path);
|
242
|
+
var out = new java.util.zip.ZipOutputStream(new java.io.FileOutputStream(name));
|
243
|
+
addDir(dirObj, out, replacePath);
|
244
|
+
out.close();
|
245
|
+
},
|
246
|
+
contents: function( func, current ) {
|
247
|
+
var me = new java.io.File(this.path),
|
248
|
+
listOfFiles = me.listFiles();
|
249
|
+
|
250
|
+
if(listOfFiles == null){
|
251
|
+
print("there is nothing in "+this.path)
|
252
|
+
}
|
253
|
+
for (var i = 0; i < listOfFiles.length; i++) {
|
254
|
+
func( listOfFiles[i].getName(),
|
255
|
+
listOfFiles[i].isFile() ? "file" :"directory",
|
256
|
+
current )
|
257
|
+
}
|
258
|
+
return listOfFiles;
|
259
|
+
},
|
260
|
+
/**
|
261
|
+
* Returns the path too the root jmvc folder
|
262
|
+
*/
|
263
|
+
pathToRoot: function( isFile ) {
|
264
|
+
var rootFolders = steal.File.cwd().split(/\/|\\/),
|
265
|
+
myFolders = this.path.split(/\/|\\/),
|
266
|
+
i = 0;
|
267
|
+
|
268
|
+
//for each .. in loc folders, replace with steal folder
|
269
|
+
|
270
|
+
if (myFolders[i] == "..") {
|
271
|
+
while(myFolders[i] == "..") {
|
272
|
+
myFolders[i] = rootFolders.pop();
|
273
|
+
i++;
|
274
|
+
}
|
275
|
+
} else{
|
276
|
+
for(i=0; i < myFolders.length - 1; i++){
|
277
|
+
myFolders[i] = ".."
|
278
|
+
}
|
279
|
+
}
|
280
|
+
myFolders.pop();
|
281
|
+
|
282
|
+
if(!isFile){
|
283
|
+
myFolders.push('..')
|
284
|
+
}
|
285
|
+
return myFolders.join("/")
|
286
|
+
}
|
287
|
+
});
|
288
|
+
|
289
|
+
steal.File.cwdURL = function(){
|
290
|
+
return new java.io.File("").toURL().toString();
|
291
|
+
}
|
292
|
+
steal.File.cwd = function(){
|
293
|
+
return String(new java.io.File('').getAbsoluteFile().toString());
|
294
|
+
}
|
295
|
+
|
296
|
+
})(steal);
|
297
|
+
|
298
|
+
|
299
|
+
|
Binary file
|
@@ -0,0 +1,49 @@
|
|
1
|
+
steal(function(steal){
|
2
|
+
steal.prompt = function(question){
|
3
|
+
java.lang.System.out.print(question);
|
4
|
+
var br = new java.io.BufferedReader(new java.io.InputStreamReader(java.lang.System["in"]));
|
5
|
+
var response;
|
6
|
+
try {
|
7
|
+
response = br.readLine();
|
8
|
+
} catch (e) {
|
9
|
+
System.out.println("IO error trying to read");
|
10
|
+
}
|
11
|
+
return response;
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
*
|
15
|
+
* @param {String} question
|
16
|
+
* @param {Boolean} true or false
|
17
|
+
*/
|
18
|
+
steal.prompt.yesno = function(question){
|
19
|
+
var response = "";
|
20
|
+
while(! response.match(/^\s*[yn]\s*$/i)){
|
21
|
+
response = steal.prompt(question)
|
22
|
+
}
|
23
|
+
return response.match(/[yn]/i)[0].toLowerCase() == "y";
|
24
|
+
}
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Accepts an array of possible arguments and creates global variables for each that is found in args
|
28
|
+
* ie: steal.handleArgs(_args, ["path"])
|
29
|
+
* Args are passed in via command line scripts like this:
|
30
|
+
* js run.js path=/one/two docsLocation=docs
|
31
|
+
* @param {Object} possibleArgs
|
32
|
+
*/
|
33
|
+
steal.handleArgs = function(args, possibleArgs){
|
34
|
+
var i, arg, j, possibleArg, matchedArg, results = {};
|
35
|
+
for(i = 0; i<args.length; i++){
|
36
|
+
arg = args[i];
|
37
|
+
for (j = 0; j < possibleArgs.length; j++) {
|
38
|
+
possibleArg = possibleArgs[j];
|
39
|
+
reg = new RegExp("^"+possibleArg+"\=([^\\s]+)");
|
40
|
+
matchedArg = arg.match(reg);
|
41
|
+
if(matchedArg && matchedArg[1]) {
|
42
|
+
results[possibleArg] = matchedArg[1];
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
return results;
|
47
|
+
}
|
48
|
+
})
|
49
|
+
|
@@ -0,0 +1,122 @@
|
|
1
|
+
//a steal for the filesystem
|
2
|
+
(function(){
|
3
|
+
var oldWindow = function(){
|
4
|
+
return (function(){return this}).call(null,0);
|
5
|
+
},
|
6
|
+
oldSteal = oldWindow().steal;
|
7
|
+
var steal = (oldWindow().steal = function(){
|
8
|
+
for(var i=0; i < arguments.length; i++){
|
9
|
+
var inc = arguments[i];
|
10
|
+
if(typeof inc == 'string'){
|
11
|
+
load(inc.substr(2)+".js")
|
12
|
+
}else{
|
13
|
+
inc(steal)
|
14
|
+
}
|
15
|
+
}
|
16
|
+
return steal;
|
17
|
+
});
|
18
|
+
steal.plugins = function(){
|
19
|
+
for(var i=0; i < arguments.length; i++){
|
20
|
+
var inc = arguments[i];
|
21
|
+
if(typeof inc == 'string'){
|
22
|
+
load(inc+"/"+inc.match(/\w+$/)[0]+".js")
|
23
|
+
}else{
|
24
|
+
inc(steal)
|
25
|
+
}
|
26
|
+
}
|
27
|
+
return steal;
|
28
|
+
}
|
29
|
+
steal.extend = function(d, s) { for (var p in s) d[p] = s[p]; return d;};
|
30
|
+
|
31
|
+
steal.isArray = function(arr){
|
32
|
+
return Object.prototype.toString.call(arr) === "[object Array]"
|
33
|
+
}
|
34
|
+
steal.then = steal;
|
35
|
+
steal.inArray = function(item, arr){
|
36
|
+
var len = arr.length;
|
37
|
+
for(var i =0; i < len; i++){
|
38
|
+
if(arr[i] == item){
|
39
|
+
return i;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
return -1;
|
43
|
+
};
|
44
|
+
steal.cleanId = function( id ) {
|
45
|
+
return id.replace(/[\/\.]/g, "_");
|
46
|
+
};
|
47
|
+
steal.win = oldWindow;
|
48
|
+
if(oldSteal){
|
49
|
+
steal._steal = oldSteal;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Converts args or a string into options
|
53
|
+
* @param {Object} args
|
54
|
+
* @param {Object} options something like
|
55
|
+
* {
|
56
|
+
* name : {
|
57
|
+
* shortcut : "-n",
|
58
|
+
* args: ["first","second"]
|
59
|
+
* },
|
60
|
+
* other : 1
|
61
|
+
* }
|
62
|
+
*/
|
63
|
+
steal.opts = function(args, options){
|
64
|
+
if(typeof args == 'string'){
|
65
|
+
args = args.split(' ')
|
66
|
+
}
|
67
|
+
if(!steal.isArray(args)){
|
68
|
+
return args
|
69
|
+
}
|
70
|
+
|
71
|
+
var opts ={};
|
72
|
+
//normalizes options
|
73
|
+
(function(){
|
74
|
+
var name, val, helper
|
75
|
+
for(name in options){
|
76
|
+
val = options[name];
|
77
|
+
if(steal.isArray(val) || typeof val == 'number'){
|
78
|
+
options[name] = {args: val};
|
79
|
+
}
|
80
|
+
options[name].name = name;
|
81
|
+
//move helper
|
82
|
+
helper = options[name].helper || name.substr(0,1);
|
83
|
+
|
84
|
+
options[helper] = options[name]
|
85
|
+
}
|
86
|
+
})();
|
87
|
+
var latest, def;
|
88
|
+
for(var i =0; i < args.length;i++){
|
89
|
+
if ( args[i].indexOf('-') == 0 && (def = options[args[i].substr(1)]) ) {
|
90
|
+
latest = def.name;
|
91
|
+
opts[latest] = true;
|
92
|
+
//opts[latest] = []
|
93
|
+
}else{
|
94
|
+
if(opts[latest] === true){
|
95
|
+
opts[latest] = args[i]
|
96
|
+
}else{
|
97
|
+
if(!steal.isArray(opts[latest]) ){
|
98
|
+
opts[latest] = [opts[latest]]
|
99
|
+
}
|
100
|
+
opts[latest].push(args[i])
|
101
|
+
}
|
102
|
+
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
return opts;
|
107
|
+
}
|
108
|
+
steal.clear = function(){
|
109
|
+
var win = steal.win();
|
110
|
+
for(var n in win){
|
111
|
+
if(n != "_S"){
|
112
|
+
//this[n] = null;
|
113
|
+
delete win[n];
|
114
|
+
}
|
115
|
+
}
|
116
|
+
return steal;
|
117
|
+
}
|
118
|
+
|
119
|
+
})()
|
120
|
+
|
121
|
+
|
122
|
+
load('steal/rhino/file.js')
|