sauce 3.7.0 → 3.7.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: cb68d5c93618cb4fd253d65a734e56a0196c4435
4
- data.tar.gz: 881b581436a2377732a29c4d4eb656eafadf8f16
3
+ metadata.gz: 8a99d68f609df983d19a5e98b8be9d3cb05c76d9
4
+ data.tar.gz: 2a70a5b41fa6542404c89c303584061c6a431161
5
5
  SHA512:
6
- metadata.gz: e71c4675a1c2061c4520afe6065ee4f7c8f4e7c450763fdaecaa16112e4fd8f6d279aa54e3a8373ad908c0e39cfd9aa34de11c036e124d70f975fcb1ef1d5620
7
- data.tar.gz: c427e7e8d19676701a03ecaa7c25085435a4a8605eed5556964b3bbf675e097bab2128d15481772ac4fb600c6a675b8a1317c4bd0ce144ab32a8d3c3be8a87a1
6
+ metadata.gz: 76836c4c7410c30332fe8dac1900ec47d6a95ca62664805bc36973752e570446a72a57dedaba7498ac909d0e3e0e85b439defe4c9b6d5a92a93f90d4f129f881
7
+ data.tar.gz: 50b464bb550ac59557d1c986ff2d420ad9eb181d5ba25833d0d6a7804a4fca206deb4026f67610559a1e533126e6886df0aa37c4566b2d1dd345e2ea21990b5a
@@ -43,6 +43,7 @@ module Sauce
43
43
  alias :base_find_window :find_window
44
44
  alias :base_execute_script :execute_script
45
45
  alias :base_evaluate_script :evaluate_script
46
+ alias :base_reset! :reset!
46
47
 
47
48
  @methods_to_retry = [:visit, :current_url,
48
49
  :within_frame, :within_window, :find_window, :source,
@@ -128,6 +129,21 @@ module Sauce
128
129
  @using_rspec_browser = nil
129
130
  end
130
131
 
132
+ def reset!
133
+ begin
134
+ base_reset!
135
+
136
+ rescue Selenium::WebDriver::Error::WebDriverError => e
137
+ session_finished = e.message.match "ERROR Job is not in progress"
138
+
139
+ if @browser.config[:suppress_session_quit_failures] && session_finished
140
+ @browser=nil
141
+ else
142
+ raise e
143
+ end
144
+ end
145
+ end
146
+
131
147
  def render(path)
132
148
  browser.save_screenshot path
133
149
  end
@@ -28,7 +28,8 @@ module Sauce
28
28
  :start_tunnel => true,
29
29
  :start_local_application => true,
30
30
  :warn_on_skipped_integration => true,
31
- :skip_connection_test => false
31
+ :skip_connection_test => false,
32
+ :suppress_session_quit_failures => false
32
33
  }
33
34
 
34
35
  DEFAULT_BROWSERS = {
@@ -70,7 +71,7 @@ module Sauce
70
71
  selenium-version command-timeout prerun prerun-args screen-resolution
71
72
  disable-popup-handler avoid-proxy public name iedriver-version parent-tunnel
72
73
  time-zone device-orientation record-logs webdriver-remote-quiet-exceptions
73
- iedriver-version chromeOptions
74
+ chromedriver-version chromeOptions
74
75
  }
75
76
 
76
77
  def self.get_application_port
@@ -91,8 +91,23 @@ module Sauce
91
91
 
92
92
  def stop
93
93
  Sauce.logger.debug "Thread #{Thread.current.object_id} quitting driver #{@driver.session_id}"
94
- @driver.quit
94
+ quit_and_maybe_rescue @driver
95
95
  Sauce.logger.debug "Thread #{Thread.current.object_id} has quit driver #{@driver.session_id}"
96
96
  end
97
+
98
+ def quit
99
+ quit_and_maybe_rescue raw_driver
100
+ end
101
+
102
+ def quit_and_maybe_rescue driver
103
+ begin
104
+ driver.quit
105
+ rescue Selenium::WebDriver::Error::WebDriverError => e
106
+ session_finished = e.message.match "has already finished, and can't receive further commands"
107
+ unless @config[:suppress_session_quit_failures] && session_finished
108
+ raise e
109
+ end
110
+ end
111
+ end
97
112
  end
98
113
  end
@@ -1,6 +1,6 @@
1
1
  module Sauce
2
2
  MAJOR_VERSION = '3.7'
3
- PATCH_VERSION = '0'
3
+ PATCH_VERSION = '1'
4
4
 
5
5
  def version
6
6
  "#{MAJOR_VERSION}.#{PATCH_VERSION}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Lacey
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-01-20 00:00:00.000000000 Z
17
+ date: 2016-02-10 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rspec