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/JsPlate.js DELETED
@@ -1,130 +0,0 @@
1
- /**
2
- * @fileOverview
3
- * @name JsPlate
4
- * @author Michael Mathews micmath@gmail.com
5
- * @url $HeadURL: https://jsdoc-toolkit.googlecode.com/svn/tags/jsdoc_toolkit-1.4.0b/app/JsPlate.js $
6
- * @revision $Id: JsPlate.js 213 2007-08-22 10:21:50Z micmath $
7
- * @license <a href="http://en.wikipedia.org/wiki/MIT_License">X11/MIT License</a>
8
- * (See the accompanying README file for full details.)
9
-
10
- */
11
-
12
- /**
13
- * @class A lightweight template engine for JavaScript.
14
- * @constructor
15
- * @author Michael Mathews <a href="mailto:micmath@gmail.com">micmath@gmail.com</a>
16
- * @param {string} template
17
- */
18
- JsPlate = function(template) {
19
- this.template = IO.readFile(template);
20
-
21
- this.code = "";
22
- this.parse();
23
- }
24
-
25
- /** Converts a template into evalable code. */
26
- JsPlate.prototype.parse = function() {
27
- this.template = this.template.replace(/\{#[\s\S]+?#\}/gi, "");
28
- this.code = "var output=``"+this.template;
29
-
30
- this.code = this.code.replace(
31
- /<for each="(.+?)" in="(.+?)"(?: sortby="(.+?)")?>/g,
32
- function (match, eachName, inName, sortby) {
33
- if (!sortby) sortby = "asis";
34
-
35
- return "``; var $"+eachName+"_keys = "+sortby+"("+inName+"); for(var $"+eachName+"_i = 0; $"+eachName+"_i < $"+eachName+"_keys.length; $"+eachName+"_i++) { var $"+eachName+"_last = ($"+eachName+"_i == $"+eachName+"_keys.length-1); var $"+eachName+"_key = $"+eachName+"_keys[$"+eachName+"_i]; var "+eachName+" = "+inName+"[$"+eachName+"_key]; output+=``";
36
- }
37
- );
38
- this.code = this.code.replace(/<if test="(.+?)">/g, "``; if ($1) { output+=``");
39
- this.code = this.code.replace(/<\/(if|for)>/g, "``; }; output+=``");
40
- this.code = this.code.replace(
41
- /\{\+\s*([\s\S]+?)\s*\+\}/gi,
42
- function (match, code) {
43
- code = code.replace(/"/g, "``"); // prevent qoute-escaping of inline code
44
- code = code.replace(/(\r?\n)/g, " ");
45
- return "``+"+code+"+``";
46
- }
47
- );
48
- this.code = this.code.replace(
49
- /\{!\s*([\s\S]+?)\s*!\}/gi,
50
- function (match, code) {
51
- code = code.replace(/"/g, "``"); // prevent qoute-escaping of inline code
52
- code = code.replace(/(\r?\n)/g, " ");
53
- return "``; "+code+"; output+=``";
54
- }
55
- );
56
- this.code = this.code+"``;";
57
-
58
- this.code = this.code.replace(/(\r?\n)/g, "\\n");
59
- this.code = this.code.replace(/"/g, "\\\"");
60
- this.code = this.code.replace(/``/g, "\"");
61
- }
62
-
63
- /**
64
- * @private
65
- */
66
- JsPlate.prototype.toCode = function() {
67
- return this.code;
68
- }
69
-
70
- /**
71
- * @private
72
- * @static
73
- * @memberOf JsPlate
74
- */
75
- JsPlate.keys = function(obj) {
76
- var keys = [];
77
- if (obj.constructor.toString().indexOf("Array") > -1) {
78
- for (var i = 0; i < obj.length; i++) keys.push(i);
79
- }
80
- else {
81
- for (var i in obj) { keys.push(i); }
82
- }
83
- return keys.sort();
84
- };
85
-
86
- /**
87
- * @private
88
- * @static
89
- * @memberOf JsPlate
90
- */
91
- JsPlate.values = function(obj) {
92
- var values = [];
93
- if (obj.constructor.toString().indexOf("Array") > -1) {
94
- for (var i = 0; i < obj.length; i++) values.push(obj[i]);
95
- }
96
- else {
97
- for (var i in obj) { values.push(obj[i]); }
98
- }
99
- return values.sort();
100
- };
101
-
102
- /**
103
- * @private
104
- * @static
105
- * @memberOf JsPlate
106
- */
107
- JsPlate.asis = function(obj) {
108
- var keys = [];
109
- if (obj.constructor.toString().indexOf("Array") > -1) {
110
- for (var i = 0; i < obj.length; i++) keys.push(i);
111
- }
112
- else {
113
- for (var i in obj) { keys.push(i); }
114
- }
115
- return keys;
116
- };
117
-
118
- /**
119
- * Return the output. This must be called after parse()
120
- * @param {object} data What shall represent the "data" in your template.
121
- * @return {string}
122
- */
123
- JsPlate.prototype.process = function(data) {
124
- var keys = JsPlate.keys;
125
- var values = JsPlate.values;
126
- var asis = JsPlate.asis;
127
- eval(this.code);
128
- return output;
129
- //print(this.code)
130
- }
@@ -1,129 +0,0 @@
1
- /**
2
- * @fileOverview
3
- * @name JsTestrun
4
- * @author Michael Mathews micmath@gmail.com
5
- * @url $HeadURL: https://jsdoc-toolkit.googlecode.com/svn/tags/jsdoc_toolkit-1.4.0b/app/JsTestrun.js $
6
- * @revision $Id: JsTestrun.js 292 2007-10-25 22:17:25Z micmath $
7
- * @license <a href="http://en.wikipedia.org/wiki/MIT_License">X11/MIT License</a>
8
- * (See the accompanying README file for full details.)
9
- */
10
-
11
- /**
12
- Yet another unit testing tool for JavaScript.
13
- @author Michael Mathews <a href="mailto:micmath@gmail.com">micmath@gmail.com</a>
14
- @param {object} testCases Properties are testcase names, values are functions to execute as tests.
15
- */
16
- function testrun(testCases) {
17
- var ran = 0;
18
- for (t in testCases) {
19
- var result = testCases[t]();
20
- ran++;
21
- }
22
-
23
- return testrun.reportOut+"-------------------------------\n"+((testrun.fails>0)? ":( Failed "+testrun.fails+"/" : ":) Passed all ")+testrun.count+" test"+((testrun.count == 1)? "":"s")+".\n";
24
- }
25
-
26
-
27
- testrun.count = 0;
28
- testrun.current = null;
29
- testrun.passes = 0;
30
- testrun.fails = 0;
31
- testrun.reportOut = "";
32
-
33
- /** @private */
34
- testrun.report = function(text) {
35
- testrun.reportOut += text+"\n";
36
- }
37
-
38
- /**
39
- Check if test evaluates to true.
40
- @param {string} test To be evaluated.
41
- @param {string} message Optional. To be displayed in the report.
42
- @return {boolean} True if the string test evaluates to true.
43
- */
44
- ok = function(test, message) {
45
- testrun.count++;
46
-
47
- var result;
48
- try {
49
- result = eval(test);
50
-
51
- if (result) {
52
- testrun.passes++;
53
- testrun.report(" OK "+testrun.count+" - "+((message != null)? message : ""));
54
- }
55
- else {
56
- testrun.fails++;
57
- testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : ""));
58
- }
59
- }
60
- catch(e) {
61
- testrun.fails++
62
- testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : ""));
63
-
64
- }
65
- }
66
-
67
- /**
68
- Check if test is same as expected.
69
- @param {string} test To be evaluated.
70
- @param {string} expected
71
- @param {string} message Optional. To be displayed in the report.
72
- @return {boolean} True if (test == expected). Note that the comparison is not a strict equality check.
73
- */
74
- is = function(test, expected, message) {
75
- testrun.count++;
76
-
77
- var result;
78
- try {
79
- result = eval(test);
80
-
81
- if (result == expected) {
82
- testrun.passes++
83
- testrun.report(" OK "+testrun.count+" - "+((message != null)? message : ""));
84
- }
85
- else {
86
- testrun.fails++
87
- testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : ""));
88
- testrun.report("expected: "+expected);
89
- testrun.report(" got: "+result);
90
- }
91
- }
92
- catch(e) {
93
- testrun.fails++
94
- testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : ""));
95
- testrun.report("expected: "+expected);
96
- testrun.report(" got: "+result);}
97
- }
98
-
99
- /**
100
- Check if test matches pattern.
101
- @param {string} test To be evaluated.
102
- @param {string} pattern Used to create a RegExp.
103
- @param {string} message Optional. To be displayed in the report.
104
- @return {boolean} True if test matches pattern.
105
- */
106
- like = function(test, pattern, message) {
107
- testrun.count++;
108
-
109
- var result;
110
- try {
111
- result = eval(test);
112
- var rgx = new RegExp(pattern);
113
-
114
- if (rgx.test(result)) {
115
- testrun.passes++
116
- testrun.report(" OK "+testrun.count+" - "+((message != null)? message : ""));
117
- }
118
- else {
119
- testrun.fails++
120
- testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : ""));
121
- testrun.report(" this: "+result);
122
- testrun.report("is not like: "+pattern);
123
- }
124
- }
125
- catch(e) {
126
- testrun.fails++
127
- testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : ""));
128
- }
129
- }