sproutcore 1.6.0.beta.3-x86-mingw32 → 1.6.0.rc.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. data/CHANGELOG +33 -0
  2. data/Rakefile +213 -10
  3. data/VERSION.yml +1 -1
  4. data/lib/Buildfile +5 -1
  5. data/lib/buildtasks/manifest.rake +7 -1
  6. data/lib/frameworks/sproutcore/Buildfile +3 -2
  7. data/lib/frameworks/sproutcore/CHANGELOG.md +154 -1
  8. data/lib/frameworks/sproutcore/README.md +1 -1
  9. data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +9 -0
  10. data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +254 -207
  11. data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +243 -172
  12. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +29 -0
  13. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +5 -0
  14. data/lib/frameworks/sproutcore/frameworks/core_foundation/controls/button.js +6 -2
  15. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +36 -14
  16. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -3
  17. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +14 -15
  18. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +14 -14
  19. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +2 -7
  20. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +3 -3
  21. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +2 -2
  22. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/responder.js +1 -1
  23. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +20 -12
  24. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +61 -0
  25. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +20 -6
  26. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +42 -0
  27. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controls/button.js +39 -57
  28. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_style.js +5 -3
  29. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +32 -0
  30. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +25 -0
  31. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +28 -17
  32. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +396 -0
  33. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +1 -1
  34. data/lib/frameworks/sproutcore/frameworks/core_foundation/{system → views}/bindable_span.js +2 -1
  35. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +78 -51
  36. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +4 -3
  37. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +2 -1
  38. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +233 -67
  39. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +3 -1
  40. data/lib/frameworks/sproutcore/frameworks/core_tools/core.js +8 -2
  41. data/lib/frameworks/sproutcore/frameworks/core_tools/data_source.js +1 -1
  42. data/lib/frameworks/sproutcore/frameworks/core_tools/models/target.js +1 -1
  43. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +15 -8
  44. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
  45. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -0
  46. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +3 -2
  47. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +66 -55
  48. data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/data_source.js +190 -0
  49. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +21 -0
  50. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +15 -1
  51. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +0 -1
  52. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/core/system/datetime.js +212 -182
  53. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +14 -16
  54. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +1 -1
  55. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +23 -11
  56. data/lib/frameworks/sproutcore/frameworks/desktop/resources/alert.css +49 -0
  57. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/a_sample_image.jpg +0 -0
  58. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/apple-logo1.jpeg +0 -0
  59. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/debug/iframe.html +0 -0
  60. data/lib/frameworks/sproutcore/frameworks/desktop/resources/disclosure.css +20 -0
  61. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/drag.css +1 -1
  62. data/lib/frameworks/sproutcore/frameworks/desktop/resources/icons.css +214 -0
  63. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/cap.png +0 -0
  64. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/downbutton.png +0 -0
  65. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-16.png +0 -0
  66. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-24.png +0 -0
  67. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-alert-48.png +0 -0
  68. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-16.png +0 -0
  69. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-bookmark-24.png +0 -0
  70. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-cancel-24.png +0 -0
  71. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-16.png +0 -0
  72. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-document-24.png +0 -0
  73. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-down-24.png +0 -0
  74. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-error-48.png +0 -0
  75. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-16.png +0 -0
  76. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-favorite-24.png +0 -0
  77. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-16.png +0 -0
  78. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-folder-24.png +0 -0
  79. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-16.png +0 -0
  80. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-group-24.png +0 -0
  81. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-16.png +0 -0
  82. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-help-24.png +0 -0
  83. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-16.png +0 -0
  84. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-24.png +0 -0
  85. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-info-48.png +0 -0
  86. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-left-24.png +0 -0
  87. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-16.png +0 -0
  88. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-options-24.png +0 -0
  89. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-redo-24.png +0 -0
  90. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-right-24.png +0 -0
  91. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-tools-24.png +0 -0
  92. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-16.png +0 -0
  93. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-trash-24.png +0 -0
  94. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-undo-24.png +0 -0
  95. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-up-24.png +0 -0
  96. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-16.png +0 -0
  97. data/lib/frameworks/sproutcore/frameworks/desktop/resources/images/icons/sc-icon-user-24.png +0 -0
  98. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-bottom.png +0 -0
  99. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-center.png +0 -0
  100. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/thumb-top.png +0 -0
  101. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/track.png +0 -0
  102. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/images/upbutton.png +0 -0
  103. data/lib/frameworks/sproutcore/frameworks/desktop/resources/list_item.css +145 -0
  104. data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu.css +10 -0
  105. data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu_item_view.css +88 -0
  106. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/modal.css +3 -4
  107. data/lib/frameworks/sproutcore/frameworks/desktop/resources/panel.css +91 -0
  108. data/lib/frameworks/sproutcore/frameworks/desktop/resources/picker.css +37 -0
  109. data/lib/frameworks/sproutcore/frameworks/desktop/resources/progress.css +29 -0
  110. data/lib/frameworks/sproutcore/frameworks/desktop/resources/radio.css +11 -0
  111. data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +121 -0
  112. data/lib/frameworks/sproutcore/frameworks/desktop/resources/separator.css +20 -0
  113. data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +34 -0
  114. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split.css +0 -0
  115. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/split_divider.css +0 -0
  116. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/tab.css +0 -0
  117. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/toolbar.css +0 -0
  118. data/lib/frameworks/sproutcore/frameworks/desktop/{english.lproj → resources}/touch-scroller.css +13 -13
  119. data/lib/frameworks/sproutcore/frameworks/desktop/resources/well.css +65 -0
  120. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +114 -103
  121. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/static_content.js +3 -2
  122. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +7 -6
  123. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +18 -0
  124. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +4 -7
  125. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +9 -2
  126. data/lib/frameworks/sproutcore/frameworks/desktop/{panes → views}/select_button.js +43 -0
  127. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +35 -33
  128. data/lib/frameworks/sproutcore/frameworks/foundation/core.js +2 -2
  129. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +15 -8
  130. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/button.js +4 -7
  131. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +55 -13
  132. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +3 -1
  133. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +7 -7
  134. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/benchmark.css +0 -0
  135. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/blank.gif +0 -0
  136. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/bootstrap.rhtml +0 -0
  137. data/lib/frameworks/sproutcore/frameworks/foundation/resources/button_view.css +36 -0
  138. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/checkbox_view.css +0 -0
  139. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/debug/control-test-pane.css +0 -0
  140. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/favicon.ico +0 -0
  141. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-logo.png +0 -0
  142. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.jpg +0 -0
  143. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-landscape.png +0 -0
  144. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.jpg +0 -0
  145. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup-portrait.png +0 -0
  146. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore-startup.png +0 -0
  147. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/images/sproutcore.png +0 -0
  148. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/inline_editor.css +0 -0
  149. data/lib/frameworks/sproutcore/frameworks/foundation/resources/label.css +47 -0
  150. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/radio_view.css +0 -0
  151. data/lib/frameworks/sproutcore/frameworks/foundation/{english.lproj → resources}/static_layout.css +1 -1
  152. data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +130 -0
  153. data/lib/frameworks/sproutcore/frameworks/foundation/system/chance.js +5 -1
  154. data/lib/frameworks/sproutcore/frameworks/foundation/system/string.js +0 -43
  155. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +5 -2
  156. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date.js +4 -4
  157. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +4 -5
  158. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +1 -1
  159. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +5 -5
  160. data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +6 -3
  161. data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +11 -0
  162. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
  163. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +2 -2
  164. data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +2 -2
  165. data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +1 -1
  166. data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +2 -2
  167. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +2 -2
  168. data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +4 -73
  169. data/lib/frameworks/sproutcore/frameworks/statechart/debug/sequence_matcher.js +189 -0
  170. data/lib/frameworks/sproutcore/frameworks/statechart/ext/function.js +122 -0
  171. data/lib/frameworks/sproutcore/frameworks/statechart/system/async.js +88 -0
  172. data/lib/frameworks/sproutcore/frameworks/statechart/system/empty_state.js +34 -0
  173. data/lib/frameworks/sproutcore/frameworks/statechart/system/history_state.js +97 -0
  174. data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +7 -189
  175. data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +14 -78
  176. data/lib/frameworks/sproutcore/frameworks/statechart/tests/debug/sequence_matcher.js +464 -0
  177. data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js +31 -11
  178. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/async/with_concurrent_states.js +6 -4
  179. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/advanced.js +40 -6
  180. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/basic.js +22 -2
  181. data/lib/frameworks/sproutcore/frameworks/statechart/tests/state_transitioning/standard/with_concurrent_states/intermediate.js +44 -3
  182. data/lib/frameworks/sproutcore/frameworks/testing/core.js +61 -9
  183. data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/additions.css +0 -0
  184. data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/runner.css +11 -2
  185. data/lib/frameworks/sproutcore/frameworks/testing/{english.lproj → resources}/testsuite.css +0 -0
  186. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +66 -27
  187. data/lib/frameworks/sproutcore/frameworks/testing/tests/spy_on.js +41 -0
  188. data/lib/frameworks/sproutcore/frameworks/testing/tests/stub_method.js +9 -0
  189. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/core.css +24 -0
  190. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/fonts.css +39 -0
  191. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/reset.css +126 -0
  192. data/lib/frameworks/sproutcore/frameworks/yuireset/resources/view.css +57 -0
  193. data/lib/frameworks/sproutcore/lib/index.rhtml +7 -4
  194. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
  195. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
  196. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
  197. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
  198. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
  199. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
  200. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
  201. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
  202. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
  203. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
  204. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
  205. data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
  206. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +13 -4
  207. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +16 -14
  208. data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
  209. data/lib/gen/app/templates/apps/@target_name@/Buildfile +1 -4
  210. data/lib/gen/app/templates/apps/@target_name@/core.js +1 -4
  211. data/lib/gen/app/templates/apps/@target_name@/main.js +1 -4
  212. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +1 -4
  213. data/lib/gen/app/templates/apps/@target_name@/theme.js +1 -4
  214. data/lib/gen/controller/templates/controllers/{@filename@.js → @filename@_controller.js} +1 -4
  215. data/lib/gen/controller/templates/tests/controllers/{@filename@.js → @filename@_test.js} +1 -4
  216. data/lib/gen/data-source/templates/data_sources/{@filename@.js → @filename@_data_source.js} +1 -4
  217. data/lib/gen/design/templates/resources/@filename@.js +1 -4
  218. data/lib/gen/framework/templates/frameworks/@target_name@/core.js +1 -4
  219. data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +1 -4
  220. data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +1 -4
  221. data/lib/gen/html_app/templates/apps/@target_name@/resources/stylesheets/@target_name@.css +2 -0
  222. data/lib/gen/html_project/templates/@filename@/Buildfile +1 -4
  223. data/lib/gen/html_project/templates/@filename@/README +1 -4
  224. data/lib/gen/language/templates/@filename@/strings.js +1 -4
  225. data/lib/gen/model/templates/fixtures/{@filename@.js → @filename@_fixtures.js} +2 -5
  226. data/lib/gen/model/templates/models/{@filename@.js → @filename@_model.js} +1 -4
  227. data/lib/gen/model/templates/tests/models/{@filename@.js → @filename@_test.js} +1 -4
  228. data/lib/gen/page/templates/pages/@target_name@/Buildfile +1 -4
  229. data/lib/gen/page/templates/pages/@target_name@/core.js +1 -4
  230. data/lib/gen/page/templates/pages/@target_name@/en.lproj/strings.js +1 -4
  231. data/lib/gen/page/templates/pages/@target_name@/resources/body.css +3 -1
  232. data/lib/gen/project/templates/@filename@/Buildfile +1 -4
  233. data/lib/gen/project/templates/@filename@/README +1 -5
  234. data/lib/gen/responder/templates/states/{@filename@.js → @filename@_state.js} +1 -4
  235. data/lib/gen/test/templates/tests/{@filename@.js → @filename@_test.js} +1 -4
  236. data/lib/gen/theme/templates/themes/@target_name@/resources/theme_styles.css +1 -5
  237. data/lib/gen/theme/templates/themes/@target_name@/theme.js +1 -4
  238. data/lib/gen/view/templates/tests/views/{@filename@.js → @filename@_test.js} +1 -4
  239. data/lib/gen/view/templates/views/{@filename@.js → @filename@_view.js} +1 -4
  240. data/lib/sproutcore.rb +4 -1
  241. data/lib/sproutcore/builders/handlebars.rb +1 -1
  242. data/lib/sproutcore/builders/module.rb +2 -2
  243. data/lib/sproutcore/helpers/static_helper.rb +4 -2
  244. data/lib/sproutcore/models/generator.rb +22 -0
  245. data/lib/sproutcore/models/manifest_entry.rb +1 -0
  246. data/lib/sproutcore/models/target.rb +4 -1
  247. data/lib/sproutcore/rack/builder.rb +3 -0
  248. data/lib/sproutcore/tools.rb +11 -11
  249. data/lib/sproutcore/tools/init.rb +10 -22
  250. data/lib/sproutcore/tools/manifest.rb +21 -22
  251. data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +21 -1
  252. data/spec/fixtures/ordered_entries/apps/template_style/a.js +0 -0
  253. data/spec/fixtures/ordered_entries/apps/template_style/template_style.js +0 -0
  254. data/spec/lib/buildfile_commands/build_task_spec.rb +1 -1
  255. data/spec/lib/tools/manifest_spec.rb +11 -0
  256. data/sproutcore.gemspec +2 -2
  257. data/vendor/chance/lib/chance/instance.rb +3 -1
  258. metadata +150 -106
  259. data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/core.css +0 -378
  260. data/lib/frameworks/sproutcore/frameworks/core_foundation/resources/view.css +0 -57
  261. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +0 -56
  262. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/disclosure.css +0 -73
  263. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/icons.css +0 -916
  264. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/images/icons/shared.png +0 -0
  265. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +0 -185
  266. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +0 -12
  267. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/menu_item_view.css +0 -101
  268. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/panel.css +0 -91
  269. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/picker.css +0 -35
  270. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/progress.css +0 -33
  271. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/radio.css +0 -10
  272. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +0 -132
  273. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/separator.css +0 -19
  274. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +0 -69
  275. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/strings.js +0 -14
  276. data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/well.css +0 -71
  277. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +0 -40
  278. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +0 -47
  279. data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +0 -146
  280. data/lib/frameworks/sproutcore/themes/empty_theme/tests/mini_icons.rhtml +0 -69
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  // This is the theme that defines how your app renders.
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_instance_name %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace_instance_name) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @class
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_instance_name %> Unit Test
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace_instance_name} Unit Test") %>
5
2
  /*globals <%= namespace %> module test ok equals same stop start */
