webdrivers 3.9.3 → 3.9.4

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: f5f04db40cd34e87279887ac59110e05f38ef250
4
- data.tar.gz: c2a768ed1f2a05ab0fce06f1a6ce9142d9f116a7
3
+ metadata.gz: a4e0c2a5c2fd095d45921dd927a01a0a181e27ab
4
+ data.tar.gz: 0d9be64a36320745d3d3eb17771c79ed53e6136a
5
5
  SHA512:
6
- metadata.gz: 6908de99e739390d34fb816b4e7ca908961123933576f890436ff6f699903389e64af8b733fa835893bc4391ed66dc0e752a46164d799980566543f124ca50f5
7
- data.tar.gz: 8add787cbc29d4f3bb3ca09cca8320c8e34f4ea5a19bdbde42e7aaa544bdce320628daf5d7eba0308c624a440a5151c13ac2f03fa24dc831bae3c122f323a800
6
+ metadata.gz: ddea9e942925176d9239e06fd414e432e8a114fdd83279760001c0bc6080f8a4e6aaef8ca2bccefaac49e7d5988905f569ac2c3409e902c57e54dc6fd17bf911
7
+ data.tar.gz: '0997d4066700cdefe6aea6acb59d96eac15475c0e9eaf5f3d053bda153d0b49d92ed512bba5c40e5a6bedb1aa2cce23ae6c586aa725ab9dd6d994c36736d2498'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
+ ### 3.9.4 (2019-05-20)
2
+ * Fix bug from bug fix that warned users about setting cache time when it was already set (issue #118)
3
+ * make #base_url public for easier mocking (issue #113)
4
+
5
+ ### 3.9.3 (2019-05-17)
6
+ * Fix the bug that warned users about setting cache time when it was already set
7
+ ([#118](https://github.com/titusfortner/webdrivers/pull/118), thanks Eduardo Gutierrez)
8
+
1
9
  ### 3.9.2 (2019-05-14)
2
10
  * Allow webdrivers to handle network mocking ([#116](https://github.com/titusfortner/webdrivers/pull/116))
3
- * Fix a Windows specific bug when decompressing the driver packages ([#114](https://github.com/titusfortner/webdrivers/pull/114))
11
+ * Fix a Windows specific bug when decompressing the driver packages
12
+ ([#114](https://github.com/titusfortner/webdrivers/pull/114))
4
13
 
5
14
  ### 3.9.1 (2019-05-09)
6
15
  * Fix bug throwing nil warnings (issue #107)
@@ -24,20 +33,27 @@
24
33
 
25
34
  ### 3.8.0 (2019-04-17)
26
35
  * Add support for `selenium-webdriver` v4. See [#69](https://github.com/titusfortner/webdrivers/pull/69).
27
- * Remove dependency on `net_http_ssl_fix` gem. `Webdrivers.net_http_ssl_fix` now raises an exception and points to other solutions. See [#60](https://github.com/titusfortner/webdrivers/pull/60) and [#68](https://github.com/titusfortner/webdrivers/pull/68).
36
+ * Remove dependency on `net_http_ssl_fix` gem. `Webdrivers.net_http_ssl_fix` now raises an exception and
37
+ points to other solutions. See [#60](https://github.com/titusfortner/webdrivers/pull/60) and
38
+ [#68](https://github.com/titusfortner/webdrivers/pull/68) (thanks Samuel Williams & Maik Arnold).
28
39
 
29
40
  ### 3.7.2 (2019-04-01)
30
- * Fix bugs in methods that retrieve Chrome/Chromium version. See [#43](https://github.com/titusfortner/webdrivers/pull/43) and [#52](https://github.com/titusfortner/webdrivers/issues/52).
31
- * Add workaround for a Jruby bug when retrieving Chrome version on Windows. See [#41](https://github.com/titusfortner/webdrivers/issues/41).
41
+ * Fix bugs in methods that retrieve Chrome/Chromium version.
42
+ See [#43](https://github.com/titusfortner/webdrivers/pull/43)
43
+ and [#52](https://github.com/titusfortner/webdrivers/issues/52) (Thanks Ochko).
44
+ * Add workaround for a Jruby bug when retrieving Chrome version on Windows.
45
+ See [#41](https://github.com/titusfortner/webdrivers/issues/41).
32
46
  * Update README with more information.
33
47
 
34
48
  ### 3.7.1 (2019-03-25)
35
- * Use `Selenium::WebDriver::Chrome#path` to check for a user given browser executable before defaulting to Google Chrome. Addresses [#38](https://github.com/titusfortner/webdrivers/issues/38).
49
+ * Use `Selenium::WebDriver::Chrome#path` to check for a user given browser executable
50
+ before defaulting to Google Chrome. Addresses [#38](https://github.com/titusfortner/webdrivers/issues/38).
36
51
  * Download `chromedriver` v2.46 if Chrome/Chromium version is less than 70.
37
52
 
38
53
  ### 3.7.0 (2019-03-19)
39
54
 
40
- * `chromedriver` version now matches the installed Chrome version. See [#32](https://github.com/titusfortner/webdrivers/pull/32).
55
+ * `chromedriver` version now matches the installed Chrome version.
56
+ See [#32](https://github.com/titusfortner/webdrivers/pull/32).
41
57
 
42
58
  ### 3.6.0 (2018-12-30)
43
59
 
@@ -50,6 +50,14 @@ module Webdrivers
50
50
  normalize_version ver[/\d+\.\d+\.\d+\.\d+/] # Google Chrome 73.0.3683.75 -> 73.0.3683.75
51
51
  end
52
52
 
53
+ #
54
+ # Returns url with domain for calls to get this driver.
55
+ #
56
+ # @return [String]
57
+ def base_url
58
+ 'https://chromedriver.storage.googleapis.com'
59
+ end
60
+
53
61
  private
54
62
 
55
63
  def latest_point_release(version)
@@ -78,10 +86,6 @@ module Webdrivers
78
86
  System.platform == 'win' ? 'chromedriver.exe' : 'chromedriver'
79
87
  end
80
88
 
81
- def base_url
82
- 'https://chromedriver.storage.googleapis.com'
83
- end
84
-
85
89
  def download_url
86
90
  return @download_url if @download_url
87
91
 
@@ -181,10 +181,10 @@ end
181
181
  if System.valid_cache?(file_name)
182
182
  normalize_version System.cached_version(file_name)
183
183
  else
184
- unless cache_warning
184
+ unless Common.cache_warning
185
185
  Webdrivers.logger.warn 'Driver caching is turned off in this version, but will be '\
186
186
  'enabled by default in 4.x. Set the value with `Webdrivers#cache_time=` in seconds'
187
- @cache_warning = true
187
+ Common.cache_warning = true
188
188
  end
189
189
  version = yield
190
190
  System.cache_version(file_name, version)
@@ -28,16 +28,20 @@ module Webdrivers
28
28
  @latest_version ||= with_cache(file_name) { normalize_version(Network.get_url("#{base_url}/latest")[/[^v]*$/]) }
29
29
  end
30
30
 
31
+ #
32
+ # Returns url with domain for calls to get this driver.
33
+ #
34
+ # @return [String]
35
+ def base_url
36
+ 'https://github.com/mozilla/geckodriver/releases'
37
+ end
38
+
31
39
  private
32
40
 
33
41
  def file_name
34
42
  System.platform == 'win' ? 'geckodriver.exe' : 'geckodriver'
35
43
  end
36
44
 
37
- def base_url
38
- 'https://github.com/mozilla/geckodriver/releases'
39
- end
40
-
41
45
  def download_url
42
46
  @download_url ||= if required_version == EMPTY_VERSION
43
47
  direct_url(latest_version)
@@ -29,16 +29,20 @@ module Webdrivers
29
29
  @latest_version ||= with_cache(file_name) { downloads.keys.max }
30
30
  end
31
31
 
32
+ #
33
+ # Returns url with domain for calls to get this driver.
34
+ #
35
+ # @return [String]
36
+ def base_url
37
+ 'https://selenium-release.storage.googleapis.com/'
38
+ end
39
+
32
40
  private
33
41
 
34
42
  def file_name
35
43
  'IEDriverServer.exe'
36
44
  end
37
45
 
38
- def base_url
39
- 'https://selenium-release.storage.googleapis.com/'
40
- end
41
-
42
46
  def downloads
43
47
  doc = Nokogiri::XML.parse(Network.get(base_url))
44
48
  items = doc.css('Key').collect(&:text)
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Webdrivers do
6
+ describe '#cache_time' do
7
+ before { Webdrivers::Chromedriver.remove }
8
+
9
+ after { described_class.cache_time = 0 }
10
+
11
+ it 'does not warn if cache time is set' do
12
+ described_class.cache_time = 50
13
+
14
+ msg = /Webdrivers Driver caching is turned off in this version, but will be enabled by default in 4\.x/
15
+ expect { Webdrivers::Chromedriver.update }.not_to output(msg).to_stdout_from_any_process
16
+ end
17
+ end
18
+ end
data/webdrivers.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('../lib', __dir__)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'webdrivers'
7
- s.version = '3.9.3'
7
+ s.version = '3.9.4'
8
8
  s.authors = ['Titus Fortner', 'Lakshya Kapoor']
9
9
  s.email = %w[titusfortner@gmail.com kapoorlakshya@gmail.com]
10
10
  s.homepage = 'https://github.com/titusfortner/webdrivers'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdrivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.3
4
+ version: 3.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-17 00:00:00.000000000 Z
12
+ date: 2019-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -184,6 +184,7 @@ files:
184
184
  - spec/webdrivers/geckodriver_spec.rb
185
185
  - spec/webdrivers/i_edriver_spec.rb
186
186
  - spec/webdrivers/ms_webdriver_spec.rb
187
+ - spec/webdrivers/webdrivers_spec.rb
187
188
  - spec/webdrivers_proxy_support_spec.rb
188
189
  - webdrivers.gemspec
189
190
  homepage: https://github.com/titusfortner/webdrivers
@@ -216,4 +217,5 @@ test_files:
216
217
  - spec/webdrivers/geckodriver_spec.rb
217
218
  - spec/webdrivers/i_edriver_spec.rb
218
219
  - spec/webdrivers/ms_webdriver_spec.rb
220
+ - spec/webdrivers/webdrivers_spec.rb
219
221
  - spec/webdrivers_proxy_support_spec.rb