sproutit-sproutcore 1.0.0.20090407205609 → 1.0.0.20090408130025

Sign up to get free protection for your applications and to get access to all the features.
Files changed (574) hide show
  1. data/frameworks/sproutcore/Buildfile +63 -0
  2. data/frameworks/sproutcore/HISTORY +682 -0
  3. data/frameworks/sproutcore/README +22 -0
  4. data/frameworks/sproutcore/apps/sc_jsdoc/controllers/docs.js +149 -0
  5. data/frameworks/sproutcore/apps/sc_jsdoc/core.js +16 -0
  6. data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/body.css +17 -0
  7. data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/body.js +99 -0
  8. data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/images/sproutcore-logo.png +0 -0
  9. data/frameworks/sproutcore/apps/sc_jsdoc/english.lproj/strings.js +15 -0
  10. data/frameworks/sproutcore/apps/sc_jsdoc/main.js +27 -0
  11. data/frameworks/sproutcore/apps/sc_jsdoc/models/doc.js +21 -0
  12. data/frameworks/sproutcore/apps/sc_qunit/controllers/runner.js +209 -0
  13. data/frameworks/sproutcore/apps/sc_qunit/core.js +16 -0
  14. data/frameworks/sproutcore/apps/sc_qunit/english.lproj/body.css +17 -0
  15. data/frameworks/sproutcore/apps/sc_qunit/english.lproj/body.js +107 -0
  16. data/frameworks/sproutcore/apps/sc_qunit/english.lproj/images/sproutcore-logo.png +0 -0
  17. data/frameworks/sproutcore/apps/sc_qunit/english.lproj/strings.js +15 -0
  18. data/frameworks/sproutcore/apps/sc_qunit/main.js +18 -0
  19. data/frameworks/sproutcore/apps/sc_qunit/models/test.js +24 -0
  20. data/frameworks/sproutcore/apps/sc_qunit/views/test_iframe.js +52 -0
  21. data/frameworks/sproutcore/apps/tests/controllers/targets.js +47 -0
  22. data/frameworks/sproutcore/apps/tests/controllers/test.js +20 -0
  23. data/frameworks/sproutcore/apps/tests/controllers/tests.js +38 -0
  24. data/frameworks/sproutcore/apps/tests/core.js +35 -0
  25. data/frameworks/sproutcore/apps/tests/english.lproj/loading.rhtml +9 -0
  26. data/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +19 -0
  27. data/frameworks/sproutcore/apps/tests/english.lproj/main_page.js +86 -0
  28. data/frameworks/sproutcore/apps/tests/english.lproj/strings.js +17 -0
  29. data/frameworks/sproutcore/apps/tests/fixtures/target.js +43 -0
  30. data/frameworks/sproutcore/apps/tests/fixtures/test.js +43 -0
  31. data/frameworks/sproutcore/apps/tests/main.js +39 -0
  32. data/frameworks/sproutcore/apps/tests/models/target.js +49 -0
  33. data/frameworks/sproutcore/apps/tests/models/test.js +20 -0
  34. data/frameworks/sproutcore/apps/tests/tests/controllers/targets.js +15 -0
  35. data/frameworks/sproutcore/apps/tests/tests/controllers/test.js +15 -0
  36. data/frameworks/sproutcore/apps/tests/tests/controllers/tests.js +15 -0
  37. data/frameworks/sproutcore/apps/tests/tests/models/target.js +15 -0
  38. data/frameworks/sproutcore/apps/tests/tests/models/test.js +15 -0
  39. data/frameworks/sproutcore/apps/welcome/core.js +23 -0
  40. data/frameworks/sproutcore/apps/welcome/english.lproj/loading.rhtml +8 -0
  41. data/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +43 -0
  42. data/frameworks/sproutcore/apps/welcome/english.lproj/strings.js +15 -0
  43. data/frameworks/sproutcore/apps/welcome/main.js +36 -0
  44. data/frameworks/sproutcore/design/Design Charts.graffle +15819 -0
  45. data/frameworks/sproutcore/design/Record State Table.numbers +0 -0
  46. data/frameworks/sproutcore/frameworks/datastore/core.js +14 -0
  47. data/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +113 -0
  48. data/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +256 -0
  49. data/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +196 -0
  50. data/frameworks/sproutcore/frameworks/datastore/debug/json.js +71 -0
  51. data/frameworks/sproutcore/frameworks/datastore/debug/standard_setup.js +96 -0
  52. data/frameworks/sproutcore/frameworks/datastore/fixtures/author_fixtures.js +2503 -0
  53. data/frameworks/sproutcore/frameworks/datastore/fixtures/sample.js +17 -0
  54. data/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +92 -0
  55. data/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +38 -0
  56. data/frameworks/sproutcore/frameworks/datastore/models/record.js +430 -0
  57. data/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +361 -0
  58. data/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +305 -0
  59. data/frameworks/sproutcore/frameworks/datastore/system/query.js +128 -0
  60. data/frameworks/sproutcore/frameworks/datastore/system/record_array.js +149 -0
  61. data/frameworks/sproutcore/frameworks/datastore/system/store.js +1689 -0
  62. data/frameworks/sproutcore/frameworks/datastore/tests/data_sources/fixtures.js +86 -0
  63. data/frameworks/sproutcore/frameworks/datastore/tests/integration/contact_model.js +114 -0
  64. data/frameworks/sproutcore/frameworks/datastore/tests/integration/mail_model.js +91 -0
  65. data/frameworks/sproutcore/frameworks/datastore/tests/integration/test_runner_model.js +56 -0
  66. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/destroy.js +73 -0
  67. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/readAttribute.js +48 -0
  68. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/refresh.js +42 -0
  69. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/storeDidChangeProperties.js +138 -0
  70. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +46 -0
  71. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +71 -0
  72. data/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +115 -0
  73. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +40 -0
  74. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChanges.js +116 -0
  75. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +135 -0
  76. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/dataHashDidChange.js +110 -0
  77. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/discardChanges.js +99 -0
  78. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readDataHash.js +180 -0
  79. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/readEditableDataHash.js +126 -0
  80. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/removeDataHash.js +163 -0
  81. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/writeDataHash.js +166 -0
  82. data/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +175 -0
  83. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/cancelRecord.js +54 -0
  84. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +126 -0
  85. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +127 -0
  86. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/createRecord.js +57 -0
  87. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +78 -0
  88. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +247 -0
  89. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/destroyRecord.js +106 -0
  90. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/init.js +21 -0
  91. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushChanges.js +61 -0
  92. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/readDataHash.js +74 -0
  93. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/readEditableDataHash.js +74 -0
  94. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/recordDidChange.js +74 -0
  95. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/removeDataHash.js +144 -0
  96. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/retrieveRecord.js +137 -0
  97. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/writeDataHash.js +130 -0
  98. data/frameworks/sproutcore/frameworks/debug/core.js +1 -0
  99. data/frameworks/sproutcore/frameworks/deprecated/core.js +61 -0
  100. data/frameworks/sproutcore/frameworks/deprecated/lib/button_views.rb +330 -0
  101. data/frameworks/sproutcore/frameworks/deprecated/lib/collection_view.rb +83 -0
  102. data/frameworks/sproutcore/frameworks/deprecated/lib/core_views.rb +326 -0
  103. data/frameworks/sproutcore/frameworks/deprecated/lib/form_views.rb +253 -0
  104. data/frameworks/sproutcore/frameworks/deprecated/lib/index.rhtml +75 -0
  105. data/frameworks/sproutcore/frameworks/deprecated/lib/menu_views.rb +93 -0
  106. data/frameworks/sproutcore/frameworks/deprecated/server/rails_server.js +80 -0
  107. data/frameworks/sproutcore/frameworks/deprecated/server/rest_server.js +178 -0
  108. data/frameworks/sproutcore/frameworks/deprecated/server/server.js +674 -0
  109. data/frameworks/sproutcore/frameworks/deprecated/system/animator.js +679 -0
  110. data/frameworks/sproutcore/frameworks/deprecated/system/binding.js +36 -0
  111. data/frameworks/sproutcore/frameworks/deprecated/system/browser.js +77 -0
  112. data/frameworks/sproutcore/frameworks/deprecated/system/classic_responder.js +314 -0
  113. data/frameworks/sproutcore/frameworks/deprecated/system/event.js +60 -0
  114. data/frameworks/sproutcore/frameworks/deprecated/system/globals.js +20 -0
  115. data/frameworks/sproutcore/frameworks/deprecated/system/misc.js +60 -0
  116. data/frameworks/sproutcore/frameworks/deprecated/system/node_descriptor.js +72 -0
  117. data/frameworks/sproutcore/frameworks/deprecated/system/object.js +124 -0
  118. data/frameworks/sproutcore/frameworks/deprecated/system/path_module.js +433 -0
  119. data/frameworks/sproutcore/frameworks/deprecated/system/string.js +109 -0
  120. data/frameworks/sproutcore/frameworks/deprecated/tests/application/application.rhtml +125 -0
  121. data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/clippingFrame.rhtml +401 -0
  122. data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/frame.rhtml +357 -0
  123. data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/isVisibleInWindow.rhtml +147 -0
  124. data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/base.rhtml +298 -0
  125. data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/incremental_rendering.rhtml +260 -0
  126. data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/source_list_rendering.rhtml +143 -0
  127. data/frameworks/sproutcore/frameworks/deprecated/tests/views/popup_button.rhtml +128 -0
  128. data/frameworks/sproutcore/frameworks/deprecated/tests/views/text_field.rhtml +37 -0
  129. data/frameworks/sproutcore/frameworks/deprecated/views/collection.js +24 -0
  130. data/frameworks/sproutcore/frameworks/designer/coders/design.js +30 -0
  131. data/frameworks/sproutcore/frameworks/designer/coders/localization.js +28 -0
  132. data/frameworks/sproutcore/frameworks/designer/coders/object.js +347 -0
  133. data/frameworks/sproutcore/frameworks/designer/controllers/page_design.js +102 -0
  134. data/frameworks/sproutcore/frameworks/designer/css/css_rule.js +22 -0
  135. data/frameworks/sproutcore/frameworks/designer/css/css_style.js +29 -0
  136. data/frameworks/sproutcore/frameworks/designer/css/css_style_sheet.js +201 -0
  137. data/frameworks/sproutcore/frameworks/designer/ext/page.js +88 -0
  138. data/frameworks/sproutcore/frameworks/designer/ext/view.js +40 -0
  139. data/frameworks/sproutcore/frameworks/designer/views/controls/button.js +18 -0
  140. data/frameworks/sproutcore/frameworks/designer/views/designer.js +553 -0
  141. data/frameworks/sproutcore/frameworks/designer/views/label.js +17 -0
  142. data/frameworks/sproutcore/frameworks/designer/views/mixins/button.js +13 -0
  143. data/frameworks/sproutcore/frameworks/designer/views/tab.js +17 -0
  144. data/frameworks/sproutcore/frameworks/desktop/core.js +6 -0
  145. data/frameworks/sproutcore/frameworks/desktop/debug/drag.js +41 -0
  146. data/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +56 -0
  147. data/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/a_sample_image.jpg +0 -0
  148. data/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/apple-logo1.jpeg +0 -0
  149. data/frameworks/sproutcore/frameworks/desktop/english.lproj/debug/iframe.html +23 -0
  150. data/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +71 -0
  151. data/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +943 -0
  152. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/blank.gif +0 -0
  153. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_222222.png +0 -0
  154. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_454545.png +0 -0
  155. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_888888.png +0 -0
  156. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/mini_ffffff.png +0 -0
  157. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
  158. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/indicator.gif +0 -0
  159. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/panels/sprite-x.png +0 -0
  160. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/panels/sprite-y.png +0 -0
  161. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/sc-theme-sprite.png +0 -0
  162. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/standard_fade/000000.png +0 -0
  163. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/standard_fade/ffffff.png +0 -0
  164. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/sticky-note.png +0 -0
  165. data/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +156 -0
  166. data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +83 -0
  167. data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +99 -0
  168. data/frameworks/sproutcore/frameworks/desktop/english.lproj/palette.css +3 -0
  169. data/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +94 -0
  170. data/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +39 -0
  171. data/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +31 -0
  172. data/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +10 -0
  173. data/frameworks/sproutcore/frameworks/desktop/english.lproj/scroller.css +26 -0
  174. data/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +141 -0
  175. data/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +19 -0
  176. data/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +57 -0
  177. data/frameworks/sproutcore/frameworks/desktop/english.lproj/split.css +70 -0
  178. data/frameworks/sproutcore/frameworks/desktop/english.lproj/split_divider.css +8 -0
  179. data/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +14 -0
  180. data/frameworks/sproutcore/frameworks/desktop/english.lproj/tab.css +12 -0
  181. data/frameworks/sproutcore/frameworks/desktop/english.lproj/text_field.css +29 -0
  182. data/frameworks/sproutcore/frameworks/desktop/english.lproj/toolbar.css +6 -0
  183. data/frameworks/sproutcore/frameworks/desktop/mixins/border.js +53 -0
  184. data/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +22 -0
  185. data/frameworks/sproutcore/frameworks/desktop/mixins/collection_item.js +22 -0
  186. data/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +226 -0
  187. data/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +247 -0
  188. data/frameworks/sproutcore/frameworks/desktop/panes/alert.js +377 -0
  189. data/frameworks/sproutcore/frameworks/desktop/panes/menu.js +504 -0
  190. data/frameworks/sproutcore/frameworks/desktop/panes/modal.js +68 -0
  191. data/frameworks/sproutcore/frameworks/desktop/panes/palette.js +63 -0
  192. data/frameworks/sproutcore/frameworks/desktop/panes/panel.js +184 -0
  193. data/frameworks/sproutcore/frameworks/desktop/panes/picker.js +402 -0
  194. data/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +46 -0
  195. data/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +39 -0
  196. data/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +81 -0
  197. data/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +175 -0
  198. data/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +280 -0
  199. data/frameworks/sproutcore/frameworks/desktop/system/drag.js +721 -0
  200. data/frameworks/sproutcore/frameworks/desktop/system/key_bindings.js +40 -0
  201. data/frameworks/sproutcore/frameworks/desktop/system/root_responder.js +641 -0
  202. data/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +187 -0
  203. data/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +43 -0
  204. data/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/methods.js +10 -0
  205. data/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +152 -0
  206. data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +10 -0
  207. data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +57 -0
  208. data/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/methods.js +10 -0
  209. data/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js +36 -0
  210. data/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +10 -0
  211. data/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +40 -0
  212. data/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/methods.js +10 -0
  213. data/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +80 -0
  214. data/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/methods.js +10 -0
  215. data/frameworks/sproutcore/frameworks/desktop/tests/panes/sheet/ui.js +38 -0
  216. data/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -0
  217. data/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +140 -0
  218. data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +145 -0
  219. data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/ui.js +99 -0
  220. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/methods.js +10 -0
  221. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +39 -0
  222. data/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/methods.js +10 -0
  223. data/frameworks/sproutcore/frameworks/desktop/tests/views/disclosure/ui.js +64 -0
  224. data/frameworks/sproutcore/frameworks/desktop/tests/views/grid/methods.js +10 -0
  225. data/frameworks/sproutcore/frameworks/desktop/tests/views/grid/ui.js +10 -0
  226. data/frameworks/sproutcore/frameworks/desktop/tests/views/list/methods.js +10 -0
  227. data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui.js +110 -0
  228. data/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +255 -0
  229. data/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/methods.js +10 -0
  230. data/frameworks/sproutcore/frameworks/desktop/tests/views/menu_item/ui.js +44 -0
  231. data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/methods.js +128 -0
  232. data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +240 -0
  233. data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +113 -0
  234. data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/ui.js +202 -0
  235. data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/methods.js +139 -0
  236. data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +111 -0
  237. data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/methods.js +63 -0
  238. data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/ui.js +70 -0
  239. data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +94 -0
  240. data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +206 -0
  241. data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +81 -0
  242. data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/ui.js +85 -0
  243. data/frameworks/sproutcore/frameworks/desktop/tests/views/separator.js +37 -0
  244. data/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/methods.js +10 -0
  245. data/frameworks/sproutcore/frameworks/desktop/tests/views/source_list/ui.js +10 -0
  246. data/frameworks/sproutcore/frameworks/desktop/tests/views/split/methods.js +50 -0
  247. data/frameworks/sproutcore/frameworks/desktop/tests/views/split/ui.js +52 -0
  248. data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +54 -0
  249. data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +88 -0
  250. data/frameworks/sproutcore/frameworks/desktop/tests/views/text_field/methods.js +76 -0
  251. data/frameworks/sproutcore/frameworks/desktop/tests/views/text_field/ui.js +198 -0
  252. data/frameworks/sproutcore/frameworks/desktop/tests/views/web/methods.js +10 -0
  253. data/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +110 -0
  254. data/frameworks/sproutcore/frameworks/desktop/views/button.js +320 -0
  255. data/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +98 -0
  256. data/frameworks/sproutcore/frameworks/desktop/views/collection.js +2141 -0
  257. data/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +44 -0
  258. data/frameworks/sproutcore/frameworks/desktop/views/form.js +595 -0
  259. data/frameworks/sproutcore/frameworks/desktop/views/grid.js +199 -0
  260. data/frameworks/sproutcore/frameworks/desktop/views/list.js +706 -0
  261. data/frameworks/sproutcore/frameworks/desktop/views/list_item.js +523 -0
  262. data/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +437 -0
  263. data/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +62 -0
  264. data/frameworks/sproutcore/frameworks/desktop/views/progress.js +207 -0
  265. data/frameworks/sproutcore/frameworks/desktop/views/radio.js +332 -0
  266. data/frameworks/sproutcore/frameworks/desktop/views/scene.js +56 -0
  267. data/frameworks/sproutcore/frameworks/desktop/views/scroll.js +648 -0
  268. data/frameworks/sproutcore/frameworks/desktop/views/scroller.js +203 -0
  269. data/frameworks/sproutcore/frameworks/desktop/views/segmented.js +509 -0
  270. data/frameworks/sproutcore/frameworks/desktop/views/select_field.js +292 -0
  271. data/frameworks/sproutcore/frameworks/desktop/views/separator.js +37 -0
  272. data/frameworks/sproutcore/frameworks/desktop/views/slider.js +178 -0
  273. data/frameworks/sproutcore/frameworks/desktop/views/source_list.js +1117 -0
  274. data/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +169 -0
  275. data/frameworks/sproutcore/frameworks/desktop/views/split.js +651 -0
  276. data/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +55 -0
  277. data/frameworks/sproutcore/frameworks/desktop/views/tab.js +190 -0
  278. data/frameworks/sproutcore/frameworks/desktop/views/text_field.js +233 -0
  279. data/frameworks/sproutcore/frameworks/desktop/views/thumb.js +49 -0
  280. data/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +49 -0
  281. data/frameworks/sproutcore/frameworks/desktop/views/web.js +86 -0
  282. data/frameworks/sproutcore/frameworks/foundation/TESTING +46 -0
  283. data/frameworks/sproutcore/frameworks/foundation/controllers/array.js +490 -0
  284. data/frameworks/sproutcore/frameworks/foundation/controllers/controller.js +317 -0
  285. data/frameworks/sproutcore/frameworks/foundation/controllers/object.js +421 -0
  286. data/frameworks/sproutcore/frameworks/foundation/core.js +111 -0
  287. data/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +172 -0
  288. data/frameworks/sproutcore/frameworks/foundation/english.lproj/blank.gif +0 -0
  289. data/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +53 -0
  290. data/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +55 -0
  291. data/frameworks/sproutcore/frameworks/foundation/english.lproj/core.css +5 -0
  292. data/frameworks/sproutcore/frameworks/foundation/english.lproj/debug/control-test-pane.css +8 -0
  293. data/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore-logo.png +0 -0
  294. data/frameworks/sproutcore/frameworks/foundation/english.lproj/static_layout.css +5 -0
  295. data/frameworks/sproutcore/frameworks/foundation/english.lproj/view.css +40 -0
  296. data/frameworks/sproutcore/frameworks/foundation/ext/object.js +81 -0
  297. data/frameworks/sproutcore/frameworks/foundation/ext/run_loop.js +158 -0
  298. data/frameworks/sproutcore/frameworks/foundation/fixtures/file_exists.json +1 -0
  299. data/frameworks/sproutcore/frameworks/foundation/mixins/button.js +291 -0
  300. data/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +88 -0
  301. data/frameworks/sproutcore/frameworks/foundation/mixins/control.js +352 -0
  302. data/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +146 -0
  303. data/frameworks/sproutcore/frameworks/foundation/mixins/responder.js +156 -0
  304. data/frameworks/sproutcore/frameworks/foundation/mixins/selection_support.js +154 -0
  305. data/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +101 -0
  306. data/frameworks/sproutcore/frameworks/foundation/mixins/string.js +237 -0
  307. data/frameworks/sproutcore/frameworks/foundation/mixins/validatable.js +176 -0
  308. data/frameworks/sproutcore/frameworks/foundation/panes/main.js +47 -0
  309. data/frameworks/sproutcore/frameworks/foundation/panes/pane.js +555 -0
  310. data/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +84 -0
  311. data/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +244 -0
  312. data/frameworks/sproutcore/frameworks/foundation/system/browser.js +64 -0
  313. data/frameworks/sproutcore/frameworks/foundation/system/builder.js +210 -0
  314. data/frameworks/sproutcore/frameworks/foundation/system/core_query.js +2015 -0
  315. data/frameworks/sproutcore/frameworks/foundation/system/cursor.js +129 -0
  316. data/frameworks/sproutcore/frameworks/foundation/system/error.js +93 -0
  317. data/frameworks/sproutcore/frameworks/foundation/system/event.js +817 -0
  318. data/frameworks/sproutcore/frameworks/foundation/system/image_cache.js +433 -0
  319. data/frameworks/sproutcore/frameworks/foundation/system/json.js +440 -0
  320. data/frameworks/sproutcore/frameworks/foundation/system/locale.js +288 -0
  321. data/frameworks/sproutcore/frameworks/foundation/system/page.js +106 -0
  322. data/frameworks/sproutcore/frameworks/foundation/system/ready.js +189 -0
  323. data/frameworks/sproutcore/frameworks/foundation/system/render_context.js +865 -0
  324. data/frameworks/sproutcore/frameworks/foundation/system/request.js +255 -0
  325. data/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +368 -0
  326. data/frameworks/sproutcore/frameworks/foundation/system/routes.js +446 -0
  327. data/frameworks/sproutcore/frameworks/foundation/system/time.js +478 -0
  328. data/frameworks/sproutcore/frameworks/foundation/system/timer.js +549 -0
  329. data/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +158 -0
  330. data/frameworks/sproutcore/frameworks/foundation/system/utils.js +330 -0
  331. data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array.js +118 -0
  332. data/frameworks/sproutcore/frameworks/foundation/tests/controllers/controller.js +268 -0
  333. data/frameworks/sproutcore/frameworks/foundation/tests/controllers/object.js +433 -0
  334. data/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/methods.js +10 -0
  335. data/frameworks/sproutcore/frameworks/foundation/tests/debug/control_test_pane/ui.js +113 -0
  336. data/frameworks/sproutcore/frameworks/foundation/tests/integration/creating_views.js +113 -0
  337. data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/content.js +195 -0
  338. data/frameworks/sproutcore/frameworks/foundation/tests/mixins/button/displayProperties.js +89 -0
  339. data/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/content.js +168 -0
  340. data/frameworks/sproutcore/frameworks/foundation/tests/mixins/control/displayProperties.js +89 -0
  341. data/frameworks/sproutcore/frameworks/foundation/tests/system/builder.js +42 -0
  342. data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +1323 -0
  343. data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +387 -0
  344. data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +405 -0
  345. data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +49 -0
  346. data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/within.js +66 -0
  347. data/frameworks/sproutcore/frameworks/foundation/tests/system/error.js +41 -0
  348. data/frameworks/sproutcore/frameworks/foundation/tests/system/json.js +14 -0
  349. data/frameworks/sproutcore/frameworks/foundation/tests/system/locale.js +128 -0
  350. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/begin.js +47 -0
  351. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/element.js +44 -0
  352. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/end.js +119 -0
  353. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/get.js +51 -0
  354. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_attr.js +50 -0
  355. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_basic.js +28 -0
  356. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_className.js +179 -0
  357. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_style.js +100 -0
  358. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/init.js +55 -0
  359. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/join.js +28 -0
  360. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/push_text.js +74 -0
  361. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/tag.js +45 -0
  362. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/update.js +205 -0
  363. data/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +89 -0
  364. data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeKeyPane.js +124 -0
  365. data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/makeMainPane.js +68 -0
  366. data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/root_responder.js +97 -0
  367. data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/targetForAction.js +238 -0
  368. data/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +33 -0
  369. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invalidate.js +38 -0
  370. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/invokeLater.js +201 -0
  371. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/isPaused.js +71 -0
  372. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/performAction.js +67 -0
  373. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/schedule.js +170 -0
  374. data/frameworks/sproutcore/frameworks/foundation/tests/system/user_defaults.js +27 -0
  375. data/frameworks/sproutcore/frameworks/foundation/tests/system/utils/normalizeURL.js +18 -0
  376. data/frameworks/sproutcore/frameworks/foundation/tests/system/utils/range.js +62 -0
  377. data/frameworks/sproutcore/frameworks/foundation/tests/validators/credit_card.js +35 -0
  378. data/frameworks/sproutcore/frameworks/foundation/tests/validators/date.js +21 -0
  379. data/frameworks/sproutcore/frameworks/foundation/tests/validators/number.js +47 -0
  380. data/frameworks/sproutcore/frameworks/foundation/tests/validators/password.js +13 -0
  381. data/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +10 -0
  382. data/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +83 -0
  383. data/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +39 -0
  384. data/frameworks/sproutcore/frameworks/foundation/tests/views/main_pane.js +31 -0
  385. data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/append_remove.js +89 -0
  386. data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/firstResponder.js +148 -0
  387. data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/keyPane.js +133 -0
  388. data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/sendEvent.js +165 -0
  389. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/clippingFrame.js +132 -0
  390. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/convertFrames.js +246 -0
  391. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/createChildViews.js +87 -0
  392. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/createLayer.js +97 -0
  393. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/destroyLayer.js +85 -0
  394. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/findLayerInParentLayer.js +52 -0
  395. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/init.js +50 -0
  396. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/insertBefore.js +200 -0
  397. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/isVisibleInWindow.js +102 -0
  398. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layer.js +150 -0
  399. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutChildViews.js +162 -0
  400. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutDidChange.js +127 -0
  401. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutStyle.js +248 -0
  402. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/parentViewDidChange.js +67 -0
  403. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/prepareContext.js +166 -0
  404. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/removeChild.js +189 -0
  405. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/render.js +83 -0
  406. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/replaceChild.js +29 -0
  407. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayer.js +142 -0
  408. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/updateLayerLocation.js +194 -0
  409. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/viewDidResize.js +185 -0
  410. data/frameworks/sproutcore/frameworks/foundation/validators/credit_card.js +125 -0
  411. data/frameworks/sproutcore/frameworks/foundation/validators/date.js +52 -0
  412. data/frameworks/sproutcore/frameworks/foundation/validators/email.js +45 -0
  413. data/frameworks/sproutcore/frameworks/foundation/validators/not_empty.js +33 -0
  414. data/frameworks/sproutcore/frameworks/foundation/validators/number.js +82 -0
  415. data/frameworks/sproutcore/frameworks/foundation/validators/password.js +86 -0
  416. data/frameworks/sproutcore/frameworks/foundation/validators/validator.js +311 -0
  417. data/frameworks/sproutcore/frameworks/foundation/views/container.js +136 -0
  418. data/frameworks/sproutcore/frameworks/foundation/views/field.js +276 -0
  419. data/frameworks/sproutcore/frameworks/foundation/views/image.js +158 -0
  420. data/frameworks/sproutcore/frameworks/foundation/views/label.js +261 -0
  421. data/frameworks/sproutcore/frameworks/foundation/views/view.js +2160 -0
  422. data/frameworks/sproutcore/frameworks/mobile/english.lproj/core.css +12 -0
  423. data/frameworks/sproutcore/frameworks/mobile/lib/index.rhtml +126 -0
  424. data/frameworks/sproutcore/frameworks/mobile/system/root_responder.js +109 -0
  425. data/frameworks/sproutcore/frameworks/mobile/tests/views/button/ui.js +9 -0
  426. data/frameworks/sproutcore/frameworks/mobile/views/button.js +190 -0
  427. data/frameworks/sproutcore/frameworks/runtime/README +11 -0
  428. data/frameworks/sproutcore/frameworks/runtime/core.js +777 -0
  429. data/frameworks/sproutcore/frameworks/runtime/license.js +28 -0
  430. data/frameworks/sproutcore/frameworks/runtime/mixins/array.js +403 -0
  431. data/frameworks/sproutcore/frameworks/runtime/mixins/delegate_support.js +70 -0
  432. data/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +1193 -0
  433. data/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1149 -0
  434. data/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +135 -0
  435. data/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +108 -0
  436. data/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +128 -0
  437. data/frameworks/sproutcore/frameworks/runtime/protocols/sparse_array_delegate.js +131 -0
  438. data/frameworks/sproutcore/frameworks/runtime/system/binding.js +891 -0
  439. data/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +107 -0
  440. data/frameworks/sproutcore/frameworks/runtime/system/object.js +783 -0
  441. data/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +99 -0
  442. data/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +214 -0
  443. data/frameworks/sproutcore/frameworks/runtime/system/set.js +246 -0
  444. data/frameworks/sproutcore/frameworks/runtime/system/sparse_array.js +286 -0
  445. data/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +56 -0
  446. data/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js +23 -0
  447. data/frameworks/sproutcore/frameworks/runtime/tests/core/clone.js +66 -0
  448. data/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +147 -0
  449. data/frameworks/sproutcore/frameworks/runtime/tests/core/inspect.js +27 -0
  450. data/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +25 -0
  451. data/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +38 -0
  452. data/frameworks/sproutcore/frameworks/runtime/tests/core/keys.js +20 -0
  453. data/frameworks/sproutcore/frameworks/runtime/tests/core/makeArray.js +30 -0
  454. data/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +19 -0
  455. data/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +37 -0
  456. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +592 -0
  457. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +467 -0
  458. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +123 -0
  459. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +79 -0
  460. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +80 -0
  461. data/frameworks/sproutcore/frameworks/runtime/tests/system/array.js +263 -0
  462. data/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +190 -0
  463. data/frameworks/sproutcore/frameworks/runtime/tests/system/object/base.js +135 -0
  464. data/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +339 -0
  465. data/frameworks/sproutcore/frameworks/runtime/tests/system/run_loop.js +120 -0
  466. data/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +313 -0
  467. data/frameworks/sproutcore/frameworks/runtime/tests/system/sparse_array.js +84 -0
  468. data/frameworks/sproutcore/frameworks/testing/core.js +13 -0
  469. data/frameworks/sproutcore/frameworks/testing/english.lproj/additions.css +8 -0
  470. data/frameworks/sproutcore/frameworks/testing/english.lproj/testsuite.css +131 -0
  471. data/frameworks/sproutcore/frameworks/testing/extras.js +43 -0
  472. data/frameworks/sproutcore/frameworks/testing/jquery.js +3559 -0
  473. data/frameworks/sproutcore/frameworks/testing/qunit.js +819 -0
  474. data/frameworks/sproutcore/frameworks/testing/tests/debug/qunit.js +25 -0
  475. data/frameworks/sproutcore/frameworks/testing/utils.js +55 -0
  476. data/frameworks/sproutcore/lib/index.rhtml +118 -0
  477. data/frameworks/sproutcore/license.js +28 -0
  478. data/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +69 -0
  479. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/button.css +41 -0
  480. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/core.css +8 -0
  481. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/backButton.png +0 -0
  482. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/blueButton.png +0 -0
  483. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/cancel.png +0 -0
  484. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/grayButton.png +0 -0
  485. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/leftButton.png +0 -0
  486. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listArrow.png +0 -0
  487. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listArrowSel.png +0 -0
  488. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/listGroup.png +0 -0
  489. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/loading.gif +0 -0
  490. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/pinstripes.png +0 -0
  491. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/rightButton.png +0 -0
  492. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/selection.png +0 -0
  493. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/thumb.png +0 -0
  494. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toggle.png +0 -0
  495. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toggleOn.png +0 -0
  496. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toolButton.png +0 -0
  497. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/toolbar.png +0 -0
  498. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/images/whiteButton.png +0 -0
  499. data/frameworks/sproutcore/themes/iphone_theme/english.lproj/strings.js +15 -0
  500. data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/Data +0 -0
  501. data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Preview.jpg +0 -0
  502. data/frameworks/sproutcore/themes/standard_theme/Source/Panel.drawit/QuickLook/Thumbnail.jpg +0 -0
  503. data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/Data +0 -0
  504. data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Preview.jpg +0 -0
  505. data/frameworks/sproutcore/themes/standard_theme/Source/ToolbarView Pattern.drawit/QuickLook/Thumbnail.jpg +0 -0
  506. data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/Data +0 -0
  507. data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Preview.jpg +0 -0
  508. data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-x.drawit/QuickLook/Thumbnail.jpg +0 -0
  509. data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/Data +0 -0
  510. data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Preview.jpg +0 -0
  511. data/frameworks/sproutcore/themes/standard_theme/Source/panel-sprite-y.drawit/QuickLook/Thumbnail.jpg +0 -0
  512. data/frameworks/sproutcore/themes/standard_theme/english.lproj/button.css +333 -0
  513. data/frameworks/sproutcore/themes/standard_theme/english.lproj/checkbox.css +90 -0
  514. data/frameworks/sproutcore/themes/standard_theme/english.lproj/collection.css +53 -0
  515. data/frameworks/sproutcore/themes/standard_theme/english.lproj/core.css +47 -0
  516. data/frameworks/sproutcore/themes/standard_theme/english.lproj/disclosure.css +55 -0
  517. data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-sprite.png +0 -0
  518. data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-ysprite.png +0 -0
  519. data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-toolbar-view.png +0 -0
  520. data/frameworks/sproutcore/themes/standard_theme/english.lproj/label.css +37 -0
  521. data/frameworks/sproutcore/themes/standard_theme/english.lproj/pane.css +8 -0
  522. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/background-fat.jpg +0 -0
  523. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/background-thin.jpg +0 -0
  524. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/bottom-edge.png +0 -0
  525. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/bottom-left-corner.png +0 -0
  526. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/bottom-right-corner.png +0 -0
  527. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/left-edge.png +0 -0
  528. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/overlay.png +0 -0
  529. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/right-edge.png +0 -0
  530. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/top-edge.png +0 -0
  531. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/top-left-corner.png +0 -0
  532. data/frameworks/sproutcore/themes/standard_theme/english.lproj/panels/top-right-corner.png +0 -0
  533. data/frameworks/sproutcore/themes/standard_theme/english.lproj/progress.css +23 -0
  534. data/frameworks/sproutcore/themes/standard_theme/english.lproj/radio.css +113 -0
  535. data/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +141 -0
  536. data/frameworks/sproutcore/themes/standard_theme/english.lproj/slider.css +62 -0
  537. data/frameworks/sproutcore/themes/standard_theme/english.lproj/split_view.css +27 -0
  538. data/frameworks/sproutcore/themes/standard_theme/english.lproj/tab.css +12 -0
  539. data/frameworks/sproutcore/themes/standard_theme/english.lproj/text_field.css +13 -0
  540. data/frameworks/sproutcore/themes/standard_theme/english.lproj/toolbar.css +4 -0
  541. data/lib/thor/.autotest +7 -0
  542. data/lib/thor/CHANGELOG.rdoc +52 -0
  543. data/lib/thor/LICENSE +20 -0
  544. data/lib/thor/README.markdown +76 -0
  545. data/lib/thor/Rakefile +6 -0
  546. data/lib/thor/Thorfile +45 -0
  547. data/lib/thor/bin/rake2thor +83 -0
  548. data/lib/thor/bin/thor +7 -0
  549. data/lib/thor/lib/thor/error.rb +3 -0
  550. data/lib/thor/lib/thor/options.rb +267 -0
  551. data/lib/thor/lib/thor/ordered_hash.rb +64 -0
  552. data/lib/thor/lib/thor/runner.rb +305 -0
  553. data/lib/thor/lib/thor/task.rb +83 -0
  554. data/lib/thor/lib/thor/task_hash.rb +22 -0
  555. data/lib/thor/lib/thor/tasks/package.rb +18 -0
  556. data/lib/thor/lib/thor/tasks.rb +77 -0
  557. data/lib/thor/lib/thor/util.rb +75 -0
  558. data/lib/thor/lib/thor.rb +170 -0
  559. data/lib/thor/script/destroy +14 -0
  560. data/lib/thor/script/generate +14 -0
  561. data/lib/thor/spec/fixtures/task.thor +10 -0
  562. data/lib/thor/spec/options_spec.rb +271 -0
  563. data/lib/thor/spec/ordered_hash_spec.rb +84 -0
  564. data/lib/thor/spec/spec.opts +1 -0
  565. data/lib/thor/spec/spec_helper.rb +30 -0
  566. data/lib/thor/spec/task_spec.rb +11 -0
  567. data/lib/thor/spec/tasks_spec.rb +28 -0
  568. data/lib/thor/spec/thor_runner_spec.rb +194 -0
  569. data/lib/thor/spec/thor_spec.rb +206 -0
  570. data/lib/thor/spec/util_spec.rb +99 -0
  571. data/lib/thor/task.thor +15 -0
  572. data/lib/thor/thor.gemspec +29 -0
  573. metadata +3 -4
  574. data/sproutcore.gemspec +0 -47
