xpcomcore-rubygem 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/xpcomcore-rubygem.gemspec +144 -2
  4. data/xpcomcore/LICENSE +21 -0
  5. data/xpcomcore/README +27 -0
  6. data/xpcomcore/Rakefile +83 -0
  7. data/xpcomcore/VERSION.yml +5 -0
  8. data/xpcomcore/bin/popen_helper.sh +47 -0
  9. data/xpcomcore/bootstrapper.js +32 -0
  10. data/xpcomcore/components/XPCOMCore.js +122 -0
  11. data/xpcomcore/doc/files.html +275 -0
  12. data/xpcomcore/doc/index.html +275 -0
  13. data/xpcomcore/doc/symbols/Error.html +264 -0
  14. data/xpcomcore/doc/symbols/File.NoSuchFileError.html +334 -0
  15. data/xpcomcore/doc/symbols/File.html +451 -0
  16. data/xpcomcore/doc/symbols/Kernel.html +1098 -0
  17. data/xpcomcore/doc/symbols/LoadError.html +334 -0
  18. data/xpcomcore/doc/symbols/SelfConceptError.html +334 -0
  19. data/xpcomcore/doc/symbols/Sys.html +394 -0
  20. data/xpcomcore/doc/symbols/XPCBuiltins.html +314 -0
  21. data/xpcomcore/doc/symbols/_global_.html +264 -0
  22. data/xpcomcore/doc/symbols/src/lib_file.js.html +82 -0
  23. data/xpcomcore/doc/symbols/src/lib_kernel.js.html +250 -0
  24. data/xpcomcore/doc/symbols/src/lib_sys.js.html +60 -0
  25. data/xpcomcore/doc/symbols/src/lib_xpc_builtins.js.html +20 -0
  26. data/xpcomcore/etc/jsdoc-toolkit/README.txt +186 -0
  27. data/xpcomcore/etc/jsdoc-toolkit/app/frame.js +33 -0
  28. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js +102 -0
  29. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js +144 -0
  30. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js +84 -0
  31. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js +153 -0
  32. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js +10 -0
  33. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js +134 -0
  34. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js +26 -0
  35. data/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js +93 -0
  36. data/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js +129 -0
  37. data/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js +26 -0
  38. data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js +26 -0
  39. data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +159 -0
  40. data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +16 -0
  41. data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +292 -0
  42. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js +104 -0
  43. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +200 -0
  44. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +294 -0
  45. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +126 -0
  46. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +109 -0
  47. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +144 -0
  48. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +145 -0
  49. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +33 -0
  50. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +645 -0
  51. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +241 -0
  52. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +41 -0
  53. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js +18 -0
  54. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +332 -0
  55. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +133 -0
  56. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js +32 -0
  57. data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +474 -0
  58. data/xpcomcore/etc/jsdoc-toolkit/app/main.js +111 -0
  59. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js +20 -0
  60. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +16 -0
  61. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js +10 -0
  62. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +62 -0
  63. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js +10 -0
  64. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js +31 -0
  65. data/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js +43 -0
  66. data/xpcomcore/etc/jsdoc-toolkit/app/run.js +348 -0
  67. data/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js +144 -0
  68. data/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js +13 -0
  69. data/xpcomcore/etc/jsdoc-toolkit/app/test.js +325 -0
  70. data/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js +24 -0
  71. data/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js +14 -0
  72. data/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js +31 -0
  73. data/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js +26 -0
  74. data/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js +46 -0
  75. data/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js +23 -0
  76. data/xpcomcore/etc/jsdoc-toolkit/app/test/config.js +22 -0
  77. data/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js +18 -0
  78. data/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js +10 -0
  79. data/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js +12 -0
  80. data/xpcomcore/etc/jsdoc-toolkit/app/test/event.js +54 -0
  81. data/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js +14 -0
  82. data/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js +39 -0
  83. data/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js +33 -0
  84. data/xpcomcore/etc/jsdoc-toolkit/app/test/global.js +13 -0
  85. data/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js +25 -0
  86. data/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js +10 -0
  87. data/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js +16 -0
  88. data/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js +477 -0
  89. data/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js +33 -0
  90. data/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js +19 -0
  91. data/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js +17 -0
  92. data/xpcomcore/etc/jsdoc-toolkit/app/test/module.js +17 -0
  93. data/xpcomcore/etc/jsdoc-toolkit/app/test/name.js +19 -0
  94. data/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js +23 -0
  95. data/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js +13 -0
  96. data/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js +20 -0
  97. data/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js +20 -0
  98. data/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js +37 -0
  99. data/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js +8 -0
  100. data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js +17 -0
  101. data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js +9 -0
  102. data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js +13 -0
  103. data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +24 -0
  104. data/xpcomcore/etc/jsdoc-toolkit/app/test/public.js +10 -0
  105. data/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js +5 -0
  106. data/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt +5 -0
  107. data/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js +42 -0
  108. data/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js +2 -0
  109. data/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js +22 -0
  110. data/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js +13 -0
  111. data/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js +31 -0
  112. data/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js +23 -0
  113. data/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js +14 -0
  114. data/xpcomcore/etc/jsdoc-toolkit/changes.txt +96 -0
  115. data/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf +31 -0
  116. data/xpcomcore/etc/jsdoc-toolkit/java/build.xml +36 -0
  117. data/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml +36 -0
  118. data/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar +0 -0
  119. data/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java +21 -0
  120. data/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java +21 -0
  121. data/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar +0 -0
  122. data/xpcomcore/etc/jsdoc-toolkit/jsrun.jar +0 -0
  123. data/xpcomcore/etc/jsdoc-toolkit/jsrun.sh +52 -0
  124. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +17 -0
  125. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +56 -0
  126. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl +646 -0
  127. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl +39 -0
  128. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js +200 -0
  129. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css +162 -0
  130. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html +2 -0
  131. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html +19 -0
  132. data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +35 -0
  133. data/xpcomcore/lib/file.js +75 -0
  134. data/xpcomcore/lib/kernel.js +243 -0
  135. data/xpcomcore/lib/sys.js +52 -0
  136. data/xpcomcore/lib/xpc_builtins.js +13 -0
  137. data/xpcomcore/test/file_test.js +27 -0
  138. data/xpcomcore/test/fixtures/empty +0 -0
  139. data/xpcomcore/test/fixtures/love.js +1 -0
  140. data/xpcomcore/test/fixtures/mad_love.js +1 -0
  141. data/xpcomcore/test/fixtures/mad_world.js +1 -0
  142. data/xpcomcore/test/fixtures/syntax_error.js +1 -0
  143. data/xpcomcore/test/kernel_test.js +95 -0
  144. data/xpcomcore/test/sys_test.js +19 -0
  145. data/xpcomcore/test/xpc_builtins_test.js +8 -0
  146. metadata +143 -1
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  gem.email = "gabriel.gironda@gmail.com"
14
14
  gem.homepage = "http://github.com/gabrielg/xpcomcore-rubygem"
