sproutcore 0.9.14 → 0.9.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. data/History.txt +43 -0
  2. data/Manifest.txt +12 -3
  3. data/bin/sc-build +19 -3
  4. data/bin/sc-install +5 -0
  5. data/bin/sc-remove +5 -0
  6. data/bin/sc-update +5 -0
  7. data/frameworks/prototype/prototype.js +267 -230
  8. data/frameworks/sproutcore/HISTORY +281 -135
  9. data/frameworks/sproutcore/controllers/array.js +133 -22
  10. data/frameworks/sproutcore/controllers/collection.js +4 -5
  11. data/frameworks/sproutcore/controllers/object.js +8 -2
  12. data/frameworks/sproutcore/core.js +361 -159
  13. data/frameworks/sproutcore/{foundation → debug}/unittest.js +3 -3
  14. data/frameworks/sproutcore/english.lproj/detect-browser +1 -1
  15. data/frameworks/sproutcore/english.lproj/theme.css +2 -2
  16. data/frameworks/sproutcore/foundation/application.js +6 -1
  17. data/frameworks/sproutcore/foundation/benchmark.js +37 -11
  18. data/frameworks/sproutcore/foundation/date.js +1 -1
  19. data/frameworks/sproutcore/foundation/enumerator.js +105 -0
  20. data/frameworks/sproutcore/foundation/object.js +19 -20
  21. data/frameworks/sproutcore/foundation/responder.js +1 -1
  22. data/frameworks/sproutcore/foundation/set.js +164 -57
  23. data/frameworks/sproutcore/foundation/string.js +151 -47
  24. data/frameworks/sproutcore/foundation/utils.js +84 -3
  25. data/frameworks/sproutcore/lib/collection_view.rb +1 -0
  26. data/frameworks/sproutcore/license.js +28 -0
  27. data/frameworks/sproutcore/mixins/array.js +73 -209
  28. data/frameworks/sproutcore/mixins/delegate_support.js +1 -1
  29. data/frameworks/sproutcore/mixins/enumerable.js +1006 -0
  30. data/frameworks/sproutcore/mixins/observable.js +153 -84
  31. data/frameworks/sproutcore/mixins/selection_support.js +13 -1
  32. data/frameworks/sproutcore/models/record.js +74 -27
  33. data/frameworks/sproutcore/models/store.js +7 -3
  34. data/frameworks/sproutcore/server/rails_server.js +82 -0
  35. data/frameworks/sproutcore/server/rest_server.js +178 -0
  36. data/frameworks/sproutcore/{foundation → server}/server.js +101 -48
  37. data/frameworks/sproutcore/tests/core/guidFor.rhtml +114 -0
  38. data/frameworks/sproutcore/tests/foundation/array.rhtml +6 -7
  39. data/frameworks/sproutcore/tests/foundation/set.rhtml +254 -0
  40. data/frameworks/sproutcore/tests/mixins/enumerable.rhtml +421 -0
  41. data/frameworks/sproutcore/tests/mixins/observable.rhtml +127 -0
  42. data/frameworks/sproutcore/tests/models/model.rhtml +23 -22
  43. data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
  44. data/frameworks/sproutcore/tests/views/view/clippingFrame.rhtml +112 -109
  45. data/frameworks/sproutcore/tests/views/view/frame.rhtml +91 -88
  46. data/frameworks/sproutcore/validators/date.js +1 -7
  47. data/frameworks/sproutcore/views/collection/collection.js +7 -2
  48. data/frameworks/sproutcore/views/list_item.js +141 -3
  49. data/frameworks/sproutcore/views/split.js +14 -11
  50. data/frameworks/sproutcore/views/view.js +9 -6
  51. data/lib/sproutcore/build_tools/html_builder.rb +19 -3
  52. data/lib/sproutcore/build_tools/resource_builder.rb +9 -3
  53. data/lib/sproutcore/bundle.rb +21 -0
  54. data/lib/sproutcore/bundle_manifest.rb +64 -20
  55. data/lib/sproutcore/helpers/capture_helper.rb +2 -2
  56. data/lib/sproutcore/library.rb +33 -9
  57. data/lib/sproutcore/merb/bundle_controller.rb +16 -5
  58. data/lib/sproutcore/version.rb +1 -1
  59. data/lib/sproutcore/view_helpers.rb +1 -1
  60. data/{sc-config.rb → sc-config} +5 -2
  61. metadata +24 -5
