chromedriver_update 0.1.8 → 0.1.9

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
  SHA256:
3
- metadata.gz: 1a692227e492aa71eef9d98f686af91343c55bf33ca1dd94ffc8ed676477bada
4
- data.tar.gz: 932c93437c817f28e6aa76ce635e404af61fcffccc7c3e34a38b7cc617c2b677
3
+ metadata.gz: bf5f436a17335dc1b8cf38d067e07d1b855ccd7c059c53b2c2186dee5c2d1e0c
4
+ data.tar.gz: f8047afe2976791fd8c5d30660195ebb1d8a4ea1e2c69036f6ac6d86df42a657
5
5
  SHA512:
6
- metadata.gz: 720cb831b5a5736c388519fe97d12be36a36ce4cc78665f54149a2b7a4801709e2db7abf09dabaaf9d1c57dff957bcbb9ee3882ee709a9fe5657ea2d16c1464f
7
- data.tar.gz: d461a29c79912443e7cf7017b8f6e1f78a871f9f4f19ad34b94c361741a30f4ec84a7cdd1d14d5d68f06759136c6937b2196afd144910bbe54aff209fdcc9c8d
6
+ metadata.gz: c5439717a74dfd5cac39ecc0479241ae9c7c8965c83398271ba7d5a2ee0d1865e5a982fe88e49694ffce669032f5cfc817bf49580e1a3469551d51e16ceeab9b
7
+ data.tar.gz: 4f1b9b5c7af90029805d083eab26134f03a1fef4412dc3ec180cb0bb3b1d56af9bfccc6216839fac28b846b0ebc7eacc22c7922622ccd4f5461565a49c3477f4
@@ -1,3 +1,3 @@
1
1
  class ChromedriverUpdate
2
- VERSION = '0.1.8'.freeze
2
+ VERSION = '0.1.9'.freeze
3
3
  end
@@ -16,8 +16,8 @@ class ChromedriverUpdate
16
16
  #
17
17
  # Update the installed version of chromedriver automatically fitting to the currently installed version of chrome
18
18
  #
19
- def self.auto_update_chromedriver
20
- if installed_chrome_version.split(".").first != installed_chromedriver_version.split(".").first
19
+ def self.auto_update_chromedriver(force: false)
20
+ if installed_chrome_version.split(".").first != installed_chromedriver_version.split(".").first || force
21
21
  original_chromedriver_version = installed_chromedriver_version
22
22
  chromedriver_zip = HTTParty.get(chromedriver_link_for_version(installed_chrome_version))
23
23
  if chromedriver_zip.code == 404 # fallback to latest lower version
@@ -32,6 +32,16 @@ class ChromedriverUpdate
32
32
  FileUtils.rm_f(download_path)
33
33
  entry.extract(download_path)
34
34
  FileUtils.mv(download_path, chromedriver_path, force: true)
35
+ begin
36
+ FileUtils.chmod("+x", chromedriver_path)
37
+ rescue
38
+ unless OS.windows?
39
+ begin
40
+ `sudo chmod +x "#{chromedriver_path}"`
41
+ rescue
42
+ end
43
+ end
44
+ end
35
45
  end
36
46
  end
37
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chromedriver_update
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus Beyrle