15
15
  gem.authors = ["ggironda"]
16
-
16
+ gem.files = (gem.files + FileList["xpcomcore/**/*"]).uniq
17
17
  gem.post_install_message = <<-EOF;
18
18
 
19
19
  #{"".ljust(80).red_on_blue.bold}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{xpcomcore-rubygem}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ggironda"]
@@ -33,7 +33,149 @@ Gem::Specification.new do |s|
33
33
  "lib/xpcomcore-rubygem.rb",
34
34
  "test/test_helper.rb",
35
35
  "test/xpcomcore-rubygem_test.rb",
36
- "xpcomcore-rubygem.gemspec"
36
+ "xpcomcore-rubygem.gemspec",
37
+ "xpcomcore/LICENSE",
38
+ "xpcomcore/README",
39
+ "xpcomcore/Rakefile",
40
+ "xpcomcore/VERSION.yml",
41
+ "xpcomcore/bin/popen_helper.sh",
42
+ "xpcomcore/bootstrapper.js",
43
+ "xpcomcore/components/XPCOMCore.js",
44
+ "xpcomcore/doc/files.html",
45
+ "xpcomcore/doc/index.html",
46
+ "xpcomcore/doc/symbols/Error.html",
47
+ "xpcomcore/doc/symbols/File.NoSuchFileError.html",
48
+ "xpcomcore/doc/symbols/File.html",
49
+ "xpcomcore/doc/symbols/Kernel.html",
50
+ "xpcomcore/doc/symbols/LoadError.html",
51
+ "xpcomcore/doc/symbols/SelfConceptError.html",
52
+ "xpcomcore/doc/symbols/Sys.html",
53
+ "xpcomcore/doc/symbols/XPCBuiltins.html",
54
+ "xpcomcore/doc/symbols/_global_.html",
55
+ "xpcomcore/doc/symbols/src/lib_file.js.html",
56
+ "xpcomcore/doc/symbols/src/lib_kernel.js.html",
57
+ "xpcomcore/doc/symbols/src/lib_sys.js.html",
58
+ "xpcomcore/doc/symbols/src/lib_xpc_builtins.js.html",
59
+ "xpcomcore/etc/jsdoc-toolkit/README.txt",
60
+ "xpcomcore/etc/jsdoc-toolkit/app/frame.js",
61
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js",
62
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js",
63
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js",
64
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js",
65
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js",
66
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js",
67
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js",
68
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/String.js",
69
+ "xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js",
70
+ "xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js",
71
+ "xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js",
72
+ "xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js",
73
+ "xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js",
74
+ "xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js",
75
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js",
76
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js",
77
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js",
78
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js",
79
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js",
80
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js",
81
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js",
82
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js",
83
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js",
84
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js",
85
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js",
86
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js",
87
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js",
88
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js",
89
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js",
90
+ "xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js",
91
+ "xpcomcore/etc/jsdoc-toolkit/app/main.js",
92
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js",
93
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js",
94
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js",
95
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js",
96
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js",
97
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js",
98
+ "xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js",
99
+ "xpcomcore/etc/jsdoc-toolkit/app/run.js",
100
+ "xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js",
101
+ "xpcomcore/etc/jsdoc-toolkit/app/t/runner.js",
102
+ "xpcomcore/etc/jsdoc-toolkit/app/test.js",
103
+ "xpcomcore/etc/jsdoc-toolkit/app/test/addon.js",
104
+ "xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js",
105
+ "xpcomcore/etc/jsdoc-toolkit/app/test/augments.js",
106
+ "xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js",
107
+ "xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js",
108
+ "xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js",
109
+ "xpcomcore/etc/jsdoc-toolkit/app/test/config.js",
110
+ "xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js",
111
+ "xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js",
112
+ "xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js",
113
+ "xpcomcore/etc/jsdoc-toolkit/app/test/event.js",
114
+ "xpcomcore/etc/jsdoc-toolkit/app/test/exports.js",
115
+ "xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js",
116
+ "xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js",
117
+ "xpcomcore/etc/jsdoc-toolkit/app/test/global.js",
118
+ "xpcomcore/etc/jsdoc-toolkit/app/test/globals.js",
119
+ "xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js",
120
+ "xpcomcore/etc/jsdoc-toolkit/app/test/inner.js",
121
+ "xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js",
122
+ "xpcomcore/etc/jsdoc-toolkit/app/test/lend.js",
123
+ "xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js",
124
+ "xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js",
125
+ "xpcomcore/etc/jsdoc-toolkit/app/test/module.js",
126
+ "xpcomcore/etc/jsdoc-toolkit/app/test/name.js",
127
+ "xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js",
128
+ "xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js",
129
+ "xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js",
130
+ "xpcomcore/etc/jsdoc-toolkit/app/test/overview.js",
131
+ "xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js",
132
+ "xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js",
133
+ "xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js",
134
+ "xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js",
135
+ "xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js",
136
+ "xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js",
137
+ "xpcomcore/etc/jsdoc-toolkit/app/test/public.js",
138
+ "xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js",
139
+ "xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt",
140
+ "xpcomcore/etc/jsdoc-toolkit/app/test/shared.js",
141
+ "xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js",
142
+ "xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js",
143
+ "xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js",
144
+ "xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js",
145
+ "xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js",
146
+ "xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js",
147
+ "xpcomcore/etc/jsdoc-toolkit/changes.txt",
148
+ "xpcomcore/etc/jsdoc-toolkit/conf/sample.conf",
149
+ "xpcomcore/etc/jsdoc-toolkit/java/build.xml",
150
+ "xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml",
151
+ "xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar",
152
+ "xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java",
153
+ "xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java",
154
+ "xpcomcore/etc/jsdoc-toolkit/jsdebug.jar",
155
+ "xpcomcore/etc/jsdoc-toolkit/jsrun.jar",
156
+ "xpcomcore/etc/jsdoc-toolkit/jsrun.sh",
157
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl",
158
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl",
159
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl",
160
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl",
161
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js",
162
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css",
163
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html",
164
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html",
165
+ "xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl",
166
+ "xpcomcore/lib/file.js",
167
+ "xpcomcore/lib/kernel.js",
168
+ "xpcomcore/lib/sys.js",
169
+ "xpcomcore/lib/xpc_builtins.js",
170
+ "xpcomcore/test/file_test.js",
171
+ "xpcomcore/test/fixtures/empty",
172
+ "xpcomcore/test/fixtures/love.js",
173
+ "xpcomcore/test/fixtures/mad_love.js",
174
+ "xpcomcore/test/fixtures/mad_world.js",
175
+ "xpcomcore/test/fixtures/syntax_error.js",
176
+ "xpcomcore/test/kernel_test.js",
177
+ "xpcomcore/test/sys_test.js",
178
+ "xpcomcore/test/xpc_builtins_test.js"
37
179
  ]
