sproutcore 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. data/History.txt +19 -0
  2. data/Manifest.txt +103 -26
  3. data/app_generators/sproutcore/templates/README +1 -1
  4. data/bin/sc-build +1 -1
  5. data/bin/sc-gen +0 -0
  6. data/bin/sc-ide +278 -0
  7. data/bin/sc-init +38 -0
  8. data/bin/sc-install +96 -0
  9. data/bin/sc-remove +94 -0
  10. data/bin/sc-server +4 -0
  11. data/bin/sc-update +94 -0
  12. data/bin/sproutcore +3 -14
  13. data/clients/sc_docs/controllers/docs.js +1 -1
  14. data/clients/sc_docs/models/doc.js +6 -0
  15. data/clients/sc_docs/views/doc_frame.js +1 -1
  16. data/clients/sc_test_runner/english.lproj/icons/small/next.png +0 -0
  17. data/clients/sc_test_runner/english.lproj/icons/small/reset.png +0 -0
  18. data/frameworks/sproutcore/HISTORY +34 -2
  19. data/frameworks/sproutcore/controllers/array.js +1 -1
  20. data/frameworks/sproutcore/controllers/controller.js +1 -1
  21. data/frameworks/sproutcore/controllers/object.js +9 -6
  22. data/frameworks/sproutcore/core.js +19 -4
  23. data/frameworks/sproutcore/english.lproj/blank.gif +0 -0
  24. data/frameworks/sproutcore/english.lproj/core.css +1 -0
  25. data/frameworks/sproutcore/english.lproj/menu.css +1 -0
  26. data/frameworks/sproutcore/foundation/application.js +3 -3
  27. data/frameworks/sproutcore/foundation/benchmark.js +1 -1
  28. data/frameworks/sproutcore/foundation/node_descriptor.js +13 -1
  29. data/frameworks/sproutcore/foundation/page.js +3 -2
  30. data/frameworks/sproutcore/foundation/path_module.js +33 -16
  31. data/frameworks/sproutcore/foundation/run_loop.js +1 -1
  32. data/frameworks/sproutcore/foundation/server.js +68 -18
  33. data/frameworks/sproutcore/foundation/string.js +1 -1
  34. data/frameworks/sproutcore/globals/window.js +62 -15
  35. data/frameworks/sproutcore/lib/core_views.rb +1 -0
  36. data/frameworks/sproutcore/lib/index.rhtml +4 -3
  37. data/frameworks/sproutcore/lib/menu_views.rb +2 -2
  38. data/frameworks/sproutcore/models/collection.js +122 -107
  39. data/frameworks/sproutcore/models/record.js +2 -2
  40. data/frameworks/sproutcore/panes/manager.js +1 -1
  41. data/frameworks/sproutcore/panes/overlay.js +3 -3
  42. data/frameworks/sproutcore/tests/controllers/object.rhtml +26 -0
  43. data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
  44. data/frameworks/sproutcore/views/button/disclosure.js +1 -1
  45. data/frameworks/sproutcore/views/collection/collection.js +19 -15
  46. data/frameworks/sproutcore/views/collection/source_list.js +1 -1
  47. data/frameworks/sproutcore/views/collection/table.js +2 -2
  48. data/frameworks/sproutcore/views/error_explanation.js +1 -1
  49. data/frameworks/sproutcore/views/field/checkbox_field.js +1 -1
  50. data/frameworks/sproutcore/views/field/field.js +1 -1
  51. data/frameworks/sproutcore/views/field/radio_field.js +1 -1
  52. data/frameworks/sproutcore/views/field/select_field.js +1 -1
  53. data/frameworks/sproutcore/views/form.js +1 -1
  54. data/frameworks/sproutcore/views/image.js +1 -1
  55. data/frameworks/sproutcore/views/menu_item.js +1 -1
  56. data/frameworks/sproutcore/views/popup_button.js +1 -1
  57. data/frameworks/sproutcore/views/popup_menu.js +1 -1
  58. data/frameworks/sproutcore/views/progress.js +4 -2
  59. data/frameworks/sproutcore/views/radio_group.js +1 -1
  60. data/frameworks/sproutcore/views/scroll.js +1 -1
  61. data/frameworks/sproutcore/views/source_list_group.js +1 -1
  62. data/frameworks/sproutcore/views/split.js +1 -1
  63. data/frameworks/sproutcore/views/tab.js +3 -1
  64. data/frameworks/sproutcore/views/view.js +19 -3
  65. data/jsdoc/README.txt +89 -57
  66. data/jsdoc/app/frame/Chain.js +102 -0
  67. data/jsdoc/app/frame/Dumper.js +144 -0
  68. data/jsdoc/app/frame/Hash.js +47 -0
  69. data/jsdoc/app/frame/Link.js +142 -0
  70. data/jsdoc/app/frame/Namespace.js +10 -0
  71. data/jsdoc/app/frame/Opt.js +134 -0
  72. data/jsdoc/app/frame/Reflection.js +26 -0
  73. data/jsdoc/app/frame/String.js +93 -0
  74. data/jsdoc/app/frame/Testrun.js +129 -0
  75. data/jsdoc/app/frame.js +33 -0
  76. data/jsdoc/app/handlers/FOODOC.js +26 -0
  77. data/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
  78. data/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
  79. data/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
  80. data/jsdoc/app/handlers/XMLDOC.js +26 -0
  81. data/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
  82. data/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
  83. data/jsdoc/app/lib/JSDOC/JsDoc.js +180 -0
  84. data/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
  85. data/jsdoc/app/lib/JSDOC/Lang.js +144 -0
  86. data/jsdoc/app/lib/JSDOC/Parser.js +109 -0
  87. data/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
  88. data/jsdoc/app/lib/JSDOC/Symbol.js +600 -0
  89. data/jsdoc/app/lib/JSDOC/SymbolSet.js +220 -0
  90. data/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
  91. data/jsdoc/app/lib/JSDOC/Token.js +18 -0
  92. data/jsdoc/app/lib/JSDOC/TokenReader.js +323 -0
  93. data/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
  94. data/jsdoc/app/lib/JSDOC/Util.js +32 -0
  95. data/jsdoc/app/lib/JSDOC/Walker.js +416 -0
  96. data/jsdoc/app/lib/JSDOC.js +97 -0
  97. data/jsdoc/app/main.js +74 -0
  98. data/jsdoc/app/plugins/commentSrcJson.js +19 -0
  99. data/jsdoc/app/plugins/frameworkPrototype.js +16 -0
  100. data/jsdoc/app/plugins/functionCall.js +10 -0
  101. data/jsdoc/app/plugins/publishSrcHilite.js +62 -0
  102. data/jsdoc/app/plugins/sproutcoreTags.js +26 -0
  103. data/jsdoc/app/plugins/symbolLink.js +9 -0
  104. data/jsdoc/app/plugins/tagParamConfig.js +31 -0
  105. data/jsdoc/app/plugins/tagSynonyms.js +43 -0
  106. data/jsdoc/app/run.js +339 -137
  107. data/jsdoc/changes.txt +47 -0
  108. data/jsdoc/conf/sample.conf +31 -0
  109. data/jsdoc/java/build.xml +36 -0
  110. data/jsdoc/java/build_1.4.xml +36 -0
  111. data/jsdoc/java/classes/js.jar +0 -0
  112. data/jsdoc/java/src/JsDebugRun.java +21 -0
  113. data/jsdoc/java/src/JsRun.java +21 -0
  114. data/jsdoc/jsdebug.jar +0 -0
  115. data/jsdoc/jsrun.jar +0 -0
  116. data/jsdoc/t/TestDoc.js +144 -0
  117. data/jsdoc/t/runner.js +13 -0
  118. data/jsdoc/templates/sproutcore/allclasses.tmpl +17 -0
  119. data/jsdoc/templates/sproutcore/allfiles.tmpl +56 -0
  120. data/jsdoc/templates/sproutcore/class.tmpl +408 -326
  121. data/jsdoc/templates/sproutcore/index.tmpl +30 -31
  122. data/jsdoc/templates/sproutcore/publish.js +173 -81
  123. data/jsdoc/templates/sproutcore/static/default.css +191 -0
  124. data/jsdoc/templates/sproutcore/static/header.html +2 -0
  125. data/jsdoc/templates/sproutcore/static/index.html +19 -0
  126. data/jsdoc/templates/sproutcore/symbol.tmpl +35 -0
  127. data/jsdoc/test/addon.js +24 -0
  128. data/jsdoc/test/anon_inner.js +14 -0
  129. data/jsdoc/test/augments.js +31 -0
  130. data/jsdoc/test/augments2.js +26 -0
  131. data/jsdoc/test/borrows.js +41 -0
  132. data/jsdoc/test/borrows2.js +23 -0
  133. data/jsdoc/test/config.js +22 -0
  134. data/jsdoc/test/constructs.js +18 -0
  135. data/jsdoc/test/encoding.js +10 -0
  136. data/jsdoc/test/encoding_other.js +12 -0
  137. data/jsdoc/test/functions_anon.js +39 -0
  138. data/jsdoc/test/functions_nested.js +33 -0
  139. data/jsdoc/test/global.js +13 -0
  140. data/jsdoc/test/globals.js +25 -0
  141. data/jsdoc/test/ignore.js +10 -0
  142. data/jsdoc/test/inner.js +16 -0
  143. data/jsdoc/test/jsdoc_test.js +477 -0
  144. data/jsdoc/test/lend.js +33 -0
  145. data/jsdoc/test/memberof.js +20 -0
  146. data/jsdoc/test/memberof_constructor.js +15 -0
  147. data/jsdoc/test/name.js +19 -0
  148. data/jsdoc/test/namespace_nested.js +23 -0
  149. data/jsdoc/test/nocode.js +13 -0
  150. data/jsdoc/test/oblit_anon.js +20 -0
  151. data/jsdoc/test/overview.js +20 -0
  152. data/jsdoc/test/param_inline.js +37 -0
  153. data/jsdoc/test/params_optional.js +8 -0
  154. data/jsdoc/test/prototype.js +17 -0
  155. data/jsdoc/test/prototype_nested.js +9 -0
  156. data/jsdoc/test/prototype_oblit.js +13 -0
  157. data/jsdoc/test/prototype_oblit_constructor.js +24 -0
  158. data/jsdoc/test/public.js +10 -0
  159. data/jsdoc/test/shared.js +42 -0
  160. data/jsdoc/test/shared2.js +2 -0
  161. data/jsdoc/test/shortcuts.js +22 -0
  162. data/jsdoc/test/static_this.js +13 -0
  163. data/jsdoc/test/synonyms.js +23 -0
  164. data/jsdoc/test/tosource.js +23 -0
  165. data/jsdoc/test/variable_redefine.js +14 -0
  166. data/jsdoc/test.js +304 -0
  167. data/lib/sproutcore/build_tools/resource_builder.rb +6 -1
  168. data/lib/sproutcore/bundle_installer.rb +268 -0
  169. data/lib/sproutcore/jsdoc.rb +7 -6
  170. data/lib/sproutcore/library.rb +38 -0
  171. data/lib/sproutcore/merb/bundle_controller.rb +8 -4
  172. data/lib/sproutcore/version.rb +1 -1
  173. data/lib/sproutcore.rb +1 -1
  174. data/script/destroy +0 -0
  175. data/script/generate +0 -0
  176. data/script/txt2html +0 -0
  177. metadata +117 -29
  178. data/clients/view_builder/core.js +0 -19
  179. data/clients/view_builder/english.lproj/body.css +0 -149
  180. data/clients/view_builder/english.lproj/body.rhtml +0 -18
  181. data/clients/view_builder/english.lproj/strings.js +0 -14
  182. data/clients/view_builder/main.js +0 -37
  183. data/jsdoc/app/DocFile.js +0 -137
  184. data/jsdoc/app/DocTag.js +0 -110
  185. data/jsdoc/app/Doclet.js +0 -63
  186. data/jsdoc/app/Dumper.js +0 -143
  187. data/jsdoc/app/JsDoc.js +0 -103
  188. data/jsdoc/app/JsHilite.js +0 -45
  189. data/jsdoc/app/JsIO.js +0 -163
  190. data/jsdoc/app/JsParse.js +0 -385
  191. data/jsdoc/app/JsPlate.js +0 -130
  192. data/jsdoc/app/JsTestrun.js +0 -129
  193. data/jsdoc/app/JsToke.js +0 -564
  194. data/jsdoc/app/Symbol.js +0 -298
  195. data/jsdoc/app/Transformer.js +0 -14
  196. data/jsdoc/app/Util.js +0 -97
  197. data/jsdoc/app/js.jar +0 -0
  198. data/jsdoc/plugins/min.js +0 -316
  199. data/jsdoc/plugins/strip.js +0 -20
  200. data/jsdoc/templates/sproutcore/default.css +0 -191
  201. data/jsdoc/templates/sproutcore/index.html +0 -13
  202. data/jsdoc/templates/sproutcore/prototype.js +0 -4186
  203. data/jsdoc/templates/sproutcore/splash.html +0 -7
