chromedriver_update 0.1.7 → 0.1.8

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: c884f0ee244e14fff32d0e7247c4d45964a900e7793d1759a454e2f6b6b9479a
4
- data.tar.gz: b2dd4b60392c743c87cded44de9c33d7a3ffd0578c326d1caf8f14949188b709
3
+ metadata.gz: 1a692227e492aa71eef9d98f686af91343c55bf33ca1dd94ffc8ed676477bada
4
+ data.tar.gz: 932c93437c817f28e6aa76ce635e404af61fcffccc7c3e34a38b7cc617c2b677
5
5
  SHA512:
6
- metadata.gz: b81f119ed0595efc509491d32240a1c31f70608e079eeb9dce3b6380451a04688a4b0645b4c01ed3469fddcb59b89dd8e73ec2ceac4f67412ff3d658fe4d34d9
7
- data.tar.gz: f04d7088733b286f5d0dd6e7aa9039fb3019fc454134a7055b82cc69be7db692445585ef1c8626803d664c00d5078772db2a8b2b85f5a65e88751dec4505e9b6
6
+ metadata.gz: 720cb831b5a5736c388519fe97d12be36a36ce4cc78665f54149a2b7a4801709e2db7abf09dabaaf9d1c57dff957bcbb9ee3882ee709a9fe5657ea2d16c1464f
7
+ data.tar.gz: d461a29c79912443e7cf7017b8f6e1f78a871f9f4f19ad34b94c361741a30f4ec84a7cdd1d14d5d68f06759136c6937b2196afd144910bbe54aff209fdcc9c8d
@@ -1,3 +1,3 @@
1
1
  class ChromedriverUpdate
2
- VERSION = '0.1.7'.freeze
2
+ VERSION = '0.1.8'.freeze
3
3
  end
@@ -81,7 +81,7 @@ class ChromedriverUpdate
81
81
  if OS.windows?
82
82
  "https://storage.googleapis.com/chrome-for-testing-public/#{version}/win64/chromedriver-win64.zip"
83
83
  elsif OS.mac?
84
- "https://storage.googleapis.com/chrome-for-testing-public/#{version}/mac-arm64/chromedriver-mac-arm64.zip"
84
+ "https://storage.googleapis.com/chrome-for-testing-public/#{version}/#{mac_platform}/chromedriver-mac-arm64.zip"
85
85
  else
86
86
  "https://storage.googleapis.com/chrome-for-testing-public/#{version}/linux64/chromedriver-linux64.zip"
87
87
  end
@@ -97,7 +97,7 @@ class ChromedriverUpdate
97
97
  platform = if OS.windows?
98
98
  "win64"
99
99
  elsif OS.mac?
100
- "mac-arm64"
100
+ mac_platform
101
101
  else
102
102
  "linux64"
103
103
  end
@@ -106,6 +106,18 @@ class ChromedriverUpdate
106
106
  latest_match['downloads']['chromedriver'].filter { |el| el['platform'] == platform }.first['url']
107
107
  end
108
108
 
109
+ #
110
+ # Detect macOS platform
111
+ #
112
+ # @return [String] platform for macos
113
+ def self.mac_platform
114
+ if RUBY_PLATFORM.include?("x86") || RUBY_PLATFORM.include?("x64")
115
+ 'mac-x64'
116
+ else
117
+ 'mac-arm64'
118
+ end
119
+ end
120
+
109
121
  #
110
122
  # Get the path of the installed chromedriver
111
123
  #
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus Beyrle