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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/webdrivers/common.rb +11 -1
- data/spec/geckodriver_spec.rb +13 -0
- data/webdrivers.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca1ac3aeef06a8be8d433cde3199d6fe8609b88d
|
4
|
+
data.tar.gz: c51bbd846ff0fbb6e21213be144a1f9c72538616
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9fc8f2e6c6e1268fc69fc7c76f197234da084b11f3298f8742449f4e44ee5d4b2605369c03ac0efcb5895814dcb4207c1514a3419486f2c5603c49576b4c48f
|
7
|
+
data.tar.gz: 81ffe1608b1d783df44a7e75075ed601e4fb6553e244733153f4098803ff05e0ba4acaa604398c7cf232ffe05ec6211a6731d5ced87e337078b27299f6e92c45
|
data/CHANGELOG.md
CHANGED
data/lib/webdrivers/common.rb
CHANGED
@@ -9,7 +9,17 @@ module Webdrivers
|
|
9
9
|
unless site_available?
|
10
10
|
return current.nil? ? nil : binary
|
11
11
|
end
|
12
|
-
|
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
|
|
data/spec/geckodriver_spec.rb
CHANGED
@@ -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.
|
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.
|
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:
|
11
|
+
date: 2018-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|