itamae-plugin-recipe-selenium 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/itamae/plugin/recipe/selenium/chrome.rb +10 -6
- data/lib/itamae/plugin/recipe/selenium/templates/etc/yum.repos.d/google-chrome.repo.erb +1 -1
- data/lib/itamae/plugin/recipe/selenium/version.rb +1 -1
- data/lib/itamae/plugin/resource/setup_selenium_driver.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b27456ae7f5fc30cbf3de2e08990ad2ed3b54b2e644f1be32f125c2b8a9615ad
|
4
|
+
data.tar.gz: 978f9f239da0b968028c6fa4adbb846352ed330855f1b945ba0ca1e5b32ac121
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aa57fec62349ea870a83524ec0d373a3c030518fb7e1cb345a1bdba550611e7cbd2de15593e4da58cb98709f2d82597e269b2a24a9724e001be5274d59bd594
|
7
|
+
data.tar.gz: b545c73eaeab56441a9aca83b522feab07332e434008250e79ef61276cef221e295f80cd93d85917de91df233d098cabf04d508a9c37de930b32a3e22377fed9
|
data/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
version = ENV['CHROME_VERSION'] || '94.0.4606.81'
|
2
|
-
|
3
1
|
template '/etc/yum.repos.d/google-chrome.repo' do
|
4
2
|
user 'root'
|
5
3
|
owner 'root'
|
@@ -7,12 +5,18 @@ template '/etc/yum.repos.d/google-chrome.repo' do
|
|
7
5
|
mode '644'
|
8
6
|
end
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
if ENV['CHROME_VERSION'].to_s.empty?
|
9
|
+
package 'google-chrome-stable' do
|
10
|
+
user 'root'
|
11
|
+
end
|
12
|
+
else
|
13
|
+
execute "yum install -y https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-#{ENV['CHROME_VERSION']}-1.x86_64.rpm" do
|
14
|
+
user 'root'
|
15
|
+
not_if "which google-chrome-stable && google-chrome-stable --version | cut -d ' ' -f 3 | egrep \"^#{ENV['CHROME_VERSION']}$\""
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
19
|
execute 'yum update -y google-chrome-stable' do
|
16
20
|
user 'root'
|
17
|
-
not_if "which google-chrome-stable && google-chrome-stable --version | egrep 'Google Chrome (
|
21
|
+
not_if "which google-chrome-stable && google-chrome-stable --version | egrep 'Google Chrome (96|97|98|99|100)\.'"
|
18
22
|
end
|
@@ -36,14 +36,19 @@ module Itamae
|
|
36
36
|
base_url = 'https://' + host
|
37
37
|
browser_version = run_command('sudo yum list | grep google-chrome-stable').stdout.split[1]
|
38
38
|
browser_version = Gem::Version.new(browser_version.to_s).segments[0..2].join('.')
|
39
|
+
|
39
40
|
driver_version_url = base_url + "/LATEST_RELEASE_#{browser_version}"
|
40
41
|
driver_version = Net::HTTP.get_response(URI(driver_version_url)).body
|
42
|
+
|
43
|
+
# see https://stackoverflow.com/questions/70967207/selenium-chromedriver-cannot-construct-keyevent-from-non-typeable-key/70968668
|
44
|
+
driver_version = '97.0.4692.71' if driver_version.start_with?('98.')
|
45
|
+
|
41
46
|
download_url = base_url + "/#{driver_version}/chromedriver_linux64.zip"
|
42
47
|
header = Net::HTTP.start(host) { |http| http.head("/#{driver_version}/chromedriver_linux64.zip") }
|
43
48
|
etag = header['etag'][1...-1]
|
44
49
|
|
45
|
-
Itamae.logger.
|
46
|
-
Itamae.logger.
|
50
|
+
Itamae.logger.info "browser version: #{browser_version}"
|
51
|
+
Itamae.logger.info "driver version: #{driver_version}"
|
47
52
|
Itamae.logger.debug "download url: #{download_url}"
|
48
53
|
Itamae.logger.debug "etag: #{etag}"
|
49
54
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-selenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- y-matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.3.10
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: itamae recipe for god process monitoring framework
|