javascriptmvc 3.0.0.pre15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (550) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/README.markdown +15 -0
  4. data/Rakefile +17 -0
  5. data/VERSION +1 -0
  6. data/bin/jmvc-build +4 -0
  7. data/bin/jmvc-gen +4 -0
  8. data/bin/jmvc-get +4 -0
  9. data/bin/jmvc-init +4 -0
  10. data/bin/jmvc-update +4 -0
  11. data/lib/javascriptmvc.rb +97 -0
  12. data/lib/javascriptmvc/documentjs/README +0 -0
  13. data/lib/javascriptmvc/documentjs/add.js +76 -0
  14. data/lib/javascriptmvc/documentjs/application.js +285 -0
  15. data/lib/javascriptmvc/documentjs/attribute.js +61 -0
  16. data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
  17. data/lib/javascriptmvc/documentjs/class.js +141 -0
  18. data/lib/javascriptmvc/documentjs/constructor.js +145 -0
  19. data/lib/javascriptmvc/documentjs/directives.js +394 -0
  20. data/lib/javascriptmvc/documentjs/distance.js +49 -0
  21. data/lib/javascriptmvc/documentjs/document +21 -0
  22. data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
  23. data/lib/javascriptmvc/documentjs/file.js +55 -0
  24. data/lib/javascriptmvc/documentjs/function.js +112 -0
  25. data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
  26. data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
  27. data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
  28. data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
  29. data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
  30. data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
  31. data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
  32. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  33. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  34. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  35. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  36. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  37. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  38. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  39. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  40. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
  41. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
  42. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
  43. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
  44. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
  45. data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
  46. data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
  47. data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
  48. data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
  49. data/lib/javascriptmvc/documentjs/json.js +172 -0
  50. data/lib/javascriptmvc/documentjs/page.js +107 -0
  51. data/lib/javascriptmvc/documentjs/pair.js +302 -0
  52. data/lib/javascriptmvc/documentjs/prototype.js +13 -0
  53. data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
  54. data/lib/javascriptmvc/documentjs/static.js +25 -0
  55. data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
  56. data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
  57. data/lib/javascriptmvc/documentjs/test/something.js +8 -0
  58. data/lib/javascriptmvc/documentjs/test/test.html +6 -0
  59. data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
  60. data/lib/javascriptmvc/documentjs/update +5 -0
  61. data/lib/javascriptmvc/funcunit/README +17 -0
  62. data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
  63. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
  64. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
  65. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
  66. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
  67. data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
  68. data/lib/javascriptmvc/funcunit/build.js +54 -0
  69. data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
  70. data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
  71. data/lib/javascriptmvc/funcunit/envjs +13 -0
  72. data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
  73. data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
  74. data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
  75. data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
  76. data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
  77. data/lib/javascriptmvc/funcunit/qunit.html +22 -0
  78. data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
  79. data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
  80. data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
  81. data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
  82. data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
  83. data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
  84. data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
  85. data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
  86. data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
  87. data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
  88. data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
  89. data/lib/javascriptmvc/funcunit/settings.js +10 -0
  90. data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
  91. data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
  92. data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
  93. data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
  94. data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
  95. data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
  96. data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
  97. data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
  98. data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
  99. data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
  100. data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
  101. data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
  102. data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
  103. data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
  104. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
  105. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
  106. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
  107. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
  108. data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
  109. data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
  110. data/lib/javascriptmvc/funcunit/template.html +18 -0
  111. data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
  112. data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
  113. data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
  114. data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
  115. data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
  116. data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
  117. data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
  118. data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
  119. data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
  120. data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
  121. data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
  122. data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
  123. data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
  124. data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
  125. data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
  126. data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
  127. data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
  128. data/lib/javascriptmvc/funcunit/update +5 -0
  129. data/lib/javascriptmvc/jquery/README +24 -0
  130. data/lib/javascriptmvc/jquery/build.js +73 -0
  131. data/lib/javascriptmvc/jquery/class/class.html +109 -0
  132. data/lib/javascriptmvc/jquery/class/class.js +627 -0
  133. data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
  134. data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
  135. data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
  136. data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
  137. data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
  138. data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
  139. data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
  140. data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
  141. data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
  142. data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
  143. data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
  144. data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
  145. data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
  146. data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
  147. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
  148. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
  149. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
  150. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
  151. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
  152. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
  153. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
  154. data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
  155. data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
  156. data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
  157. data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
  158. data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
  159. data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
  160. data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
  161. data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
  162. data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
  163. data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
  164. data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
  165. data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
  166. data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
  167. data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
  168. data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
  169. data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
  170. data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
  171. data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
  172. data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
  173. data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
  174. data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
  175. data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
  176. data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
  177. data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
  178. data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
  179. data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
  180. data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
  181. data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
  182. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
  183. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
  184. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
  185. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
  186. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
  187. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
  188. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
  189. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
  190. data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
  191. data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
  192. data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
  193. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
  194. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
  195. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
  196. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
  197. data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
  198. data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
  199. data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
  200. data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
  201. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
  202. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
  203. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
  204. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
  205. data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
  206. data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
  207. data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
  208. data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
  209. data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
  210. data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
  211. data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
  212. data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
  213. data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
  214. data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
  215. data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
  216. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
  217. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
  218. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
  219. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
  220. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
  221. data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
  222. data/lib/javascriptmvc/jquery/error/background.png +0 -0
  223. data/lib/javascriptmvc/jquery/error/error.html +31 -0
  224. data/lib/javascriptmvc/jquery/error/error.js +227 -0
  225. data/lib/javascriptmvc/jquery/error/setup.js +4 -0
  226. data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
  227. data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
  228. data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
  229. data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
  230. data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
  231. data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
  232. data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
  233. data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
  234. data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
  235. data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
  236. data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
  237. data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
  238. data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
  239. data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
  240. data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
  241. data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
  242. data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
  243. data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
  244. data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
  245. data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
  246. data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
  247. data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
  248. data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
  249. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
  250. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
  251. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
  252. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
  253. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
  254. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
  255. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
  256. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
  257. data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
  258. data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
  259. data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
  260. data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
  261. data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
  262. data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
  263. data/lib/javascriptmvc/jquery/event/event.js +6 -0
  264. data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
  265. data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
  266. data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
  267. data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
  268. data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
  269. data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
  270. data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
  271. data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
  272. data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
  273. data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
  274. data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
  275. data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
  276. data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
  277. data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
  278. data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
  279. data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
  280. data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
  281. data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
  282. data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
  283. data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
  284. data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
  285. data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
  286. data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
  287. data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
  288. data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
  289. data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
  290. data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
  291. data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
  292. data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
  293. data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
  294. data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
  295. data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
  296. data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
  297. data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
  298. data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
  299. data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
  300. data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
  301. data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
  302. data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
  303. data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
  304. data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
  305. data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
  306. data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
  307. data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
  308. data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
  309. data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
  310. data/lib/javascriptmvc/jquery/generate/app +23 -0
  311. data/lib/javascriptmvc/jquery/generate/controller +21 -0
  312. data/lib/javascriptmvc/jquery/generate/model +26 -0
  313. data/lib/javascriptmvc/jquery/generate/page +20 -0
  314. data/lib/javascriptmvc/jquery/generate/plugin +20 -0
  315. data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
  316. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
  317. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
  318. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
  319. data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
  320. data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
  321. data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
  322. data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
  323. data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
  324. data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
  325. data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
  326. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
  327. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
  328. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
  329. data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
  330. data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
  331. data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
  332. data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
  333. data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
  334. data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
  335. data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
  336. data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
  337. data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
  338. data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
  339. data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
  340. data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
  341. data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
  342. data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
  343. data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
  344. data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
  345. data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
  346. data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
  347. data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
  348. data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
  349. data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
  350. data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
  351. data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
  352. data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
  353. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
  354. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
  355. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
  356. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
  357. data/lib/javascriptmvc/jquery/jquery.js +6360 -0
  358. data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
  359. data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
  360. data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
  361. data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
  362. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
  363. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
  364. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
  365. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
  366. data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
  367. data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
  368. data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
  369. data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
  370. data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
  371. data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
  372. data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
  373. data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
  374. data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
  375. data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
  376. data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
  377. data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
  378. data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
  379. data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
  380. data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
  381. data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
  382. data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
  383. data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
  384. data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
  385. data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
  386. data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
  387. data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
  388. data/lib/javascriptmvc/jquery/model/model.js +537 -0
  389. data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
  390. data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
  391. data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
  392. data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
  393. data/lib/javascriptmvc/jquery/qunit.html +15 -0
  394. data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
  395. data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
  396. data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
  397. data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
  398. data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
  399. data/lib/javascriptmvc/jquery/update +5 -0
  400. data/lib/javascriptmvc/jquery/view/compress.js +7 -0
  401. data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
  402. data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
  403. data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
  404. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
  405. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
  406. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
  407. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
  408. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
  409. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
  410. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
  411. data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
  412. data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
  413. data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
  414. data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
  415. data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
  416. data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
  417. data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
  418. data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
  419. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
  420. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
  421. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
  422. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
  423. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
  424. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
  425. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
  426. data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
  427. data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
  428. data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
  429. data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
  430. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
  431. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
  432. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
  433. data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
  434. data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
  435. data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
  436. data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
  437. data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
  438. data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
  439. data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
  440. data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
  441. data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
  442. data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
  443. data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
  444. data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
  445. data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
  446. data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
  447. data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
  448. data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
  449. data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
  450. data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
  451. data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
  452. data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
  453. data/lib/javascriptmvc/jquery/view/view.html +65 -0
  454. data/lib/javascriptmvc/jquery/view/view.js +296 -0
  455. data/lib/javascriptmvc/js +56 -0
  456. data/lib/javascriptmvc/js.bat +57 -0
  457. data/lib/javascriptmvc/steal/README +26 -0
  458. data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
  459. data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
  460. data/lib/javascriptmvc/steal/build/build.js +281 -0
  461. data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
  462. data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
  463. data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
  464. data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
  465. data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
  466. data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
  467. data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
  468. data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
  469. data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
  470. data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
  471. data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
  472. data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
  473. data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
  474. data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
  475. data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
  476. data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
  477. data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
  478. data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
  479. data/lib/javascriptmvc/steal/build/test/run.js +57 -0
  480. data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
  481. data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
  482. data/lib/javascriptmvc/steal/build/test/test.js +3 -0
  483. data/lib/javascriptmvc/steal/buildjs +21 -0
  484. data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
  485. data/lib/javascriptmvc/steal/clean/clean.js +179 -0
  486. data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
  487. data/lib/javascriptmvc/steal/clean/test.js +7 -0
  488. data/lib/javascriptmvc/steal/cleanjs +5 -0
  489. data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
  490. data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
  491. data/lib/javascriptmvc/steal/dev/dev.js +83 -0
  492. data/lib/javascriptmvc/steal/end.js +1 -0
  493. data/lib/javascriptmvc/steal/generate/app +23 -0
  494. data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
  495. data/lib/javascriptmvc/steal/generate/generate.js +211 -0
  496. data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
  497. data/lib/javascriptmvc/steal/generate/system.js +33 -0
  498. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
  499. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
  500. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
  501. data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
  502. data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
  503. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
  504. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
  505. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
  506. data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
  507. data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
  508. data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
  509. data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
  510. data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
  511. data/lib/javascriptmvc/steal/get/get.js +163 -0
  512. data/lib/javascriptmvc/steal/get/gets.json +10 -0
  513. data/lib/javascriptmvc/steal/get/getter.js +115 -0
  514. data/lib/javascriptmvc/steal/get/github.js +134 -0
  515. data/lib/javascriptmvc/steal/get/json.js +172 -0
  516. data/lib/javascriptmvc/steal/getjs +5 -0
  517. data/lib/javascriptmvc/steal/js +56 -0
  518. data/lib/javascriptmvc/steal/js.bat +57 -0
  519. data/lib/javascriptmvc/steal/less/less.js +117 -0
  520. data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
  521. data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
  522. data/lib/javascriptmvc/steal/rhino/build.js +31 -0
  523. data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
  524. data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
  525. data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
  526. data/lib/javascriptmvc/steal/rhino/file.js +299 -0
  527. data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
  528. data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
  529. data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
  530. data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
  531. data/lib/javascriptmvc/steal/rhino/test.js +16 -0
  532. data/lib/javascriptmvc/steal/steal.js +1317 -0
  533. data/lib/javascriptmvc/steal/steal.production.js +23 -0
  534. data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
  535. data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
  536. data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
  537. data/lib/javascriptmvc/steal/test/another/two.js +2 -0
  538. data/lib/javascriptmvc/steal/test/one/four.js +1 -0
  539. data/lib/javascriptmvc/steal/test/one/one.js +6 -0
  540. data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
  541. data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
  542. data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
  543. data/lib/javascriptmvc/steal/test/run.js +12 -0
  544. data/lib/javascriptmvc/steal/test/steal.html +37 -0
  545. data/lib/javascriptmvc/steal/test/test.js +82 -0
  546. data/lib/javascriptmvc/steal/test/three.js +3 -0
  547. data/lib/javascriptmvc/steal/testing/test.html +20 -0
  548. data/lib/javascriptmvc/steal/testing/testing.js +48 -0
  549. data/lib/javascriptmvc/steal/update +5 -0
  550. metadata +622 -0
