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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6ae5faa0c5219a25e34453918b753bddea201ef08844b2f481513c0e2f1ca1d
4
- data.tar.gz: 36942efdfcd848547b6829c87b8cf7e25209d2b87feb384a0a1063d17ba0b040
3
+ metadata.gz: 8dbfbae2dda607c78c4eea01a95f6278eac730a4fe9befeb871e51787e6ee85a
4
+ data.tar.gz: 8c4c85c2aa0017de60790047e3ec0290d577a48e5d6da38baa11e33a76d2a0f9
5
5
  SHA512:
6
- metadata.gz: 22839b971f457d7d83def0575baa4497ff6fcdda3ebf376e54a56947c262dd5c998cf513a1a0b7338a39478d46c003edf1042c54df4acd04c696ebf455eaf7ae
7
- data.tar.gz: 7e8cda883f1456c5acef378d86e4309e40a00c6e7d0b2f53b0a407b47d94f56b6266442e3c4b774c4be3fbcd15f8e6f9e62cf973aacc89f0bf22c8b808114e0f
6
+ metadata.gz: d739b94e94c43971bb6147db399627f49686b66d726bdce40f446f3be88690ce60e2897ef6183b2b730357b0a7f5edf891678d3585e54ab498f93d3511ddd6e1
7
+ data.tar.gz: e602b8669163db7880ff2fb0c43cf7b54ef323aa29021ce1dc660b731f9696a2fc700d74b937a199309dec61e75ba338b03c5a3656fbbe4280cf9f9e195afeeb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v1.1.0
2
+
3
+ - Fixes
4
+ - S3 config activation;
5
+
6
+ - Update
7
+ - Adds more default arguments;
8
+
1
9
  ## v1.0.1
2
10
 
3
11
  - Fixes
@@ -19,7 +19,11 @@ module CapybaraBox
19
19
  def apply_arguments
20
20
  arguments.each { |argument| add_argument(argument) }
21
21
 
22
- add_argument('--headless') if chrome_headless?
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
- Capybara::Screenshot.s3_configuration = {
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CapybaraBox
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
5
5
  end
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.1
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-21 00:00:00.000000000 Z
11
+ date: 2020-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara-screenshot