@@ -0,0 +1,268 @@
1
+ require 'pathname'
2
+
3
+ module SproutCore
4
+
5
+ # An installer can install, update or remove frameworks and clients in a
6
+ # project. You generally will not work with an installer instance directly
7
+ # but instead call the install methods on the SC.library which will
8
+ # instantiate an installer class for you.
9
+ class BundleInstaller
10
+
11
+ attr :library
12
+ attr :target
13
+
14
+ def self.configure_tool_options(opts, options = {})
15
+
16
+ can_install = options[:can_install].nil? ? true : options[:can_install]
17
+
18
+ ### General Options
19
+
20
+ opts.on("-d", "--dry-run", "Logs the expected behavior of this utility without actually changing anything.") do |opt_dry_run|
21
+ options[:dry_run] = opt_dry_run
22
+ end
23
+
24
+ opts.on("-v", "--[no-]verbose", "If set, extra debug output will be displayed during the build") do |opt_verbose|
25
+ options[:verbose] = !!opt_verbose
26
+ end
27
+
28
+ opts.on("-l", "--library=PATH", "Normally sc-install works within the library of your working directory. You can name an arbitrary location for the library with this option instead.") do |opt_library|
29
+ options[:library_root] = opt_library
30
+ end
31
+
32
+ opts.on("-t", "--target=PATH", "Set the install path for the bundle. This can be either a bundle name or an absolute path.") do |opt_target|
33
+ options[:target] = opt_target
34
+ end
35
+
36
+ ### Install Only Options
37
+
38
+ if can_install
39
+ opts.on("-s", "--source=URL", "Specify a URL to install from. You can provide either a full URL or just the path on github to your project. The tool assumes that the url you provide plus '.git' can be used to clone the project.")
40
+
41
+ opts.on("-f", "--[no-]force", "Normally SproutCore will not install a bundle if a directory already exists at the install location. If you include this option, it will forceably install bundles even if it has to delete an existing directory.") do |opt_force|
42
+ options[:force] = !!opt_force
43
+ end
44
+ end
45
+
46
+ end
47
+
48
+ # ==== Options
49
+ # :library :: the owner library. Required.
50
+ # :target :: the target output directory. Defaults to :frameworks
51
+ #
52
+ def initialize(opts = {})
53
+ @library = opts[:library]
54
+ @target = opts[:target] || :frameworks
55
+ end
56
+
57
+ # ==== Returns
58
+ # The install directory as currently configured. Requires library and
59
+ # target.
60
+ def install_root
61
+ raise "BundleInstaller cannot be used without a library" if library.nil?
62
+ File.join(library.root_path, target.to_s)
63
+ end
64
+
65
+ # Attempts to install the named bundle using any passed options. If a
66
+ # directory already exists at the install path location, then this method
67
+ # will attempt to update the bundle there rather than install it.
68
+ #
69
+ def install(bundle_name, opts ={})
70
+
71
+ # Calculate the install path. If a directory already exists at the
72
+ # location, try an update instead.
73
+ install_path = normalize_install_path(bundle_name, opts)
74
+ if !opts[:skip_check] && File.exists?(install_path)
75
+ if opts[:force]
76
+ remove(bundle_name, opts)
77
+ opts.delete(:force)
78
+ opts[:skip_check] = true if opts[:dry_run]
79
+ install(bundle_name, opts)
80
+ else
81
+ display_path = display_path_for(install_path)
82
+ SC.logger.warn %(#{bundle_name} appears to be installed already!)
83
+ SC.logger.info %( ~ If you do not think this bundle is properly installed remove the directory at:)
84
+ SC.logger.info %( ~ #{install_path})
85
+ SC.logger.info %( ~ and try again.)
86
+ end
87
+
88
+ # Directory does not exist at install location, fetch the resource...
89
+ else
90
+ # Compute/normalize the github path
91
+ github_path = normalize_github_path(bundle_name, opts)
92
+ SC.logger.info("Installing #{bundle_name}...")
93
+ self.fetch(github_path, install_path, opts)
94
+ end
95
+
96
+ end
97
+
98
+ # Attempts to update the named bundle to the latest revision using any
99
+ # passed options. If the directory does not contain a git repository,
100
+ # and the :force option is set, then this tool will delete the file at the
101
+ # specified location and re-install it.
102
+ def update(bundle_name, opts = {})
103
+ install_path = normalize_install_path(bundle_name, opts)
104
+ display_path = display_path_for(install_path)
105
+ git_path = File.join(install_path, '.git')
106
+
107
+ if (!File.exists?(install_path))
108
+ SC.logger.info(" ~ #{bundle_name} is not installed.")
109
+ self.install(bundle_name, opts)
110
+
111
+ elsif File.exists?(git_path)
112
+ SC.logger.info("Updating #{bundle_name} at #{display_path}...")
113
+ if !has_git?
114
+ SC.logger.warn(" ~ git it not installed!")
115
+ raise "Cannot update because git is installed"
116
+ else
117
+ SC.logger.debug(" ~ cd #{install_path};")
118
+ SC.logger.debug(" ~ git pull")
119
+ if !opts[:dry_run]
120
+ `cd #{install_path}; git pull`
121
+ end
122
+ end
123
+
124
+ elsif opts[:force]
125
+ SC.logger.info("Updating #{bundle_name} at #{display_path}...")
126
+ SC.logger.warn(" ~ Installed bundle was not installed using git. Removing and reinstalling instead.")
127
+ remove(bundle_name, opts)
128
+ install(bundle_name, opts)
129
+
130
+ else
131
+
132
+ SC.logger.info("Updating #{bundle_name} at #{display_path}...")
133
+ SC.logger.fatal(" ~ Something is already installed at #{display_path} that cannot be updated!")
134
+ SC.logger.fatal(" ~ Try the --force option to remove and reinstall instead.")
135
+ end
136
+
137
+ end
138
+
139
+ # Attemps to remove the bundle installed at the specified location.
140
+ def remove(bundle_name, opts = {})
141
+ install_path = normalize_install_path(bundle_name, opts)
142
+ display_path = display_path_for(install_path)
143
+ if File.exists?(install_path)
144
+ SC.logger.info("Removing #{bundle_name} at #{install_path}")
145
+ SC.logger.debug(" ~ rm_rf #{install_path}")
146
+ if !opts[:dry_run]
147
+ FileUtils.rm_rf(install_path)
148
+ end
149
+ else
150
+ SC.logger.warn("Bundle #{bundle_name} is not installed at #{display_path}.")
151
+ SC.logger.info(" ~ You can specify an alternate location using the --target option.")
152
+ end
153
+ end
154
+
155
+ # Tries to fetch the specified github_path to the named location. If the
156
+ # fetched path uses tar/zip, then the file will be decompressed into that
157
+ # location.
158
+ #
159
+ # ==== Options
160
+ # :method :: Indicates the preferred fetch form. Can be git, zip, or tar
161
+ def fetch(github_path, install_path, opts)
162
+ SC.logger.info(" ~ Fetching from #{github_path}")
163
+ method = opts[:method] || (has_git? ? :git : has_zip? ? :zip : :tar)
164
+
165
+ SC.logger.debug(" ~ using method: #{method}")
166
+
167
+ if (method == :git) && has_git?
168
+ install_dir = File.dirname(install_path)
169
+ install_filename = File.basename(install_path)
170
+ SC.logger.debug %( ~ cd #{install_dir};)
171
+ SC.logger.debug %( ~ git clone #{github_path}.git "#{install_filename}")
172
+
173
+ if !opts[:dry_run]
174
+ result = `cd #{install_dir}; git clone #{github_path}.git "#{install_filename}"`
175
+ end
176
+
177
+ elsif (method == :zip) && has_zip?
178
+ raise "ZIP not yet supported!"
179
+
180
+ elsif (method == :tar) && has_tar?
181
+ raise "TAR not yet supported!"
182
+
183
+ # If none of the fetch mechanisms are installed, ask the user to
184
+ # install git.
185
+ else
186
+ SC.logger.info(" ~ Cannot fetch because git is not installed")
187
+ SC.logger.info(" ~ Please install git and try again.")
188
+ raise "No fetch tool installed"
189
+ end
190
+ end
191
+
192
+ # ==== Returns
193
+ # true if zip appears to be installed.
194
+ def has_zip?; @has_zip = has_tool?('zip -v', @has_zip); end
195
+
196
+ # ==== Returns
197
+ # true if git appears to be installed
198
+ def has_git?; @has_git = has_tool?('git --version', @has_git); end
199
+
200
+ # ==== Returns
201
+ # true if tar appears to be installed
202
+ def has_tar?; @has_tar = has_tool?('tar --usage', @has_tar); end
203
+
204
+ protected
205
+
206
+ def normalize_github_path(bundle_name, opts ={})
207
+ github_path = opts[:source]
208
+
209
+ # If a path was given, try to clean it up...
210
+ if github_path
211
+ # if http, then everything is cool...
212
+ if !(github_path =~ /^http/)
213
+ # append / if needed...
214
+ github_path = "/#{github_path}" unless github_path =~ /^\//
215
+ # prepend hostname
216
+ github_path = "http://github.com#{github_path}"
217
+ end
218
+
219
+ else
220
+ bundle_string = bundle_name.to_s.downcase.gsub(" ",'-')
221
+
222
+ # sproutcore and prototype are special cases...
223
+ if bundle_name == 'sproutcore'
224
+ github_path = '/sproutit/sproutcore'
225
+
226
+ elsif ['prototype', 'jquery'].include?(bundle_string)
227
+ github_path = "/sproutit/sproutcore-#{bundle_string}"
228
+
229
+ # Typical bundle name like okito-plotkit ->
230
+ # /okito/sproutcore-plotkit.git
231
+ else
232
+ github_account, github_project = bundle_string.split('-')
233
+ if github_project.nil?
234
+ github_project = github_account
235
+ github_account = 'sproutit'
236
+ end
237
+ github_path = "/#{github_account}/sproutcore-#{github_project}"
238
+ end
239
+
240
+ # Add hostname
241
+ github_path = "git://github.com#{github_path}"
242
+ end
243
+
244
+ return github_path
245
+ end
246
+
247
+ # Computes the normalized install path for the bundle.
248
+ def normalize_install_path(bundle_name, opts = {})
249
+ install_name = opts[:target] || bundle_name.to_s.downcase
250
+ is_absolute = Pathname.new(install_name).absolute?
251
+
252
+ # Add install_root unless pathname is absolute
253
+ is_absolute ? install_name : File.expand_path(File.join(install_root, install_name))
254
+ end
255
+
256
+ def display_path_for(install_path)
257
+ install_path.gsub(/^#{library.root_path}\/?/,'')
258
+ end
259
+
260
+ def has_tool?(tool_name, cached_result)
261
+ return cached_result unless cached_result.nil?
262
+ test_exec = `#{tool_name}` rescue nil
263
+ return !test_exec.nil? && test_exec.size > 0
264
+ end
265
+
266
+ end
267
+
268
+ end
@@ -20,7 +20,7 @@ module SproutCore
20
20
  files = opts[:files]
21
21
  if files.nil?
22
22
  raise "MISSING OPTION: :bundle => bundle or :files => list of files required for JSDoc" if bundle.nil?
23
- entries = bundle.entries_for(:javascript, :hidden => :include)
23
+ entries = bundle.sorted_javascript_entries(:hidden => :include)
24
24
  files = entries.map { |x| x.composite? ? nil : x.source_path }.compact.uniq
25
25
  end
26
26
 
@@ -29,16 +29,17 @@ module SproutCore
29
29
 
30
30
  # Now run jsdoc
31
31
  jsdoc_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'jsdoc'))
32
- jar_path = File.join(jsdoc_root, 'app', 'js.jar')
32
+ jar_path = File.join(jsdoc_root, 'jsrun.jar')
33
33
  runjs_path = File.join(jsdoc_root, 'app', 'run.js')
34
34
  template_path = File.join(jsdoc_root, 'templates', 'sproutcore')
35
-
36
- puts %(GENERATING: java -Djsdoc.dir="#{jsdoc_root}" -jar "#{jar_path}" "#{runjs_path}" -t="#{template_path}" -d="#{build_path}" "#{ files * '" "' }" -v)
37
-
35
+
38
36
  # wrap files in quotes...
37
+ # Note: using -server gives an approx. 25% speed boost over -client (the default)
38
+ js_doc_cmd = %(java -server -Djsdoc.dir="#{jsdoc_root}" -jar "#{jar_path}" "#{runjs_path}" -t="#{template_path}" -d="#{build_path}" "#{ files * '" "' }" -v)
39
39
 
40
- SC.logger.debug `java -Djsdoc.dir="#{jsdoc_root}" -jar "#{jar_path}" "#{runjs_path}" -t="#{template_path}" -d="#{build_path}" "#{ files * '" "' }" -v`
40
+ puts "GENERATING: #{js_doc_cmd}"
41
41
 
42
+ SC.logger.debug `#{js_doc_cmd}`
42
43
  end
43
44
  end
44
45
  end
@@ -286,6 +286,44 @@ module SproutCore
286
286
  [(env[:include_fixtures] || :development)].flatten
287
287
  end
288
288
 
289
+ # ==== Returns
290
+ # A BundleInstaller configured for the receiver library.
291
+ #
292
+ def bundle_installer
293
+ @bundle_installer ||= BundleInstaller.new(:library => self)
294
+ end
295
+
296
+ # Install a named bundle from github. This feature requires
297
+ # git to be installed unless you are on a system that supports
298
+ # tar, in which case it can install using tar.
299
+ #
300
+ # ==== Params
301
+ # bundle_name :: the bundle name
302
+ #
303
+ # ==== Options
304
+ # :github_path :: the root path on github for the project. By default
305
+ # this is calculated from the bundle name.
306
+ # :install_path :: optional path to install
307
+ # :method :: optional preferred method. May be :git, :zip, :tar
308
+ # :force :: If a directory already exists at the install path, deletes
309
+ # and replaces it.
310
+ #
311
+ def install_bundle(bundle_name, opts = {})
312
+ self.bundle_installer.install(bundle_name, opts)
313
+ end
314
+
315
+ # Update a named bundle. This feature required git to be installed
316
+ #
317
+ def update_bundle(bundle_name, opts = {})
318
+ self.bundle_installer.update(bundle_name, opts)
319
+ end
320
+
321
+ # Removed a named bundle.
322
+ #
323
+ def remove_bundle(bundle_name, opts = {})
324
+ self.bundle_installer.remove(bundle_name, opts)
325
+ end
326
+
289
327
  protected
290
328
 
291
329
  # Load the library at the specified path. Loads the sc-config.rb if it
@@ -4,8 +4,6 @@ require 'uri'
4
4
 
5
5
  module SproutCore
6
6
 
7
- NO_BODY_METHOD = [:delete, :get, :copy, :head, :move, :options, :trace]
8
-
9
7
  module Merb
10
8
 
11
9
  # A subclass of this controller handles all incoming requests for the
@@ -148,6 +146,12 @@ module SproutCore
148
146
  headers[key] = value
149
147
  end
150
148
 
149
+ # add the Content-Type header
150
+ if(request.content_type)
151
+ headers['Content-Type'] = request.content_type;
152
+ SC.logger.debug "Content-Type: #{headers['Content-Type']}"
153
+ end
154
+
151
155
  uri = URI.parse(proxy_url)
152
156
  http_host = uri.host
153
157
  http_port = uri.port
@@ -158,9 +162,9 @@ module SproutCore
158
162
  response = nil
159
163
 
160
164
  # Handle those that require a body.
161
-
165
+ no_body_method = %w(delete get copy head move options trace)
162
166
  ::Net::HTTP.start(http_host, http_port) do |http|
163
- if NO_BODY_METHOD.include?(http_method.to_sym)
167
+ if no_body_method.include?(http_method.to_s.downcase)
164
168
  response = http.send(http_method, http_path, headers)
165
169
  else
166
170
  http_body = request.raw_post
@@ -2,7 +2,7 @@ module SproutCore #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 13
5
+ TINY = 14
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/sproutcore.rb CHANGED
@@ -21,7 +21,7 @@ module SproutCore
21
21
  end
22
22
 
23
23
  # Force load the code files. Others may be loaded only as required
24
- %w(library bundle bundle_manifest jsdoc jsmin version).each do |fname|
24
+ %w(library bundle bundle_manifest bundle_installer jsdoc jsmin version).each do |fname|
25
25
  require "sproutcore/#{fname}"
26
26
  end
27
27
 
data/script/destroy CHANGED
File without changes
data/script/generate CHANGED
File without changes
data/script/txt2html CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sproutcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Jolley
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-01 00:00:00 -07:00
12
+ date: 2008-07-20 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
@@ -23,6 +24,7 @@ dependencies:
23
24
  version:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: merb-core
27
+ type: :runtime
26
28
  version_requirement:
27
29
  version_requirements: !ruby/object:Gem::Requirement
28
30
  requirements:
@@ -32,6 +34,7 @@ dependencies:
32
34
  version:
33
35
  - !ruby/object:Gem::Dependency
34
36
  name: erubis
37
+ type: :runtime
35
38
  version_requirement:
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
@@ -41,6 +44,7 @@ dependencies:
41
44
  version:
42
45
  - !ruby/object:Gem::Dependency
43
46
  name: rubigen
47
+ type: :runtime
44
48
  version_requirement:
45
49
  version_requirements: !ruby/object:Gem::Requirement
46
50
  requirements:
@@ -50,6 +54,7 @@ dependencies:
50
54
  version:
51
55
  - !ruby/object:Gem::Dependency
52
56
  name: mongrel
57
+ type: :runtime
53
58
  version_requirement:
54
59
  version_requirements: !ruby/object:Gem::Requirement
55
60
  requirements:
@@ -63,12 +68,18 @@ email:
63
68
  executables:
64
69
  - sc-build
65
70
  - sc-gen
71
+ - sc-ide
72
+ - sc-init
73
+ - sc-install
74
+ - sc-remove
66
75
  - sc-server
76
+ - sc-update
67
77
  - sproutcore
68
78
  extensions: []
69
79
 
70
80
  extra_rdoc_files:
71
81
  - History.txt
82
+ - jsdoc/changes.txt
72
83
  - jsdoc/README.txt
73
84
  - License.txt
74
85
  - Manifest.txt
@@ -80,7 +91,12 @@ files:
80
91
  - app_generators/sproutcore/USAGE
81
92
  - bin/sc-build
82
93
  - bin/sc-gen
94
+ - bin/sc-ide
95
+ - bin/sc-init
96
+ - bin/sc-install
97
+ - bin/sc-remove
83
98
  - bin/sc-server
99
+ - bin/sc-update
84
100
  - bin/sproutcore
85
101
  - clients/sc_docs/controllers/docs.js
86
102
  - clients/sc_docs/core.js
@@ -119,11 +135,6 @@ files:
119
135
  - clients/sc_test_runner/README
120
136
  - clients/sc_test_runner/views/runner_frame.js
121
137
  - clients/sc_test_runner/views/test_label.js
122
- - clients/view_builder/core.js
123
- - clients/view_builder/english.lproj/body.css
124
- - clients/view_builder/english.lproj/body.rhtml
125
- - clients/view_builder/english.lproj/strings.js
126
- - clients/view_builder/main.js
127
138
  - config/hoe.rb
128
139
  - config/requirements.rb
129
140
  - frameworks/prototype/HISTORY
@@ -298,36 +309,113 @@ files:
298
309
  - frameworks/sproutcore/views/toolbar.js
299
310
  - frameworks/sproutcore/views/view.js
300
311
  - History.txt
301
- - jsdoc/app/DocFile.js
302
- - jsdoc/app/Doclet.js
303
- - jsdoc/app/DocTag.js
304
- - jsdoc/app/Dumper.js
305
- - jsdoc/app/js.jar
306
- - jsdoc/app/JsDoc.js
307
- - jsdoc/app/JsHilite.js
308
- - jsdoc/app/JsIO.js
309
- - jsdoc/app/JsParse.js
310
- - jsdoc/app/JsPlate.js
311
- - jsdoc/app/JsTestrun.js
312
- - jsdoc/app/JsToke.js
312
+ - jsdoc/app/frame/Chain.js
313
+ - jsdoc/app/frame/Dumper.js
314
+ - jsdoc/app/frame/Hash.js
315
+ - jsdoc/app/frame/Link.js
316
+ - jsdoc/app/frame/Namespace.js
317
+ - jsdoc/app/frame/Opt.js
318
+ - jsdoc/app/frame/Reflection.js
319
+ - jsdoc/app/frame/String.js
320
+ - jsdoc/app/frame/Testrun.js
321
+ - jsdoc/app/frame.js
322
+ - jsdoc/app/handlers/FOODOC.js
323
+ - jsdoc/app/handlers/XMLDOC/DomReader.js
324
+ - jsdoc/app/handlers/XMLDOC/XMLDoc.js
325
+ - jsdoc/app/handlers/XMLDOC/XMLParse.js
326
+ - jsdoc/app/handlers/XMLDOC.js
327
+ - jsdoc/app/lib/JSDOC/DocComment.js
328
+ - jsdoc/app/lib/JSDOC/DocTag.js
329
+ - jsdoc/app/lib/JSDOC/JsDoc.js
330
+ - jsdoc/app/lib/JSDOC/JsPlate.js
331
+ - jsdoc/app/lib/JSDOC/Lang.js
332
+ - jsdoc/app/lib/JSDOC/Parser.js
333
+ - jsdoc/app/lib/JSDOC/PluginManager.js
334
+ - jsdoc/app/lib/JSDOC/Symbol.js
335
+ - jsdoc/app/lib/JSDOC/SymbolSet.js
336
+ - jsdoc/app/lib/JSDOC/TextStream.js
337
+ - jsdoc/app/lib/JSDOC/Token.js
338
+ - jsdoc/app/lib/JSDOC/TokenReader.js
339
+ - jsdoc/app/lib/JSDOC/TokenStream.js
340
+ - jsdoc/app/lib/JSDOC/Util.js
341
+ - jsdoc/app/lib/JSDOC/Walker.js
342
+ - jsdoc/app/lib/JSDOC.js
343
+ - jsdoc/app/main.js
344
+ - jsdoc/app/plugins/commentSrcJson.js
345
+ - jsdoc/app/plugins/frameworkPrototype.js
346
+ - jsdoc/app/plugins/functionCall.js
347
+ - jsdoc/app/plugins/publishSrcHilite.js
348
+ - jsdoc/app/plugins/sproutcoreTags.js
349
+ - jsdoc/app/plugins/symbolLink.js
350
+ - jsdoc/app/plugins/tagParamConfig.js
351
+ - jsdoc/app/plugins/tagSynonyms.js
313
352
  - jsdoc/app/run.js
314
- - jsdoc/app/Symbol.js
315
- - jsdoc/app/Transformer.js
316
- - jsdoc/app/Util.js
317
- - jsdoc/plugins/min.js
318
- - jsdoc/plugins/strip.js
353
+ - jsdoc/changes.txt
354
+ - jsdoc/conf/sample.conf
355
+ - jsdoc/java/build.xml
356
+ - jsdoc/java/build_1.4.xml
357
+ - jsdoc/java/classes/js.jar
358
+ - jsdoc/java/src/JsDebugRun.java
359
+ - jsdoc/java/src/JsRun.java
360
+ - jsdoc/jsdebug.jar
361
+ - jsdoc/jsrun.jar
319
362
  - jsdoc/README.txt
363
+ - jsdoc/t/runner.js
364
+ - jsdoc/t/TestDoc.js
365
+ - jsdoc/templates/sproutcore/allclasses.tmpl
366
+ - jsdoc/templates/sproutcore/allfiles.tmpl
320
367
  - jsdoc/templates/sproutcore/class.tmpl
321
- - jsdoc/templates/sproutcore/default.css
322
- - jsdoc/templates/sproutcore/index.html
323
368
  - jsdoc/templates/sproutcore/index.tmpl
324
- - jsdoc/templates/sproutcore/prototype.js
325
369
  - jsdoc/templates/sproutcore/publish.js
326
- - jsdoc/templates/sproutcore/splash.html
370
+ - jsdoc/templates/sproutcore/static/default.css
371
+ - jsdoc/templates/sproutcore/static/header.html
372
+ - jsdoc/templates/sproutcore/static/index.html
373
+ - jsdoc/templates/sproutcore/symbol.tmpl
374
+ - jsdoc/test/addon.js
375
+ - jsdoc/test/anon_inner.js
376
+ - jsdoc/test/augments.js
377
+ - jsdoc/test/augments2.js
378
+ - jsdoc/test/borrows.js
379
+ - jsdoc/test/borrows2.js
380
+ - jsdoc/test/config.js
381
+ - jsdoc/test/constructs.js
382
+ - jsdoc/test/encoding.js
383
+ - jsdoc/test/encoding_other.js
384
+ - jsdoc/test/functions_anon.js
385
+ - jsdoc/test/functions_nested.js
386
+ - jsdoc/test/global.js
387
+ - jsdoc/test/globals.js
388
+ - jsdoc/test/ignore.js
389
+ - jsdoc/test/inner.js
390
+ - jsdoc/test/jsdoc_test.js
391
+ - jsdoc/test/lend.js
392
+ - jsdoc/test/memberof.js
393
+ - jsdoc/test/memberof_constructor.js
394
+ - jsdoc/test/name.js
395
+ - jsdoc/test/namespace_nested.js
396
+ - jsdoc/test/nocode.js
397
+ - jsdoc/test/oblit_anon.js
398
+ - jsdoc/test/overview.js
399
+ - jsdoc/test/param_inline.js
400
+ - jsdoc/test/params_optional.js
401
+ - jsdoc/test/prototype.js
402
+ - jsdoc/test/prototype_nested.js
403
+ - jsdoc/test/prototype_oblit.js
404
+ - jsdoc/test/prototype_oblit_constructor.js
405
+ - jsdoc/test/public.js
406
+ - jsdoc/test/shared.js
407
+ - jsdoc/test/shared2.js
408
+ - jsdoc/test/shortcuts.js
409
+ - jsdoc/test/static_this.js
410
+ - jsdoc/test/synonyms.js
411
+ - jsdoc/test/tosource.js
412
+ - jsdoc/test/variable_redefine.js
413
+ - jsdoc/test.js
327
414
  - lib/sproutcore/build_tools/html_builder.rb
328
415
  - lib/sproutcore/build_tools/resource_builder.rb
329
416
  - lib/sproutcore/build_tools.rb
330
417
  - lib/sproutcore/bundle.rb
418
+ - lib/sproutcore/bundle_installer.rb
331
419
  - lib/sproutcore/bundle_manifest.rb
332
420
  - lib/sproutcore/generator_helper.rb
333
421
  - lib/sproutcore/helpers/capture_helper.rb
@@ -415,7 +503,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
503
  requirements: []
416
504
 
417
505
  rubyforge_project: sproutcore
418
- rubygems_version: 1.0.1
506
+ rubygems_version: 1.2.0
419
507
  signing_key:
420
508
  specification_version: 2
421
509
  summary: SproutCore - JavaScript Application Framework + Build Tools
@@ -1,19 +0,0 @@
1
- // ==========================================================================
2
- // ViewBuilder
3
- // ==========================================================================
4
-
5
- ViewBuilder = SC.Object.create({
6
-
7
- // This will create the server for your application. Add any namespaces
8
- // your model objects are defined in to the prefix array.
9
- server: SC.Server.create({ prefix: ['ViewBuilder'] }),
10
-
11
- // When you are in development mode, this array will be populated with
12
- // any fixtures you create for testing and loaded automatically in your
13
- // main method. When in production, this will be an empty array.
14
- FIXTURES: [],
15
-
16
- // Any keys in this array will be instantiated automatically from main.
17
- controllers: []
18
-
19
- }) ;