6
3
 
7
4
  module("<%= namespace_instance_name %>");
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_class_name %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace_class_name) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @class
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_instance_name %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace_instance_name) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  // This page describes a part of the interface for your application.
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @namespace
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %> Strings
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace} Strings") %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  // Place strings you want to localize here. In your app, use the key and
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  <%= namespace %> = SC.Application.create();
@@ -1,3 +1,5 @@
1
+ <%= copyright_block(namespace, :css) %>
2
+
1
3
  .sc-view {
2
4
  position: relative;
3
5
  overflow: visible;
@@ -1,7 +1,4 @@
1
- # ===========================================================================
2
- # Project: <%= namespace %>
3
- # Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- # ===========================================================================
1
+ <%= copyright_block(namespace, :ruby) %>
5
2
 
6
3
  # Add initial buildfile information here
7
4
  config :all, :required => "sproutcore/core_foundation", :theme => "sproutcore/empty_theme"
@@ -1,7 +1,4 @@
1
- =============================================================================
2
- Project: <%= namespace %>
3
- Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- =============================================================================
1
+ <%= copyright_block(namespace, false) %>
5
2
 
6
3
  TODO: Describe Your Project
7
4
 
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %> Strings
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace} Strings") %>
5
2
 
6
3
  // Place strings you want to localize here. In your app, use the key and