@@ -0,0 +1,286 @@
1
+ // ==========================================================================
2
+ // Project: SproutCore Costello - Property Observing Library
3
+ // Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
4
+ // Portions ©2008-2009 Apple, Inc. All rights reserved.
5
+ // License: Licened under MIT license (see license.js)
6
+ // ==========================================================================
7
+
8
+ sc_require('mixins/enumerable') ;
9
+ sc_require('mixins/array') ;
10
+ sc_require('mixins/observable') ;
11
+ sc_require('mixins/delegate_support') ;
12
+
13
+ /**
14
+ @class
15
+
16
+ A dynamically filled array. A SparseArray makes it easy for you to create
17
+ very large arrays of data but then to defer actually populating that array
18
+ until it is actually needed. This is often much faster than generating an
19
+ array up front and paying the cost to load your data then.
20
+
21
+ Although technically all arrays in JavaScript are "sparse" (in the sense
22
+ that you can read and write properties are arbitrary indexes), this array
23
+ keeps track of which elements in the array have been populated already
24
+ and which ones have not. If you try to get a value at an index that has
25
+ not yet been populated, the SparseArray will notify a delegate object first
26
+ giving the delegate a chance to populate the component.
27
+
28
+ Most of the time, you will use a SparseArray to incrementally load data
29
+ from the server. For example, if you have a contact list with 3,000
30
+ contacts in it, you may create a SparseArray with a length of 3,000 and set
31
+ that as the content for a ListView. As the ListView tries to display the
32
+ visible contacts, it will request them from the SparseArray, which will in
33
+ turn notify your delegate, giving you a chance to load the contact data from
34
+ the server.
35
+
36
+ @extends SC.Enumerable
37
+ @extends SC.Array
38
+ @extends SC.Observable
39
+ @extends SC.DelegateSupport
40
+ @since SproutCore 1.0
41
+ */
42
+
43
+ SC.SparseArray = SC.Object.extend(SC.Observable, SC.Enumerable, SC.Array,
44
+ SC.DelegateSupport, /** @scope SC.SparseArray.prototype */ {
45
+
46
+ // ..........................................................
47
+ // LENGTH SUPPORT
48
+ //
49
+
50
+ /**
51
+ The length of the sparse array. The delegate for the array should set
52
+ this length.
53
+
54
+ @property {Number}
55
+ */
56
+ length: function() {
57
+ var del = this.delegate ;
58
+ if (del && SC.none(this._length) && del.sparseArrayDidRequestLength) {
59
+ del.sparseArrayDidRequestLength(this);
60
+ }
61
+ return this._length || 0 ;
62
+ }.property().cacheable(),
63
+
64
+ /**
65
+ Call this method from a delegate to provide a length for the sparse array.
66
+ If you pass null for this property, it will essentially "reset" the array
67
+ causing your delegate to be called again the next time another object
68
+ requests the array length.
69
+
70
+ @param {Number} length the length or null
71
+ @returns {SC.SparseArray} receiver
72
+ */
73
+ provideLength: function(length) {
74
+ if (SC.none(length)) this._sa_content = null ;
75
+ if (length !== this._length) {
76
+ this._length = length ;
77
+ this.enumerableContentDidChange() ;
78
+ }
79
+ return this ;
80
+ },
81
+
82
+ // ..........................................................
83
+ // READING CONTENT
84
+ //
85
+
86
+ /**
87
+ The minimum range of elements that should be requested from the delegate.
88
+ If this value is set to larger than 1, then the sparse array will always
89
+ fit a requested index into a range of this size and request it.
90
+
91
+ @property {Number}
92
+ */
93
+ rangeWindowSize: 1,
94
+
95
+ /**
96
+ Returns the object at the specified index. If the value for the index
97
+ is currently undefined, invokes the didRequestIndex() method to notify
98
+ the delegate.
99
+
100
+ @param {Number} idx the index to get
101
+ @return {Object} the object
102
+ */
103
+ objectAt: function(idx) {
104
+ var content = this._sa_content, ret ;
105
+ if (!content) content = this._sa_content = [] ;
106
+ if ((ret = content[idx]) === undefined) {
107
+ this.requestIndex(idx);
108
+ ret = content[idx]; // just in case the delegate provided immediately
109
+ }
110
+ return ret ;
111
+ },
112
+
113
+ _TMP_RANGE: {},
114
+
115
+ /**
116
+ Called by objectAt() whenever you request an index that has not yet been
117
+ loaded. This will possibly expand the index into a range and then invoke
118
+ an appropriate method on the delegate to request the data.
119
+
120
+ @param {SC.SparseArray} receiver
121
+ */
122
+ requestIndex: function(idx) {
123
+ var del = this.delegate;
124
+ if (!del) return this; // nothing to do
125
+
126
+ // adjust window
127
+ var len = this.get('rangeWindowSize'), start = idx;
128
+ if (len > 1) start = Math.floor(start / windowSize);
129
+ if (len < 1) len = 1 ;
130
+
131
+ // invoke appropriate callback
132
+ if (del.sparseArrayDidRequestRange) {
133
+ var range = this._TMP_RANGE;
134
+ range.start = start;
135
+ range.length = len;
136
+ del.sparseArrayDidRequestRange(this, range);
137
+
138
+ } else if (del.sparseArrayDidRequestIndex) {
139
+ while(--len >= 0) del.sparseArrayDidRequestIndex(start + len);
140
+ }
141
+ return this ;
142
+ },
143
+
144
+ /**
145
+ This method sets the content for the specified to the objects in the
146
+ passed array. If you change the way SparseArray implements its internal
147
+ tracking of objects, you should override this method along with
148
+ objectAt().
149
+
150
+ @param {Range} range the range to apply to
151
+ @param {Array} array the array of objects to insert
152
+ @returns {SC.SparseArray} reciever
153
+ */
154
+ provideObjectsInRange: function(range, array) {
155
+ var content = this._sa_content ;
156
+ if (!content) content = this._sa_content = [] ;
157
+ var start = range.start, len = range.length;
158
+ while(--len >= 0) content[start+len] = array[len];
159
+ this.enumerableContentDidChange() ;
160
+ return this ;
161
+ },
162
+
163
+ _TMP_PROVIDE_ARRAY: [],
164
+ _TMP_PROVIDE_RANGE: { length: 1 },
165
+
166
+ /**
167
+ Convenience method to provide a single object at a specified index. Under
168
+ the covers this calls provideObjectsInRange() so you can override only
169
+ that method and this one will still work.
170
+
171
+ @param {Number} index the index to insert
172
+ @param {Object} the object to insert
173
+ @return {SC.SparseArray} receiver
174
+ */
175
+ provideObjectAtIndex: function(index, object) {
176
+ var array = this._TMP_PROVIDE_ARRAY, range = this._TMP_PROVIDE_RANGE;
177
+ array[0] = object;
178
+ range.start = index;
179
+ return this.provideObjectsInRange(range, array);
180
+ },
181
+
182
+ /**
183
+ Invalidates the array content in the specified range. This is not the
184
+ same as editing an array. Rather it will cause the array to reload the
185
+ content from the delegate again when it is requested.
186
+
187
+ @param {Range} the range
188
+ @returns {SC.SparseArray} receiver
189
+ */
190
+ objectsDidChangeInRange: function(range) {
191
+
192
+ // delete cached content
193
+ var content = this._sa_content ;
194
+ if (content) {
195
+ // if range covers entire length of cached content, just reset array
196
+ if (range.start === 0 && SC.maxRange(range)>=content.length) {
197
+ this._sa_content = null ;
198
+
199
+ // otherwise, step through the changed parts and delete them.
200
+ } else {
201
+ var start = range.start, loc = Math.min(start + range.length, content.length);
202
+ while (--loc>=start) content[loc] = undefined;
203
+ }
204
+ }
205
+ this.enumerableContentDidChange(range) ; // notify
206
+ return this ;
207
+ },
208
+
209
+ /**
210
+ Optimized version of indexOf(). Asks the delegate to provide the index
211
+ of the specified object. If the delegate does not implement this method
212
+ then it will search the internal array directly.
213
+
214
+ @param {Object} obj the object to search for
215
+ @returns {Number} the discovered index or -1 if not found
216
+ */
217
+ indexOf: function(obj) {
218
+ var del = this.delegate ;
219
+ if (del && del.sparseArrayDidRequestIndexOf) {
220
+ return del.del.sparseArrayDidRequestIndexOf(this, obj);
221
+ } else {
222
+ var content = this._sa_content ;
223
+ if (!content) content = this._sa_content = [] ;
224
+ return content.indexOf(obj) ;
225
+ }
226
+ },
227
+
228
+ // ..........................................................
229
+ // EDITING
230
+ //
231
+
232
+ /**
233
+ Array primitive edits the objects at the specified index unless the
234
+ delegate rejects the change.
235
+
236
+ @param {Number} idx the index to begin to replace
237
+ @param {Number} amt the number of items to replace
238
+ @param {Array} objects the new objects to set instead
239
+ @returns {SC.SparseArray} receiver
240
+ */
241
+ replace: function(idx, amt, objects) {
242
+ objects = objects || [] ;
243
+
244
+ // if we have a delegate, get permission to make the replacement.
245
+ var del = this.delegate ;
246
+ if (del) {
247
+ if (!del.sparseArrayShouldReplace ||
248
+ !del.sparseArrayShouldReplace(this, idx, amt, objects)) {
249
+ return this;
250
+ }
251
+ }
252
+
253
+ // go ahead and apply to local content.
254
+ var content = this._sa_content ;
255
+ if (!content) content = this._sa_content = [] ;
256
+ content.replace(idx, amt, objects) ;
257
+
258
+ // update length
259
+ var delta = objects.length - amt ;
260
+ if (delta!==0 && !SC.none(this._length)) {
261
+ this.propertyWillChange('length');
262
+ this._length += delta;
263
+ this.propertyDidChange('length');
264
+ }
265
+
266
+ this.enumerableContentDidChange() ;
267
+ return this ;
268
+ },
269
+
270
+ /**
271
+ Resets the SparseArray, causing it to reload its content from the
272
+ delegate again.
273
+ */
274
+ reset: function() {
275
+ this._sa_content = null ;
276
+ this._length = null ;
277
+ this.enumerableContentDidChange() ;
278
+ this.invokeDelegateMethod(this.delegate, 'sparseArrayDidReset', this);
279
+ return this ;
280
+ }
281
+
282
+ }) ;
283
+
284
+ SC.SparseArray.array = function(len) {
285
+ return this.create({ _length: len||0 });
286
+ };
@@ -0,0 +1,56 @@
1
+ // ========================================================================
2
+ // SC.isEqual Tests
3
+ // ========================================================================
4
+ /*globals module test */
5
+
6
+ module("String's - isEqual", {
7
+
8
+ setup: function(){
9
+ StringA = "Hello";
10
+ StringB = "Hi";
11
+ StringC = "Hello";
12
+ }
13
+
14
+ });
15
+
16
+ test("strings should be equal ",function(){
17
+ equals(SC.isEqual(StringA,StringB),false);
18
+ equals(SC.isEqual(StringA,StringC),true);
19
+ });
20
+
21
+ module("Number's - isEqual",{
22
+
23
+ setup: function(){
24
+ num1 = 24;
25
+ num2 = 24;
26
+ num3 = 21;
27
+ }
28
+
29
+ });
30
+
31
+ test("numericals should be equal ",function(){
32
+ equals(SC.isEqual(num1,num2),true);
33
+ equals(SC.isEqual(num1,num3),false);
34
+ });
35
+
36
+ var objectA,objectB; //global variables
37
+
38
+ module("Array's - isEqual",{
39
+
40
+ setup: function(){
41
+ objectA = [1,2];
42
+ objectB = [1,2];
43
+ objectC = [1];
44
+ }
45
+
46
+ });
47
+
48
+ test("array should be equal ",function(){
49
+ // NOTE: We don't test for array contents -- that would be too expensive.
50
+ equals(SC.isEqual(objectA,objectB),false, 'two array instances with the same values should not be equal');
51
+ equals(SC.isEqual(objectA,objectC),false, 'two array instances with different values should not be equal');
52
+ });
53
+
54
+
55
+
56
+
@@ -0,0 +1,23 @@
1
+ // ========================================================================
2
+ // SC.guidFor Tests
3
+ // ========================================================================
4
+ /*globals module test ok isObj equals expects */
5
+
6
+ var objectA, objectB ; // global variables
7
+
8
+ module("Beget function Module", {
9
+ setup: function() {
10
+ objectA = {} ;
11
+ objectB = {} ;
12
+ arrayA = [1,3];
13
+ stringA ="stringA";
14
+ }
15
+ });
16
+
17
+ test("should return a new object with same prototype as that of passed object", function() {
18
+ equals(YES, SC.beget(objectA) !== objectA, "Beget for an object") ;
19
+ equals(YES, SC.beget(stringA) !== stringA, "Beget for a string") ;
20
+ equals(YES, SC.beget(SC.hashFor(objectB))!==SC.hashFor(objectB), "Beget for a hash") ;
21
+ equals(YES, SC.beget(arrayA) !== arrayA, "Beget for an array") ;
22
+ });
23
+
@@ -0,0 +1,66 @@
1
+ // ==========================================================================
2
+ // Project: SproutCore Costello - Property Observing Library
3
+ // Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
4
+ // Portions ©2008-2009 Apple, Inc. All rights reserved.
5
+ // License: Licened under MIT license (see license.js)
6
+ // ==========================================================================
7
+
8
+ /*globals module test ok isObj equals expects object isSet */
9
+
10
+ var object ;
11
+
12
+ module("Cloned Objects", {
13
+ setup: function() {
14
+
15
+ object = SC.Object.create({
16
+
17
+ name:'Cloned Object',
18
+ value:'value1',
19
+
20
+ clone: function(object) {
21
+ var ret = object ;
22
+ switch (SC.typeOf(object)) {
23
+
24
+ case SC.T_ARRAY:
25
+ ret = object.slice() ;
26
+ break ;
27
+
28
+ case SC.T_OBJECT:
29
+ ret = {} ;
30
+ for(var key in object) ret[key] = object[key] ;
31
+ }
32
+
33
+ return ret ;
34
+ }
35
+ });
36
+ }
37
+ });
38
+
39
+
40
+ test("should return a cloned object", function() {
41
+ var objectA = [1,2,3,4,5] ;
42
+ var objectB = "SproutCore" ;
43
+ var objectC = SC.hashFor(objectA);
44
+ var objectE = 100;
45
+ var a = SC.clone(objectA);
46
+ var b = SC.clone(objectA);
47
+
48
+ equals(SC.clone(objectB), SC.clone(objectB)) ;
49
+ equals(SC.clone(objectC), SC.clone(objectC)) ;
50
+ equals(SC.clone(objectE), SC.clone(objectE)) ;
51
+ isSet(a, b);
52
+ });
53
+
54
+ test("should return cloned object when the object is null", function() {
55
+ var objectD = null;
56
+ equals(SC.clone(objectD), SC.clone(objectD)) ;
57
+ });
58
+
59
+ test("should return a cloned array ", function() {
60
+ var arrayA = ['value1','value2'] ;
61
+ var resultArray = object.clone(arrayA);
62
+ equals(resultArray[0], arrayA[0], 'check first array item');
63
+ equals(resultArray[1], arrayA[1], 'check first array item');
64
+
65
+ });
66
+
@@ -0,0 +1,147 @@
1
+ // ========================================================================
2
+ // SC.guidFor Tests
3
+ // ========================================================================
4
+ /*globals module test ok isObj equals expects */
5
+
6
+ var objectA, objectB ; // global variables
7
+
8
+ module("Object", {
9
+
10
+ setup: function() {
11
+ objectA = {} ;
12
+ objectB = {} ;
13
+ }
14
+
15
+ });
16
+
17
+ test("should return same guid for same instance every time", function() {
18
+ equals(SC.guidFor(objectA), SC.guidFor(objectA)) ;
19
+ });
20
+
21
+ test("should return different guid for different instances", function() {
22
+ ok(SC.guidFor(objectA) !== SC.guidFor(objectB)) ;
23
+ });
24
+
25
+ test("guid should not parse to a number", function() {
26
+ equals(YES, isNaN(parseInt(SC.guidFor(objectA), 0))) ;
27
+ });
28
+
29
+ var stringA, stringACopy, stringB ; // global variables
30
+
31
+ module("String", {
32
+
33
+ setup: function() {
34
+ stringA = "string A" ;
35
+ stringACopy = "string A" ;
36
+ stringB = "string B" ;
37
+ }
38
+
39
+ });
40
+
41
+ test("same string instance should have same guide every time", function() {
42
+ equals(SC.guidFor(stringA), SC.guidFor(stringA)) ;
43
+ });
44
+
45
+ test("two string instances with same value should have same guid", function() {
46
+ equals(SC.guidFor(stringA), SC.guidFor(stringACopy)) ;
47
+ });
48
+
49
+ test("two instances with different value should have different guid", function() {
50
+ ok(SC.guidFor(stringA) !== SC.guidFor(stringB)) ;
51
+ });
52
+
53
+ test("guid should not parse to a number", function() {
54
+ equals(YES, isNaN(parseInt(SC.guidFor(stringA), 0))) ;
55
+ });
56
+
57
+ var numberA, numberACopy, numberB ; // global variables
58
+
59
+ module("Number", {
60
+
61
+ setup: function() {
62
+ numberA = 23 ;
63
+ numberACopy = 23 ;
64
+ numberB = 34 ;
65
+ }
66
+
67
+ });
68
+
69
+ test("same number instance should have same guide every time", function() {
70
+ equals(SC.guidFor(numberA), SC.guidFor(numberA)) ;
71
+ });
72
+
73
+ test("two number instances with same value should have same guid", function() {
74
+ equals(SC.guidFor(numberA), SC.guidFor(numberACopy)) ;
75
+ });
76
+
77
+ test("two instances with different value should have different guid", function() {
78
+ ok(SC.guidFor(numberA) !== SC.guidFor(numberB)) ;
79
+ });
80
+
81
+ test("guid should not parse to a number", function() {
82
+ equals(YES, isNaN(parseInt(SC.guidFor(numberA), 0))) ;
83
+ });
84
+
85
+ module("Boolean") ;
86
+
87
+ test("should always have same guid", function() {
88
+ equals(SC.guidFor(true), SC.guidFor(true)) ;
89
+ equals(SC.guidFor(false), SC.guidFor(false)) ;
90
+ });
91
+
92
+ test("true should have different guid than false", function() {
93
+ ok(SC.guidFor(true) !== SC.guidFor(false)) ;
94
+ });
95
+
96
+ test("guid should not parse to a number", function() {
97
+ equals(YES, isNaN(parseInt(SC.guidFor(true), 0)), 'guid for boolean-true') ;
98
+ equals(YES, isNaN(parseInt(SC.guidFor(false), 0)), 'guid for boolean-false') ;
99
+ });
100
+
101
+ module("Null and Undefined") ;
102
+
103
+ test("should always have same guid", function() {
104
+ equals(SC.guidFor(null), SC.guidFor(null)) ;
105
+ equals(SC.guidFor(undefined), SC.guidFor(undefined)) ;
106
+ });
107
+
108
+ test("null should have different guid than undefined", function() {
109
+ ok(SC.guidFor(null) !== SC.guidFor(undefined)) ;
110
+ });
111
+
112
+ test("guid should not parse to a number", function() {
113
+ equals(YES, isNaN(parseInt(SC.guidFor(null), 0))) ;
114
+ equals(YES, isNaN(parseInt(SC.guidFor(undefined), 0))) ;
115
+ });
116
+
117
+ module("Arrays", {
118
+
119
+ setup: function() {
120
+ array1 = ['a','b','c'] ;
121
+ array1copy = array1 ;
122
+ array2 = ['1','2','3'];
123
+ array2copy = ['1','2','3'] ;
124
+ }
125
+ }) ;
126
+
127
+ test("same array instance should have same guide every time", function(){
128
+ equals(SC.guidFor(array1), SC.guidFor(array1));
129
+ equals(SC.guidFor(array2), SC.guidFor(array2));
130
+ });
131
+
132
+ test("two array instances with same value, by assigning one to the other.", function() {
133
+ equals(SC.guidFor(array1), SC.guidFor(array1copy)) ;
134
+ });
135
+
136
+ test("two array instances with same value, by assigning the same value", function() {
137
+ ok(SC.guidFor(array2) !== SC.guidFor(array2copy)) ;
138
+ });
139
+
140
+ test("two instances with different value should have different guid", function() {
141
+ ok(SC.guidFor(array1) !== SC.guidFor(array2)) ;
142
+ ok(SC.guidFor(array1copy) !== SC.guidFor(array2copy)) ;
143
+ });
144
+
145
+ test("guid should not parse to a number", function() {
146
+ equals(YES, isNaN(parseInt(SC.guidFor(array1), 0))) ;
147
+ });
@@ -0,0 +1,27 @@
1
+ // ========================================================================
2
+ // SC.inspect Tests
3
+ // ========================================================================
4
+ /*globals module test ok isObj equals expects */
5
+
6
+ var obj1,obj2,obj3; //global variables
7
+
8
+ module("Inspect module",{
9
+
10
+ setup: function(){
11
+ obj1 = [1,3,4,9];
12
+ obj2 = 24;
13
+ obj3 = {};
14
+ }
15
+ });
16
+
17
+
18
+ test("SC.inspect module should give a string type",function(){
19
+ var object1 = SC.inspect(obj1);
20
+ equals(YES,SC.T_STRING === SC.typeOf(object1) ,'description of the array');
21
+
22
+ var object2 = SC.inspect(obj2);
23
+ equals(YES,SC.T_STRING === SC.typeOf(object2),'description of the numbers');
24
+
25
+ var object3 = SC.inspect(obj3);
26
+ equals(YES,SC.T_STRING === SC.typeOf(object3),'description of the object');
27
+ });
@@ -0,0 +1,25 @@
1
+ // ========================================================================
2
+ // SC.isArray Tests
3
+ // ========================================================================
4
+ /*globals module test */
5
+
6
+ var objectA,objectB,objectC; //global variables
7
+
8
+ module("Array Check" , {
9
+
10
+ setup: function(){
11
+ objectA = [1,2,3];
12
+ objectB = 23;
13
+ objectC = ["Hello","Hi"];
14
+ objectD = "Hello";
15
+ objectE = {};
16
+ }
17
+ });
18
+
19
+ test("should check if a given object is an array or not " ,function(){
20
+ equals(SC.isArray(objectA),true);
21
+ equals(SC.isArray(objectB),false);
22
+ equals(SC.isArray(objectC),true);
23
+ equals(SC.isArray(objectD),false);
24
+ equals(SC.isArray(objectE),false);
25
+ });
@@ -0,0 +1,38 @@
1
+ module("item type", {
2
+ setup: function() {
3
+ object = SC.Object.create({
4
+
5
+ method:function(){
6
+
7
+ }
8
+ });
9
+
10
+ }
11
+
12
+ });
13
+
14
+ test("should return the type for the passed item", function() {
15
+ a = null;
16
+ var arr = [1,2,3];
17
+ var obj = {};
18
+
19
+ equals(SC.T_NULL,SC.typeOf(a),"item of type null ");
20
+ equals(SC.T_ARRAY,SC.typeOf(arr),"item of type array ");
21
+ equals(SC.T_HASH,SC.typeOf(obj),"item of type hash");
22
+ equals(SC.T_OBJECT,SC.typeOf(object),"item of type object");
23
+ equals(SC.T_FUNCTION,SC.typeOf(object.method),"item of type function") ;
24
+ equals(SC.T_CLASS,SC.typeOf(SC.Object),"item of type class");
25
+ });
26
+
27
+ var a,b;
28
+ module("none or undefined object type",{
29
+ setup: function() {
30
+ a = null;
31
+ b = undefined;
32
+ }
33
+ });
34
+
35
+ test("should return true for null and undefined ",function(){
36
+ equals(YES,SC.none(a),"for a null parameter passed ");
37
+ equals(YES,SC.none(b),"for a undefined parameter passed ");
38
+ });
@@ -0,0 +1,20 @@
1
+ // ========================================================================
2
+ // SC.keys Tests
3
+ // ========================================================================
4
+ /*globals module test */
5
+
6
+ module("Fetch Keys ");
7
+
8
+ test("should get a key array for a specified object ",function(){
9
+ var object1 = {};
10
+
11
+ object1.names = "Rahul";
12
+ object1.age = "23";
13
+ object1.place = "Mangalore";
14
+
15
+ var object2 = [];
16
+ object2 = SC.keys(object1);
17
+ equals(object2,'names,age,place');
18
+ });
19
+
20
+