data/History.txt CHANGED
@@ -1,3 +1,46 @@
1
+ == 0.9.15
2
+
3
+ * Fixed bug that would sometimes convert "faked" HTTP methods sent for Rails
4
+ apps into real HTTP methods, breaking Rails. (Ticket #115) [Lawrence Pit]
5
+
6
+ * Experimental support for rendering templates using HAML (Ticket #114) [Trek, Lawrence Pit]
7
+
8
+ * During sc-build, by default the build tools will now calculate a digest
9
+ key to append to the end of URLs instead of simply using a timestamp. This
10
+ will ensure that the URLs generated are properly cacheable even when
11
+ building on different machines. [CAJ]
12
+
13
+ * regex for replacing occurrences of static_url() are no longer greedy.
14
+ (Closes #87) [nciagra]
15
+
16
+ * Added support for the autobuild config option. If specified, then the named
17
+ bundle will be skipped when you run sc-build by itself. It will still be
18
+ built if you name the bundle explictly (i.e. sc-build mybundle) or if you
19
+ pass the -r option and the bundle is required by another bundle that is also
20
+ being built.
21
+
22
+ * Along those lines, the default config was also changes so that the doc tool
23
+ and the test runner will no longer autobuild.
24
+
25
+ * Added support for the build_languages config option. If specified, then
26
+ simply runnig sc-build will automatically build all of the languages named
27
+ here, even if there are no specific locatizations for said language in your
28
+ project.
29
+
30
+ * Added support for the debug directory. Any JS files in the debug directory
31
+ will now be loaded in development mode but excluded from production builds.
32
+ You can use this to include added instrumentation and benchmarks for use
33
+ in dev mode.
34
+
35
+ * Following with the debug enhancement, the SproutCore JavaScript now includes
36
+ the unittest.js in its own debug directory so that this library will no
37
+ longer be included in production builds.
38
+
39
+ * Bundles are now reloaded on each request to the development server. This
40
+ both allows the server to recover from exceptions when building a file and
41
+ eliminates a memory leak that caused an eventual slow-down.
42
+
43
+ * Eliminated need for :outlet option. And there was much rejoicing.
1
44
 
2
45
  == 0.9.14
3
46
 
data/Manifest.txt CHANGED
@@ -58,6 +58,7 @@ frameworks/sproutcore/controllers/collection.js
58
58
  frameworks/sproutcore/controllers/controller.js
59
59
  frameworks/sproutcore/controllers/object.js
60
60
  frameworks/sproutcore/core.js
61
+ frameworks/sproutcore/debug/unittest.js
61
62
  frameworks/sproutcore/drag/drag.js
62
63
  frameworks/sproutcore/drag/drag_data_source.js
63
64
  frameworks/sproutcore/drag/drag_source.js
@@ -96,6 +97,7 @@ frameworks/sproutcore/foundation/application.js
96
97
  frameworks/sproutcore/foundation/benchmark.js
97
98
  frameworks/sproutcore/foundation/binding.js
98
99
  frameworks/sproutcore/foundation/date.js
100
+ frameworks/sproutcore/foundation/enumerator.js
99
101
  frameworks/sproutcore/foundation/error.js
100
102
  frameworks/sproutcore/foundation/input_manager.js
101
103
  frameworks/sproutcore/foundation/json.js
@@ -107,12 +109,10 @@ frameworks/sproutcore/foundation/path_module.js
107
109
  frameworks/sproutcore/foundation/responder.js
108
110
  frameworks/sproutcore/foundation/routes.js
109
111
  frameworks/sproutcore/foundation/run_loop.js
110
- frameworks/sproutcore/foundation/server.js
111
112
  frameworks/sproutcore/foundation/set.js
112
113
  frameworks/sproutcore/foundation/string.js
113
114
  frameworks/sproutcore/foundation/timer.js
114
115
  frameworks/sproutcore/foundation/undo_manager.js
115
- frameworks/sproutcore/foundation/unittest.js
116
116
  frameworks/sproutcore/foundation/utils.js
117
117
  frameworks/sproutcore/globals/panels.js
118
118
  frameworks/sproutcore/globals/popups.js
@@ -124,11 +124,13 @@ frameworks/sproutcore/lib/core_views.rb
124
124
  frameworks/sproutcore/lib/form_views.rb
125
125
  frameworks/sproutcore/lib/index.rhtml
126
126
  frameworks/sproutcore/lib/menu_views.rb
127
+ frameworks/sproutcore/license.js
127
128
  frameworks/sproutcore/mixins/array.js
128
129
  frameworks/sproutcore/mixins/collection_view_delegate.js
129
130
  frameworks/sproutcore/mixins/control.js
130
131
  frameworks/sproutcore/mixins/delegate_support.js
131
132
  frameworks/sproutcore/mixins/editable.js
133
+ frameworks/sproutcore/mixins/enumerable.js
132
134
  frameworks/sproutcore/mixins/inline_editor_delegate.js
133
135
  frameworks/sproutcore/mixins/observable.js
134
136
  frameworks/sproutcore/mixins/scrollable.js
@@ -145,17 +147,24 @@ frameworks/sproutcore/panes/pane.js
145
147
  frameworks/sproutcore/panes/panel.js
146
148
  frameworks/sproutcore/panes/picker.js
147
149
  frameworks/sproutcore/README
150
+ frameworks/sproutcore/server/rails_server.js
151
+ frameworks/sproutcore/server/rest_server.js
152
+ frameworks/sproutcore/server/server.js
148
153
  frameworks/sproutcore/tests/controllers/array.rhtml
149
154
  frameworks/sproutcore/tests/controllers/controller.rhtml
150
155
  frameworks/sproutcore/tests/controllers/object.rhtml
156
+ frameworks/sproutcore/tests/core/guidFor.rhtml
151
157
  frameworks/sproutcore/tests/foundation/application.rhtml
152
158
  frameworks/sproutcore/tests/foundation/array.rhtml
153
159
  frameworks/sproutcore/tests/foundation/object.rhtml
160
+ frameworks/sproutcore/tests/foundation/set.rhtml
154
161
  frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
155
162
  frameworks/sproutcore/tests/foundation/timer/invokeLater.rhtml
156
163
  frameworks/sproutcore/tests/foundation/timer/isPaused.rhtml
157
164
  frameworks/sproutcore/tests/foundation/timer/schedule.rhtml
158
165
  frameworks/sproutcore/tests/globals/window.rhtml
166
+ frameworks/sproutcore/tests/mixins/enumerable.rhtml
167
+ frameworks/sproutcore/tests/mixins/observable.rhtml
159
168
  frameworks/sproutcore/tests/models/model.rhtml
160
169
  frameworks/sproutcore/tests/panes/pane.rhtml
161
170
  frameworks/sproutcore/tests/views/checkbox.rhtml
@@ -349,7 +358,7 @@ License.txt
349
358
  Manifest.txt
350
359
  Rakefile
351
360
  README.txt
352
- sc-config.rb
361
+ sc-config
353
362
  sc_generators/client/client_generator.rb
354
363
  sc_generators/client/README
355
364
  sc_generators/client/templates/core.js
data/bin/sc-build CHANGED
@@ -46,6 +46,7 @@ verbose = false # show debug level
46
46
  languages = nil
47
47
  clean = false
48
48
  docs = false
49
+ build_all = false
49
50
 
50
51
  opts = OptionParser.new do |opts|
51
52
  opts.version = SproutCore::VERSION::STRING
@@ -87,6 +88,10 @@ opts = OptionParser.new do |opts|
87
88
  opts.on('-d', '--[no-]docs', "Include documentation") do |opt_docs|
88
89
  docs = !!opt_docs
89
90
  end
91
+
92
+ opts.on('-a', '--all', "Build all bundles, including those with autobuild disabled.") do |opt_all|
93
+ build_all = !!opt_all
94
+ end
90
95
 
91
96
  end
92
97
  opts.parse!
@@ -102,6 +107,11 @@ SC.logger.progname = $0
102
107
  # Load Library
103
108
  library = SC.library_for(library_root, :public_root => build_root, :build_mode => build_mode)
104
109
 
110
+ if library.nil?
111
+ SC.logger.fatal("No SproutCore library could be found. Make sure you are inside of your project directory (the one with an sc-config file in it).")
112
+ exit(1)
113
+ end
114
+
105
115
  ############################################################
106
116
  ## FIND BUNDLES TO BUILD
107
117
  ##
@@ -125,7 +135,7 @@ if bundle_name
125
135
 
126
136
  # No bundle provided, get all bundles for library
127
137
  else
128
- bundles = library.bundles
138
+ bundles = (build_all) ? library.bundles : library.default_bundles_for_build
129
139
  SC.logger.info("Building ALL bundles:\n #{bundles.map { |x| x.bundle_name } * ', '}...")
130
140
  end
131
141
 
@@ -134,8 +144,14 @@ end
134
144
  ##
135
145
 
136
146
  # Detect required languages to build
137
- languages = bundles.map { |b| b.installed_languages }.flatten.uniq if languages.nil?
138
- SC.logger.info("Selected Languages: #{languages.join(', ')}")
147
+ # Unless languages are specified on the command line, we build any languages
148
+ # specified in the build_languages config or try to detect any languages with
149
+ # matching code.
150
+ languages ||= library.environment_for(nil)[:build_languages]
151
+ languages = nil unless languages.nil? || languages.size > 0
152
+ languages ||= bundles.map { |b| b.installed_languages }.flatten.uniq
153
+
154
+ SC.logger.info("Building Languages: #{languages.join(', ')}")
139
155
 
140
156
  SC.logger.info('')
141
157
  bundles.each do |bundle|
data/bin/sc-install CHANGED
@@ -89,6 +89,11 @@ if bundle_name.nil?
89
89
  exit(1)
90
90
  end
91
91
 
92
+ if library.nil?
93
+ SC.logger.fatal("No SproutCore library could be found. Make sure you are inside of your project directory (the one with an sc-config file in it).")
94
+ exit(1)
95
+ end
96
+
92
97
  library.install_bundle(bundle_name, options)
93
98
  SC.logger.debug("")
94
99
 
data/bin/sc-remove CHANGED
@@ -87,6 +87,11 @@ if bundle_name.nil?
87
87
  exit(1)
88
88
  end
89
89
 
90
+ if library.nil?
91
+ SC.logger.fatal("No SproutCore library could be found. Make sure you are inside of your project directory (the one with an sc-config file in it).")
92
+ exit(1)
93
+ end
94
+
90
95
  library.remove_bundle(bundle_name, options)
91
96
  SC.logger.debug("")
92
97
 
data/bin/sc-update CHANGED
@@ -87,6 +87,11 @@ if bundle_name.nil?
87
87
  exit(1)
88
88
  end
89
89
 
90
+ if library.nil?
91
+ SC.logger.fatal("No SproutCore library could be found. Make sure you are inside of your project directory (the one with an sc-config file in it).")
92
+ exit(1)
93
+ end
94
+
90
95
  library.update_bundle(bundle_name, options)
91
96
  SC.logger.debug("")
92
97