7
4
  // localize it using "key string".loc(). HINT: For your key names, use the
@@ -1,10 +1,7 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_class_name %> Fixtures
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace_class_name} Fixtures") %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
- sc_require('models/<%= filename.ext('') %>');
4
+ sc_require('models/<%= filename.ext('') %>_model');
8
5
 
9
6
  <%= namespace_class_name %>.FIXTURES = [
10
7
 
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_class_name %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace_class_name) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @class
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_class_name %> Unit Test
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace_class_name} Unit Test") %>
5
2
  /*globals <%= namespace %> module test ok equals same stop start */
6
3
 
7
4
  module("<%= namespace_class_name %>");
@@ -1,7 +1,4 @@
1
- # ==========================================================================
2
- # Project: <%= namespace %> Buildfile
3
- # Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- # ==========================================================================
1
+ <%= copyright_block("#{namespace} Buildfile", :ruby) %>
5
2
 
6
3
  # You can use to buildfile to add a custom page title, set environment
7
4
  # variables, and require any specific JavaScript or other libraries you want
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @namespace
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %> Strings
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace} Strings") %>
5
2
 
6
3
  // Place strings you want to localize here. In your app, use the key and
7
4
  // localize it using "key string".loc(). HINT: For your key names, use the
@@ -1 +1,3 @@
1
- /* Add any extra CSS for this page here. You can also add other CSS files if you want */
1
+ <%= copyright_block(namespace, :css) %>
2
+
3
+ /* Add any extra CSS for this page here. You can also add other CSS files if you want */
@@ -1,7 +1,4 @@
1
- # ===========================================================================
2
- # Project: <%= namespace %>
3
- # Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- # ===========================================================================
1
+ <%= copyright_block(namespace, :ruby) %>
5
2
 
