capybara-box 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/capybara-box/base.rb +16 -1
- data/lib/capybara-box/screenshot.rb +6 -2
- data/lib/capybara-box/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dbfbae2dda607c78c4eea01a95f6278eac730a4fe9befeb871e51787e6ee85a
|
4
|
+
data.tar.gz: 8c4c85c2aa0017de60790047e3ec0290d577a48e5d6da38baa11e33a76d2a0f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d739b94e94c43971bb6147db399627f49686b66d726bdce40f446f3be88690ce60e2897ef6183b2b730357b0a7f5edf891678d3585e54ab498f93d3511ddd6e1
|
7
|
+
data.tar.gz: e602b8669163db7880ff2fb0c43cf7b54ef323aa29021ce1dc660b731f9696a2fc700d74b937a199309dec61e75ba338b03c5a3656fbbe4280cf9f9e195afeeb
|
data/CHANGELOG.md
CHANGED
data/lib/capybara-box/base.rb
CHANGED
@@ -19,7 +19,11 @@ module CapybaraBox
|
|
19
19
|
def apply_arguments
|
20
20
|
arguments.each { |argument| add_argument(argument) }
|
21
21
|
|
22
|
-
|
22
|
+
if chrome_headless?
|
23
|
+
add_argument('--headless')
|
24
|
+
add_argument('--no-sandbox')
|
25
|
+
add_argument('--disable-gpu')
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
def apply_preferences
|
@@ -39,7 +43,9 @@ module CapybaraBox
|
|
39
43
|
return [] unless chrome_family?
|
40
44
|
|
41
45
|
%w[
|
46
|
+
--disable-background-networking
|
42
47
|
--disable-default-apps
|
48
|
+
--disable-dev-shm-usage
|
43
49
|
--disable-extensions
|
44
50
|
--disable-infobars
|
45
51
|
--disable-notifications
|
@@ -49,11 +55,20 @@ module CapybaraBox
|
|
49
55
|
--disable-popup-blocking
|
50
56
|
--disable-save-password-bubble
|
51
57
|
--disable-site-isolation-trials
|
58
|
+
--disable-sync
|
52
59
|
--disable-translate
|
60
|
+
--hide-scrollbars
|
53
61
|
--incognito
|
62
|
+
--metrics-recording-only
|
54
63
|
--mute-audio
|
55
64
|
--no-default-browser-check
|
65
|
+
--no-first-run
|
66
|
+
--remote-debugging-address=0.0.0.0
|
67
|
+
--remote-debugging-port=9222
|
68
|
+
--safebrowsing-disable-auto-update
|
56
69
|
--start-fullscreen
|
70
|
+
--user-data-dir=/tmp
|
71
|
+
--window-size=1920,1080
|
57
72
|
]
|
58
73
|
end
|
59
74
|
|
@@ -17,11 +17,11 @@ module CapybaraBox
|
|
17
17
|
example.full_description.downcase.gsub('#', '--').tr ' ', '-'
|
18
18
|
end
|
19
19
|
|
20
|
-
if options[:s3]
|
20
|
+
if ::CapybaraBox::Helper.true?(options[:s3])
|
21
21
|
bucket_name = ENV['CAPYBARA_BOX__S3_BUCKET_NAME']
|
22
22
|
region = ENV['CAPYBARA_BOX__S3_REGION']
|
23
23
|
|
24
|
-
|
24
|
+
s3_configuration = {
|
25
25
|
bucket_name: bucket_name,
|
26
26
|
bucket_host: "#{bucket_name}.#{region}.amazonaws.com",
|
27
27
|
|
@@ -31,8 +31,12 @@ module CapybaraBox
|
|
31
31
|
secret_access_key: ENV['CAPYBARA_BOX__S3_SECRET_ACCESS_KEY']
|
32
32
|
},
|
33
33
|
}
|
34
|
+
else
|
35
|
+
s3_configuration = {}
|
34
36
|
end
|
35
37
|
|
38
|
+
Capybara::Screenshot.s3_configuration = s3_configuration
|
39
|
+
|
36
40
|
Capybara::Screenshot.register_driver(browser_name) do |driver, path|
|
37
41
|
driver.browser.save_screenshot(path)
|
38
42
|
end
|
data/lib/capybara-box/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-box
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Washington Botelho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara-screenshot
|