xultestrunner 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. data/.gitignore +2 -0
  2. data/.gitmodules +3 -0
  3. data/LICENSE +21 -0
  4. data/README +17 -0
  5. data/Rakefile +50 -0
  6. data/VERSION +1 -0
  7. data/bin/xultest +13 -0
  8. data/lib/xultestrunner.rb +1 -0
  9. data/xulapp/application.ini +9 -0
  10. data/xulapp/chrome/chrome.manifest +2 -0
  11. data/xulapp/chrome/content/interface/boot.xul +20 -0
  12. data/xulapp/chrome/content/interface/testharness.html +30 -0
  13. data/xulapp/chrome/content/lib/xultestcase.js +140 -0
  14. data/xulapp/chrome/content/lib/xultestrunner.js +120 -0
  15. data/xulapp/chrome/content/vendor/prototype/LICENSE +16 -0
  16. data/xulapp/chrome/content/vendor/prototype/prototype.js +4874 -0
  17. data/xulapp/chrome/content/vendor/scriptaculous/LICENSE +20 -0
  18. data/xulapp/chrome/content/vendor/scriptaculous/test.css +90 -0
  19. data/xulapp/chrome/content/vendor/scriptaculous/unittest.js +566 -0
  20. data/xulapp/chrome/content/vendor/xpcomcore/LICENSE +21 -0
  21. data/xulapp/chrome/content/vendor/xpcomcore/README +27 -0
  22. data/xulapp/chrome/content/vendor/xpcomcore/Rakefile +83 -0
  23. data/xulapp/chrome/content/vendor/xpcomcore/VERSION.yml +5 -0
  24. data/xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js +32 -0
  25. data/xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js +120 -0
  26. data/xulapp/chrome/content/vendor/xpcomcore/doc/files.html +241 -0
  27. data/xulapp/chrome/content/vendor/xpcomcore/doc/index.html +243 -0
  28. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Error.html +256 -0
  29. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Kernel.html +1030 -0
  30. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/LoadError.html +319 -0
  31. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/SelfConceptError.html +319 -0
  32. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/_global_.html +316 -0
  33. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_file.js.html +53 -0
  34. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_kernel.js.html +251 -0
  35. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/README.txt +186 -0
  36. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame.js +33 -0
  37. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js +102 -0
  38. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js +144 -0
  39. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js +84 -0
  40. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js +153 -0
  41. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js +10 -0
  42. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js +134 -0
  43. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js +26 -0
  44. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js +93 -0
  45. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js +129 -0
  46. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js +26 -0
  47. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js +26 -0
  48. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +159 -0
  49. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +16 -0
  50. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +292 -0
  51. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js +104 -0
  52. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +200 -0
  53. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +294 -0
  54. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +126 -0
  55. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +109 -0
  56. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +144 -0
  57. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +145 -0
  58. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +33 -0
  59. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +645 -0
  60. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +241 -0
  61. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +41 -0
  62. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js +18 -0
  63. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +332 -0
  64. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +133 -0
  65. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js +32 -0
  66. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +474 -0
  67. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/main.js +111 -0
  68. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js +20 -0
  69. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +16 -0
  70. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js +10 -0
  71. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +62 -0
  72. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js +10 -0
  73. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js +31 -0
  74. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js +43 -0
  75. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/run.js +348 -0
  76. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js +144 -0
  77. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js +13 -0
  78. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test.js +325 -0
  79. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js +24 -0
  80. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js +14 -0
  81. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js +31 -0
  82. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js +26 -0
  83. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js +46 -0
  84. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js +23 -0
  85. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/config.js +22 -0
  86. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js +18 -0
  87. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js +10 -0
  88. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js +12 -0
  89. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/event.js +54 -0
  90. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js +14 -0
  91. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js +39 -0
  92. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js +33 -0
  93. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/global.js +13 -0
  94. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js +25 -0
  95. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js +10 -0
  96. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js +16 -0
  97. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js +477 -0
  98. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js +33 -0
  99. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js +19 -0
  100. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js +17 -0
  101. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/module.js +17 -0
  102. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/name.js +19 -0
  103. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js +23 -0
  104. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js +13 -0
  105. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js +20 -0
  106. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js +20 -0
  107. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js +37 -0
  108. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js +8 -0
  109. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js +17 -0
  110. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js +9 -0
  111. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js +13 -0
  112. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +24 -0
  113. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/public.js +10 -0
  114. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js +5 -0
  115. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt +5 -0
  116. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js +42 -0
  117. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js +2 -0
  118. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js +22 -0
  119. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js +13 -0
  120. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js +31 -0
  121. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js +23 -0
  122. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js +14 -0
  123. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/changes.txt +96 -0
  124. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf +31 -0
  125. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build.xml +36 -0
  126. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml +36 -0
  127. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar +0 -0
  128. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java +21 -0
  129. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java +21 -0
  130. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar +0 -0
  131. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.jar +0 -0
  132. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.sh +52 -0
  133. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +17 -0
  134. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +56 -0
  135. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl +646 -0
  136. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl +39 -0
  137. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js +200 -0
  138. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css +162 -0
  139. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html +2 -0
  140. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html +19 -0
  141. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +35 -0
  142. data/xulapp/chrome/content/vendor/xpcomcore/lib/file.js +46 -0
  143. data/xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js +244 -0
  144. data/xulapp/chrome/content/vendor/xpcomcore/test/file_test.js +16 -0
  145. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/love.js +1 -0
  146. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_love.js +1 -0
  147. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_world.js +1 -0
  148. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/syntax_error.js +1 -0
  149. data/xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js +88 -0
  150. data/xulapp/components/bootstrap.js +93 -0
  151. data/xulapp/defaults/preferences/prefs.js +14 -0
  152. data/xultestrunner.gemspec +190 -0
  153. metadata +207 -0