38
180
  s.homepage = %q{http://github.com/gabrielg/xpcomcore-rubygem}
39
181
  s.post_install_message = %q{
data/xpcomcore/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) <2009> <Gabriel Gironda>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/xpcomcore/README ADDED
@@ -0,0 +1,27 @@
1
+ XPCOMCore
2
+ =========
3
+
4
+ A standard library like Ruby's, only for JavaScript (with XPCOM access).
5
+
6
+ Installation
7
+ ============
8
+
9
+ Check out / submodule in / whatever the code to a place of your choosing. Then load it from an XPCOM component like so:
10
+
11
+ Components.utils.import("resource://app/chrome/content/vendor/xpcomcore/bootstrapper.js");
12
+
13
+ Then, to pull XPCOMCore into your scope, do this lovely little trick:
14
+
15
+ XPCOMCore({scope: this});
16
+
17
+ If you wish to not automatically mix in the `Kernel` module, pass another argument like so:
18
+
19
+ XPCOMCore({scope: this, importKernel: false});
20
+
21
+ Then, whenever you want to make use of XPCOMCore (say, from a XUL window), do the same deal. For example:
22
+
23
+ <script type="text/javascript">XPCOMCore({scope: this});</script>
24
+
25
+ Then you'll have access to methods such as load() and require() and whatever else is defined in Kernel.
26
+
27
+ - Gabriel Gironda
@@ -0,0 +1,83 @@
1
+ require 'pathname'
2
+ require 'yaml'
3
+ here = (Pathname(__FILE__).parent.expand_path)
4
+
5
+ task :test do
6
+ ENV['XPCOMCORE'] = Pathname(__FILE__).parent.expand_path.to_s
7
+ exec(ENV['XULTEST'] || "xultest", "-testDir", (Pathname(__FILE__).parent + "test/").expand_path.to_s)
8
+ end
9
+
10
+ task :default => :test
11
+
12
+ namespace :docs do
13
+ doc_dir = here + "doc"
14
+ jsdoc_loc = here + "etc/jsdoc-toolkit"
15
+
16
+ desc "Builds the documentation"
17
+ task :build do
18
+ raise "java does not seem to be in your PATH." if `which java`.chomp.empty?
19
+ system(%Q[java -jar "#{jsdoc_loc}/jsrun.jar" "#{jsdoc_loc}/app/run.js" -r -a -t="#{jsdoc_loc}/templates/jsdoc" -d="#{doc_dir}" lib])
20
+ end
21
+
22
+ task :clean do
23
+ system(%Q[cd "#{here}" && git rm -rf "doc/*"])
24
+ FileUtils.rm_rf(doc_dir)
25
+ FileUtils.mkdir(doc_dir)
26
+ end
27
+
28
+ task :commit do
29
+ system(%Q[cd "#{here}" && git add "doc" && git commit -m "Updating docs"])
30
+ end
31
+
32
+ task :update_gh_pages do
33
+ current_branch = `cd "#{here}" && git branch 2> /dev/null | grep -e '\\* ' | sed 's/^..\\(.*\\)/\\1/'`.chomp
34
+ system(%Q[cd "#{here}" && git checkout gh-pages && git rm -rf doc && git checkout master doc && git add doc && git commit -m "Updating docs for GH pages" && git checkout -f #{current_branch}])
35
+ end
36
+
37
+ end
38
+
39
+ task :build => ['version:update_files', 'docs:clean', 'docs:build', 'docs:commit', 'docs:update_gh_pages']
40
+
41
+
42
+ task :release => :build do
43
+ system(%Q[cd #{here} && git push])
44
+ end
45
+
46
+ namespace :version do
47
+ version_file = here + "VERSION.yml"
48
+
49
+ task :update_files do
50
+ component_file = (Pathname(__FILE__).parent + "components/XPCOMCore.js").expand_path
51
+ current = YAML.load_file(version_file.to_s)
52
+ version_string = "#{current['version']['major']}.#{current['version']['minor']}.#{current['version']['patch']}"
53
+ js_marker_comment = "// DO NOT REMOVE THIS COMMENT OR MOVE THIS LINE. THIS LINE IS AUTO-GENERATED FROM A RAKE TASK. @XPCOMCORE_VERSION@"
54
+ js_version_string = "var XPCOMCoreVersion = '#{version_string}'; #{js_marker_comment}\n"
55
+ new_file = component_file.readlines.collect do |line|
56
+ next line unless line =~ /@XPCOMCORE_VERSION@/
57
+ js_version_string
58
+ end
59
+
60
+ component_file.open('w') { |f| f << new_file.join }
61
+ puts "Updated '#{component_file}' to reflect VERSION.yml"
62
+ system(%Q[cd "#{here}" && git add "#{component_file}" && git commit -m "Updating version to '#{version_string}'" "#{component_file}"])
63
+ end
64
+
65
+ namespace :bump do
66
+ bumper = lambda do |version_part|
67
+ current = YAML.load_file(version_file.to_s)
68
+ puts "Current version is: #{current['version']['major']}.#{current['version']['minor']}.#{current['version']['patch']}"
69
+ current['version'][version_part] += 1
70
+ version_file.open('w') { |f| f << YAML.dump(current) }
71
+ puts "Current version is now: #{current['version']['major']}.#{current['version']['minor']}.#{current['version']['patch']}"
72
+ end
73
+
74
+ desc "Bumps the major version"
75
+ task(:major) { bumper.call('major') }
76
+
77
+ desc "Bumps the minor version"
78
+ task(:minor) { bumper.call('minor') }
79
+
80
+ desc "Bumps the patch version"
81
+ task(:patch) { bumper.call('patch') }
82
+ end
83
+ end
@@ -0,0 +1,5 @@
1
+ ---
2
+ version:
3
+ major: 0
4
+ minor: 4
5
+ patch: 1
@@ -0,0 +1,47 @@
1
+ #!/bin/sh
2
+ IFS=
3
+ pid=$$
4
+ tmpdir=$1
5
+ streams=$2
6
+ cmd=$3
7
+
8
+ if [[ !( "$cmd" ) || !( "$streams" ) ]]; then
9
+ echo "A valid command or set of streams were not provided."
10
+ exit 1
11
+ fi
12
+
13
+ if [[ ( $tmpdir ) && ( -d "$tmpdir" ) && ( -w "$tmpdir" ) ]]; then
14
+ stdin="&0"
15
+ stdout="&1"
16
+ stderr="&2"
17
+
18
+ IFS=","
19
+
20
+ for streamname in $streams; do
21
+ export "$streamname"="$tmpdir/$pid.$streamname.pipe"
22
+ mkfifo -m 600 "$tmpdir/$pid.$streamname.pipe"
23
+ exit=$?
24
+ test $exit -gt 0 && exit $exit
25
+ done
26
+
27
+ IFS=
28
+ shift && shift && shift
29
+
30
+ eval "exec 2>$stderr"
31
+ eval "exec 3<$stdin"
32
+ eval "exec 1>$stdout"
33
+
34
+ $cmd $* <&3
35
+
36
+ status=$?
37
+ IFS=","
38
+ for streamname in $streams; do
39
+ rm "$tmpdir/$pid.$streamname.pipe"
40
+ done
41
+
42
+ IFS=
43
+ exit $status
44
+ else
45
+ echo "Temporary directory \"$tmpdir\" doesn't exist or is not writable."
46
+ exit 1
47
+ fi
@@ -0,0 +1,32 @@
1
+ const requiredMinGeckoVersion = '1.9.0';
2
+ var EXPORTED_SYMBOLS = ["XPCOMCore", "XPCOMCoreConfig"];
3
+
4
+ const $Cc = Components.classes;
5
+ const $Ci = Components.interfaces;
6
+
7
+ var checkGeckoVersion = function() {
8
+ var versionComparator = $Cc["@mozilla.org/xpcom/version-comparator;1"].getService($Ci.nsIVersionComparator);
9
+ var appInfo = $Cc["@mozilla.org/xre/app-info;1"].getService($Ci.nsIXULAppInfo);
10
+ if (versionComparator.compare(appInfo.platformVersion, requiredMinGeckoVersion) < 0) {
11
+ throw("Gecko version '" + appInfo.platformVersion + "' is unable to use XPCOMCore.");
12
+ }
13
+ };
14
+
15
+ // Check we're even compatible with this version of Gecko before doing anything else.
16
+ checkGeckoVersion();
17
+
18
+ // Set up a resource substitution for our current directory location
19
+ var ioService = $Cc["@mozilla.org/network/io-service;1"].getService($Ci.nsIIOService);
20
+ var resProt = ioService.getProtocolHandler("resource").QueryInterface($Ci.nsIResProtocolHandler);
21
+ var currentDir = ioService.newURI(Components.stack.filename, null, null).QueryInterface($Ci.nsIFileURL).file.parent;
22
+ resProt.setSubstitution("xpcomcore", ioService.newFileURI(currentDir));
23
+
24
+ // Register our XPCOM Components
25
+ var componentsDir = ioService.newURI("resource://xpcomcore/components", null, null).QueryInterface($Ci.nsIFileURL).file;
26
+ Components.manager.QueryInterface($Ci.nsIComponentRegistrar).autoRegister(componentsDir);
27
+
28
+ // Now we're registered, export a reference to the service for the component that's bootstrapping us,
29
+ // since "Javascript global property"/"Javascript global constructor" don't get exported into the
30
+ // BackstagePass environment.
31
+ const XPCOMCore = $Cc["@conflagrationjs.org/xpcomcore/core-constructor;1"].createInstance();
32
+ const XPCOMCoreConfig = $Cc["@conflagrationjs.org/xpcomcore/core;1"].createInstance();
@@ -0,0 +1,122 @@
1
+ var XPCOMCoreVersion = '0.4.1'; // DO NOT REMOVE THIS COMMENT OR MOVE THIS LINE. THIS LINE IS AUTO-GENERATED FROM A RAKE TASK. @XPCOMCORE_VERSION@
2
+ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
3
+
4
+ const $Cc = Components.classes;
5
+ const $Ci = Components.interfaces;
6
+
7
+ var ioService = $Cc["@mozilla.org/network/io-service;1"].getService($Ci.nsIIOService);
8
+ var libRoot = ioService.newURI("resource://xpcomcore/lib", null, null).QueryInterface($Ci.nsIFileURL).file.path;
9
+ var binRoot = ioService.newURI("resource://xpcomcore/bin", null, null).QueryInterface($Ci.nsIFileURL).file.path;
10
+
11
+ // NOTE - XPCOMCore is a singleton
12
+ var XPCOMCore = function() {
13
+ if (arguments.callee.__singletonInstance__) { return arguments.callee.__singletonInstance__; };
14
+
15
+ // Private method that does the work of loading the XPCOMCore kernel
16
+ // into the given scope.
17
+ var loadKernel = function(importScope) {
18
+ var loader = $Cc["@mozilla.org/moz/jssubscript-loader;1"].getService($Ci.mozIJSSubScriptLoader);
19
+ loader.loadSubScript("resource://xpcomcore/lib/kernel.js", importScope);
20
+ };
21
+
22
+ // Private method to actually kick off the importing of kernel into the given
23
+ // import scope.
24
+ var import = function(importScope, importKernel) {
25
+ if (importScope.__XPCOMCoreLoaded__) {
26
+ return false;
27
+ } else {
28
+ loadKernel(importScope);
29
+ // FIXME - defineGetter explodes when it's a 'Window' object for some reason. Fine for
30
+ // ChromeWindow and fine for BackstagePass though. Weird.
31
+ // importScope.__defineGetter__('__XPCOMCoreLoaded__', function() { return true; });
32
+ importScope.__XPCOMCoreLoaded__ = true;
33
+ // Automatically mix Kernel into the scope if importKernel is true
34
+ if (importKernel) { importScope.Kernel(importScope); };
35
+ return true;
36
+ }
37
+ };
38
+
39
+ // FIXME - hack. hijacking the nsIWritableVariant interface so we can have a constructor that works
40
+ // FIXME - and to boot, for reasons i dont understand, we wrap the scope in another object, hence the options
41
+ // hash. which might be useful anyway.
42
+ this.setFromVariant = function(options) {
43
+ if (!options.scope) { return false; }
44
+ return import(options.scope, !(options.importKernel === false));
45
+ };
46
+
47
+ arguments.callee.__singletonInstance__ = this;
48
+ // HACK HACK HACK - this is so we can get a reference to the real constructor
49
+ // from the bootstrapper.
50
+ this.__specialConstructor__ = arguments.callee;
51
+ };
52
+
53
+ // FIXME - maybe? might not really be a 'bug'
54
+ // Bahaha - we rely on http://mxr.mozilla.org/mozilla1.8/source/js/src/xpconnect/src/xpcwrappedjsclass.cpp#528
55
+ // (as written about in http://weblogs.mozillazine.org/weirdal/archives/019778.html) to expose a getProperty
56
+ // method on this object to allow for getting arbitrary properties.
57
+ var XPCOMCoreInterfaces = [$Ci.nsIClassInfo, $Ci.nsIPropertyBag, $Ci.nsIWritableVariant];
58
+
59
+ XPCOMCore.prototype = {
60
+ classDescription: "XPCOMCore Core Object",
61
+ contractID: "@conflagrationjs.org/xpcomcore/core;1",
62
+ classID: Components.ID("{f562f600-9c25-11de-8a39-0800200c9a66}"),
63
+ QueryInterface: XPCOMUtils.generateQI(XPCOMCoreInterfaces),
64
+ _xpcom_categories: [{category: "JavaScript global property", entry: "XPCOMCoreConfig"}],
65
+
66
+ // implemented for nsIClassInfo
67
+ getInterfaces: function(aCountRef) {
68
+ aCountRef.value = XPCOMCoreInterfaces.length;
69
+ return XPCOMCoreInterfaces;
70
+ },
71
+
72
+ // implemented for nsIClassInfo
73
+ getHelperForLanguage: function(aLanguage) { return null; },
74
+
75
+ // implemented for nsIClassInfo
76
+ implementationLanguage: $Ci.nsIProgrammingLanguage.JAVASCRIPT,
77
+
78
+ // implemented for nsIClassInfo
79
+ flags: $Ci.nsIClassInfo.SINGLETON,
80
+
81
+ get version() { return new String(XPCOMCoreVersion); },
82
+ get libRoot() { return new String(libRoot); },
83
+ get binRoot() { return new String(binRoot); }
84
+
85
+ };
86
+
87
+ var XPCOMCoreConstructorInterfaces = [$Ci.nsIClassInfo, $Ci.nsIXPCConstructor, $Ci.nsIXPCScriptable];
88
+
89
+ // Singleton
90
+ var XPCOMCoreConstructor = function() {
91
+ if (arguments.callee.__singletonInstance__) { return arguments.callee.__singletonInstance__; };
92
+ var ctor = Components.Constructor("@conflagrationjs.org/xpcomcore/core;1", Components.interfaces.nsIWritableVariant, "setFromVariant");
93
+ arguments.callee.__singletonInstance__ = ctor;
94
+ return ctor;
95
+ };
96
+
97
+ XPCOMCoreConstructor.prototype = {
98
+ classDescription: "XPCOMCore Core Object Constructor Hack",
99
+ contractID: "@conflagrationjs.org/xpcomcore/core-constructor;1",
100
+ classID: Components.ID("{b5762b40-a0ec-11de-8a39-0800200c9a66}"),
101
+ QueryInterface: XPCOMUtils.generateQI(XPCOMCoreConstructorInterfaces),
102
+ _xpcom_categories: [{category: "JavaScript global property", entry: "XPCOMCore"}],
103
+
104
+ // implemented for nsIClassInfo
105
+ getInterfaces: function(aCountRef) {
106
+ aCountRef.value = XPCOMCoreConstructorInterfaces.length;
107
+ return XPCOMCoreConstructorInterfaces;
108
+ },
109
+
110
+ // implemented for nsIClassInfo
111
+ getHelperForLanguage: function(aLanguage) { return null; },
112
+
113
+ // implemented for nsIClassInfo
114
+ implementationLanguage: $Ci.nsIProgrammingLanguage.JAVASCRIPT,
115
+
116
+ // implemented for nsIClassInfo
117
+ flags: $Ci.nsIClassInfo.SINGLETON
118
+ }
119
+
120
+ NSGetModule = function(compMgr, fileSpec) {
121
+ return XPCOMUtils.generateModule([XPCOMCore, XPCOMCoreConstructor]);
122
+ };