@@ -0,0 +1,23 @@
1
+ (function(){if(typeof steal!="undefined"&&steal.nodeType)throw"steal is defined an element's id!";var s=window.steal,n=function(){var a=document,b=a.documentElement,c=a.getElementsByTagName("head");if(c.length>0)return c[0];a=a.createElement("head");b.insertBefore(a,b.firstChild);return a},t=function(){var a=document.createElement("script");a.type="text/javascript";return a},h=function(a,b){for(var c in b)a[c]=b[c];return a},u=function(a){return a.match(/[^\/]+$/)[0]},l={msie:!!(window.attachEvent&&
2
+ !window.opera),opera:!!window.opera,safari:navigator.userAgent.indexOf("AppleWebKit/")>-1,firefox:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,mobilesafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/),rhino:navigator.userAgent.match(/Rhino/)&&true},v=function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest},o=function(a){a=h({id:a.src&&steal.cleanId(a.src)},a);var b="",c="<script ",d;if(a.src){b=steal.File(a.src);
3
+ if(!b.isLocalAbsolute()&&!b.protocol())a.src=steal.root.join(a.src)}if(a.type&&a.process){b=steal.request(a.src);if(!b)throw"steal.js there is nothing at "+a.src;d=a.process(b);a.type="text/javascript";delete a.process;delete a.src}else if(a.type&&a.type!="text/javascript"&&!l.rhino){b=steal.request(a.src);if(!b)throw"steal.js there is nothing at "+a.src;a.text=b;delete a.src}for(var g in a)c+=g+"='"+a[g]+"' ";if(steal.support.load&&!steal.browser.rhino&&!d)c+=steal.loadErrorTimer(a);c+=">"+(d||"")+
4
+ "<\/script>";c+=steal.support.load?'<script type="text/javascript">steal.end()<\/script>':'<script type="text/javascript" src="'+steal.root.join("steal/end.js")+'"><\/script>';document.write(a.src||d?c:"")};steal=function(){for(var a=0;a<arguments.length;a++)steal.add(new steal.fn.init(arguments[a]));return steal};(function(){var a=function(b,c){c=document.createElement(c);b="on"+b;var d=b in c;if(!d){c.setAttribute(b,"return;");d=typeof c[b]==="function"}return d};steal.support={load:a("load","script"),
5
+ readystatechange:a("readystatechange","script"),error:a("readystatechange","script")}})();steal.fn=steal.prototype={init:function(a){if(typeof a=="function"){var b=steal.getCurrent();this.path=b;this.func=function(){steal.curDir(b);a(steal.send||window.jQuery||steal)};this.options=a}else{if(typeof a=="string")a=/\.js$/i.test(a)?{path:a}:{path:a+".js"};h(this,a);this.options=a;this.originalPath=this.path;var c=steal.File(this.path);this.path=c.normalize();this.absolute=this.originalPath.match(/^\/\//)?
6
+ steal.root.join(this.originalPath.substr(2)):c.relative()?c.joinFrom(steal.getAbsolutePath(),true):this.path;this.dir=steal.File(this.path).dir()}},run:function(){steal.cur(this);this.dependencies=[];var a=steal.options.env=="production",b=h({type:"text/javascript",compress:"true","package":"production.js"},h({src:this.path},this.options));if(this.func){this.func();steal.end()}else if(!a||this.force)if(this.type)o(b);else{steal.curDir(this.path);o(this.skipInsert?undefined:b)}else this.type||steal.curDir(this.path)},
7
+ runNow:function(){steal.curDir(this.path);return l.rhino?load(this.path):steal.insertHead(steal.root.join(this.path))}};steal.fn.init.prototype=steal.fn;steal.root=null;steal.pageDir=null;steal.extend=h;steal.browser=l;steal.File=function(a){if(this.constructor!=steal.File)return new steal.File(a);this.path=a};var f=steal.File;h(f.prototype,{clean:function(){return this.path.match(/([^\?#]*)/)[1]},dir:function(){var a=this.clean().lastIndexOf("/");a=a!=-1?this.clean().substring(0,a):"";var b=a!==
8
+ ""&&a.match(/^(https?:\/|file:\/)$/);return b&&b[1]?this.clean():a},domain:function(){if(this.path.indexOf("file:")===0)return null;var a=this.path.match(/^(?:https?:\/\/)([^\/]*)/);return a?a[1]:null},join:function(a){return f(a).joinFrom(this.path)},joinFrom:function(a,b){var c=f(a);if(this.protocol())return this.domain()&&this.domain()==c.domain()?this.afterDomain():this.domain()==c.domain()?this.toReferenceFromSameDomain(a):this.path;else if(a==steal.pageDir&&!b)return this.path;else if(this.isLocalAbsolute()){if(!c.domain())return this.path;
9
+ return c.protocol()+"//"+c.domain()+this.path}else{if(a==="")return this.path.replace(/\/$/,"");b=a.split("/");c=this.path.split("/");var d=c[0];for(a.match(/\/$/)&&b.pop();d==".."&&c.length>0;){c.shift();b.pop();d=c[0]}return b.concat(c).join("/")}},joinCurrent:function(){return this.joinFrom(steal.curDir())},relative:function(){return this.path.match(/^(https?:|file:|\/)/)===null},afterDomain:function(){return this.path.match(/https?:\/\/[^\/]*(.*)/)[1]},toReferenceFromSameDomain:function(a){var b=
10
+ this.path.split("/");a=a.split("/");for(var c="";b.length>0&&a.length>0&&b[0]==a[0];){b.shift();a.shift()}for(var d=0;d<a.length;d++)c+="../";return c+b.join("/")},isCrossDomain:function(){return this.isLocalAbsolute()?false:this.domain()!=f(window.location.href).domain()},isLocalAbsolute:function(){return this.path.indexOf("/")===0},protocol:function(){var a=this.path.match(/^(https?:|file:)/);return a&&a[0]},normalize:function(){var a=steal.curDir(),b=this.path;if(/^\/\//.test(this.path))b=this.path.substr(2);
11
+ else if(this.relative()||steal.isCurrentCrossDomain()&&!this.protocol())b=this.joinFrom(a);return b}});steal.pageDir=f(window.location.href).dir();steal.options={loadProduction:true,env:"development",production:null,encoding:"utf-8",cacheInclude:true,debug:true};var p=true,q=false,m="",r=null,i=[],j=[],k=[];h(steal,{setScriptOptions:function(){for(var a=document.getElementsByTagName("script"),b,c=/steal\.(production\.)?js/,d=0;d<a.length;d++){var g=a[d].src;if(g&&c.test(g)){var e=f(f(g).joinFrom(steal.pageDir)).dir();
12
+ e=/\.\.$/.test(e)?e+"/..":e.replace(/steal$/,"");if(/.+\/$/.test(e))e=e.replace(/\/$/,"");if(/steal\.production\.js/.test(g))steal.options.env="production";steal.root=f(e);if(g.indexOf("?")!=-1)b=g.split("?")[1]}}if(b)if(b.indexOf("=")>-1)b.replace(/steal\[([^\]]+)\]=([^&]+)/g,function(y,w,x){steal.options[w]=x});else{a=b.split(",");if(a[0]&&a[0].lastIndexOf(".js")>0)steal.options.startFile=a[0];else if(a[0])steal.options.app=a[0];if(steal.options.env!="production")steal.options.env=a[1]}},setOldIncludeOptions:function(){h(steal.options,
13
+ s)},setHashOptions:function(){window.location.hash.replace(/steal\[(\w+)\]=(\w+)/g,function(a,b,c){steal.options[b]=c})},init:function(){this.setScriptOptions();if(steal.browser.rhino)steal.options.env="development";this.setOldIncludeOptions();this.setHashOptions();if(steal.options.app)steal.options.startFile=steal.options.app+"/"+steal.options.app.match(/[^\/]+$/)[0]+".js";if(steal.options.ignoreControllers){steal.controllers=function(){return steal};steal.controller=function(){return steal}}if(!steal.options.production&&
14
+ steal.options.startFile)steal.options.production="//"+f(steal.options.startFile).dir()+"/production";if(steal.options.production)steal.options.production+=steal.options.production.indexOf(".js")==-1?".js":"";if(steal.options.env=="production"&&steal.options.loadProduction){if(steal.options.production){p=false;steal({path:steal.options.production,force:true})}}else{var a=steal.getCurrent();steal({path:"steal/dev/dev.js",ignore:true});steal.curDir(a);if(steal.options.startFile){p=false;steal._start=
15
+ new steal.fn.init(steal.options.startFile);steal.add(steal._start)}}steal.options.startFile&&steal.start()},curDir:function(a){if(a!==undefined){m=a;return steal}else return(a=f(m).dir())?a+(a.lastIndexOf("/")===a.length-1?"":"/"):a},cur:function(a){return a!==undefined?(r=a):r},isCurrentCrossDomain:function(){return f(steal.getAbsolutePath()).isCrossDomain()},getCurrent:function(){return m},getAbsolutePath:function(){var a=this.curDir(),b=f(this.curDir());return b.relative()?b.joinFrom(steal.root.path,
16
+ true):a},add:function(a){if(typeof a.func=="function")j.unshift(a);else{var b=steal.cur();b&&b.dependencies.push(a);if(steal.shouldAdd(a)){if(q)return a.runNow();b=a.absolute||a.path;for(var c=0;c<i.length;c++)if(i[c].absolute==b){i.splice(c,1);break}j.unshift(a)}}},shouldAdd:function(a){a=a.absolute||a.path;var b;for(b=0;b<k.length;b++)if(k[b].absolute==a)return false;for(b=0;b<j.length;b++)if(j[b].absolute==a)return false;return true},done:function(){typeof steal.options.done=="function"&&steal.options.done(k)},
17
+ end:function(){clearTimeout(steal.timer);i=i.concat(j);if(i.length){var a=i.pop();if(a){k.push(a);j=[];a.run()}else{q=true;steal.done()}}},start:function(){steal.end()},css:function(){if(steal.options.env=="production"){if(!steal.loadedProductionCSS){var a=steal.File(steal.options.production.replace(".js",".css")).normalize();a=steal.root.join(a);steal.createLink(a);steal.loadedProductionCSS=true}return steal}for(var b=0;b<arguments.length;b++){a=f(arguments[b]+".css").joinCurrent();steal.createLink(steal.root.join(a))}return this},
18
+ createLink:function(a,b){b=b||{};var c=document.createElement("link");c.rel=b.rel||"stylesheet";c.href=a;c.type=b.type||"text/css";n().appendChild(c);return c},request:function(a,b){b=b||"application/x-www-form-urlencoded; charset="+steal.options.encoding;var c=v();c.open("GET",a,false);c.setRequestHeader("Content-type",b);c.overrideMimeType&&c.overrideMimeType(b);try{c.send(null)}catch(d){return null}if(c.status===500||c.status===404||c.status===2||c.status===0&&c.responseText==="")return null;return c.responseText},
19
+ insertHead:function(a,b,c,d,g){b=b||"UTF-8";var e=t();if(a)e.src=a;if(g)e.id=g;e.charset=b;e.type=c||"text/javascript";if(d)e.text=d;n().appendChild(e)},write:function(a){document.write('<script type="text/javascript" src="'+a+'" encode="+encode+"><\/script>')},resetApp:function(a){return function(b){var c=steal.getCurrent();steal.curDir("");if(b.path)b.path=a(b.path);else b=a(b);steal(b);steal.curDir(c);return steal}},callOnArgs:function(a){return function(){for(var b=0;b<arguments.length;b++)a(arguments[b]);
20
+ return steal}},applier:function(a){return function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=typeof arguments[c]=="function"?arguments[c]:a(arguments[c]);steal.apply(null,b);return steal}},then:steal,total:k});steal.plugin=steal.resetApp(function(a){return a+"/"+u(a)});steal.packs=function(){for(var a=0;a<arguments.length;a++)typeof arguments[a]=="function"?steal(arguments[a]):steal({force:true,path:"//packages/"+arguments[a]+".js"});return this};h(steal,{plugins:steal.callOnArgs(steal.plugin),
21
+ controllers:steal.applier(function(a){if(a.match(/^\/\//))return a=steal.root.join(a.substr(2));return"controllers/"+a+"_controller"}),models:steal.applier(function(a){if(a.match(/^\/\//))return a=steal.root.join(a.substr(2));return"models/"+a}),resources:steal.applier(function(a){if(a.match(/^\/\//))return a=steal.root.join(a.substr(2));return"resources/"+a}),views:function(){if(l.rhino||steal.options.env=="production")for(var a=0;a<arguments.length;a++)steal.view(arguments[a]);return steal},timerCount:0,
22
+ view:function(a){var b=a.match(/\.\w+$/gi)[0].replace(".","");steal({path:a,type:"text/"+b,compress:"false"});return steal},timers:{},ct:function(a){clearTimeout(steal.timers[a]);delete steal.timers[a]},loadErrorTimer:function(a){var b=++steal.timerCount;steal.timers[b]=setTimeout(function(){throw"steal.js Could not load "+a.src+". Are you sure you have the right path?";},5E3);return"onLoad='steal.ct("+b+")' "},cleanId:function(a){return a.replace(/[\/\.]/g,"_")}});if(!steal.build)steal.build={types:{}};
23
+ steal.loadedProductionCSS=false;steal.init()})();
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <head>
3
+ <script type='text/javascript' src='../steal.js?steal[app]=steal/test/absoluteurl'></script>
4
+ </head>
5
+ <body>
6
+ </body>
7
+ </html>
@@ -0,0 +1 @@
1
+ steal("//steal/test/absoluteurl/alert")
@@ -0,0 +1,2 @@
1
+ order(2);
2
+ steal('../three')
@@ -0,0 +1 @@
1
+ order(4);
@@ -0,0 +1,6 @@
1
+ order(1);
2
+ steal('../another/two','four','wrong');
3
+ //something here
4
+ another = function(somevariablename){
5
+ return somevariablename *2;
6
+ };
@@ -0,0 +1,22 @@
1
+ <html>
2
+ <head>
3
+ <link rel="stylesheet" type="text/css" href="../../../funcunit/qunit/qunit.css" />
4
+ <title>QUnit Test</title>
5
+ <style>
6
+ body {
7
+ margin: 0px; padding: 0px;
8
+ }
9
+ </style>
10
+ <script type='text/javascript' src='../../../steal/steal.js?steal[app]=steal/test/qunit'></script>
11
+ </head>
12
+ <body>
13
+
14
+ <h1 id="qunit-header">Steal Test Suite</h1>
15
+ <h2 id="qunit-banner"></h2>
16
+ <div id="qunit-testrunner-toolbar"></div>
17
+ <h2 id="qunit-userAgent"></h2>
18
+ <div id="test-content"></div>
19
+ <ol id="qunit-tests"></ol>
20
+ <div id="qunit-test-area"></div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,3 @@
1
+ steal
2
+ .plugins("funcunit/qunit")
3
+ .then("steal_test")
@@ -0,0 +1,197 @@
1
+ module("steal")
2
+
3
+ test("steal's domain()", function(){
4
+ equals(null,new steal.File("file://C:/Development").domain(),"problems from file" )
5
+ equals('something.com',new steal.File('http://something.com/asfdkl;a').domain(),"something.com is the correct http domain." )
6
+ equals('127.0.0.1:3006',new steal.File('https://127.0.0.1:3006/asdf').domain(),"something.com is the correct https domain." )
7
+ })
8
+
9
+ test("steal's joinFrom()", function(){
10
+ var result;
11
+ equals(
12
+ steal.File('a/b.c').joinFrom('/d/e'), "/d/e/a/b.c", "/d/e/a/b.c is correctly joined.");
13
+
14
+ result = new steal.File('a/b.c').joinFrom('d/e');
15
+ equals(result, "d/e/a/b.c", "d/e/a/b.c is correctly joined.");
16
+
17
+ result = new steal.File('a/b.c').joinFrom('d/e/');
18
+ equals(result, "d/e/a/b.c", "d/e/a/b.c is correctly joined.");
19
+
20
+ result = new steal.File('a/b.c').joinFrom('http://abc.com');
21
+ equals(result, "http://abc.com/a/b.c", "http://abc.com/a/b.c is correctly joined.");
22
+
23
+ result = new steal.File('/a/b.c').joinFrom('http://abc.com');
24
+ equals(result, "http://abc.com/a/b.c", "http://abc.com/a/b.c is correctly joined.");
25
+
26
+ result = new steal.File('a/b.c').joinFrom('http://abc.com/');
27
+ equals(result, "http://abc.com/a/b.c", "http://abc.com/a/b.c is correctly joined.");
28
+
29
+ result = new steal.File('/a/b.c').joinFrom('http://abc.com/');
30
+ equals(result, "http://abc.com/a/b.c", "http://abc.com/a/b.c is correctly joined.");
31
+
32
+ result = new steal.File('a/b.c').joinFrom('../d/e');
33
+ equals(result, "../d/e/a/b.c", "../d/e/a/b.c is correctly joined.");
34
+
35
+ result = new steal.File('a/b.c').joinFrom('');
36
+ equals(result, "a/b.c", "a/b.c is correctly joined.");
37
+
38
+ result = new steal.File('/a/b.c').joinFrom('');
39
+ equals(result, "/a/b.c", "/a/b.c is correctly joined.");
40
+ })
41
+
42
+ test("steal's dir()", function(){
43
+ equals("/a/b/c", new steal.File("/a/b/c/cookbook.html").dir(), "/a/b/c dir is correct.")
44
+ equals("a/b/c", new steal.File("a/b/c/cookbook.html").dir(), "a/b/c dir is correct.")
45
+ equals("../a/b/c", new steal.File("../a/b/c/cookbook.html").dir(), "../a/b/c dir is correct.")
46
+ equals("http://127.0.0.1:3007", new steal.File("http://127.0.0.1:3007/cookbook.html").dir(), "http://127.0.0.1:3007 dir is correct.")
47
+ })
48
+
49
+ test("steal's File.clean()", function(){
50
+ result = new steal.File('http://abc.com#action').clean();
51
+ equals(result, "http://abc.com", "http://abc.com#action is correctly cleaned.");
52
+
53
+ result = new steal.File('http://abc.com#action&q=param').clean();
54
+ equals(result, "http://abc.com", "http://abc.com#action&q=param is correctly cleaned.");
55
+
56
+ result = new steal.File('http://abc.com/#action&q=param').clean();
57
+ equals(result, "http://abc.com/", "http://abc.com/#action&q=param is correctly cleaned.");
58
+
59
+ result = new steal.File('a/b/#action&q=param').clean();
60
+ equals(result, "a/b/", "a/b/#action&q=param is correctly cleaned.");
61
+
62
+ result = new steal.File('a/b#action&q=param').clean();
63
+ equals(result, "a/b", "a/b#action&q=param is correctly cleaned.");
64
+ })
65
+
66
+ test("steal's File.protocol()", function(){
67
+ result = new steal.File('http://abc.com').protocol();
68
+ equals(result, "http:", "http://abc.com protocol should be http:.");
69
+
70
+ result = new steal.File('https://abc.com').protocol();
71
+ equals(result, "https:", "https://abc.com protocol should be https:.");
72
+
73
+ result = new steal.File('file://a/b/c').protocol();
74
+ equals(result, "file:", "file://a/b/c protocol should be file:.");
75
+
76
+ result = new steal.File('file:///a/b/c').protocol();
77
+ equals(result, "file:", "file:///a/b/c protocol should be file:.");
78
+ })
79
+
80
+ test("steal's File.join(url)", function(){
81
+ result = new steal.File("http://abc.com").join("/a/b/c");
82
+ equals(result, "http://abc.com/a/b/c", "http://abc.com/a/b/c was joined successfuly.");
83
+
84
+ result = new steal.File("http://abc.com/").join("/a/b/c");
85
+ equals(result, "http://abc.com/a/b/c", "http://abc.com/a/b/c was joined successfuly.");
86
+
87
+ result = new steal.File("http://abc.com/").join("a/b/c");
88
+ equals(result, "http://abc.com/a/b/c", "http://abc.com/a/b/c was joined successfuly.");
89
+
90
+ result = new steal.File("http://abc.com").join("a/b/c");
91
+ equals(result, "http://abc.com/a/b/c", "http://abc.com/a/b/c was joined successfuly.");
92
+
93
+ result = new steal.File("a/b/c").join("d/e");
94
+ equals(result, "a/b/c/d/e", "a/b/c/d/e was joined successfuly.");
95
+
96
+ result = new steal.File("a/b/c/").join("d/e");
97
+ equals(result, "a/b/c/d/e", "a/b/c/d/e was joined successfuly.");
98
+
99
+ result = new steal.File("a/b/c/").join("/d/e");
100
+ equals(result, "/d/e", "/d/e was joined successfuly.");
101
+
102
+ result = new steal.File("a/b/c").join("/d/e");
103
+ equals(result, "/d/e", "/d/e was joined successfuly.");
104
+ })
105
+
106
+ test("steal's File.joinCurrent()", function(){
107
+ steal.curDir("http://abc.com");
108
+ result = new steal.File("d/e").joinCurrent();
109
+ equals(result, "http://abc.com/d/e", "http://abc.com/d/e was joined successfuly.");
110
+
111
+ steal.curDir("/a/b/");
112
+ result = new steal.File("c/d").joinCurrent();
113
+ equals(result, "/a/b/c/d", "/a/b/c/d was joined successfuly.");
114
+ })
115
+
116
+ test("steal's File.relative()", function(){
117
+ result = new steal.File("a/b/c").relative();
118
+ ok(result, "a/b/c is relative.")
119
+
120
+ result = new steal.File("/a/b/c").relative();
121
+ ok(!result, "/a/b/c is NOT relative.")
122
+ })
123
+
124
+ test("steal's File.isLocalAbsolute()", function(){
125
+ result = new steal.File("/a/b/c").isLocalAbsolute();
126
+ ok(result, "/a/b/c is absolute.")
127
+
128
+ result = new steal.File("a/b/c").isLocalAbsolute();
129
+ ok(!result, "a/b/c is NOT absolute.")
130
+ })
131
+
132
+ test("steal's File.isDomainAbsolute()", function(){
133
+ var result = new steal.File("http://abc.com/d/e").protocol();
134
+ ok(result, "http://abc.com/d/e domain is absolute.")
135
+
136
+ result = new steal.File("http://abc.com/d/e/").protocol();
137
+ ok(result, "http://abc.com/d/e/ domain is absolute.")
138
+
139
+ result = new steal.File("https://abc.com/d/e").protocol();
140
+ ok(result, "https://abc.com/d/e domain is absolute.")
141
+
142
+ result = new steal.File("https://abc.com/d/e/").protocol();
143
+ ok(result, "https://abc.com/d/e/ domain is absolute.")
144
+
145
+ result = new steal.File("file://a/b/c/d/e").protocol();
146
+ ok(result, "file://a/b/c/d/e domain is absolute.")
147
+
148
+ result = new steal.File("file://a/b/c/d/e/").protocol();
149
+ ok(result, "file://a/b/c/d/e/ domain is absolute.")
150
+
151
+ result = new steal.File("file:///a/b/c/d/e").protocol();
152
+ ok(result, "file:///a/b/c/d/e domain is absolute.");
153
+
154
+ result = new steal.File("/a/b/c/d/e").protocol();
155
+ ok(!result, "/a/b/c/d/e domain is absolute.");
156
+ })
157
+
158
+ test("steal's File.afterDomain()", function(){
159
+ result = new steal.File("http://abc.com/d/e").afterDomain();
160
+ equals(result, "/d/e", "/d/e is the correct after domain result.");
161
+ })
162
+
163
+ test("steal's File.toReferenceFromSameDomain()", function(){
164
+ result = new steal.File("http://abc.com/d/e").toReferenceFromSameDomain("http://abc.com/d/e/f/g/h");
165
+ equals(result, "../../../", "../../../ is the correct reference from same domain result.");
166
+
167
+ result = new steal.File("http://abc.com/d/e/x/y").toReferenceFromSameDomain("http://abc.com/d/e/f/g/h");
168
+ equals(result, "../../../x/y", "../../../x/y is the correct reference from same domain result.");
169
+
170
+ result = new steal.File("a/b/c/x/y").toReferenceFromSameDomain("a/b/c/d/e");
171
+ equals(result, "../../x/y", "../../x/y is the correct reference from same domain result.");
172
+
173
+ result = new steal.File("a/b/c/d/e").toReferenceFromSameDomain("a/b/c/d/e");
174
+ equals(result, "", "'' is the correct reference from same domain result.");
175
+ })
176
+
177
+ test("steal's File.normalize()", function(){
178
+ steal.curDir("/a/b/");
179
+ result = new steal.File("c/d").normalize();
180
+ equals(result, "/a/b/c/d", "/a/b/c/d was normalized successfuly.");
181
+
182
+ steal.curDir("/a/b/c");
183
+ result = new steal.File("//d/e").normalize();
184
+ equals(result, "d/e", "d/e was normalized successfuly.");
185
+
186
+ steal.curDir("/a/b/c");
187
+ result = new steal.File("/d/e").normalize();
188
+ equals(result, "/d/e", "/d/e was normalized successfuly.");
189
+
190
+ steal.curDir("http://abc.com");
191
+ result = new steal.File("d/e").normalize();
192
+ equals(result, "http://abc.com/d/e", "http://abc.com/d/e was normalized successfuly.");
193
+
194
+ steal.curDir("http://abc.com");
195
+ result = new steal.File("/d/e").normalize();
196
+ equals(result, "http://abc.com/d/e", "http://abc.com/d/e was normalized successfuly.");
197
+ })
@@ -0,0 +1,12 @@
1
+ // load('steal/test/run.js')
2
+
3
+ /**
4
+ * Steal qunit tests
5
+ */
6
+
7
+ load('steal/test/helpers.js')
8
+ _S.clear();
9
+
10
+ load('settings.js')
11
+ load('funcunit/funcunit.js')
12
+ Funcunit.runTest('steal/test/qunit/qunit.html')
@@ -0,0 +1,37 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
+ "http://www.w3.org/TR/html4/strict.dtd">
3
+ <html lang="en">
4
+ <head>
5
+ <title>steal</title>
6
+ <style type='text/css'>
7
+ body {font-family: verdana}
8
+ .error {border: solid 1px red;}
9
+ .error_text { color: red; font-size: 10px;}
10
+ td {padding: 3px;}
11
+ </style>
12
+ </head>
13
+ <body>
14
+ <script type='text/javascript'>
15
+ var order_num = 0;
16
+ order = function(o){
17
+ var p = document.createElement('p');
18
+ if (typeof o == 'number') {
19
+ p.style.backgroundColor = o == order_num ? '#ddffdd' : '#ffdddd'
20
+ p.innerHTML = '' + o + '=' + (order_num++) + ': ' + steal.getCurrent() + ', ' + steal.current.path;
21
+ }else{
22
+ p.innerHTML = o
23
+ }
24
+ document.body.appendChild(p)
25
+ }
26
+ window.onload = function(){
27
+ var p = document.createElement('p');
28
+ p.style.backgroundColor = '#ffdddd'
29
+ p.innerHTML = 'load'
30
+ document.body.appendChild(p)
31
+ }
32
+ </script>
33
+ <script type='text/javascript'
34
+ src='../steal.js?steal[app]=steal/test/one&steal[env]=development'>
35
+ </script>
36
+ </body>
37
+ </html>
@@ -0,0 +1,82 @@
1
+ steal(function(steal){
2
+
3
+ steal.test = {
4
+ //clears every property fromt he window, returns steal (might return old stuff)
5
+ clear: function() {
6
+ var win = this.getWindow();
7
+ for(var n in win){
8
+ if(n != "_S"){
9
+ //this[n] = null;
10
+ delete win[n];
11
+ }
12
+ }
13
+ this.testNamespace();
14
+ return steal;
15
+ },
16
+ getWindow: function() {
17
+ return (function(){return this}).call(null,0)
18
+ },
19
+ wait: function( name ) {
20
+ var checkExists = function(name){
21
+ var parts = name.split(".");
22
+ var cur = this;
23
+ for(var i =0; i < parts.length; i++){
24
+ if(! cur[parts[i]] ){
25
+ return false;
26
+ }else
27
+ cur = cur[parts[i]];
28
+ }
29
+ return true;
30
+ }
31
+ while(!checkExists(name)){
32
+ java.lang.Thread.currentThread().sleep(300);
33
+ }
34
+ },
35
+ sleep: function( duration ){
36
+ java.lang.Thread.currentThread().sleep(duration);
37
+ },
38
+ print: function() {
39
+ var win =this.getWindow();
40
+ for(var n in win) print(n);
41
+ },
42
+ deleteDir: function( dir ) {
43
+ if (dir.isDirectory()) {
44
+ var children = dir.list();
45
+ for (var i=0; i<children.length; i++) {
46
+ var success = deleteDir(new java.io.File(dir, children[i]));
47
+ if (!success) return false;
48
+
49
+ }
50
+ }
51
+
52
+ // The directory is now empty so delete it
53
+ return dir['delete']();
54
+ },
55
+ remove: function() {
56
+ for(var i=0; i < arguments.length; i++){
57
+ this.deleteDir(new java.io.File(arguments[i]) )
58
+ }
59
+ },
60
+ testNamespace: function() {
61
+ var win = this.getWindow();
62
+ for(var n in win) {
63
+ if(n !== "_S")
64
+ throw "Namespace Pollution";
65
+ }
66
+ },
67
+ equals: function( a, b, message ) {
68
+ if(a !== b)
69
+ throw ""+a+"!="+b+":"+message
70
+ },
71
+ ok: function( v, message ) {
72
+ if(!v){
73
+ throw "not "+v+" "+message
74
+ }
75
+ },
76
+ open: function( src ) {
77
+ load("steal/rhino/env.js");
78
+ Envjs(src, {scriptTypes : {"text/javascript" : true,"text/envjs" : true}, fireLoad: true, logLevel: 2});
79
+ }
80
+ }
81
+
82
+ })
@@ -0,0 +1,3 @@
1
+ steal(function(){
2
+ order(3)
3
+ });
@@ -0,0 +1,20 @@
1
+ <html>
2
+ <head>
3
+ <link rel="stylesheet" type="text/css" href="../test/qunit/qunit.css" />
4
+ <style>
5
+ body {
6
+ margin: 0px; padding: 0px;
7
+ }
8
+ </style>
9
+ </head>
10
+ <body>
11
+
12
+ <h1 id="qunit-header">StealTest</h1>
13
+ <h2 id="qunit-banner"></h2>
14
+ <div id="qunit-testrunner-toolbar"></div>
15
+ <h2 id="qunit-userAgent"></h2>
16
+ <ol id="qunit-tests"></ol>
17
+
18
+ <script type='text/javascript' src='../steal.js?steal[app]=steal/testing'></script>
19
+ </body>
20
+ </html>
@@ -0,0 +1,48 @@
1
+ steal.plugins('steal/test/qunit').then(function(){
2
+
3
+ test("join relative", function(){
4
+
5
+ //ok("true")
6
+
7
+ equals(new steal.File("a/b/c").joinFrom("d/e"), "d/e/a/b/c", " A relative joinFrom" )
8
+ equals(new steal.File("d/e").join("a/b/c"), "d/e/a/b/c", " A relative join" )
9
+
10
+ equals(new steal.File("d/e").join("//a/b/c"), "a/b/c", " A // join" )
11
+
12
+ equals(new steal.File("d/e").join("/a/b/c"), "/a/b/c", " A / join" )
13
+
14
+ equals(new steal.File("d/e").join("http://javascriptmvc.com/a/b/c"), "http://javascriptmvc.com/a/b/c", " A domain join " )
15
+
16
+ equals(new steal.File("d/e").join("http://javascriptmvc.com/a/b/c"), "http://javascriptmvc.com/a/b/c", " A file join " )
17
+
18
+ equals(new steal.File("../d/e").join("a/b/c"), "../d/e/a/b/c", " A join from a left .." )
19
+
20
+ equals(new steal.File("d/e").join("../a/b/c"), "d/a/b/c", " A join with a left .." )
21
+
22
+ equals(new steal.File("d").join("../a/b/c"), "a/b/c", " A join with a left .." )
23
+
24
+ equals(new steal.File("d").join("../../a/b/c"), "../a/b/c", " A join with a left .." )
25
+
26
+
27
+
28
+ equals(new steal.File("/d").join("../a/b/c"), "/a/b/c", " A join with a left .. on a /" )
29
+
30
+ equals(new steal.File("http://abc.com/d").join("../a/b/c"), "http://abc.com/a/b/c", " A join with a left .. on a domain" )
31
+
32
+
33
+ equals(new steal.File("file:///c:/users/Jupiter").join("../a/b/c"), "file:///c:/users/a/b/c", " A join with a left .. on a file" )
34
+
35
+
36
+ equals(new steal.File("file:///c:/users/Jupiter").join("file:///c:/users/Jupiter/a/b"), "a/b", " A join with a left .. on a file" )
37
+
38
+
39
+ equals(new steal.File("a/b").join("http://google.com/here"), "http://google.com/here", "A join with a domain" )
40
+ // a //
41
+ // a /
42
+ // another domain
43
+ // something with ../../.
44
+
45
+ })
46
+
47
+
48
+ })