@@ -0,0 +1,186 @@
1
+ ======================================================================
2
+
3
+ DESCRIPTION:
4
+
5
+ This is the source code for JsDoc Toolkit, an automatic documentation
6
+ generation tool for JavaScript. It is written in JavaScript and is run
7
+ from a command line (or terminal) using the Java and Mozilla's Rhino
8
+ JavaScript runtime engine.
9
+
10
+ Using this tool you can automatically turn JavaDoc-like comments in
11
+ your JavaScript source code into published output files, such as HTML
12
+ or XML.
13
+
14
+ For more information, to report a bug, or to browse the technical
15
+ documentation for this tool please visit the official JsDoc Toolkit
16
+ project homepage at http://code.google.com/p/jsdoc-toolkit/
17
+
18
+ For the most up-to-date documentation on JsDoc Toolkit see the
19
+ official wiki at http://code.google.com/p/jsdoc-toolkit/w/list
20
+
21
+ ======================================================================
22
+
23
+ REQUIREMENTS:
24
+
25
+ JsDoc Toolkit is known to work with:
26
+ java version "1.6.0_03"
27
+ Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
28
+ on Windows XP,
29
+ and java version "1.5.0_13"
30
+ Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
31
+ on Mac OS X 10.4.
32
+
33
+ Other versions of java may or may not work with JsDoc Toolkit.
34
+
35
+ ======================================================================
36
+
37
+ USAGE:
38
+
39
+ Running JsDoc Toolkit requires you to have Java installed on your
40
+ computer. For more information see http://www.java.com/getjava/
41
+
42
+ Before running the JsDoc Toolkit app you should change your current
43
+ working directory to the jsdoc-toolkit folder. Then follow the
44
+ examples below, or as shown on the project wiki.
45
+
46
+ On a computer running Windows a valid command line to run JsDoc
47
+ Toolkit might look like this:
48
+
49
+ > java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js
50
+
51
+ On Mac OS X or Linux the same command would look like this:
52
+
53
+ $ java -jar jsrun.jar app/run.js -a -t=templates/jsdoc mycode.js
54
+
55
+ The above assumes your current working directory contains jsrun.jar,
56
+ the "app" and "templates" subdirectories from the standard JsDoc
57
+ Toolkit distribution and that the relative path to the code you wish
58
+ to document is "mycode.js".
59
+
60
+ The output documentation files will be saved to a new directory named
61
+ "out" (by default) in the current directory, or if you specify a
62
+ -d=somewhere_else option, to the somewhere_else directory.
63
+
64
+ For help (usage notes) enter this on the command line:
65
+
66
+ $ java -jar jsrun.jar app/run.js --help
67
+
68
+ More information about the various command line options used by JsDoc
69
+ Toolkit are available on the project wiki.
70
+
71
+ ======================================================================
72
+
73
+ RUNNING VIA SHELL SCRIPT
74
+
75
+ Avi Deitcher has contributed the file jsrun.sh with the following usage notes:
76
+
77
+ A script to simplify running jsdoc from the command-line, especially when
78
+ running from within a development or build environment such as ant.
79
+
80
+ Normally, to run jsdoc, you need a command-line as the following:
81
+ java -Djsdoc.dir=/some/long/dir/path/to/jsdoc -jar
82
+ /some/long/dir/path/to/jsdoc/jsrun.jar /some/long/dir/path/to/jsdoc/app/run.js
83
+ -t=template -r=4 /some/long/dir/path/to/my/src/code
84
+
85
+ This can get tedious to redo time and again, and difficult to use from within a
86
+ build environment.
87
+
88
+ To simplify the process, jsrun.sh will automatically run this path, as well as
89
+ passing through any arguments.
90
+
91
+ Usage: jsrun.sh <run.js arguments>
92
+
93
+ All <run.js arguments> will be passed through.
94
+ Additionally, jsrun.sh will take the following actions:
95
+ 1) If the environment variable JSDOCDIR is set, it will add
96
+ "-Djsdoc.dir=$JSDOCDIR" to the command-line
97
+ 2) If the environment variable JSDOCTEMPLATEDIR is set, it will add
98
+ "-Djsdoc.template.dir=$JSDOCTEMPLATEDIR" to the command-line
99
+ 3) java with the appropriate path to jsrun.jar and run.js will be instantiated
100
+
101
+ If not variables are set, it is assumed that the path to jsrun.jar and app/ is
102
+ in the current working directory.
103
+
104
+ Example:
105
+ # jsrun.sh ./src/
106
+ Assuming JSDOCDIR=/some/path/to/my/jsdoc will cause the following command to
107
+ execute:
108
+ java -Djsdoc.dir=/some/path/to/my/jsdoc -jar /some/path/to/my/jsdoc/jsrun.jar
109
+ /some/path/to/my/jsdoc/app/run.js ./src/
110
+
111
+ ======================================================================
112
+
113
+ TESTING:
114
+
115
+ To run the suite of unit tests included with JsDoc Toolkit enter this
116
+ on the command line:
117
+
118
+ $ java -jar jsrun.jar app/run.js -T
119
+
120
+ To see a dump of the internal data structure that JsDoc Toolkit has
121
+ built from your source files use this command:
122
+
123
+ $ java -jar jsrun.jar app/run.js mycode.js -Z
124
+
125
+ ======================================================================
126
+
127
+ LICENSE:
128
+
129
+ JSDoc.pm
130
+
131
+ This project is based on the JSDoc.pm tool, created by Michael
132
+ Mathews and Gabriel Reid. More information on JsDoc.pm can
133
+ be found on the JSDoc.pm homepage: http://jsdoc.sourceforge.net/
134
+
135
+ Complete documentation on JsDoc Toolkit can be found on the project
136
+ wiki at http://code.google.com/p/jsdoc-toolkit/w/list
137
+
138
+ Rhino
139
+
140
+ Rhino (JavaScript in Java) is open source and licensed by Mozilla
141
+ under the MPL 1.1 or later/GPL 2.0 or later licenses, the text of
142
+ which is available at http://www.mozilla.org/MPL/
143
+
144
+ You can obtain the source code for Rhino from the Mozilla web site at
145
+ http://www.mozilla.org/rhino/download.html
146
+
147
+ JsDoc Toolkit is a larger work that uses the Rhino JavaScript engine
148
+ but is not derived from it in any way. The Rhino library is used
149
+ without modification and without any claims whatsoever.
150
+
151
+ The Rhino Debugger
152
+
153
+ You can obtain more information about the Rhino Debugger from the
154
+ Mozilla web site at http://www.mozilla.org/rhino/debugger.html
155
+
156
+ JsDoc Toolkit is a larger work that uses the Rhino Debugger but
157
+ is not derived from it in any way. The Rhino Debugger is used
158
+ without modification and without any claims whatsoever.
159
+
160
+ JsDoc Toolkit
161
+
162
+ All code specific to JsDoc Toolkit are free, open source and licensed
163
+ for use under the X11/MIT License.
164
+
165
+ JsDoc Toolkit is Copyright (c)2009 Michael Mathews <micmath@gmail.com>
166
+
167
+ This program is free software; you can redistribute it and/or
168
+ modify it under the terms below.
169
+
170
+ Permission is hereby granted, free of charge, to any person obtaining
171
+ a copy of this software and associated documentation files (the
172
+ "Software"), to deal in the Software without restriction, including
173
+ without limitation the rights to use, copy, modify, merge, publish,
174
+ distribute, sublicense, and/or sell copies of the Software, and to
175
+ permit persons to whom the Software is furnished to do so, subject to
176
+ the following conditions: The above copyright notice and this
177
+ permission notice must be included in all copies or substantial
178
+ portions of the Software.
179
+
180
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
181
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
182
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
183
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
184
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
185
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
186
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,33 @@
1
+ IO.include("frame/Opt.js");
2
+ IO.include("frame/Chain.js");
3
+ IO.include("frame/Link.js");
4
+ IO.include("frame/String.js");
5
+ IO.include("frame/Hash.js");
6
+ IO.include("frame/Namespace.js");
7
+ //IO.include("frame/Reflection.js");
8
+
9
+ /** A few helper functions to make life a little easier. */
10
+
11
+ function defined(o) {
12
+ return (o !== undefined);
13
+ }
14
+
15
+ function copy(o) { // todo check for circular refs
16
+ if (o == null || typeof(o) != 'object') return o;
17
+ var c = new o.constructor();
18
+ for(var p in o) c[p] = copy(o[p]);
19
+ return c;
20
+ }
21
+
22
+ function isUnique(arr) {
23
+ var l = arr.length;
24
+ for(var i = 0; i < l; i++ ) {
25
+ if (arr.lastIndexOf(arr[i]) > i) return false;
26
+ }
27
+ return true;
28
+ }
29
+
30
+ /** Returns the given string with all regex meta characters backslashed. */
31
+ RegExp.escapeMeta = function(str) {
32
+ return str.replace(/([$^\\\/()|?+*\[\]{}.-])/g, "\\$1");
33
+ }
@@ -0,0 +1,102 @@
1
+ /**@constructor*/
2
+ function ChainNode(object, link) {
3
+ this.value = object;
4
+ this.link = link; // describes this node's relationship to the previous node
5
+ }
6
+
7
+ /**@constructor*/
8
+ function Chain(valueLinks) {
9
+ this.nodes = [];
10
+ this.cursor = -1;
11
+
12
+ if (valueLinks && valueLinks.length > 0) {
13
+ this.push(valueLinks[0], "//");
14
+ for (var i = 1, l = valueLinks.length; i < l; i+=2) {
15
+ this.push(valueLinks[i+1], valueLinks[i]);
16
+ }
17
+ }
18
+ }
19
+
20
+ Chain.prototype.push = function(o, link) {
21
+ if (this.nodes.length > 0 && link) this.nodes.push(new ChainNode(o, link));
22
+ else this.nodes.push(new ChainNode(o));
23
+ }
24
+
25
+ Chain.prototype.unshift = function(o, link) {
26
+ if (this.nodes.length > 0 && link) this.nodes[0].link = link;
27
+ this.nodes.unshift(new ChainNode(o));
28
+ this.cursor++;
29
+ }
30
+
31
+ Chain.prototype.get = function() {
32
+ if (this.cursor < 0 || this.cursor > this.nodes.length-1) return null;
33
+ return this.nodes[this.cursor];
34
+ }
35
+
36
+ Chain.prototype.first = function() {
37
+ this.cursor = 0;
38
+ return this.get();
39
+ }
40
+
41
+ Chain.prototype.last = function() {
42
+ this.cursor = this.nodes.length-1;
43
+ return this.get();
44
+ }
45
+
46
+ Chain.prototype.next = function() {
47
+ this.cursor++;
48
+ return this.get();
49
+ }
50
+
51
+ Chain.prototype.prev = function() {
52
+ this.cursor--;
53
+ return this.get();
54
+ }
55
+
56
+ Chain.prototype.toString = function() {
57
+ var string = "";
58
+ for (var i = 0, l = this.nodes.length; i < l; i++) {
59
+ if (this.nodes[i].link) string += " -("+this.nodes[i].link+")-> ";
60
+ string += this.nodes[i].value.toString();
61
+ }
62
+ return string;
63
+ }
64
+
65
+ Chain.prototype.joinLeft = function() {
66
+ var result = "";
67
+ for (var i = 0, l = this.cursor; i < l; i++) {
68
+ if (result && this.nodes[i].link) result += this.nodes[i].link;
69
+ result += this.nodes[i].value.toString();
70
+ }
71
+ return result;
72
+ }
73
+
74
+
75
+ /* USAGE:
76
+
77
+ var path = "one/two/three.four/five-six";
78
+ var pathChain = new Chain(path.split(/([\/.-])/));
79
+ print(pathChain);
80
+
81
+ var lineage = new Chain();
82
+ lineage.push("Port");
83
+ lineage.push("Les", "son");
84
+ lineage.push("Dawn", "daughter");
85
+ lineage.unshift("Purdie", "son");
86
+
87
+ print(lineage);
88
+
89
+ // walk left
90
+ for (var node = lineage.last(); node !== null; node = lineage.prev()) {
91
+ print("< "+node.value);
92
+ }
93
+
94
+ // walk right
95
+ var node = lineage.first()
96
+ while (node !== null) {
97
+ print(node.value);
98
+ node = lineage.next();
99
+ if (node && node.link) print("had a "+node.link+" named");
100
+ }
101
+
102
+ */
@@ -0,0 +1,144 @@
1
+ /**
2
+ * @class
3
+ <pre>
4
+ This is a lightly modified version of Kevin Jones' JavaScript
5
+ library Data.Dump. To download the original visit:
6
+ <a href="http://openjsan.org/doc/k/ke/kevinj/Data/Dump/">http://openjsan.org/doc/k/ke/kevinj/Data/Dump/</a>
7
+
8
+ AUTHORS
9
+
10
+ The Data.Dump JavaScript module is written by Kevin Jones
11
+ (kevinj@cpan.org), based on Data::Dump by Gisle Aas (gisle@aas.no),
12
+ based on Data::Dumper by Gurusamy Sarathy (gsar@umich.edu).
13
+
14
+ COPYRIGHT
15
+
16
+ Copyright 2007 Kevin Jones. Copyright 1998-2000,2003-2004 Gisle Aas.
17
+ Copyright 1996-1998 Gurusamy Sarathy.
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the Perl Artistic License
21
+
22
+ See http://www.perl.com/perl/misc/Artistic.html
23
+ </pre>
24
+ * @static
25
+ */
26
+ Dumper = {
27
+ /** @param [...] The objects to dump. */
28
+ dump: function () {
29
+ if (arguments.length > 1)
30
+ return this._dump(arguments);
31
+ else if (arguments.length == 1)
32
+ return this._dump(arguments[0]);
33
+ else
34
+ return "()";
35
+ },
36
+
37
+ _dump: function (obj) {
38
+ if (typeof obj == 'undefined') return 'undefined';
39
+ var out;
40
+ if (obj.serialize) { return obj.serialize(); }
41
+ var type = this._typeof(obj);
42
+ if (obj.circularReference) obj.circularReference++;
43
+ switch (type) {
44
+ case 'circular':
45
+ out = "{ //circularReference\n}";
46
+ break;
47
+ case 'object':
48
+ var pairs = new Array;
49
+
50
+ for (var prop in obj) {
51
+ if (prop != "circularReference" && obj.hasOwnProperty(prop)) { //hide inherited properties
52
+ pairs.push(prop + ': ' + this._dump(obj[prop]));
53
+ }
54
+ }
55
+
56
+ out = '{' + this._format_list(pairs) + '}';
57
+ break;
58
+
59
+ case 'string':
60
+ for (var prop in Dumper.ESC) {
61
+ if (Dumper.ESC.hasOwnProperty(prop)) {
62
+ obj = obj.replace(prop, Dumper.ESC[prop]);
63
+ }
64
+ }
65
+
66
+ // Escape UTF-8 Strings
67
+ if (obj.match(/^[\x00-\x7f]*$/)) {
68
+ out = '"' + obj.replace(/\"/g, "\\\"").replace(/([\n\r]+)/g, "\\$1") + '"';
69
+ }
70
+ else {
71
+ out = "unescape('"+escape(obj)+"')";
72
+ }
73
+ break;
74
+
75
+ case 'array':
76
+ var elems = new Array;
77
+
78
+ for (var i=0; i<obj.length; i++) {
79
+ elems.push( this._dump(obj[i]) );
80
+ }
81
+
82
+ out = '[' + this._format_list(elems) + ']';
83
+ break;
84
+
85
+ case 'date':
86
+ // firefox returns GMT strings from toUTCString()...
87
+ var utc_string = obj.toUTCString().replace(/GMT/,'UTC');
88
+ out = 'new Date("' + utc_string + '")';
89
+ break;
90
+
91
+ case 'element':
92
+ // DOM element
93
+ out = this._dump_dom(obj);
94
+ break;
95
+
96
+ default:
97
+ out = obj;
98
+ }
99
+
100
+ out = String(out).replace(/\n/g, '\n ');
101
+ out = out.replace(/\n (.*)$/,"\n$1");
102
+
103
+ return out;
104
+ },
105
+
106
+ _format_list: function (list) {
107
+ if (!list.length) return '';
108
+ var nl = list.toString().length > 60 ? '\n' : ' ';
109
+ return nl + list.join(',' + nl) + nl;
110
+ },
111
+
112
+ _typeof: function (obj) {
113
+ if (obj && obj.circularReference && obj.circularReference > 1) return 'circular';
114
+ if (Array.prototype.isPrototypeOf(obj)) return 'array';
115
+ if (Date.prototype.isPrototypeOf(obj)) return 'date';
116
+ if (typeof obj.nodeType != 'undefined') return 'element';
117
+ return typeof(obj);
118
+ },
119
+
120
+ _dump_dom: function (obj) {
121
+ return '"' + Dumper.nodeTypes[obj.nodeType] + '"';
122
+ }
123
+ };
124
+
125
+ Dumper.ESC = {
126
+ "\t": "\\t",
127
+ "\n": "\\n",
128
+ "\f": "\\f"
129
+ };
130
+
131
+ Dumper.nodeTypes = {
132
+ 1: "ELEMENT_NODE",
133
+ 2: "ATTRIBUTE_NODE",
134
+ 3: "TEXT_NODE",
135
+ 4: "CDATA_SECTION_NODE",
136
+ 5: "ENTITY_REFERENCE_NODE",
137
+ 6: "ENTITY_NODE",
138
+ 7: "PROCESSING_INSTRUCTION_NODE",
139
+ 8: "COMMENT_NODE",
140
+ 9: "DOCUMENT_NODE",
141
+ 10: "DOCUMENT_TYPE_NODE",
142
+ 11: "DOCUMENT_FRAGMENT_NODE",
143
+ 12: "NOTATION_NODE"
144
+ };