6
3
  # This is your Buildfile, which sets build settings for your project.
7
4
  # For example, this tells SproutCore's build tools that your requires
@@ -1,7 +1,3 @@
1
- =============================================================================
2
- Project: <%= namespace %>
3
- Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- =============================================================================
1
+ <%= copyright_block(namespace, false) %>
5
2
 
6
3
  TODO: Describe Your Project
7
-
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %>.<%= class_name.upcase %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace}.#{class_name.upcase}") %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @class
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %> Unit Test
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace} Unit Test") %>
5
2
  /*globals <%= namespace %> module test ok equals same stop start */
6
3
 
7
4
  module("<%= namespace %>");
@@ -1,8 +1,4 @@
1
- /* ==========================================================================
2
- * Project: <%= namespace %> Theme Styles
3
- * Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- * ==========================================================================
5
- */
1
+ <%= copyright_block("#{namespace} Theme Styles", :css) %>
6
2
 
7
3
  /*
8
4
  Place any styles you want to define in this file. You can also break your
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  // This is the JavaScript representation of your theme.
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_class_name %> Unit Test
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block("#{namespace_class_name} Unit Test") %>
5
2
  /*globals <%= namespace %> module test ok equals same stop start */
6
3
 
7
4
  module("<%= namespace_class_name %>");
