webdrivers 3.2.3 → 3.2.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: f81f6522ad358e18e2cf683e41223f33700eb62b
4
- data.tar.gz: 3164add137b3f3a154a7ab954238ad16c8e91c47
3
+ metadata.gz: ca1ac3aeef06a8be8d433cde3199d6fe8609b88d
4
+ data.tar.gz: c51bbd846ff0fbb6e21213be144a1f9c72538616
5
5
  SHA512:
6
- metadata.gz: c979cb462555fcf4e3c50730c01ca293a0f78c8b5ef70a21407cc31084631e211e8c5eef272346cba6fd254dd1fed8596150e3b18683cfaf60bd789f668b12f0
7
- data.tar.gz: 5185f0ee4ef76cae82b73f0c3feffe54cd80f24e5505a99eacbf8de75e1579c6b32a3b4368459c4a9734e36f10fdb4b7059d7aafb6340a813d71bcedc1b0e7e2
6
+ metadata.gz: c9fc8f2e6c6e1268fc69fc7c76f197234da084b11f3298f8742449f4e44ee5d4b2605369c03ac0efcb5895814dcb4207c1514a3419486f2c5603c49576b4c48f
7
+ data.tar.gz: 81ffe1608b1d783df44a7e75075ed601e4fb6553e244733153f4098803ff05e0ba4acaa604398c7cf232ffe05ec6211a6731d5ced87e337078b27299f6e92c45
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 3.2.3 (2017-01-04)
2
+
3
+ * Improve error message when unable to find the latest driver
4
+
1
5
  ### 3.2.3 (2017-12-12)
2
6
 
3
7
  * Fixed bug with finding geckodriver on updated Github release pages
@@ -9,7 +9,17 @@ module Webdrivers
9
9
  unless site_available?
10
10
  return current.nil? ? nil : binary
11
11
  end
12
- return binary if current == latest
12
+ released = latest()
13
+ location = binary()
14
+
15
+ return location if released.nil? && File.exist?(location)
16
+
17
+ if released.nil?
18
+ msg = "Unable to find the latest version of #{file_name}; try downloading manually from #{base_url} and place in #{install_dir}"
19
+ raise StandardError, msg
20
+ end
21
+
22
+ return location if current == released
13
23
  remove && download
14
24
  end
15
25
 
@@ -4,6 +4,19 @@ describe Webdrivers::Geckodriver do
4
4
 
5
5
  let(:geckodriver) { Webdrivers::Geckodriver }
6
6
 
7
+ it 'raises exception if unable to get latest geckodriver and no geckodriver present' do
8
+ geckodriver.remove
9
+ allow(geckodriver).to receive(:latest).and_return(nil)
10
+ msg = /^Unable to find the latest version of geckodriver; try downloading manually from (.*)?and place in (.*)?\.webdrivers$/
11
+ expect { geckodriver.update }.to raise_exception StandardError, msg
12
+ end
13
+
14
+ it 'uses found version of geckodriver if latest release unable to be found' do
15
+ geckodriver.download
16
+ allow(geckodriver).to receive(:latest).and_return(nil)
17
+ expect(geckodriver.update).to match(/\.webdrivers\/geckodriver/)
18
+ end
19
+
7
20
  it 'finds latest version' do
8
21
  expect(geckodriver.latest).to be > 0.17
9
22
  expect(geckodriver.latest).to be < 0.2
data/webdrivers.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "webdrivers"
6
- s.version = "3.2.3"
6
+ s.version = "3.2.4"
7
7
  s.authors = ["Titus Fortner"]
8
8
  s.email = ["titusfortner@gmail.com"]
9
9
  s.homepage = "https://github.com/titusfortner/webdrivers"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdrivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec