xpcomcore-rubygem 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -18,13 +18,32 @@ XPCOMCoreBootstrapper.prototype = {
18
18
  if (topic != "xpcom-startup") { return false; }
19
19
  if (this.bootstrapped) {
20
20
  dump("\n\nXPCOMCore already bootstrapped.\n\n");
21
- } else {
21
+ } else {
22
22
  var env = Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment);
23
23
  var xpcomcoreBootstrapper = env.exists('XPCOMCORE') && env.get('XPCOMCORE');
24
24
  if (xpcomcoreBootstrapper) {
25
- dump("\n\nLoading XPCOMCore Bootstrapper from " + xpcomcoreBootstrapper + ".\n\n");
26
- Components.utils.import("file://" + xpcomcoreBootstrapper);
27
- dump("\n\nXPCOMCore bootstrapped.\n\n");
25
+ try {
26
+ var iniFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("XCurProcD", Components.interfaces.nsIFile);
27
+ iniFile.append("application.ini");
28
+ iniFile.QueryInterface(Components.interfaces.nsILocalFile);
29
+
30
+ var iniParser = Components.classes["@mozilla.org/xpcom/ini-parser-factory;1"].getService(Components.interfaces.nsIINIParserFactory).createINIParser(iniFile);
31
+ var xpcomCoreMinVersion = iniParser.getString('XPCOMCore', 'MinVersion');
32
+
33
+ dump("\n\nLoading XPCOMCore Bootstrapper from " + xpcomcoreBootstrapper + ".\n\n");
34
+ Components.utils.import("file://" + xpcomcoreBootstrapper);
35
+ var versionComparator = Components.classes["@mozilla.org/xpcom/version-comparator;1"].createInstance(Components.interfaces.nsIVersionComparator);
36
+
37
+ if (versionComparator.compare(XPCOMCoreConfig.getProperty('version'), xpcomCoreMinVersion) < 0) {
38
+ throw("XPCOMCore version " + xpcomCoreMinVersion + " is required but we were bootstrapped with " + XPCOMCoreConfig.getProperty('version') + ".");
39
+ }
40
+
41
+ dump("\n\nXPCOMCore bootstrapped with version " + XPCOMCoreConfig.getProperty('version') + ".\n\n");
42
+ } catch (e) {
43
+ dump("\nException caught. Quitting.\n" + e + "\n");
44
+ var appStartup = Components.classes['@mozilla.org/toolkit/app-startup;1'].getService(Components.interfaces.nsIAppStartup);
45
+ appStartup.quit(Components.interfaces.nsIAppStartup.eForceQuit);
46
+ }
28
47
  } else {
29
48
  dump("\n\nNot loading XPCOMCore Bootstrapper.\n\n");
30
49
  }
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{xpcomcore-rubygem}
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ggironda"]
@@ -1,6 +1,7 @@
1
1
  require 'pathname'
2
2
  require 'yaml'
3
3
  require 'jsdoc-toolkit/doc_task'
4
+ require 'english'
4
5
 
5
6
  # TODO - fix this rakefile because it sucks sucks sucks
6
7
 
@@ -54,7 +55,7 @@ namespace :version do
54
55
 
55
56
  new_file = file.readlines.collect do |line|
56
57
  next line unless line =~ /#{Regexp.escape(js_marker_comment)}/
57
- "#{new_val} #{js_marker_comment}"
58
+ "#{new_val} #{js_marker_comment}#{$RS}"
58
59
  end
59
60
 
60
61
 
@@ -1,3 +1,4 @@
1
+ var EXPORTED_SYMBOLS = ['XPCOMCore', 'XPCOMCoreConfig'];
1
2
  const requiredMinGeckoVersion = '1.9.0'; // DO NOT REMOVE THIS COMMENT OR MOVE THIS LINE. THIS LINE IS AUTO-GENERATED FROM A RAKE TASK. @MIN_GECKO_VERSION@
2
3
  const $Cc = Components.classes;
3
4
  const $Ci = Components.interfaces;
@@ -1,8 +1,7 @@
1
1
  ---
2
+ gecko:
3
+ min_version: 1.9.0
2
4
  version:
3
5
  major: 0
4
- minor: 4
5
6
  patch: 1
6
-
7
- gecko:
8
- min_version: 1.9.0
7
+ minor: 5
@@ -1,4 +1,5 @@
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@
1
+ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
2
+ var XPCOMCoreVersion = '0.5.1'; // DO NOT REMOVE THIS COMMENT OR MOVE THIS LINE. THIS LINE IS AUTO-GENERATED FROM A RAKE TASK. @XPCOMCORE_VERSION@
2
3
  const $Cc = Components.classes;
3
4
  const $Ci = Components.interfaces;
4
5
 
@@ -269,7 +269,7 @@ This file defines the implementation of our File object.
269
269
  </div>
270
270
  <div class="fineprint" style="clear:both">
271
271
 
272
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
272
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:22 GMT-0500 (CDT)
273
273
  </div>
274
274
  </body>
275
275
  </html>
@@ -269,7 +269,7 @@ build the rest of XPCOMCore on top of.
269
269
  </div>
270
270
  <div class="fineprint" style="clear:both">
271
271
 
272
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
272
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:22 GMT-0500 (CDT)
273
273
  </div>
274
274
  </body>
275
275
  </html>
@@ -259,7 +259,7 @@ ul.inheritsList
259
259
  <!-- ============================== footer ================================= -->
260
260
  <div class="fineprint" style="clear:both">
261
261
 
262
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:12 GMT-0500 (CDT)
262
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:21 GMT-0500 (CDT)
263
263
  </div>
264
264
  </body>
265
265
  </html>
@@ -259,7 +259,7 @@ ul.inheritsList
259
259
  <!-- ============================== footer ================================= -->
260
260
  <div class="fineprint" style="clear:both">
261
261
 
262
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:12 GMT-0500 (CDT)
262
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:21 GMT-0500 (CDT)
263
263
  </div>
264
264
  </body>
265
265
  </html>
@@ -446,7 +446,7 @@ from the specified file
446
446
  <!-- ============================== footer ================================= -->
447
447
  <div class="fineprint" style="clear:both">
448
448
 
449
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:12 GMT-0500 (CDT)
449
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:21 GMT-0500 (CDT)
450
450
  </div>
451
451
  </body>
452
452
  </html>
@@ -329,7 +329,7 @@ ul.inheritsList
329
329
  <!-- ============================== footer ================================= -->
330
330
  <div class="fineprint" style="clear:both">
331
331
 
332
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:12 GMT-0500 (CDT)
332
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:21 GMT-0500 (CDT)
333
333
  </div>
334
334
  </body>
335
335
  </html>
@@ -1093,7 +1093,7 @@ in <a href="../symbols/kernel.html#$LOAD_PATH">Kernel#$LOAD_PATH</a>.</dd>
1093
1093
  <!-- ============================== footer ================================= -->
1094
1094
  <div class="fineprint" style="clear:both">
1095
1095
 
1096
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
1096
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:21 GMT-0500 (CDT)
1097
1097
  </div>
1098
1098
  </body>
1099
1099
  </html>
@@ -329,7 +329,7 @@ ul.inheritsList
329
329
  <!-- ============================== footer ================================= -->
330
330
  <div class="fineprint" style="clear:both">
331
331
 
332
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
332
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:22 GMT-0500 (CDT)
333
333
  </div>
334
334
  </body>
335
335
  </html>
@@ -329,7 +329,7 @@ ul.inheritsList
329
329
  <!-- ============================== footer ================================= -->
330
330
  <div class="fineprint" style="clear:both">
331
331
 
332
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
332
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:22 GMT-0500 (CDT)
333
333
  </div>
334
334
  </body>
335
335
  </html>
@@ -389,7 +389,7 @@ invoke the command with.</dd>
389
389
  <!-- ============================== footer ================================= -->
390
390
  <div class="fineprint" style="clear:both">
391
391
 
392
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
392
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:22 GMT-0500 (CDT)
393
393
  </div>
394
394
  </body>
395
395
  </html>
@@ -309,7 +309,7 @@ ul.inheritsList
309
309
  <!-- ============================== footer ================================= -->
310
310
  <div class="fineprint" style="clear:both">
311
311
 
312
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 18:59:13 GMT-0500 (CDT)
312
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Sun Oct 11 2009 20:30:22 GMT-0500 (CDT)
313
313
  </div>
314
314
  </body>
315
315
  </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xpcomcore-rubygem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ggironda