@@ -1,7 +1,4 @@
1
- // ==========================================================================
2
- // Project: <%= namespace_class_name %>
3
- // Copyright: ©<%= Time.now.year %> My Company, Inc.
4
- // ==========================================================================
1
+ <%= copyright_block(namespace_class_name) %>
5
2
  /*globals <%= namespace %> */
6
3
 
7
4
  /** @class
data/lib/sproutcore.rb CHANGED
@@ -78,7 +78,7 @@ module SproutCore
78
78
 
79
79
  # if we are logging to the screen, no reason to use a std loggin fmt
80
80
  @logger.formatter = lambda do |severity, time, progname, msg|
81
- [severity, '~', msg.to_s, "\n"].join(' ')
81
+ [severity, time.strftime("%H:%M:%S.") + "%.3d" % (time.usec / 100000), '~', msg.to_s, "\n"].join(' ')
82
82
  end
83
83
  end
84
84
 
@@ -150,6 +150,9 @@ module SproutCore
150
150
  end
151
151
  end
152
152
 
153
+ def self.attach_prefix(url)
154
+ $script_name ? "#{$script_name}#{url}" : url
155
+ end
153
156
  end # module SC
154
157
 
155
158
  SC = SproutCore # alias
@@ -22,7 +22,7 @@ module SC
22
22
 
23
23
  def build(dst_path)
24
24
  template_name = entry.rootname[/^.*\/([^\/]*)$/, 1]
25
- writelines dst_path, "SC.TEMPLATES[#{template_name.inspect}] = SC.Handlebars.compile(#{readlines(entry[:source_path]).to_json})"
25
+ writelines dst_path, "SC.TEMPLATES[#{template_name.inspect}] = SC.Handlebars.compile(#{readlines(entry[:source_path]).to_json});"
26
26
  end
27
27
  end
28
28
 
@@ -27,7 +27,7 @@ module SC
27
27
  if (SC.MODULE_INFO[target_name]) return ; <%# not an error... %>
28
28
 
29
29
  <%# first time, so add a Hash with this target's module_info %>
30
- SC.MODULE_INFO[target_name] = {
30
+ SC.MODULE_INFO[target_name] = SC.Object.create({
31
31
  dependencies:[<%= @dependencies.join(',') %>],
32
32
  styles:[<%= @styles.join(',') %>],
33
33
  styles2x: [<%= @styles2x.join(',') %>],
@@ -35,7 +35,7 @@ module SC
35
35
  stringURL:'<%= @string %>'<% if @prefetched %>,
36
36
  isPrefetched: YES
37
37
  <% end %>
38
- }
38
+ })
39
39
  })();
40
40
  EOT
41
41
 
@@ -191,8 +191,10 @@ module SC
191
191
  end
192
192
  end
193
193
 
194
- ret << %(<script type="text/javascript">SC.buildMode = "#{SC.build_mode}";</script>)
195
-
194
+ url_prefix = $script_name ? %("#{$script_name}") : "null";
195
+
196
+ ret << %(<script type="text/javascript">SC.buildMode = "#{SC.build_mode}"; \n SC.urlPrefix = #{url_prefix}; </script>)
197
+
196
198
  return ret * "\n"
197
199
  end
198
200
 
@@ -293,6 +293,28 @@ module SC
293
293
  [self.namespace, self.instance_name].compact.join '.'
294
294
  end
295
295
 
296
+ def copyright_block(desc, commented=:javascript)
297
+ company = ENV['COMPANY'] || "My Company, Inc."
298
+
299
+ str = ["==========================================================================",
300
+ "Project: #{desc}",
301
+ "Copyright: @#{Time.now.year} #{company}",
302
+ "=========================================================================="]
303
+
304
+ case commented
305
+ when true, :javascript, :js
306
+ str.map!{|s| "// #{s}" }
307
+ when :css
308
+ str[0] = "/* #{str[0]}"
309
+ str[1..-1].each{|s| s.replace "* #{s}" }
310
+ str << "*/"
311
+ when :ruby
312
+ str.map!{|s| "# #{s}" }
313
+ end
314
+
315
+ str.join("\n")
316
+ end
317
+
296
318
  # Verifies that the passed array of keys are defined on the object. If
