blade-sauce_labs_plugin 0.6.0 → 0.6.1

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: 4b6c919462742f38659c797c6057783c1f3a3539
4
- data.tar.gz: d4f780931cef4790313e74596092f40e5f94fd02
3
+ metadata.gz: 22a46cbac58623726ac3afd141455b82784352b8
4
+ data.tar.gz: 2fa8257a14a638c2e54693dda4f4d3c1bdfec269
5
5
  SHA512:
6
- metadata.gz: 366f8244f22c1e448c4ea077a47b6687f9295689d001cddcbf2d9ee23931166ad3bff0ac8449ce644fe5bf14860e0ac9c8387c880e2a13d3dee15cba340e91c0
7
- data.tar.gz: 657bb9ecc532d0c534b000a524e7bf0b8fafdcb1687fef1b2d572f62db28634e7ba47b5ade00f47bcfdd55a2e72f61760e4cf337c2b3c77134f58be6054ee8d0
6
+ metadata.gz: 5fac9e05d635f7616ecf176adf166eb29d837376a47c72d8c26cbf181b3115d5cdba99f8b2042525946310b7dce89de5d942da5ffcf9747f9e47cb7c7a9e3252
7
+ data.tar.gz: d52460395a4d0ef296bf5530ccf615d2d7af07afd162caa28752020076afbb32f94380b39a3dc985446089019743cb58a1d588f420f47f4d4cf2ce647eb925cf
@@ -7,9 +7,11 @@ module Blade::SauceLabsPlugin::Tunnel
7
7
  extend Forwardable
8
8
  def_delegators Blade::SauceLabsPlugin, :username, :access_key, :tunnel_timeout, :config, :debug, :debug?
9
9
 
10
- attr_reader :identifier, :process
10
+ attr_reader :identifier
11
11
 
12
12
  def start
13
+ return if @process
14
+
13
15
  @identifier = SecureRandom.hex(10)
14
16
  @process = create_child_process
15
17
 
@@ -31,13 +33,14 @@ module Blade::SauceLabsPlugin::Tunnel
31
33
  end
32
34
 
33
35
  def stop
36
+ return unless @process
37
+
34
38
  begin
35
39
  tunnel_io.unlink
36
- process.poll_for_exit(10)
37
- rescue ChildProcess::TimeoutError
38
- process.stop
39
- rescue
40
- nil
40
+ @process.stop(15)
41
+ @process = nil
42
+ rescue => error
43
+ debug "Error stopping tunnel: #{error}"
41
44
  end
42
45
  end
43
46
 
@@ -1,5 +1,5 @@
1
1
  module Blade
2
2
  module SauceLabsPlugin
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blade-sauce_labs_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javan Makhmali
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-08 00:00:00.000000000 Z
11
+ date: 2016-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler