xultestrunner 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/.document +5 -0
  2. data/.gitignore +4 -1
  3. data/LICENSE +17 -18
  4. data/README.rdoc +18 -0
  5. data/Rakefile +65 -40
  6. data/VERSION +1 -1
  7. data/bin/xultest +1 -12
  8. data/lib/xultestrunner.rb +1 -1
  9. data/test/test_helper.rb +9 -0
  10. data/test/xultestrunner_test.rb +7 -0
  11. data/xpcomcore/app/application.ini +12 -0
  12. data/xpcomcore/app/chrome/chrome.manifest +1 -0
  13. data/xpcomcore/app/chrome/content/xul/main_window.xul +6 -0
  14. data/xpcomcore/app/components/bootstrapper.js +70 -0
  15. data/xpcomcore/app/defaults/preferences/prefs.js +7 -0
  16. data/xultestrunner.gemspec +21 -150
  17. metadata +27 -153
  18. data/.gitmodules +0 -3
  19. data/README +0 -17
  20. data/xulapp/application.ini +0 -9
  21. data/xulapp/chrome/chrome.manifest +0 -2
  22. data/xulapp/chrome/content/interface/boot.xul +0 -20
  23. data/xulapp/chrome/content/interface/testharness.html +0 -30
  24. data/xulapp/chrome/content/lib/xultestcase.js +0 -140
  25. data/xulapp/chrome/content/lib/xultestrunner.js +0 -120
  26. data/xulapp/chrome/content/vendor/prototype/LICENSE +0 -16
  27. data/xulapp/chrome/content/vendor/prototype/prototype.js +0 -4874
  28. data/xulapp/chrome/content/vendor/scriptaculous/LICENSE +0 -20
  29. data/xulapp/chrome/content/vendor/scriptaculous/test.css +0 -90
  30. data/xulapp/chrome/content/vendor/scriptaculous/unittest.js +0 -566
  31. data/xulapp/chrome/content/vendor/xpcomcore/LICENSE +0 -21
  32. data/xulapp/chrome/content/vendor/xpcomcore/README +0 -27
  33. data/xulapp/chrome/content/vendor/xpcomcore/Rakefile +0 -83
  34. data/xulapp/chrome/content/vendor/xpcomcore/VERSION.yml +0 -5
  35. data/xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js +0 -32
  36. data/xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js +0 -120
  37. data/xulapp/chrome/content/vendor/xpcomcore/doc/files.html +0 -241
  38. data/xulapp/chrome/content/vendor/xpcomcore/doc/index.html +0 -243
  39. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Error.html +0 -256
  40. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Kernel.html +0 -1030
  41. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/LoadError.html +0 -319
  42. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/SelfConceptError.html +0 -319
  43. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/_global_.html +0 -316
  44. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_file.js.html +0 -53
  45. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_kernel.js.html +0 -251
  46. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/README.txt +0 -186
  47. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js +0 -102
  48. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js +0 -144
  49. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js +0 -84
  50. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js +0 -153
  51. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js +0 -10
  52. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js +0 -134
  53. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js +0 -26
  54. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js +0 -93
  55. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js +0 -129
  56. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame.js +0 -33
  57. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js +0 -26
  58. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +0 -159
  59. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +0 -16
  60. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +0 -292
  61. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js +0 -26
  62. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +0 -200
  63. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +0 -294
  64. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +0 -126
  65. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +0 -109
  66. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +0 -144
  67. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +0 -145
  68. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +0 -33
  69. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +0 -645
  70. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +0 -241
  71. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +0 -41
  72. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js +0 -18
  73. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +0 -332
  74. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +0 -133
  75. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js +0 -32
  76. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +0 -474
  77. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js +0 -104
  78. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/main.js +0 -111
  79. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js +0 -20
  80. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +0 -16
  81. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js +0 -10
  82. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +0 -62
  83. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js +0 -10
  84. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js +0 -31
  85. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js +0 -43
  86. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/run.js +0 -348
  87. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js +0 -144
  88. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js +0 -13
  89. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js +0 -24
  90. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js +0 -14
  91. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js +0 -31
  92. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js +0 -26
  93. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js +0 -46
  94. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js +0 -23
  95. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/config.js +0 -22
  96. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js +0 -18
  97. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js +0 -10
  98. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js +0 -12
  99. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/event.js +0 -54
  100. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js +0 -14
  101. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js +0 -39
  102. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js +0 -33
  103. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/global.js +0 -13
  104. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js +0 -25
  105. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js +0 -10
  106. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js +0 -16
  107. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js +0 -477
  108. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js +0 -33
  109. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js +0 -19
  110. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js +0 -17
  111. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/module.js +0 -17
  112. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/name.js +0 -19
  113. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js +0 -23
  114. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js +0 -13
  115. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js +0 -20
  116. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js +0 -20
  117. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js +0 -37
  118. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js +0 -8
  119. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js +0 -17
  120. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js +0 -9
  121. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js +0 -13
  122. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +0 -24
  123. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/public.js +0 -10
  124. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js +0 -5
  125. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt +0 -5
  126. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js +0 -42
  127. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js +0 -2
  128. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js +0 -22
  129. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js +0 -13
  130. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js +0 -31
  131. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js +0 -23
  132. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js +0 -14
  133. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test.js +0 -325
  134. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/changes.txt +0 -96
  135. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf +0 -31
  136. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build.xml +0 -36
  137. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml +0 -36
  138. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar +0 -0
  139. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java +0 -21
  140. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java +0 -21
  141. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar +0 -0
  142. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.jar +0 -0
  143. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.sh +0 -52
  144. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +0 -17
  145. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +0 -56
  146. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl +0 -646
  147. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl +0 -39
  148. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js +0 -200
  149. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css +0 -162
  150. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html +0 -2
  151. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html +0 -19
  152. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +0 -35
  153. data/xulapp/chrome/content/vendor/xpcomcore/lib/file.js +0 -46
  154. data/xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js +0 -244
  155. data/xulapp/chrome/content/vendor/xpcomcore/test/file_test.js +0 -16
  156. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/love.js +0 -1
  157. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_love.js +0 -1
  158. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_world.js +0 -1
  159. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/syntax_error.js +0 -1
  160. data/xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js +0 -88
  161. data/xulapp/components/bootstrap.js +0 -93
  162. data/xulapp/defaults/preferences/prefs.js +0 -14