297
319
  # you pass an optional block, the block will be invoked for each key so
298
320
  # you can validate the value as well. Otherwise, this will raise an error
@@ -167,6 +167,7 @@ module SC
167
167
  def cacheable_url
168
168
  ret = self[:url]
169
169
  ret = [ret, self.timestamp].join('?') if target.config[:timestamp_urls]
170
+ ret = SC.attach_prefix(ret)
170
171
  if target.config[:hyper_domaining]
171
172
  ret = [self.hyperdomain_prefix(ret), ret].join('')
172
173
  end
@@ -642,7 +642,10 @@ module SC
642
642
  js_urls = []
643
643
  javascript_entries.each do |resource_name, entries|
644
644
  resource_name = resource_name.ext('js')
645
- pf = (resource_name == 'javascript.js') ? %w(source/lproj/strings.js source/core.js source/utils.js) : []
645
+ target_name = manifest.target.target_name.to_s.split('/')[-1]
646
+ pf = (resource_name == 'javascript.js') ?
647
+ ['source/lproj/strings.js', 'source/core.js', "source/#{target_name}.js", 'source/utils.js'] :
648
+ []
646
649
  SC::Helpers::EntrySorter.sort(entries, pf).each do |entry|
647
650
  if minify_js && entry[:minified]
648
651
  js_urls << entry.cacheable_url
