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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c7926df5d9bc748333244b3826ffa5406e1294f
4
- data.tar.gz: 58a6dc2d5c05207d8b0fdd0e11340bdf0a675d26
3
+ metadata.gz: a9ed7b3fb8ed58e3aab8713ee071de1e4a4cfa5d
4
+ data.tar.gz: b58c1af9c762ddc33afe22af4cd6958119b1cbb4
5
5
  SHA512:
6
- metadata.gz: 377774e2f9e2937a592edfbc97c875cc7b89361b7bee94b873c87970e9c3700c327890b973e8d86f5766c714c05f5f2ce96e7eb13a6be7309daeac1ba2fdbc46
7
- data.tar.gz: 28a0870a9b700769c234a8939d430974f08143fa4683970d607634178847dee6d670120152dca789868465bea710f25dcf58f70e943e409b915b78ad6def1450
6
+ metadata.gz: 7df4bf67b327f5a1e1158ce08451f5195af70316be0e7b592b31e9b19ff9438d1396811281f8c773f7aca6ce8807ed683a56a169a0d159543ef03a99b6c644d4
7
+ data.tar.gz: ad69bf9f0e1bbcde4ca73194fb3e0bdd440b7386bd97cd06e89333deb919c98c8adf4836efc4a30f9f861e7af95390ab54b6dfe1581c7183a5091b33e3acaf4e
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module RSpec
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
5
5
  end
@@ -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
- phantom.exit(1);
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
- phantom.exit(124);
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
- phantom.exit(code);
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.1
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-02-25 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal