gabrielg-xultestrunner 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -3,4 +3,10 @@ XULTestRunner
3
3
 
4
4
  This is a XUL based test runner for running the quasi-scriptaculous-unittest.js-based tests that Conflagration and WaterTower use.
5
5
 
6
- Yes, it is a XUL app in a RubyGem, yes I am in touch with this.
6
+ Yes, it is a XUL app in a RubyGem, yes I am in touch with this.
7
+
8
+ TODO
9
+ ====
10
+
11
+ * Better error output.
12
+ * Write its own tests in itself.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/bin/xultest CHANGED
@@ -9,4 +9,5 @@ raise "Could not find `firefox-bin` or `firefox` in your path. Please rectify th
9
9
 
10
10
  xulapp_ini_path = (Pathname(__FILE__).parent.parent + "xulapp/application.ini").expand_path
11
11
 
12
+ puts("")
12
13
  exec(firefox_location, *["-app", xulapp_ini_path, *ARGV])
@@ -1,7 +1,7 @@
1
1
  [App]
2
2
  Name=XULTestRunner
3
- Version=0.1.1
4
- BuildID=93cb1ffb-a454-4b54-8159-d05eafd80fcd
3
+ Version=0.1.2
4
+ BuildID=f01e29f6-709e-4522-b77e-c3b2f22566ff
5
5
  ID=XULTestRunner@conflagrationjs.org
6
6
  Vendor=Conflagration JS
7
7
 
@@ -12,4 +12,13 @@ load = function(fileURI, moduleScope) {
12
12
  };
13
13
 
14
14
  print = dump;
15
- puts = function(str) { print(str + "\n"); };
15
+ puts = function(str) { print(str + "\n"); };
16
+
17
+ // Much love to http://ejohn.org/blog/__file__-in-javascript/
18
+ this.__defineGetter__("__FILE__", function() {
19
+ var stack = (new Error).stack;
20
+ // FIXME - Great. All this is a dance around the fact line #289 of mozJSSubScriptLoader.cpp in mozilla 1.9.1
21
+ // thinks that the best way to delimit script files is with a fucking ASCII arrow YOU FUCKS
22
+ var fileURI = stack.split("\n")[2].split("@")[1].split(" -> ").slice(-1)[0].split(/:[0-9]/)[0];
23
+ return fileURI;
24
+ });
@@ -51,12 +51,12 @@
51
51
  },
52
52
 
53
53
  _handleEmptyPaths: function() {
54
- dump("-testDir or -testFile were given without arguments. Please specify a path to a test file or directory.\n");
54
+ puts("-testDir or -testFile were given without arguments. Please specify a path to a test file or directory.");
55
55
  throw(Cr.NS_ERROR_ABORT);
56
56
  },
57
57
 
58
58
  _handleNoArguments: function() {
59
- dump("-testDir or -testFile must be specified. Please specify a path to a test file or directory.\n");
59
+ puts("-testDir or -testFile must be specified. Please specify a path to a test file or directory.");
60
60
  throw(Cr.NS_ERROR_ABORT);
61
61
  },
62
62
 
@@ -78,7 +78,7 @@
78
78
  try {
79
79
  wrappedFunc.call(this);
80
80
  } catch (e if e.result == Cr.NS_ERROR_FILE_NOT_FOUND) {
81
- dump("Given path '" + attemptedPath + "' does not exist.\n");
81
+ puts("Given path '" + attemptedPath + "' does not exist.");
82
82
  throw(Cr.NS_ERROR_ABORT);
83
83
  }
84
84
  }
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{xultestrunner}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gabriel Gironda"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gabrielg-xultestrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Gironda