@@ -1,251 +0,0 @@
1
- <html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
2
- .KEYW {color: #933;}
3
- .COMM {color: #bbb; font-style: italic;}
4
- .NUMB {color: #393;}
5
- .STRN {color: #393;}
6
- .REGX {color: #339;}
7
- .line {border-right: 1px dotted #666; color: #666; font-style: normal;}
8
- </style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
9
- <span class='line'> 2</span> * @fileoverview This file specifies a set of globally useful features/shortcuts
10
- <span class='line'> 3</span> * and defines our "Kernel" object, which is the base for doing a lot of simple
11
- <span class='line'> 4</span> * things with XPCOMCore such as loading in other files and printing to the
12
- <span class='line'> 5</span> * console.
13
- <span class='line'> 6</span> */</span><span class="WHIT">
14
- <span class='line'> 7</span>
15
- <span class='line'> 8</span> </span><span class="COMM">/**
16
- <span class='line'> 9</span> * @class Exception representing an error loading a file.
17
- <span class='line'> 10</span> * @extends Error
18
- <span class='line'> 11</span> * @constructor
19
- <span class='line'> 12</span> * @param {String} message The error message to be given for this exception.
20
- <span class='line'> 13</span> * @type Error
21
- <span class='line'> 14</span> */</span><span class="WHIT">
22
- <span class='line'> 15</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">LoadError</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
23
- <span class='line'> 16</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">err</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
24
- <span class='line'> 17</span> </span><span class="WHIT"> </span><span class="NAME">err.name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments.callee.name</span><span class="PUNC">;</span><span class="WHIT">
25
- <span class='line'> 18</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">err</span><span class="PUNC">;</span><span class="WHIT">
26
- <span class='line'> 19</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
27
- <span class='line'> 20</span>
28
- <span class='line'> 21</span> </span><span class="COMM">/**
29
- <span class='line'> 22</span> * @class Exception representing an error determining what the path to the currently executing file is.
30
- <span class='line'> 23</span> * @extends Error
31
- <span class='line'> 24</span> * @constructor
32
- <span class='line'> 25</span> * @param {String} message The error message to be given for this exception.
33
- <span class='line'> 26</span> * @type Error
34
- <span class='line'> 27</span> */</span><span class="WHIT">
35
- <span class='line'> 28</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">SelfConceptError</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
36
- <span class='line'> 29</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">err</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
37
- <span class='line'> 30</span> </span><span class="WHIT"> </span><span class="NAME">err.name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments.callee.name</span><span class="PUNC">;</span><span class="WHIT">
38
- <span class='line'> 31</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">err</span><span class="PUNC">;</span><span class="WHIT">
39
- <span class='line'> 32</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
40
- <span class='line'> 33</span>
41
- <span class='line'> 34</span> </span><span class="COMM">/**
42
- <span class='line'> 35</span> * A pseudo-constructor to make JSDoc happy and actually document things in {@link Kernel}.
43
- <span class='line'> 36</span> * If this method is called with an argument, all properties from {@link Kernel} are taken
44
- <span class='line'> 37</span> * and defined as the return value of getter methods set on the given object.
45
- <span class='line'> 38</span> * @class Our central 'class' containing a lot of properties and methods we need to
46
- <span class='line'> 39</span> * build the rest of XPCOMCore on top of.
47
- <span class='line'> 40</span> * @param {Object} mixinScope Optional argument, any object to mix {@link Kernel}'s properties
48
- <span class='line'> 41</span> * into.
49
- <span class='line'> 42</span> * @return The prototype object of the Kernel function.
50
- <span class='line'> 43</span> */</span><span class="WHIT">
51
- <span class='line'> 44</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">Kernel</span><span class="PUNC">(</span><span class="NAME">mixinScope</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
52
- <span class='line'> 45</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">myPrototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments.callee.prototype</span><span class="PUNC">;</span><span class="WHIT">
53
- <span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">mixinScope</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
54
- <span class='line'> 47</span> </span><span class="WHIT"> </span><span class="COMM">// FIXME - figure out a better way than this object jammed in here to special case our</span><span class="WHIT">
55
- <span class='line'> 48</span> </span><span class="WHIT"> </span><span class="COMM">// methods we really want to be calling getters when they're mixed in.</span><span class="WHIT">
56
- <span class='line'> 49</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">callingGetters</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">'$CURRENT_FILE'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">defaultArgs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'$CURRENT_DIRECTORY'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">defaultArgs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
57
- <span class='line'> 50</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">makeGetter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">attr</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">myPrototype</span><span class="PUNC">[</span><span class="NAME">attr</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
58
- <span class='line'> 51</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">makeCallingGetter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">attr</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">argsArray</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
59
- <span class='line'> 52</span> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
60
- <span class='line'> 53</span> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">myPrototype</span><span class="PUNC">[</span><span class="NAME">attr</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">argsArray</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
61
- <span class='line'> 54</span> </span><span class="PUNC">}</span><span class="WHIT">
62
- <span class='line'> 55</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
63
- <span class='line'> 56</span> </span><span class="WHIT">
64
- <span class='line'> 57</span> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">myPrototype</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
65
- <span class='line'> 58</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">callingGetters</span><span class="PUNC">[</span><span class="NAME">p</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
66
- <span class='line'> 59</span> </span><span class="WHIT"> </span><span class="NAME">mixinScope.__defineGetter__</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">makeCallingGetter</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">callingGetters</span><span class="PUNC">[</span><span class="NAME">p</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">defaultArgs</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
67
- <span class='line'> 60</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
68
- <span class='line'> 61</span> </span><span class="WHIT"> </span><span class="NAME">mixinScope.__defineGetter__</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">makeGetter</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
69
- <span class='line'> 62</span> </span><span class="PUNC">}</span><span class="WHIT">
70
- <span class='line'> 63</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
71
- <span class='line'> 64</span> </span><span class="WHIT">
72
- <span class='line'> 65</span> </span><span class="COMM">// Load up our standard library into the mixinScope.</span><span class="WHIT">
73
- <span class='line'> 66</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">standardLibraries</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">'file'</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
74
- <span class='line'> 67</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">standardLibraryLoader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
75
- <span class='line'> 68</span> </span><span class="WHIT"> </span><span class="NAME">standardLibraries.forEach</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">library</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">require</span><span class="PUNC">(</span><span class="NAME">library</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
76
- <span class='line'> 69</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
77
- <span class='line'> 70</span> </span><span class="WHIT"> </span><span class="NAME">standardLibraryLoader.call</span><span class="PUNC">(</span><span class="NAME">mixinScope</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
78
- <span class='line'> 71</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
79
- <span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">myPrototype</span><span class="PUNC">;</span><span class="WHIT">
80
- <span class='line'> 73</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
81
- <span class='line'> 74</span>
82
- <span class='line'> 75</span> </span><span class="NAME">Kernel.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
83
- <span class='line'> 76</span> </span><span class="WHIT"> </span><span class="COMM">/**
84
- <span class='line'> 77</span> * A shortcut constant to Components.classes.
85
- <span class='line'> 78</span> * @final
86
- <span class='line'> 79</span> */</span><span class="WHIT">
87
- <span class='line'> 80</span> </span><span class="WHIT"> </span><span class="NAME">$Cc</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Components.classes</span><span class="PUNC">,</span><span class="WHIT">
88
- <span class='line'> 81</span>
89
- <span class='line'> 82</span> </span><span class="WHIT"> </span><span class="COMM">/**
90
- <span class='line'> 83</span> * A shortcut constant to Components.interfaces.
91
- <span class='line'> 84</span> * @final
92
- <span class='line'> 85</span> */</span><span class="WHIT">
93
- <span class='line'> 86</span> </span><span class="WHIT"> </span><span class="NAME">$Ci</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Components.interfaces</span><span class="PUNC">,</span><span class="WHIT">
94
- <span class='line'> 87</span>
95
- <span class='line'> 88</span> </span><span class="WHIT"> </span><span class="COMM">/**
96
- <span class='line'> 89</span> * A shortcut constant to Components.results.
97
- <span class='line'> 90</span> * @final
98
- <span class='line'> 91</span> */</span><span class="WHIT">
99
- <span class='line'> 92</span> </span><span class="WHIT"> </span><span class="NAME">$Cr</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Components.results</span><span class="PUNC">,</span><span class="WHIT">
100
- <span class='line'> 93</span>
101
- <span class='line'> 94</span> </span><span class="WHIT"> </span><span class="COMM">/**
102
- <span class='line'> 95</span> * A shortcut constant to Components.utils.
103
- <span class='line'> 96</span> * @final
104
- <span class='line'> 97</span> */</span><span class="WHIT">
105
- <span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">$Cu</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Components.utils</span><span class="PUNC">,</span><span class="WHIT">
106
- <span class='line'> 99</span>
107
- <span class='line'>100</span> </span><span class="WHIT"> </span><span class="COMM">/**
108
- <span class='line'>101</span> * Taking inspiration from Ruby, this defines the set of paths to check when
109
- <span class='line'>102</span> * trying to load a file via either {@link Kernel#load} or {@link Kernel#require}.
110
- <span class='line'>103</span> * @final
111
- <span class='line'>104</span> * @type Array
112
- <span class='line'>105</span> */</span><span class="WHIT">
113
- <span class='line'>106</span> </span><span class="WHIT"> </span><span class="NAME">$LOAD_PATH</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">XPCOMCoreConfig.getProperty</span><span class="PUNC">(</span><span class="STRN">'libRoot'</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
114
- <span class='line'>107</span>
115
- <span class='line'>108</span> </span><span class="WHIT"> </span><span class="COMM">/**
116
- <span class='line'>109</span> * Taking inspiration from Ruby, this defines the currently loaded files that
117
- <span class='line'>110</span> * have been loaded through {@link Kernel#require}.
118
- <span class='line'>111</span> * @final
119
- <span class='line'>112</span> * @type Array
120
- <span class='line'>113</span> */</span><span class="WHIT">
121
- <span class='line'>114</span> </span><span class="WHIT"> </span><span class="NAME">$LOADED_FEATURES</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"kernel.js"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
122
- <span class='line'>115</span> </span><span class="WHIT">
123
- <span class='line'>116</span> </span><span class="COMM">/**
124
- <span class='line'>117</span> * Taking inspiration from Ruby, this method tries to determine the filesystem path to
125
- <span class='line'>118</span> * the caller code of this method.
126
- <span class='line'>119</span> * NOTE - when {@link Kernel} is mixed into an object, this function gets mixed in via
127
- <span class='line'>120</span> * a special case behaviour that makes it a getter that actually calls the function
128
- <span class='line'>121</span> * rather than returning the function object itself. This is to facilitate being able
129
- <span class='line'>122</span> * to call '$CURRENT_FILE' in your code rather than '$CURRENT_FILE()'. The stackTraversalDepth
130
- <span class='line'>123</span> * parameter is there for this reason, since we need to traverse the stack further than
131
- <span class='line'>124</span> * normal to find the calling scope than we normally would.
132
- <span class='line'>125</span> * @type String
133
- <span class='line'>126</span> * @param {int} stackTraversalDepth Optional argument, how far to look up the stack to
134
- <span class='line'>127</span> * figure out who called us. The default is usually safe.
135
- <span class='line'>128</span> * @throws {@link SelfConceptError} Thrown when we can't figure out what the filesystem
136
- <span class='line'>129</span> * path to the current file is.
137
- <span class='line'>130</span> */</span><span class="WHIT">
138
- <span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">$CURRENT_FILE</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">stackTraversalDepth</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
139
- <span class='line'>132</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
140
- <span class='line'>133</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">stackTraversalDepth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">stackTraversalDepth</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
141
- <span class='line'>134</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ioService</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Cc</span><span class="PUNC">[</span><span class="STRN">"@mozilla.org/network/io-service;1"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getService</span><span class="PUNC">(</span><span class="NAME">$Ci.nsIIOService</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
142
- <span class='line'>135</span> </span><span class="WHIT"> </span><span class="COMM">// FIXME - UGH. This is so seedy.</span><span class="WHIT">
143
- <span class='line'>136</span> </span><span class="WHIT"> </span><span class="COMM">// Traverse up the stack as far as needed to get our caller's stack frame. Sometimes we need to</span><span class="WHIT">
144
- <span class='line'>137</span> </span><span class="WHIT"> </span><span class="COMM">// traverse more than one level up, like when this function is actually called from a getter</span><span class="WHIT">
145
- <span class='line'>138</span> </span><span class="WHIT"> </span><span class="COMM">// property that references it.</span><span class="WHIT">
146
- <span class='line'>139</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">callerStack</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Components.stack</span><span class="PUNC">;</span><span class="WHIT">
147
- <span class='line'>140</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">stackTraversalDepth</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
148
- <span class='line'>141</span> </span><span class="WHIT"> </span><span class="NAME">callerStack</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">callerStack.caller</span><span class="PUNC">;</span><span class="WHIT">
149
- <span class='line'>142</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
150
- <span class='line'>143</span> </span><span class="WHIT"> </span><span class="COMM">// Split based on the stupid fucking " -> " Gecko puts in the filename and get the last entry</span><span class="WHIT">
151
- <span class='line'>144</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ostensiblyUs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">callerStack.filename.split</span><span class="PUNC">(</span><span class="STRN">" -> "</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">slice</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
152
- <span class='line'>145</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">callerFileURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ioService.newURI</span><span class="PUNC">(</span><span class="NAME">ostensiblyUs</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
153
- <span class='line'>146</span> </span><span class="WHIT"> </span><span class="COMM">// QI for an nsIFileURL which lets us get a handle on an actual file attribute and automagically does</span><span class="WHIT">
154
- <span class='line'>147</span> </span><span class="WHIT"> </span><span class="COMM">// resource: URL resolution for us</span><span class="WHIT">
155
- <span class='line'>148</span> </span><span class="WHIT"> </span><span class="NAME">callerFileURI.QueryInterface</span><span class="PUNC">(</span><span class="NAME">$Ci.nsIFileURL</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
156
- <span class='line'>149</span> </span><span class="WHIT"> </span><span class="COMM">// And theoretically, we can now get a handle on an nsIFile and return the path of that.</span><span class="WHIT">
157
- <span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">callerFileURI.file.path</span><span class="PUNC">;</span><span class="WHIT">
158
- <span class='line'>151</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
159
- <span class='line'>152</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">SelfConceptError</span><span class="PUNC">(</span><span class="STRN">"The filesystem location of the current file could not be determined. -- "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
160
- <span class='line'>153</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
161
- <span class='line'>154</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
162
- <span class='line'>155</span> </span><span class="WHIT">
163
- <span class='line'>156</span> </span><span class="COMM">/**
164
- <span class='line'>157</span> * This method tries to determine the filesystem path to parent directory of the caller
165
- <span class='line'>158</span> * code of this method NOTE - see the note on $CURRENT_FILE, as the same applies here.
166
- <span class='line'>159</span> * @type String
167
- <span class='line'>160</span> * @param {int} stackTraversalDepth Optional argument, how far to look up the stack to
168
- <span class='line'>161</span> * figure out who called us. The default is usually safe.
169
- <span class='line'>162</span> * @throws {@link SelfConceptError} Thrown when we can't figure out what the filesystem
170
- <span class='line'>163</span> * path to the parent directory of the current file is.
171
- <span class='line'>164</span> */</span><span class="WHIT">
172
- <span class='line'>165</span> </span><span class="WHIT"> </span><span class="NAME">$CURRENT_DIRECTORY</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">stackTraversalDepth</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
173
- <span class='line'>166</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">stackTraversalDepth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">stackTraversalDepth</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
174
- <span class='line'>167</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">currentFilePath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Kernel.prototype.$CURRENT_FILE</span><span class="PUNC">(</span><span class="NAME">stackTraversalDepth</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
175
- <span class='line'>168</span> </span><span class="WHIT">
176
- <span class='line'>169</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fileObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Cc</span><span class="PUNC">[</span><span class="STRN">"@mozilla.org/file/local;1"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">createInstance</span><span class="PUNC">(</span><span class="NAME">$Ci.nsILocalFile</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
177
- <span class='line'>170</span> </span><span class="WHIT"> </span><span class="NAME">fileObject.initWithPath</span><span class="PUNC">(</span><span class="NAME">currentFilePath</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
178
- <span class='line'>171</span>
179
- <span class='line'>172</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">fileObject.parent.path</span><span class="PUNC">;</span><span class="WHIT">
180
- <span class='line'>173</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
181
- <span class='line'>174</span> </span><span class="WHIT">
182
- <span class='line'>175</span> </span><span class="COMM">/**
183
- <span class='line'>176</span> * Prints a string to standard out, without a trailing newline.
184
- <span class='line'>177</span> * @param {String} str String to print to standard out.
185
- <span class='line'>178</span> */</span><span class="WHIT">
186
- <span class='line'>179</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
187
- <span class='line'>180</span> </span><span class="WHIT"> </span><span class="NAME">dump</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
188
- <span class='line'>181</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
189
- <span class='line'>182</span> </span><span class="WHIT">
190
- <span class='line'>183</span> </span><span class="COMM">/**
191
- <span class='line'>184</span> * Prints a string to standard out, with a trailing newline.
192
- <span class='line'>185</span> * @param {String} str String to print to standard out.
193
- <span class='line'>186</span> */</span><span class="WHIT">
194
- <span class='line'>187</span> </span><span class="WHIT"> </span><span class="NAME">puts</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
195
- <span class='line'>188</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="NAME">str</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
196
- <span class='line'>189</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
197
- <span class='line'>190</span> </span><span class="WHIT">
198
- <span class='line'>191</span> </span><span class="COMM">/**
199
- <span class='line'>192</span> * Searches {@link Kernel#$LOAD_PATH $LOAD_PATH} for files to load into the current global scope.
200
- <span class='line'>193</span> * Files loaded via this method will not be added to {@link Kernel#$LOADED_FEATURES} and hence
201
- <span class='line'>194</span> * can be repeatedly loaded and executed.
202
- <span class='line'>195</span> * @param {String} featurePath Full or relative path including file extension to try and load.
203
- <span class='line'>196</span> * @type Boolean
204
- <span class='line'>197</span> * @throws {@link LoadError} Thrown when we can't find the specified file in any directories specified
205
- <span class='line'>198</span> * in {@link Kernel#$LOAD_PATH $LOAD_PATH}.
206
- <span class='line'>199</span> */</span><span class="WHIT">
207
- <span class='line'>200</span> </span><span class="WHIT"> </span><span class="NAME">load</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">featurePath</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
208
- <span class='line'>201</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">loader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Cc</span><span class="PUNC">[</span><span class="STRN">"@mozilla.org/moz/jssubscript-loader;1"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getService</span><span class="PUNC">(</span><span class="NAME">$Ci.mozIJSSubScriptLoader</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
209
- <span class='line'>202</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">foundFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
210
- <span class='line'>203</span> </span><span class="WHIT"> </span><span class="COMM">// FIXME - so this is kinda shitty. We have an empty entry here so we default to just trying to load </span><span class="WHIT">
211
- <span class='line'>204</span> </span><span class="WHIT"> </span><span class="COMM">// from an absolute path</span><span class="WHIT">
212
- <span class='line'>205</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">loadPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$LOAD_PATH.concat</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">""</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
213
- <span class='line'>206</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">loadPathLength</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">loadPath.length</span><span class="PUNC">;</span><span class="WHIT">
214
- <span class='line'>207</span> </span><span class="WHIT"> </span><span class="COMM">// FIXME - mozilla bug here. if i use foreach on array it ignores the granted security privileges</span><span class="WHIT">
215
- <span class='line'>208</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">loadPathLength</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
216
- <span class='line'>209</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">potentialFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Cc</span><span class="PUNC">[</span><span class="STRN">"@mozilla.org/file/local;1"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">createInstance</span><span class="PUNC">(</span><span class="NAME">$Ci.nsILocalFile</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
217
- <span class='line'>210</span> </span><span class="WHIT"> </span><span class="NAME">potentialFile.initWithPath</span><span class="PUNC">(</span><span class="NAME">loadPath</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">featurePath</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
218
- <span class='line'>211</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">potentialFile.exists</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
219
- <span class='line'>212</span> </span><span class="NAME">foundFile</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">potentialFile</span><span class="PUNC">;</span><span class="WHIT">
220
- <span class='line'>213</span> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
221
- <span class='line'>214</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
222
- <span class='line'>215</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
223
- <span class='line'>216</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">foundFile</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
224
- <span class='line'>217</span> </span><span class="WHIT"> </span><span class="NAME">foundFile.normalize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
225
- <span class='line'>218</span> </span><span class="WHIT"> </span><span class="NAME">loader.loadSubScript</span><span class="PUNC">(</span><span class="STRN">"file://"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">encodeURI</span><span class="PUNC">(</span><span class="NAME">foundFile.path</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
226
- <span class='line'>219</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
227
- <span class='line'>220</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
228
- <span class='line'>221</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">LoadError</span><span class="PUNC">(</span><span class="STRN">"no such file to load -- "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">featurePath</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
229
- <span class='line'>222</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
230
- <span class='line'>223</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
231
- <span class='line'>224</span>
232
- <span class='line'>225</span> </span><span class="WHIT"> </span><span class="COMM">/**
233
- <span class='line'>226</span> * Searches {@link Kernel#$LOAD_PATH $LOAD_PATH} for features to load into the current global scope.
234
- <span class='line'>227</span> * Files loaded via this method will be added to {@link Kernel#$LOADED_FEATURES} and hence two
235
- <span class='line'>228</span> * consecutive calls to this method will not load and execute the code twice.
236
- <span class='line'>229</span> * @type Boolean True if successful, false if the specified feature has already been required.
237
- <span class='line'>230</span> * @param {String} featurePath Full or relative path without the file extension to try and require.
238
- <span class='line'>231</span> * @throws {@link LoadError} Thrown when we can't find the specified feature in any directories specified
239
- <span class='line'>232</span> * in {@link Kernel#$LOAD_PATH $LOAD_PATH}.
240
- <span class='line'>233</span> */</span><span class="WHIT">
241
- <span class='line'>234</span> </span><span class="NAME">require</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">feature</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
242
- <span class='line'>235</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">jsFeature</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">feature</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">".js"</span><span class="PUNC">;</span><span class="WHIT">
243
- <span class='line'>236</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">$LOADED_FEATURES.indexOf</span><span class="PUNC">(</span><span class="NAME">jsFeature</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
244
- <span class='line'>237</span> </span><span class="WHIT"> </span><span class="NAME">load</span><span class="PUNC">(</span><span class="NAME">jsFeature</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
245
- <span class='line'>238</span> </span><span class="WHIT"> </span><span class="NAME">$LOADED_FEATURES.push</span><span class="PUNC">(</span><span class="NAME">jsFeature</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
246
- <span class='line'>239</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
247
- <span class='line'>240</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
248
- <span class='line'>241</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
249
- <span class='line'>242</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
250
- <span class='line'>243</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
251
- <span class='line'>244</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>
@@ -1,186 +0,0 @@
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.