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
data/jsdoc/app/main.js ADDED
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @version $Id: main.js 570 2008-04-07 23:54:50Z micmath $
3
+ */
4
+
5
+ function main() {
6
+ IO.include("lib/JSDOC.js");
7
+ IO.includeDir("plugins/");
8
+
9
+ if (JSDOC.opt.v) LOG.verbose = true;
10
+ if (JSDOC.opt.o) LOG.out = IO.open(JSDOC.opt.o);
11
+
12
+ if (JSDOC.opt.T) {
13
+ LOG.inform("JsDoc Toolkit running in test mode at "+new Date()+".");
14
+ IO.include("frame/Testrun.js");
15
+ IO.include("test.js");
16
+ }
17
+ else {
18
+ LOG.inform("JsDoc Toolkit main() running at "+new Date()+".");
19
+ LOG.inform("With options: ");
20
+ for (var o in JSDOC.opt) {
21
+ LOG.inform(" "+o+": "+JSDOC.opt[o]);
22
+ }
23
+
24
+ var jsdoc = new JSDOC.JsDoc();
25
+
26
+ if (JSDOC.opt.Z) { // secret debugging option
27
+ LOG.warn("So you want to see the data structure, eh? This might hang if you have circular refs...");
28
+ IO.include("frame/Dumper.js");
29
+ var symbols = jsdoc.symbolSet.toArray();
30
+ for (var i = 0, l = symbols.length; i < l; i++) {
31
+ var symbol = symbols[i];
32
+ print("// symbol: " + symbol.alias);
33
+ print(symbol.serialize());
34
+ }
35
+ }
36
+ else {
37
+ var template = JSDOC.opt.t || System.getProperty("jsdoc.template.dir");
38
+
39
+ var handler = jsdoc.symbolSet.handler;
40
+ if (handler && handler.publish) {
41
+ handler.publish(jsdoc.symbolSet);
42
+ }
43
+ else {
44
+ if (typeof template != "undefined") {
45
+ try {
46
+ load(template+"/publish.js");
47
+ if (!publish) {
48
+ LOG.warn("No publish() function is defined in that template so nothing to do.");
49
+ }
50
+ else {
51
+ publish(jsdoc.symbolSet);
52
+ }
53
+ }
54
+ catch(e) {
55
+ LOG.warn("Sorry, that doesn't seem to be a valid template: "+template+"/publish.js : "+e);
56
+ }
57
+ }
58
+ else {
59
+ LOG.warn("No template or handlers given. Might as well read the usage notes.");
60
+ JSDOC.usage();
61
+ }
62
+ }
63
+ }
64
+ }
65
+
66
+ if (LOG.warnings.length) {
67
+ print(LOG.warnings.length+" warning"+(LOG.warnings.length != 1? "s":"")+".");
68
+ }
69
+
70
+ if (LOG.out) {
71
+ LOG.out.flush();
72
+ LOG.out.close();
73
+ }
74
+ }
@@ -0,0 +1,19 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.commentSrcJson",
3
+ {
4
+ onDocCommentSrc: function(commentSrc) {
5
+ var json;
6
+ if (/^\s*@json\b/.test(commentSrc)) {
7
+ commentSrc = commentSrc.replace("@json", "");
8
+ eval("json = "+commentSrc);
9
+ var tagged = "";
10
+ for (var i in json) {
11
+ var tag = json[i];
12
+ // todo handle cases where tag is an object
13
+ tagged += "@"+i+" "+tag+"\n";
14
+ }
15
+ return tagged;
16
+ }
17
+ }
18
+ }
19
+ );
@@ -0,0 +1,16 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.frameworkPrototype",
3
+ {
4
+ onPrototypeClassCreate: function(classCreator) {
5
+ var desc = "";
6
+ if (classCreator.comment) {
7
+ desc = classCreator.comment;
8
+ }
9
+ var insert = desc+"/** @name "+classCreator.name+"\n@constructor\n@scope "+classCreator.name+".prototype */"
10
+
11
+ insert = insert.replace(/\*\/\/\*\*/g, "\n");
12
+ /*DEBUG*///print("insert is "+insert);
13
+ classCreator.addComment.data = insert;
14
+ }
15
+ }
16
+ );
@@ -0,0 +1,10 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.functionCall",
3
+ {
4
+ onFunctionCall: function(functionCall) {
5
+ if (functionCall.name == "dojo.define" && functionCall.arg1) {
6
+ functionCall.doc = "/** @lends "+eval(functionCall.arg1)+".prototype */";
7
+ }
8
+ }
9
+ }
10
+ );
@@ -0,0 +1,62 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.publishSrcHilite",
3
+ {
4
+ onPublishSrc: function(src) {
5
+ if (src.path in JsHilite.cache) {
6
+ return; // already generated src code
7
+ }
8
+ else JsHilite.cache[src.path] = true;
9
+
10
+ try {
11
+ var sourceCode = IO.readFile(src.path);
12
+ }
13
+ catch(e) {
14
+ print(e.message);
15
+ quit();
16
+ }
17
+
18
+ var hiliter = new JsHilite(sourceCode, src.charset);
19
+ src.hilited = hiliter.hilite();
20
+ }
21
+ }
22
+ );
23
+
24
+ function JsHilite(src, charset) {
25
+
26
+ var tr = new JSDOC.TokenReader();
27
+
28
+ tr.keepComments = true;
29
+ tr.keepDocs = true;
30
+ tr.keepWhite = true;
31
+
32
+ this.tokens = tr.tokenize(new JSDOC.TextStream(src));
33
+
34
+ // TODO is redefining toString() the best way?
35
+ JSDOC.Token.prototype.toString = function() {
36
+ return "<span class=\""+this.type+"\">"+this.data.replace(/</g, "&lt;")+"</span>";
37
+ }
38
+
39
+ if (!charset) charset = "utf-8";
40
+
41
+ this.header = '<html><head><meta http-equiv="content-type" content="text/html; charset='+charset+'"> '+
42
+ "<style>\n\
43
+ .KEYW {color: #933;}\n\
44
+ .COMM {color: #bbb; font-style: italic;}\n\
45
+ .NUMB {color: #393;}\n\
46
+ .STRN {color: #393;}\n\
47
+ .REGX {color: #339;}\n\
48
+ .line {border-right: 1px dotted #666; color: #666; font-style: normal;}\n\
49
+ </style></head><body><pre>";
50
+ this.footer = "</pre></body></html>";
51
+ this.showLinenumbers = true;
52
+ }
53
+
54
+ JsHilite.cache = {};
55
+
56
+ JsHilite.prototype.hilite = function() {
57
+ var hilited = this.tokens.join("");
58
+ var line = 1;
59
+ if (this.showLinenumbers) hilited = hilited.replace(/(^|\n)/g, function(m){return m+"<span class='line'>"+((line<10)? " ":"")+((line<100)? " ":"")+(line++)+"</span> "});
60
+
61
+ return this.header+hilited+this.footer;
62
+ }
@@ -0,0 +1,26 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.sproutcoreTags",
3
+ {
4
+ onDocCommentTags: function(comment) {
5
+ for (var i = 0, l = comment.tags.length; i < l; i++) {
6
+ var title = comment.tags[i].title.toLowerCase();
7
+ var syn;
8
+ if ((syn = JSDOC.sproutcoreTags.synonyms["="+title])) {
9
+ comment.tags[i].title = syn;
10
+ }
11
+ }
12
+ }
13
+ }
14
+ );
15
+
16
+ new Namespace(
17
+ "JSDOC.sproutcoreTags",
18
+ function() {
19
+ JSDOC.sproutcoreTags.synonyms = {
20
+ "=method": "function",
21
+ "=delegate": "namespace",
22
+ "=property": "field",
23
+ "=singleton": "class"
24
+ }
25
+ }
26
+ );
@@ -0,0 +1,9 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.symbolLink",
3
+ {
4
+ onSymbolLink: function(link) {
5
+ // modify link.linkPath
6
+ // or link.linkText here
7
+ }
8
+ }
9
+ );
@@ -0,0 +1,31 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.tagParamConfig",
3
+ {
4
+ onDocCommentTags: function(comment) {
5
+ var currentParam = null;
6
+ var tags = comment.tags;
7
+ for (var i = 0, l = tags.length; i < l; i++) {
8
+
9
+ if (tags[i].title == "param") {
10
+ if (tags[i].name.indexOf(".") == -1) {
11
+ currentParam = i;
12
+ }
13
+ }
14
+ else if (tags[i].title == "config") {
15
+ tags[i].title = "param";
16
+ if (currentParam == null) {
17
+ tags[i].name = "arguments"+"."+tags[i].name;
18
+ }
19
+ else if (tags[i].name.indexOf(tags[currentParam].name+".") != 0) {
20
+ tags[i].name = tags[currentParam].name+"."+tags[i].name;
21
+ }
22
+ currentParam != null
23
+ //tags[currentParam].properties.push(tags[i]);
24
+ }
25
+ else {
26
+ currentParam = null;
27
+ }
28
+ }
29
+ }
30
+ }
31
+ );
@@ -0,0 +1,43 @@
1
+ JSDOC.PluginManager.registerPlugin(
2
+ "JSDOC.tagSynonyms",
3
+ {
4
+ onDocCommentSrc: function(comment) {
5
+ comment.src = comment.src.replace(/@methodOf\b/i, "@function\n@memberOf");
6
+ comment.src = comment.src.replace(/@fieldOf\b/i, "@field\n@memberOf");
7
+ },
8
+
9
+ onDocCommentTags: function(comment) {
10
+ for (var i = 0, l = comment.tags.length; i < l; i++) {
11
+ var title = comment.tags[i].title.toLowerCase();
12
+ var syn;
13
+ if ((syn = JSDOC.tagSynonyms.synonyms["="+title])) {
14
+ comment.tags[i].title = syn;
15
+ }
16
+ }
17
+ }
18
+ }
19
+ );
20
+
21
+ new Namespace(
22
+ "JSDOC.tagSynonyms",
23
+ function() {
24
+ JSDOC.tagSynonyms.synonyms = {
25
+ "=member": "memberOf",
26
+ "=memberof": "memberOf",
27
+ "=description": "desc",
28
+ "=exception": "throws",
29
+ "=argument": "param",
30
+ "=returns": "return",
31
+ "=classdescription": "class",
32
+ "=fileoverview": "overview",
33
+ "=extends": "augments",
34
+ "=base": "augments",
35
+ "=projectdescription": "overview",
36
+ "=classdescription": "class",
37
+ "=link": "see",
38
+ "=borrows": "inherits",
39
+ "=scope": "lends",
40
+ "=construct": "constructor"
41
+ }
42
+ }
43
+ );