chromedriver_update 0.1.9 → 0.2.0

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: bf5f436a17335dc1b8cf38d067e07d1b855ccd7c059c53b2c2186dee5c2d1e0c
4
- data.tar.gz: f8047afe2976791fd8c5d30660195ebb1d8a4ea1e2c69036f6ac6d86df42a657
3
+ metadata.gz: 8f80bc896506e0820d75a9ce024aea0a0069141ec9c5abc7f3dc91f79f227d9f
4
+ data.tar.gz: af1b2b07f17b299ea4e06be84ca09a5ecd5d6a19a56235d8fa5892c1a8e6ca9a
5
5
  SHA512:
6
- metadata.gz: c5439717a74dfd5cac39ecc0479241ae9c7c8965c83398271ba7d5a2ee0d1865e5a982fe88e49694ffce669032f5cfc817bf49580e1a3469551d51e16ceeab9b
7
- data.tar.gz: 4f1b9b5c7af90029805d083eab26134f03a1fef4412dc3ec180cb0bb3b1d56af9bfccc6216839fac28b846b0ebc7eacc22c7922622ccd4f5461565a49c3477f4
6
+ metadata.gz: 4be72e197c5cea4742c6d3978f2519c4fcffc448349d90edc71b736fece56e0f0f2f2c1e13d5710d4b838ec8ffa6c7f9eb1183eb6fc87f636a66cfef0569669a
7
+ data.tar.gz: 5ab81ae391c125c1188368b3b4c67063c5c2e9e7088a493a00cc20c09180a7a09fa40c4a4d6d6249b2b60f9bc03f3915add5d51fe8b6704967f5529ebe1d8ab9
@@ -1,3 +1,3 @@
1
1
  class ChromedriverUpdate
2
- VERSION = '0.1.9'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
@@ -19,6 +19,7 @@ class ChromedriverUpdate
19
19
  def self.auto_update_chromedriver(force: false)
20
20
  if installed_chrome_version.split(".").first != installed_chromedriver_version.split(".").first || force
21
21
  original_chromedriver_version = installed_chromedriver_version
22
+ original_chromedriver_path = chromedriver_path
22
23
  chromedriver_zip = HTTParty.get(chromedriver_link_for_version(installed_chrome_version))
23
24
  if chromedriver_zip.code == 404 # fallback to latest lower version
24
25
  chromedriver_zip = HTTParty.get(chromedriver_closest_link_for_version(installed_chrome_version))
@@ -32,13 +33,18 @@ class ChromedriverUpdate
32
33
  FileUtils.rm_f(download_path)
33
34
  entry.extract(download_path)
34
35
  FileUtils.mv(download_path, chromedriver_path, force: true)
35
- begin
36
- FileUtils.chmod("+x", chromedriver_path)
37
- rescue
38
- unless OS.windows?
36
+ unless OS.windows?
37
+ begin
38
+ FileUtils.chmod("+x", original_chromedriver_path)
39
+ `chmod +x "#{original_chromedriver_path}"`
40
+ rescue
39
41
  begin
40
- `sudo chmod +x "#{chromedriver_path}"`
42
+ `chmod +x "#{original_chromedriver_path}"`
41
43
  rescue
44
+ begin
45
+ `sudo chmod +x "#{original_chromedriver_path}"`
46
+ rescue
47
+ end
42
48
  end
43
49
  end
44
50
  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.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus Beyrle