sproutcore 0.9.13 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +19 -0
- data/Manifest.txt +103 -26
- data/app_generators/sproutcore/templates/README +1 -1
- data/bin/sc-build +1 -1
- data/bin/sc-gen +0 -0
- data/bin/sc-ide +278 -0
- data/bin/sc-init +38 -0
- data/bin/sc-install +96 -0
- data/bin/sc-remove +94 -0
- data/bin/sc-server +4 -0
- data/bin/sc-update +94 -0
- data/bin/sproutcore +3 -14
- data/clients/sc_docs/controllers/docs.js +1 -1
- data/clients/sc_docs/models/doc.js +6 -0
- data/clients/sc_docs/views/doc_frame.js +1 -1
- data/clients/sc_test_runner/english.lproj/icons/small/next.png +0 -0
- data/clients/sc_test_runner/english.lproj/icons/small/reset.png +0 -0
- data/frameworks/sproutcore/HISTORY +34 -2
- data/frameworks/sproutcore/controllers/array.js +1 -1
- data/frameworks/sproutcore/controllers/controller.js +1 -1
- data/frameworks/sproutcore/controllers/object.js +9 -6
- data/frameworks/sproutcore/core.js +19 -4
- data/frameworks/sproutcore/english.lproj/blank.gif +0 -0
- data/frameworks/sproutcore/english.lproj/core.css +1 -0
- data/frameworks/sproutcore/english.lproj/menu.css +1 -0
- data/frameworks/sproutcore/foundation/application.js +3 -3
- data/frameworks/sproutcore/foundation/benchmark.js +1 -1
- data/frameworks/sproutcore/foundation/node_descriptor.js +13 -1
- data/frameworks/sproutcore/foundation/page.js +3 -2
- data/frameworks/sproutcore/foundation/path_module.js +33 -16
- data/frameworks/sproutcore/foundation/run_loop.js +1 -1
- data/frameworks/sproutcore/foundation/server.js +68 -18
- data/frameworks/sproutcore/foundation/string.js +1 -1
- data/frameworks/sproutcore/globals/window.js +62 -15
- data/frameworks/sproutcore/lib/core_views.rb +1 -0
- data/frameworks/sproutcore/lib/index.rhtml +4 -3
- data/frameworks/sproutcore/lib/menu_views.rb +2 -2
- data/frameworks/sproutcore/models/collection.js +122 -107
- data/frameworks/sproutcore/models/record.js +2 -2
- data/frameworks/sproutcore/panes/manager.js +1 -1
- data/frameworks/sproutcore/panes/overlay.js +3 -3
- data/frameworks/sproutcore/tests/controllers/object.rhtml +26 -0
- data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
- data/frameworks/sproutcore/views/button/disclosure.js +1 -1
- data/frameworks/sproutcore/views/collection/collection.js +19 -15
- data/frameworks/sproutcore/views/collection/source_list.js +1 -1
- data/frameworks/sproutcore/views/collection/table.js +2 -2
- data/frameworks/sproutcore/views/error_explanation.js +1 -1
- data/frameworks/sproutcore/views/field/checkbox_field.js +1 -1
- data/frameworks/sproutcore/views/field/field.js +1 -1
- data/frameworks/sproutcore/views/field/radio_field.js +1 -1
- data/frameworks/sproutcore/views/field/select_field.js +1 -1
- data/frameworks/sproutcore/views/form.js +1 -1
- data/frameworks/sproutcore/views/image.js +1 -1
- data/frameworks/sproutcore/views/menu_item.js +1 -1
- data/frameworks/sproutcore/views/popup_button.js +1 -1
- data/frameworks/sproutcore/views/popup_menu.js +1 -1
- data/frameworks/sproutcore/views/progress.js +4 -2
- data/frameworks/sproutcore/views/radio_group.js +1 -1
- data/frameworks/sproutcore/views/scroll.js +1 -1
- data/frameworks/sproutcore/views/source_list_group.js +1 -1
- data/frameworks/sproutcore/views/split.js +1 -1
- data/frameworks/sproutcore/views/tab.js +3 -1
- data/frameworks/sproutcore/views/view.js +19 -3
- data/jsdoc/README.txt +89 -57
- data/jsdoc/app/frame/Chain.js +102 -0
- data/jsdoc/app/frame/Dumper.js +144 -0
- data/jsdoc/app/frame/Hash.js +47 -0
- data/jsdoc/app/frame/Link.js +142 -0
- data/jsdoc/app/frame/Namespace.js +10 -0
- data/jsdoc/app/frame/Opt.js +134 -0
- data/jsdoc/app/frame/Reflection.js +26 -0
- data/jsdoc/app/frame/String.js +93 -0
- data/jsdoc/app/frame/Testrun.js +129 -0
- data/jsdoc/app/frame.js +33 -0
- data/jsdoc/app/handlers/FOODOC.js +26 -0
- data/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
- data/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
- data/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
- data/jsdoc/app/handlers/XMLDOC.js +26 -0
- data/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
- data/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
- data/jsdoc/app/lib/JSDOC/JsDoc.js +180 -0
- data/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
- data/jsdoc/app/lib/JSDOC/Lang.js +144 -0
- data/jsdoc/app/lib/JSDOC/Parser.js +109 -0
- data/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
- data/jsdoc/app/lib/JSDOC/Symbol.js +600 -0
- data/jsdoc/app/lib/JSDOC/SymbolSet.js +220 -0
- data/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
- data/jsdoc/app/lib/JSDOC/Token.js +18 -0
- data/jsdoc/app/lib/JSDOC/TokenReader.js +323 -0
- data/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
- data/jsdoc/app/lib/JSDOC/Util.js +32 -0
- data/jsdoc/app/lib/JSDOC/Walker.js +416 -0
- data/jsdoc/app/lib/JSDOC.js +97 -0
- data/jsdoc/app/main.js +74 -0
- data/jsdoc/app/plugins/commentSrcJson.js +19 -0
- data/jsdoc/app/plugins/frameworkPrototype.js +16 -0
- data/jsdoc/app/plugins/functionCall.js +10 -0
- data/jsdoc/app/plugins/publishSrcHilite.js +62 -0
- data/jsdoc/app/plugins/sproutcoreTags.js +26 -0
- data/jsdoc/app/plugins/symbolLink.js +9 -0
- data/jsdoc/app/plugins/tagParamConfig.js +31 -0
- data/jsdoc/app/plugins/tagSynonyms.js +43 -0
- data/jsdoc/app/run.js +339 -137
- data/jsdoc/changes.txt +47 -0
- data/jsdoc/conf/sample.conf +31 -0
- data/jsdoc/java/build.xml +36 -0
- data/jsdoc/java/build_1.4.xml +36 -0
- data/jsdoc/java/classes/js.jar +0 -0
- data/jsdoc/java/src/JsDebugRun.java +21 -0
- data/jsdoc/java/src/JsRun.java +21 -0
- data/jsdoc/jsdebug.jar +0 -0
- data/jsdoc/jsrun.jar +0 -0
- data/jsdoc/t/TestDoc.js +144 -0
- data/jsdoc/t/runner.js +13 -0
- data/jsdoc/templates/sproutcore/allclasses.tmpl +17 -0
- data/jsdoc/templates/sproutcore/allfiles.tmpl +56 -0
- data/jsdoc/templates/sproutcore/class.tmpl +408 -326
- data/jsdoc/templates/sproutcore/index.tmpl +30 -31
- data/jsdoc/templates/sproutcore/publish.js +173 -81
- data/jsdoc/templates/sproutcore/static/default.css +191 -0
- data/jsdoc/templates/sproutcore/static/header.html +2 -0
- data/jsdoc/templates/sproutcore/static/index.html +19 -0
- data/jsdoc/templates/sproutcore/symbol.tmpl +35 -0
- data/jsdoc/test/addon.js +24 -0
- data/jsdoc/test/anon_inner.js +14 -0
- data/jsdoc/test/augments.js +31 -0
- data/jsdoc/test/augments2.js +26 -0
- data/jsdoc/test/borrows.js +41 -0
- data/jsdoc/test/borrows2.js +23 -0
- data/jsdoc/test/config.js +22 -0
- data/jsdoc/test/constructs.js +18 -0
- data/jsdoc/test/encoding.js +10 -0
- data/jsdoc/test/encoding_other.js +12 -0
- data/jsdoc/test/functions_anon.js +39 -0
- data/jsdoc/test/functions_nested.js +33 -0
- data/jsdoc/test/global.js +13 -0
- data/jsdoc/test/globals.js +25 -0
- data/jsdoc/test/ignore.js +10 -0
- data/jsdoc/test/inner.js +16 -0
- data/jsdoc/test/jsdoc_test.js +477 -0
- data/jsdoc/test/lend.js +33 -0
- data/jsdoc/test/memberof.js +20 -0
- data/jsdoc/test/memberof_constructor.js +15 -0
- data/jsdoc/test/name.js +19 -0
- data/jsdoc/test/namespace_nested.js +23 -0
- data/jsdoc/test/nocode.js +13 -0
- data/jsdoc/test/oblit_anon.js +20 -0
- data/jsdoc/test/overview.js +20 -0
- data/jsdoc/test/param_inline.js +37 -0
- data/jsdoc/test/params_optional.js +8 -0
- data/jsdoc/test/prototype.js +17 -0
- data/jsdoc/test/prototype_nested.js +9 -0
- data/jsdoc/test/prototype_oblit.js +13 -0
- data/jsdoc/test/prototype_oblit_constructor.js +24 -0
- data/jsdoc/test/public.js +10 -0
- data/jsdoc/test/shared.js +42 -0
- data/jsdoc/test/shared2.js +2 -0
- data/jsdoc/test/shortcuts.js +22 -0
- data/jsdoc/test/static_this.js +13 -0
- data/jsdoc/test/synonyms.js +23 -0
- data/jsdoc/test/tosource.js +23 -0
- data/jsdoc/test/variable_redefine.js +14 -0
- data/jsdoc/test.js +304 -0
- data/lib/sproutcore/build_tools/resource_builder.rb +6 -1
- data/lib/sproutcore/bundle_installer.rb +268 -0
- data/lib/sproutcore/jsdoc.rb +7 -6
- data/lib/sproutcore/library.rb +38 -0
- data/lib/sproutcore/merb/bundle_controller.rb +8 -4
- data/lib/sproutcore/version.rb +1 -1
- data/lib/sproutcore.rb +1 -1
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/txt2html +0 -0
- metadata +117 -29
- data/clients/view_builder/core.js +0 -19
- data/clients/view_builder/english.lproj/body.css +0 -149
- data/clients/view_builder/english.lproj/body.rhtml +0 -18
- data/clients/view_builder/english.lproj/strings.js +0 -14
- data/clients/view_builder/main.js +0 -37
- data/jsdoc/app/DocFile.js +0 -137
- data/jsdoc/app/DocTag.js +0 -110
- data/jsdoc/app/Doclet.js +0 -63
- data/jsdoc/app/Dumper.js +0 -143
- data/jsdoc/app/JsDoc.js +0 -103
- data/jsdoc/app/JsHilite.js +0 -45
- data/jsdoc/app/JsIO.js +0 -163
- data/jsdoc/app/JsParse.js +0 -385
- data/jsdoc/app/JsPlate.js +0 -130
- data/jsdoc/app/JsTestrun.js +0 -129
- data/jsdoc/app/JsToke.js +0 -564
- data/jsdoc/app/Symbol.js +0 -298
- data/jsdoc/app/Transformer.js +0 -14
- data/jsdoc/app/Util.js +0 -97
- data/jsdoc/app/js.jar +0 -0
- data/jsdoc/plugins/min.js +0 -316
- data/jsdoc/plugins/strip.js +0 -20
- data/jsdoc/templates/sproutcore/default.css +0 -191
- data/jsdoc/templates/sproutcore/index.html +0 -13
- data/jsdoc/templates/sproutcore/prototype.js +0 -4186
- data/jsdoc/templates/sproutcore/splash.html +0 -7
data/History.txt
CHANGED
@@ -1,4 +1,23 @@
|
|
1
1
|
|
2
|
+
== 0.9.14
|
3
|
+
|
4
|
+
* The long form of sc-build -e is not --environment. It was misspelled. (Thanks zoowar)
|
5
|
+
|
6
|
+
* Fixed README for new apps to use the correct sc-build command. (Thanks Spencer Ho!)
|
7
|
+
|
8
|
+
* Added sc-install, sc-update, and sc-remove. These utilities work with
|
9
|
+
github to automatically install and update plugin JavaScript libraries.
|
10
|
+
|
11
|
+
* [FIX] Removed warning about NO_BODY_METHOD
|
12
|
+
|
13
|
+
* Upgraded to a newer version of JSDoc that can provide a much more accurate description of the inline documentation for SproutCore.
|
14
|
+
|
15
|
+
* sc_super() now works automatically and does not require you to pass this.
|
16
|
+
|
17
|
+
* sc-server now autodetects Merb.root. This means that you can start sc-server from any directory inside of your project and it will do the right thing.
|
18
|
+
|
19
|
+
== 0.9.13
|
20
|
+
|
2
21
|
* Fixed critical bug that prevented sc-build from correctly compiling stylesheets and javascript.
|
3
22
|
|
4
23
|
== 0.9.12
|
data/Manifest.txt
CHANGED
@@ -4,7 +4,12 @@ app_generators/sproutcore/templates/sc-config
|
|
4
4
|
app_generators/sproutcore/USAGE
|
5
5
|
bin/sc-build
|
6
6
|
bin/sc-gen
|
7
|
+
bin/sc-ide
|
8
|
+
bin/sc-init
|
9
|
+
bin/sc-install
|
10
|
+
bin/sc-remove
|
7
11
|
bin/sc-server
|
12
|
+
bin/sc-update
|
8
13
|
bin/sproutcore
|
9
14
|
clients/sc_docs/controllers/docs.js
|
10
15
|
clients/sc_docs/core.js
|
@@ -43,11 +48,6 @@ clients/sc_test_runner/models/test.js
|
|
43
48
|
clients/sc_test_runner/README
|
44
49
|
clients/sc_test_runner/views/runner_frame.js
|
45
50
|
clients/sc_test_runner/views/test_label.js
|
46
|
-
clients/view_builder/core.js
|
47
|
-
clients/view_builder/english.lproj/body.css
|
48
|
-
clients/view_builder/english.lproj/body.rhtml
|
49
|
-
clients/view_builder/english.lproj/strings.js
|
50
|
-
clients/view_builder/main.js
|
51
51
|
config/hoe.rb
|
52
52
|
config/requirements.rb
|
53
53
|
frameworks/prototype/HISTORY
|
@@ -222,36 +222,113 @@ frameworks/sproutcore/views/tab.js
|
|
222
222
|
frameworks/sproutcore/views/toolbar.js
|
223
223
|
frameworks/sproutcore/views/view.js
|
224
224
|
History.txt
|
225
|
-
jsdoc/app/
|
226
|
-
jsdoc/app/
|
227
|
-
jsdoc/app/
|
228
|
-
jsdoc/app/
|
229
|
-
jsdoc/app/js
|
230
|
-
jsdoc/app/
|
231
|
-
jsdoc/app/
|
232
|
-
jsdoc/app/
|
233
|
-
jsdoc/app/
|
234
|
-
jsdoc/app/
|
235
|
-
jsdoc/app/
|
236
|
-
jsdoc/app/
|
225
|
+
jsdoc/app/frame/Chain.js
|
226
|
+
jsdoc/app/frame/Dumper.js
|
227
|
+
jsdoc/app/frame/Hash.js
|
228
|
+
jsdoc/app/frame/Link.js
|
229
|
+
jsdoc/app/frame/Namespace.js
|
230
|
+
jsdoc/app/frame/Opt.js
|
231
|
+
jsdoc/app/frame/Reflection.js
|
232
|
+
jsdoc/app/frame/String.js
|
233
|
+
jsdoc/app/frame/Testrun.js
|
234
|
+
jsdoc/app/frame.js
|
235
|
+
jsdoc/app/handlers/FOODOC.js
|
236
|
+
jsdoc/app/handlers/XMLDOC/DomReader.js
|
237
|
+
jsdoc/app/handlers/XMLDOC/XMLDoc.js
|
238
|
+
jsdoc/app/handlers/XMLDOC/XMLParse.js
|
239
|
+
jsdoc/app/handlers/XMLDOC.js
|
240
|
+
jsdoc/app/lib/JSDOC/DocComment.js
|
241
|
+
jsdoc/app/lib/JSDOC/DocTag.js
|
242
|
+
jsdoc/app/lib/JSDOC/JsDoc.js
|
243
|
+
jsdoc/app/lib/JSDOC/JsPlate.js
|
244
|
+
jsdoc/app/lib/JSDOC/Lang.js
|
245
|
+
jsdoc/app/lib/JSDOC/Parser.js
|
246
|
+
jsdoc/app/lib/JSDOC/PluginManager.js
|
247
|
+
jsdoc/app/lib/JSDOC/Symbol.js
|
248
|
+
jsdoc/app/lib/JSDOC/SymbolSet.js
|
249
|
+
jsdoc/app/lib/JSDOC/TextStream.js
|
250
|
+
jsdoc/app/lib/JSDOC/Token.js
|
251
|
+
jsdoc/app/lib/JSDOC/TokenReader.js
|
252
|
+
jsdoc/app/lib/JSDOC/TokenStream.js
|
253
|
+
jsdoc/app/lib/JSDOC/Util.js
|
254
|
+
jsdoc/app/lib/JSDOC/Walker.js
|
255
|
+
jsdoc/app/lib/JSDOC.js
|
256
|
+
jsdoc/app/main.js
|
257
|
+
jsdoc/app/plugins/commentSrcJson.js
|
258
|
+
jsdoc/app/plugins/frameworkPrototype.js
|
259
|
+
jsdoc/app/plugins/functionCall.js
|
260
|
+
jsdoc/app/plugins/publishSrcHilite.js
|
261
|
+
jsdoc/app/plugins/sproutcoreTags.js
|
262
|
+
jsdoc/app/plugins/symbolLink.js
|
263
|
+
jsdoc/app/plugins/tagParamConfig.js
|
264
|
+
jsdoc/app/plugins/tagSynonyms.js
|
237
265
|
jsdoc/app/run.js
|
238
|
-
jsdoc/
|
239
|
-
jsdoc/
|
240
|
-
jsdoc/
|
241
|
-
jsdoc/
|
242
|
-
jsdoc/
|
266
|
+
jsdoc/changes.txt
|
267
|
+
jsdoc/conf/sample.conf
|
268
|
+
jsdoc/java/build.xml
|
269
|
+
jsdoc/java/build_1.4.xml
|
270
|
+
jsdoc/java/classes/js.jar
|
271
|
+
jsdoc/java/src/JsDebugRun.java
|
272
|
+
jsdoc/java/src/JsRun.java
|
273
|
+
jsdoc/jsdebug.jar
|
274
|
+
jsdoc/jsrun.jar
|
243
275
|
jsdoc/README.txt
|
276
|
+
jsdoc/t/runner.js
|
277
|
+
jsdoc/t/TestDoc.js
|
278
|
+
jsdoc/templates/sproutcore/allclasses.tmpl
|
279
|
+
jsdoc/templates/sproutcore/allfiles.tmpl
|
244
280
|
jsdoc/templates/sproutcore/class.tmpl
|
245
|
-
jsdoc/templates/sproutcore/default.css
|
246
|
-
jsdoc/templates/sproutcore/index.html
|
247
281
|
jsdoc/templates/sproutcore/index.tmpl
|
248
|
-
jsdoc/templates/sproutcore/prototype.js
|
249
282
|
jsdoc/templates/sproutcore/publish.js
|
250
|
-
jsdoc/templates/sproutcore/
|
283
|
+
jsdoc/templates/sproutcore/static/default.css
|
284
|
+
jsdoc/templates/sproutcore/static/header.html
|
285
|
+
jsdoc/templates/sproutcore/static/index.html
|
286
|
+
jsdoc/templates/sproutcore/symbol.tmpl
|
287
|
+
jsdoc/test/addon.js
|
288
|
+
jsdoc/test/anon_inner.js
|
289
|
+
jsdoc/test/augments.js
|
290
|
+
jsdoc/test/augments2.js
|
291
|
+
jsdoc/test/borrows.js
|
292
|
+
jsdoc/test/borrows2.js
|
293
|
+
jsdoc/test/config.js
|
294
|
+
jsdoc/test/constructs.js
|
295
|
+
jsdoc/test/encoding.js
|
296
|
+
jsdoc/test/encoding_other.js
|
297
|
+
jsdoc/test/functions_anon.js
|
298
|
+
jsdoc/test/functions_nested.js
|
299
|
+
jsdoc/test/global.js
|
300
|
+
jsdoc/test/globals.js
|
301
|
+
jsdoc/test/ignore.js
|
302
|
+
jsdoc/test/inner.js
|
303
|
+
jsdoc/test/jsdoc_test.js
|
304
|
+
jsdoc/test/lend.js
|
305
|
+
jsdoc/test/memberof.js
|
306
|
+
jsdoc/test/memberof_constructor.js
|
307
|
+
jsdoc/test/name.js
|
308
|
+
jsdoc/test/namespace_nested.js
|
309
|
+
jsdoc/test/nocode.js
|
310
|
+
jsdoc/test/oblit_anon.js
|
311
|
+
jsdoc/test/overview.js
|
312
|
+
jsdoc/test/param_inline.js
|
313
|
+
jsdoc/test/params_optional.js
|
314
|
+
jsdoc/test/prototype.js
|
315
|
+
jsdoc/test/prototype_nested.js
|
316
|
+
jsdoc/test/prototype_oblit.js
|
317
|
+
jsdoc/test/prototype_oblit_constructor.js
|
318
|
+
jsdoc/test/public.js
|
319
|
+
jsdoc/test/shared.js
|
320
|
+
jsdoc/test/shared2.js
|
321
|
+
jsdoc/test/shortcuts.js
|
322
|
+
jsdoc/test/static_this.js
|
323
|
+
jsdoc/test/synonyms.js
|
324
|
+
jsdoc/test/tosource.js
|
325
|
+
jsdoc/test/variable_redefine.js
|
326
|
+
jsdoc/test.js
|
251
327
|
lib/sproutcore/build_tools/html_builder.rb
|
252
328
|
lib/sproutcore/build_tools/resource_builder.rb
|
253
329
|
lib/sproutcore/build_tools.rb
|
254
330
|
lib/sproutcore/bundle.rb
|
331
|
+
lib/sproutcore/bundle_installer.rb
|
255
332
|
lib/sproutcore/bundle_manifest.rb
|
256
333
|
lib/sproutcore/generator_helper.rb
|
257
334
|
lib/sproutcore/helpers/capture_helper.rb
|
@@ -74,7 +74,7 @@ that is optimized for serving static content.
|
|
74
74
|
If you want real speed, do a static build of your content and serve it through
|
75
75
|
lighttpd or apache. Do the static build, just run:
|
76
76
|
|
77
|
-
sc-build
|
77
|
+
sc-build
|
78
78
|
|
79
79
|
This will place a directory in tmp/build that contains all of your resources
|
80
80
|
pre-compiled and ready for static serving.
|
data/bin/sc-build
CHANGED
@@ -56,7 +56,7 @@ opts = OptionParser.new do |opts|
|
|
56
56
|
opts.separator 'If no flags are given, sc-build will try to build all of the bundles in the current directory'
|
57
57
|
opts.separator '*'*80
|
58
58
|
|
59
|
-
opts.on("-e", "--
|
59
|
+
opts.on("-e", "--environment=MODE", "Set the build mode for the system. Normally you want to build in production mode (which is the default if you do not include this option), but you can use this switch to build in development mode for testing.") do |opt_build_mode|
|
60
60
|
build_mode = opt_build_mode.to_s.downcase.to_sym
|
61
61
|
end
|
62
62
|
|
data/bin/sc-gen
CHANGED
File without changes
|
data/bin/sc-ide
ADDED
@@ -0,0 +1,278 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# USE THE REDBULL IDE
|
4
|
+
# This script will set up, update, and run RedBull for you. Usage:
|
5
|
+
#
|
6
|
+
# sc-ide run RedBull on port 4040
|
7
|
+
# sc-ide init set up RedBull in the current directory
|
8
|
+
# sc-ide update update RedBull to the latest version
|
9
|
+
# sc-ide update --tag=45 update RedBull to tagged release 'r45'
|
10
|
+
# sc-ide update --edge update RedBull to the current HEAD of the master repository (might be unstable)
|
11
|
+
# sc-ide run --port=5000 run RedBull on port 5000, it will be accessible in your browser
|
12
|
+
# sc-ide version list the versions of the various RedBull components
|
13
|
+
# sc-ide license display RedBull's licensing info
|
14
|
+
#
|
15
|
+
# Note: sc-ide update can also be invoked from inside RedBull, so you should be able to do everything using
|
16
|
+
# sc-ide init, followed by sc-ide run (and then be done with the command line).
|
17
|
+
|
18
|
+
APP_ROOT = File.expand_path(Dir.pwd)
|
19
|
+
|
20
|
+
# Set String encoding to Unicode
|
21
|
+
$KCODE = 'u'
|
22
|
+
|
23
|
+
# Require SproutCore
|
24
|
+
require 'rubygems'
|
25
|
+
require 'rubigen'
|
26
|
+
require 'sproutcore'
|
27
|
+
require 'optparse'
|
28
|
+
|
29
|
+
############################################################
|
30
|
+
## Define Helper Methods
|
31
|
+
##
|
32
|
+
|
33
|
+
def check_git
|
34
|
+
git_version = `git --version`.chomp!
|
35
|
+
SC.logger.debug git_version
|
36
|
+
unless git_version
|
37
|
+
SC.logger.fatal "You must have git installed to use the SproutCore IDE (aka RedBull)."
|
38
|
+
exit(1)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
############################################################
|
43
|
+
## Process Options
|
44
|
+
##
|
45
|
+
|
46
|
+
# Setup defaults
|
47
|
+
verb_name = ARGV.shift if (ARGV.size > 0 && ARGV[0][0..0] != '-')
|
48
|
+
verb_name ||= "run"
|
49
|
+
git_tag = -1
|
50
|
+
port = '4040'
|
51
|
+
verbose = false
|
52
|
+
clean = false
|
53
|
+
edge = false
|
54
|
+
|
55
|
+
opts = OptionParser.new do |opts|
|
56
|
+
opts.version = SproutCore::VERSION::STRING
|
57
|
+
|
58
|
+
opts.banner = <<-EOT
|
59
|
+
RedBull Helper Script (RedBull is the experimental SproutCore IDE)
|
60
|
+
==================================================================
|
61
|
+
Usage: sc-ide {verb} {options}
|
62
|
+
|
63
|
+
Verbs:
|
64
|
+
init - uses git to set up a full sc-ide environment pulled from --edge or the value of --tag
|
65
|
+
install - synonym for init
|
66
|
+
update - uses git to update your sc-ide repositories to --edge or the value of --tag
|
67
|
+
run - (DEFAULT) starts RedBull on port 4040 or --port
|
68
|
+
server - synonym for run
|
69
|
+
version - list the installed versions of the various RedBull components
|
70
|
+
status - synonym for version
|
71
|
+
license - show the RedBull license and copyright notice
|
72
|
+
help - show this text
|
73
|
+
remove - remove RedBull from the working directory
|
74
|
+
uninstall - synonym for remove
|
75
|
+
==================================================================
|
76
|
+
EOT
|
77
|
+
|
78
|
+
opts.on("-t", "--tag=TAG", "Specify a particular tagged release of RedBull to check out. Example: --tag=r71.") do |opt_tag|
|
79
|
+
git_tag = opt_tag
|
80
|
+
if git_tag.match(/r?(\d\d?\d?)/)
|
81
|
+
git_tag = $1.to_i
|
82
|
+
else
|
83
|
+
SC.logger.fatal "Invalid tag: #{git_tag}. Should match /r?\\d\\d?\\d?/."
|
84
|
+
exit(1)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
opts.on("-e", "--edge", "If set, sc-ide init and update will use HEAD. Note: HEAD is not guaranteed to be stable. Use a tagged release if you're unsure (the default).") do |opt_edge|
|
89
|
+
edge = !!opt_edge
|
90
|
+
end
|
91
|
+
|
92
|
+
opts.on("-v", "--[no-]verbose", "If set, extra debug output will be displayed.") do |opt_verbose|
|
93
|
+
verbose = !!opt_verbose
|
94
|
+
end
|
95
|
+
|
96
|
+
opts.on("-c", "--[no-]clean", "If set, sc-ide will flush the contents of ./ide/public prior to running.") do |opt_clean|
|
97
|
+
clean = !!opt_clean
|
98
|
+
end
|
99
|
+
|
100
|
+
opts.on("-p", "--port=PORT", "If set, sc-ide will run on this port. Otherwise, it will run on port 4040.") do |opt_port|
|
101
|
+
port = opt_port
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
opts.parse!
|
106
|
+
|
107
|
+
############################################################
|
108
|
+
## SETUP ENVIRONMENT
|
109
|
+
##
|
110
|
+
|
111
|
+
# Configure logger
|
112
|
+
SC.logger.level = (verbose) ? Logger::DEBUG : Logger::INFO
|
113
|
+
SC.logger.progname = $0
|
114
|
+
|
115
|
+
check_git
|
116
|
+
|
117
|
+
SC.logger.debug "verb_name = #{verb_name}"
|
118
|
+
SC.logger.debug "git_tag = #{git_tag}"
|
119
|
+
SC.logger.debug "port = #{port}"
|
120
|
+
SC.logger.debug "verbose = #{verbose}"
|
121
|
+
SC.logger.debug "clean = #{clean}"
|
122
|
+
SC.logger.debug "edge = #{edge}"
|
123
|
+
|
124
|
+
############################################################
|
125
|
+
## CLEAN IF NECESSARY
|
126
|
+
##
|
127
|
+
|
128
|
+
if clean
|
129
|
+
SC.logger.info("~ Cleaning ./ide/public")
|
130
|
+
FileUtils.rm_rf(File.join(APP_ROOT,'ide/public'))
|
131
|
+
end
|
132
|
+
|
133
|
+
############################################################
|
134
|
+
## EXECUTE THE VERB
|
135
|
+
##
|
136
|
+
|
137
|
+
def update_to_tag( git_tag, show_current = false, use_edge = false )
|
138
|
+
# get the latest tagged release and make that the "active" branch for all repositories
|
139
|
+
['ide', 'ide/frameworks/sproutcore', 'ide/clients/red_bull'].each do |rep|
|
140
|
+
revision = -1
|
141
|
+
for tag in `cd #{rep}; git tag`.split(/\n/)
|
142
|
+
if tag.match(/r(\d\d?\d?)/)
|
143
|
+
if $1.to_i > revision
|
144
|
+
revision = $1.to_i
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
if git_tag >= 0
|
150
|
+
if revision < git_tag
|
151
|
+
SC.logger.info "WARNING: Tag r#{git_tag} is greater than the latest revision of #{rep} (r#{revision})." unless use_edge
|
152
|
+
else
|
153
|
+
revision = git_tag
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# SC.logger.info "#{rep} is currently at #{`cd #{rep}; git describe --tags`.chomp!}" if show_current
|
158
|
+
unless use_edge
|
159
|
+
SC.logger.info "Setting #{rep} to r#{revision}."
|
160
|
+
`cd #{rep}; git checkout -q r#{revision}`
|
161
|
+
else
|
162
|
+
SC.logger.info "Setting #{rep} to HEAD."
|
163
|
+
if rep != "ide/clients/red_bull"
|
164
|
+
`cd #{rep}; git checkout -q remotes/origin/redbull`
|
165
|
+
else
|
166
|
+
`cd #{rep}; git checkout -q master`
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
if verb_name == 'init' or verb_name == 'install'
|
173
|
+
if File.exist?(File.join(APP_ROOT, 'ide'))
|
174
|
+
SC.logger.fatal "RedBull appears to have already been initialized. Exiting..."
|
175
|
+
exit(1)
|
176
|
+
else
|
177
|
+
SC.logger.info "Initializing the current directory with a full RedBull installation. (This may take some time.)\n"
|
178
|
+
|
179
|
+
# clone the get repositories and run sc-init if necessary
|
180
|
+
SC.logger.info `git clone git://github.com/onitunes/sproutcore-buildtools.git ide`.chomp!
|
181
|
+
SC.logger.info `cd ide/frameworks; rm -R prototype; git clone git://github.com/onitunes/sproutcore-prototype.git prototype`.chomp!
|
182
|
+
SC.logger.info `cd ide/frameworks; rm -R sproutcore; git clone git://github.com/onitunes/sproutcore.git sproutcore`.chomp!
|
183
|
+
SC.logger.info `cd ide/clients; git clone git://github.com/onitunes/sproutcore-ide.git red_bull`.chomp!
|
184
|
+
unless File.exists?(File.join(APP_ROOT, 'sc-config')) or File.exists?(File.join(APP_ROOT, 'sc-config.rb'))
|
185
|
+
SC.logger.info "Initializing default SproutCore workspace with sc-init."
|
186
|
+
SC.logger.debug `sc-init`.chomp!
|
187
|
+
# `cd clients; rm -R *` # remove the "default" client sc-init created
|
188
|
+
end
|
189
|
+
|
190
|
+
update_to_tag(git_tag)
|
191
|
+
|
192
|
+
SC.logger.info "\nPlease run sc-ide to start using RedBull."
|
193
|
+
end
|
194
|
+
elsif verb_name == 'update'
|
195
|
+
unless File.exist?(File.join(APP_ROOT, 'ide'))
|
196
|
+
SC.logger.fatal "RedBull does not appear to be installed. Use `sc-ide init` to install. Exiting..."
|
197
|
+
exit(1)
|
198
|
+
end
|
199
|
+
|
200
|
+
if git_tag >= 0
|
201
|
+
SC.logger.info "Updating the current directory to the r#{git_tag} RedBull release."
|
202
|
+
elsif edge
|
203
|
+
SC.logger.info "Updating the current directory with the edge RedBull release."
|
204
|
+
else
|
205
|
+
SC.logger.info "Updating the current directory with the latest tagged RedBull release."
|
206
|
+
end
|
207
|
+
SC.logger.info ''
|
208
|
+
SC.logger.debug `cd ide/; git fetch`.chomp!
|
209
|
+
SC.logger.debug `cd ide/frameworks/sproutcore; git fetch`.chomp!
|
210
|
+
SC.logger.debug `cd ide/clients/red_bull; git fetch`.chomp!
|
211
|
+
|
212
|
+
unless edge
|
213
|
+
update_to_tag(git_tag, true)
|
214
|
+
else
|
215
|
+
update_to_tag(git_tag, true, true)
|
216
|
+
end
|
217
|
+
elsif verb_name == 'run' or verb_name == 'server'
|
218
|
+
unless File.exist?(File.join(APP_ROOT, 'ide'))
|
219
|
+
SC.logger.fatal "RedBull does not appear to be installed. Use `sc-ide init` to install. Exiting..."
|
220
|
+
exit(1)
|
221
|
+
end
|
222
|
+
SC.logger.info "Starting up RedBull on port #{port}."
|
223
|
+
SC.logger.info "To begin using RedBull, open your browser and load: http://localhost:#{port}"
|
224
|
+
SC.logger.info "Use ^C to quit."
|
225
|
+
Dir.chdir(File.join(APP_ROOT, 'ide'))
|
226
|
+
exec "bin/sc-server -p #{port}"
|
227
|
+
elsif verb_name == 'version' or verb_name == 'status'
|
228
|
+
unless File.exist?(File.join(APP_ROOT, 'ide'))
|
229
|
+
SC.logger.fatal "RedBull does not appear to be installed. Use `sc-ide init` to install. Exiting..."
|
230
|
+
exit(1)
|
231
|
+
end
|
232
|
+
|
233
|
+
['ide', 'ide/frameworks/sproutcore', 'ide/clients/red_bull'].each do |rep|
|
234
|
+
SC.logger.info "#{rep}: #{`cd #{rep}; git describe --tags`.chomp!}"
|
235
|
+
end
|
236
|
+
elsif verb_name == 'license'
|
237
|
+
SC.logger.info <<-EOL
|
238
|
+
==============================================================================
|
239
|
+
The SproutCore IDE (code name: RedBull)
|
240
|
+
|
241
|
+
Copyright (c) 2008 by Erich Atlas Ocean.
|
242
|
+
|
243
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
244
|
+
copy of this software and associated documentation files (the
|
245
|
+
"Software"), to deal in the Software without restriction, including
|
246
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
247
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
248
|
+
permit persons to whom the Software is furnished to do so, subject to
|
249
|
+
the following conditions:
|
250
|
+
|
251
|
+
The above copyright notice and this permission notice shall be included
|
252
|
+
in all copies or substantial portions of the Software.
|
253
|
+
|
254
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
255
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
256
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
257
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
258
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
259
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
260
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
261
|
+
==============================================================================
|
262
|
+
EOL
|
263
|
+
elsif verb_name == 'remove' or verb_name == 'uninstall'
|
264
|
+
unless File.exist?(File.join(APP_ROOT, 'ide'))
|
265
|
+
SC.logger.fatal "RedBull does not appear to be installed. Exiting..."
|
266
|
+
exit(1)
|
267
|
+
else
|
268
|
+
SC.logger.info("Removing RedBull...")
|
269
|
+
FileUtils.rm_rf(File.join(APP_ROOT,'ide'))
|
270
|
+
SC.logger.info("Done.")
|
271
|
+
end
|
272
|
+
elsif verb_name == 'help'
|
273
|
+
SC.logger.info opts.help
|
274
|
+
else
|
275
|
+
SC.logger.fatal "Unknown verb: #{verb_name}.\n"
|
276
|
+
SC.logger.info opts.help
|
277
|
+
exit(1)
|
278
|
+
end
|
data/bin/sc-init
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Creates a new SproutCore Project/Library
|
4
|
+
# You can use this command in one of two ways:
|
5
|
+
#
|
6
|
+
# sc-init
|
7
|
+
# - This will create a new project library within the current working dir
|
8
|
+
#
|
9
|
+
# sc-init project-name
|
10
|
+
# - This will create a new directory and create the project library there.
|
11
|
+
|
12
|
+
# Set String encoding to Unicode
|
13
|
+
$KCODE = 'u'
|
14
|
+
|
15
|
+
APP_ROOT = File.expand_path(Dir.pwd)
|
16
|
+
SC_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
17
|
+
$:.unshift File.join(SC_ROOT,'lib') ;
|
18
|
+
|
19
|
+
require 'rubygems'
|
20
|
+
require 'rubigen'
|
21
|
+
require 'sproutcore'
|
22
|
+
|
23
|
+
if %w(-v --version).include? ARGV.first
|
24
|
+
require 'sproutcore/version'
|
25
|
+
puts "#{File.basename($0)} #{SproutCore::VERSION::STRING}"
|
26
|
+
exit(0)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Handle default case...
|
30
|
+
ARGV.unshift('.') if ARGV.size == 0
|
31
|
+
|
32
|
+
require 'rubigen/scripts/generate'
|
33
|
+
source = RubiGen::PathSource.new(:application,
|
34
|
+
File.join(File.dirname(__FILE__), "../app_generators"))
|
35
|
+
RubiGen::Base.reset_sources
|
36
|
+
RubiGen::Base.append_sources source
|
37
|
+
RubiGen::Base.use_component_sources! [:sc, :app]
|
38
|
+
RubiGen::Scripts::Generate.new.run(ARGV, :generator => 'sproutcore')
|
data/bin/sc-install
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# INSTALLS A SPROUTCORE BUNDLE
|
4
|
+
# This script will attempt to download and install framework and application
|
5
|
+
# bundles from github.
|
6
|
+
#
|
7
|
+
# Usage:
|
8
|
+
# sc-install owner-projectname
|
9
|
+
#
|
10
|
+
# You can also choose a different install URL:
|
11
|
+
# sc-install owner-projectname --source=sproutit/sproutcore-samples
|
12
|
+
#
|
13
|
+
# You can select an install method. (git is preferred and the default)
|
14
|
+
# sc-install owner-projectname --method=zip
|
15
|
+
|
16
|
+
|
17
|
+
APP_ROOT = File.expand_path(Dir.pwd)
|
18
|
+
SC_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
19
|
+
$:.unshift File.join(SC_ROOT,'lib') ;
|
20
|
+
|
21
|
+
# Set String encoding to Unicode
|
22
|
+
$KCODE = 'u'
|
23
|
+
|
24
|
+
# Require SproutCore
|
25
|
+
require 'rubygems'
|
26
|
+
require 'rubigen'
|
27
|
+
require 'sproutcore'
|
28
|
+
require 'optparse'
|
29
|
+
|
30
|
+
############################################################
|
31
|
+
## Define Helper Methods
|
32
|
+
##
|
33
|
+
|
34
|
+
|
35
|
+
############################################################
|
36
|
+
## Process Options
|
37
|
+
##
|
38
|
+
|
39
|
+
# Process options
|
40
|
+
bundle_name = ARGV.shift if (ARGV.size > 0 && ARGV[0][0..0] != '-')
|
41
|
+
options = { :verbose => false, :library_root => APP_ROOT }
|
42
|
+
|
43
|
+
opts = OptionParser.new do |opts|
|
44
|
+
opts.version = SproutCore::VERSION::STRING
|
45
|
+
|
46
|
+
opts.banner = "Usage: sc-install {bundle-name} {options}"
|
47
|
+
opts.define_head "Remotely install JavaScript bundles from Github and other sources"
|
48
|
+
opts.separator ''
|
49
|
+
opts.separator '*'*80
|
50
|
+
opts.separator 'If no flags are given, sc-install will attempt to install the named bundle from'
|
51
|
+
opts.separator 'github into the local project.'
|
52
|
+
opts.separator '*'*80
|
53
|
+
|
54
|
+
SC::BundleInstaller.configure_tool_options(opts, options)
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
begin
|
59
|
+
opts.parse!
|
60
|
+
rescue Exception => e
|
61
|
+
puts opts
|
62
|
+
puts e
|
63
|
+
exit(1)
|
64
|
+
end
|
65
|
+
|
66
|
+
############################################################
|
67
|
+
## SETUP ENVIRONMENT
|
68
|
+
##
|
69
|
+
|
70
|
+
# Configure logger
|
71
|
+
SC.logger.level = (options[:verbose]) ? Logger::DEBUG : Logger::INFO
|
72
|
+
SC.logger.progname = $0
|
73
|
+
SC.logger.info("sc-install v#{SproutCore::VERSION::STRING}")
|
74
|
+
|
75
|
+
# Confirm various safety settings
|
76
|
+
SC.logger.info(" ~ Verbose logging enabled") if options[:verbose]
|
77
|
+
SC.logger.info(" ~ Dry run mode - no change will be made") if options[:dry_run]
|
78
|
+
|
79
|
+
# Load Library
|
80
|
+
library = SC.library_for(options[:library_root])
|
81
|
+
|
82
|
+
############################################################
|
83
|
+
## PERFORM THE INSTALL
|
84
|
+
##
|
85
|
+
|
86
|
+
if bundle_name.nil?
|
87
|
+
puts opts
|
88
|
+
SC.logger.fatal("A bundle name is required.")
|
89
|
+
exit(1)
|
90
|
+
end
|
91
|
+
|
92
|
+
library.install_bundle(bundle_name, options)
|
93
|
+
SC.logger.debug("")
|
94
|
+
|
95
|
+
|
96
|
+
|