@@ -89,6 +89,9 @@ module SC
89
89
  project_mutex.synchronize do
90
90
  did_reload = reload_project! # if needed
91
91
 
92
+ # set SCRIPT_NAME to correctly set namespaces
93
+ $script_name = env["SCRIPT_NAME"]
94
+
92
95
  # collect some standard info
93
96
  url = env['PATH_INFO']
94
97
  url = '/sproutcore/welcome' if url == '/'
@@ -32,17 +32,17 @@ module SC
32
32
 
33
33
  # All sproutcore tools can take some standard options. These are
34
34
  # processed automatically when the tool is loaded
35
- class_option "project", :type => :string
36
- class_option "mode", :type => :string
37
- class_option "logfile", :type => :string
38
- class_option "build", :type => :string
39
- class_option "build-targets",:type => :string
40
- class_option "yui-minification", :type => :boolean
41
- class_option "dont-minify", :type => :boolean
42
- class_option "verbose", :type => :boolean, :aliases => "-v"
43
- class_option "very-verbose", :type => :boolean, :aliases => "-V"
44
- class_option "library", :type => :string #deprecated
45
- class_option "environment", :type => :string #deprecated
35
+ class_option "project", :type => :string
36
+ class_option "mode", :type => :string
37
+ class_option "logfile", :type => :string
38
+ class_option "build", :type => :string, :aliases => "-b"
39
+ class_option "build-targets", :type => :string
40
+ class_option "yui-minification", :type => :boolean
41
+ class_option "dont-minify", :type => :boolean
42
+ class_option "verbose", :type => :boolean, :aliases => "-v"
43
+ class_option "very-verbose", :type => :boolean, :aliases => "-V"
44
+ class_option "library", :type => :string #deprecated
45
+ class_option "environment", :type => :string #deprecated
46
46
 
47
47
  default_task :banner
48
48
 
@@ -14,17 +14,11 @@ module SC
14
14
  def init(project_name, app_name=nil)
15
15
 
16
16
  # Generate the project
17
- if (options[:template])
18
- project_gen = SC.builtin_project.generator_for 'html_project',
19
- :arguments => ['project', project_name],
20
- :dry_run => options['dry-run'],
21
- :force => options[:force]
22
- else
23
- project_gen = SC.builtin_project.generator_for 'project',
24
- :arguments => ['project', project_name],
25
- :dry_run => options['dry-run'],
26
- :force => options[:force]
27
- end
17
+ project_type = options[:template] ? 'html_project' : 'project'
18
+ project_gen = SC.builtin_project.generator_for project_type,
19
+ :arguments => ['project', project_name],
20
+ :dry_run => options['dry-run'],
21
+ :force => options[:force]
28
22
 
29
23
  project_gen.prepare!.build!
30
24
 
@@ -35,17 +29,11 @@ module SC
35
29
  # And get the app generator and run it
36
30
  project = SC::Project.load project_root, :parent => SC.builtin_project
37
31
 
38
- if (options[:template])
39
- generator = project.generator_for 'html_app',
40
- :arguments => ['app', app_name],
41
- :dry_run => options['dry-run'],
42
- :force => options[:force]
43
- else
44
- generator = project.generator_for 'app',
45
- :arguments => ['app', app_name],
46
- :dry_run => options['dry-run'],
47
- :force => options[:force]
48
- end
32
+ app_type = options[:template] ? 'html_app' : 'app'
33
+ generator = project.generator_for app_type,
34
+ :arguments => ['app', app_name],
35
+ :dry_run => options['dry-run'],
36
+ :force => options[:force]
49
37
  generator.prepare!.build!
50
38
 
51
39
  project_gen.log_file(project_gen.source_root / 'INIT')