opal-rspec 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opal/rspec/version.rb +1 -1
- data/vendor/spec_runner.js +12 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9ed7b3fb8ed58e3aab8713ee071de1e4a4cfa5d
|
4
|
+
data.tar.gz: b58c1af9c762ddc33afe22af4cd6958119b1cbb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7df4bf67b327f5a1e1158ce08451f5195af70316be0e7b592b31e9b19ff9438d1396811281f8c773f7aca6ce8807ed683a56a169a0d159543ef03a99b6c644d4
|
7
|
+
data.tar.gz: ad69bf9f0e1bbcde4ca73194fb3e0bdd440b7386bd97cd06e89333deb919c98c8adf4836efc4a30f9f861e7af95390ab54b6dfe1581c7183a5091b33e3acaf4e
|
data/lib/opal/rspec/version.rb
CHANGED
data/vendor/spec_runner.js
CHANGED
@@ -14,17 +14,26 @@ page.onInitialized = function() {
|
|
14
14
|
});
|
15
15
|
};
|
16
16
|
|
17
|
+
/*
|
18
|
+
* Exit phantom instance "safely" see - https://github.com/ariya/phantomjs/issues/12697
|
19
|
+
* https://github.com/nobuoka/gulp-qunit/commit/d242aff9b79de7543d956e294b2ee36eda4bac6c
|
20
|
+
*/
|
21
|
+
function phantom_exit(code) {
|
22
|
+
page.close();
|
23
|
+
setTimeout(function () { phantom.exit(code); }, 0);
|
24
|
+
}
|
25
|
+
|
17
26
|
page.open(args[0], function(status) {
|
18
27
|
if (status !== 'success') {
|
19
28
|
console.error("Cannot load: " + args[0]);
|
20
|
-
|
29
|
+
phantom_exit(1);
|
21
30
|
} else {
|
22
31
|
var timeout = parseInt(args[1] || 60000, 10);
|
23
32
|
var start = Date.now();
|
24
33
|
var interval = setInterval(function() {
|
25
34
|
if (Date.now() > start + timeout) {
|
26
35
|
console.error("Specs timed out");
|
27
|
-
|
36
|
+
phantom_exit(124);
|
28
37
|
} else {
|
29
38
|
var code = page.evaluate(function() {
|
30
39
|
return window.OPAL_SPEC_CODE;
|
@@ -32,7 +41,7 @@ page.open(args[0], function(status) {
|
|
32
41
|
|
33
42
|
if (code === 0 || code === 1) {
|
34
43
|
clearInterval(interval);
|
35
|
-
|
44
|
+
phantom_exit(code);
|
36
45
|
}
|
37
46
|
}
|
38
47
|
}, 500);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Beynon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|