capybara-headless_chrome 0.6.0 → 0.6.4

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
- SHA1:
3
- metadata.gz: bb9a3a3c6af00a81f9c3b97350bed66b09879629
4
- data.tar.gz: c947b552b0b2355284103f6437a417d668fa4717
2
+ SHA256:
3
+ metadata.gz: fc8b05799303d2fbf55815b8972d3889b0e1b13493339cc5b4fac074c214bf11
4
+ data.tar.gz: 55e392fdcb20927f4d4737da9a31d854ff1585c805050746ee7209a98d726c5e
5
5
  SHA512:
6
- metadata.gz: 6f014190f1eacb8316fd6788a290d7a100c045c6d441e375f45369ea13161c581bdbac14b091606bd2889949bec86d0e5028a8cc3606a1c2c976d6c368b4713d
7
- data.tar.gz: 8f904554f3c80edaa9267a6c3535cc872d5660bf03877a5207dd6064fe4a98b1a1963c35fc66baabebffdb436e4347c64cb9e87690fc68b34f89408aea0d98ea
6
+ metadata.gz: a0fab5f3a16ba12ad51666b0e6aff6fa0e76155dbcc0afb7ae874367c7f98aaa7dcf20913e3e28d4c0af9e01b7ea6899da96ddd395bec63d61445e6332db5667
7
+ data.tar.gz: 2f7da8a9752984c73be459a262b932087eb18a2e505a6561a2837658f8d976cdcd130227f9258db79a3a8ac590b2e255936f64110f3dcd8b1f814ff38b3c8fe0
data/.byebug_history ADDED
@@ -0,0 +1,3 @@
1
+ c
2
+ hash["PATH_INFO"]
3
+ hash
data/.travis.yml CHANGED
@@ -1,5 +1,39 @@
1
1
  sudo: false
2
2
  language: ruby
3
+
3
4
  rvm:
4
- - 2.4.3
5
- before_install: gem install bundler -v 1.16.1
5
+ - 2.3
6
+ - 2.4
7
+ - 2.5
8
+ - 2.6
9
+
10
+ gemfile:
11
+ - gemfiles/capybara_2.gemfile
12
+ - gemfiles/capybara_3.gemfile
13
+ - gemfiles/rails_5.0.gemfile
14
+ - gemfiles/rails_5.1.gemfile
15
+ - gemfiles/rails_5.2.gemfile
16
+ - gemfiles/latest.gemfile
17
+
18
+ matrix:
19
+ exclude:
20
+ - rvm: 2.3
21
+ gemfile: gemfiles/capybara_3.gemfile
22
+ - rvm: 2.3
23
+ gemfile: gemfiles/rails_5.0.gemfile
24
+ - rvm: 2.3
25
+ gemfile: gemfiles/rails_5.1.gemfile
26
+ - rvm: 2.3
27
+ gemfile: gemfiles/rails_5.2.gemfile
28
+ - rvm: 2.3
29
+ gemfile: gemfiles/latest.gemfile
30
+
31
+ addons:
32
+ chrome: stable
33
+
34
+ before_install:
35
+ - gem update --system
36
+ - gem install bundler
37
+
38
+ cache: bundler
39
+
data/Appraisals ADDED
@@ -0,0 +1,24 @@
1
+ appraise "capybara-2" do
2
+ gem "capybara", "~>2.0"
3
+ end
4
+
5
+ appraise "capybara-3" do
6
+ gem "capybara", "~>3.0"
7
+ end
8
+
9
+ appraise "rails-5.0" do
10
+ gem "rails", "~>5.0.0"
11
+ gem "sqlite3", "~>1.3.0"
12
+ end
13
+
14
+ appraise "rails-5.1" do
15
+ gem "rails", "~>5.1.0"
16
+ end
17
+
18
+ appraise "rails-5.2" do
19
+ gem "rails", "~>5.2.0"
20
+ end
21
+
22
+ appraise "latest" do
23
+ end
24
+
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Capybara::HeadlessChrome
2
+ [![Build Status](https://travis-ci.org/botandrose/capybara-headless_chrome.svg?branch=master)](https://travis-ci.org/botandrose/capybara-headless_chrome)
2
3
 
3
4
  A nice and tidy Capybara driver for headless Chrome. Even supports file downloads!
4
5
 
@@ -8,6 +9,18 @@ A nice and tidy Capybara driver for headless Chrome. Even supports file download
8
9
 
9
10
  Just `require "capybara/headless_chrome"` somewhere in your test setup. This will register the `:chrome` driver, and make it Capybara's default.
10
11
 
12
+ #### Options
13
+
14
+ If you want to change some of the options Chrome is started with, just reregister the driver:
15
+
16
+ ```ruby
17
+ Capybara.register_driver :chrome do |app|
18
+ Capybara::HeadlessChrome::Driver.new(app, lang: "es_MX", headless: false, window_size: [1024,768])
19
+ end
20
+ ```
21
+
22
+ Consult https://peter.sh/experiments/chromium-command-line-switches/ for a list of options. Although these are command-line options, conversion from a Ruby hash works as you would expect. E.g. `headless: true` works out to `--headless`, `window_size: [1024,768]` works out to `--window-size=1024,768`, etc.
23
+
11
24
  ### Working with Downloaded Files
12
25
 
13
26
  The Capybara session is extended with a single `#downloads` method that provides access to files downloaded during the session.
@@ -50,7 +63,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
50
63
 
51
64
  ## Contributing
52
65
 
53
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capybara-headless_chrome.
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/botandrose/capybara-headless_chrome.
54
67
 
55
68
  ## License
56
69
 
@@ -27,4 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "bundler"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
+ spec.add_development_dependency "appraisal"
31
+ spec.add_development_dependency "byebug"
30
32
  end
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "capybara", "~>2.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,75 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ capybara-headless_chrome (0.6.3)
5
+ capybara
6
+ webdrivers
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.6.0)
12
+ public_suffix (>= 2.0.2, < 4.0)
13
+ appraisal (2.2.0)
14
+ bundler
15
+ rake
16
+ thor (>= 0.14.0)
17
+ byebug (11.0.1)
18
+ capybara (2.18.0)
19
+ addressable
20
+ mini_mime (>= 0.1.3)
21
+ nokogiri (>= 1.3.3)
22
+ rack (>= 1.0.0)
23
+ rack-test (>= 0.5.4)
24
+ xpath (>= 2.0, < 4.0)
25
+ childprocess (1.0.1)
26
+ rake (< 13.0)
27
+ diff-lcs (1.3)
28
+ mini_mime (1.0.1)
29
+ mini_portile2 (2.4.0)
30
+ nokogiri (1.10.2)
31
+ mini_portile2 (~> 2.4.0)
32
+ public_suffix (3.0.3)
33
+ rack (2.0.6)
34
+ rack-test (1.1.0)
35
+ rack (>= 1.0, < 3)
36
+ rake (10.5.0)
37
+ rspec (3.8.0)
38
+ rspec-core (~> 3.8.0)
39
+ rspec-expectations (~> 3.8.0)
40
+ rspec-mocks (~> 3.8.0)
41
+ rspec-core (3.8.0)
42
+ rspec-support (~> 3.8.0)
43
+ rspec-expectations (3.8.2)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.8.0)
46
+ rspec-mocks (3.8.0)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.8.0)
49
+ rspec-support (3.8.0)
50
+ rubyzip (1.2.3)
51
+ selenium-webdriver (3.142.3)
52
+ childprocess (>= 0.5, < 2.0)
53
+ rubyzip (~> 1.2, >= 1.2.2)
54
+ thor (0.20.3)
55
+ webdrivers (4.0.0)
56
+ nokogiri (~> 1.6)
57
+ rubyzip (~> 1.0)
58
+ selenium-webdriver (~> 3.0)
59
+ xpath (3.2.0)
60
+ nokogiri (~> 1.8)
61
+
62
+ PLATFORMS
63
+ ruby
64
+
65
+ DEPENDENCIES
66
+ appraisal
67
+ bundler
68
+ byebug
69
+ capybara (~> 2.0)
70
+ capybara-headless_chrome!
71
+ rake (~> 10.0)
72
+ rspec (~> 3.0)
73
+
74
+ BUNDLED WITH
75
+ 2.0.1
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "capybara", "~>3.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ capybara-headless_chrome (0.6.3)
5
+ capybara
6
+ webdrivers
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.6.0)
12
+ public_suffix (>= 2.0.2, < 4.0)
13
+ appraisal (2.2.0)
14
+ bundler
15
+ rake
16
+ thor (>= 0.14.0)
17
+ byebug (11.0.1)
18
+ capybara (3.16.1)
19
+ addressable
20
+ mini_mime (>= 0.1.3)
21
+ nokogiri (~> 1.8)
22
+ rack (>= 1.6.0)
23
+ rack-test (>= 0.6.3)
24
+ regexp_parser (~> 1.2)
25
+ xpath (~> 3.2)
26
+ childprocess (1.0.1)
27
+ rake (< 13.0)
28
+ diff-lcs (1.3)
29
+ mini_mime (1.0.1)
30
+ mini_portile2 (2.4.0)
31
+ nokogiri (1.10.2)
32
+ mini_portile2 (~> 2.4.0)
33
+ public_suffix (3.0.3)
34
+ rack (2.0.6)
35
+ rack-test (1.1.0)
36
+ rack (>= 1.0, < 3)
37
+ rake (10.5.0)
38
+ regexp_parser (1.3.0)
39
+ rspec (3.8.0)
40
+ rspec-core (~> 3.8.0)
41
+ rspec-expectations (~> 3.8.0)
42
+ rspec-mocks (~> 3.8.0)
43
+ rspec-core (3.8.0)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-expectations (3.8.2)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.8.0)
48
+ rspec-mocks (3.8.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.8.0)
51
+ rspec-support (3.8.0)
52
+ rubyzip (1.2.3)
53
+ selenium-webdriver (3.142.3)
54
+ childprocess (>= 0.5, < 2.0)
55
+ rubyzip (~> 1.2, >= 1.2.2)
56
+ thor (0.20.3)
57
+ webdrivers (4.0.0)
58
+ nokogiri (~> 1.6)
59
+ rubyzip (~> 1.0)
60
+ selenium-webdriver (~> 3.0)
61
+ xpath (3.2.0)
62
+ nokogiri (~> 1.8)
63
+
64
+ PLATFORMS
65
+ ruby
66
+
67
+ DEPENDENCIES
68
+ appraisal
69
+ bundler
70
+ byebug
71
+ capybara (~> 3.0)
72
+ capybara-headless_chrome!
73
+ rake (~> 10.0)
74
+ rspec (~> 3.0)
75
+
76
+ BUNDLED WITH
77
+ 2.0.1
@@ -0,0 +1,5 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,76 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ capybara-headless_chrome (0.6.3)
5
+ capybara
6
+ webdrivers
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.6.0)
12
+ public_suffix (>= 2.0.2, < 4.0)
13
+ appraisal (2.2.0)
14
+ bundler
15
+ rake
16
+ thor (>= 0.14.0)
17
+ byebug (11.0.1)
18
+ capybara (3.23.0)
19
+ addressable
20
+ mini_mime (>= 0.1.3)
21
+ nokogiri (~> 1.8)
22
+ rack (>= 1.6.0)
23
+ rack-test (>= 0.6.3)
24
+ regexp_parser (~> 1.5)
25
+ xpath (~> 3.2)
26
+ childprocess (1.0.1)
27
+ rake (< 13.0)
28
+ diff-lcs (1.3)
29
+ mini_mime (1.0.1)
30
+ mini_portile2 (2.4.0)
31
+ nokogiri (1.10.3)
32
+ mini_portile2 (~> 2.4.0)
33
+ public_suffix (3.1.0)
34
+ rack (2.0.7)
35
+ rack-test (1.1.0)
36
+ rack (>= 1.0, < 3)
37
+ rake (10.5.0)
38
+ regexp_parser (1.5.1)
39
+ rspec (3.8.0)
40
+ rspec-core (~> 3.8.0)
41
+ rspec-expectations (~> 3.8.0)
42
+ rspec-mocks (~> 3.8.0)
43
+ rspec-core (3.8.0)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-expectations (3.8.2)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.8.0)
48
+ rspec-mocks (3.8.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.8.0)
51
+ rspec-support (3.8.0)
52
+ rubyzip (1.2.3)
53
+ selenium-webdriver (3.142.3)
54
+ childprocess (>= 0.5, < 2.0)
55
+ rubyzip (~> 1.2, >= 1.2.2)
56
+ thor (0.20.3)
57
+ webdrivers (4.0.0)
58
+ nokogiri (~> 1.6)
59
+ rubyzip (~> 1.0)
60
+ selenium-webdriver (~> 3.0)
61
+ xpath (3.2.0)
62
+ nokogiri (~> 1.8)
63
+
64
+ PLATFORMS
65
+ ruby
66
+
67
+ DEPENDENCIES
68
+ appraisal
69
+ bundler
70
+ byebug
71
+ capybara-headless_chrome!
72
+ rake (~> 10.0)
73
+ rspec (~> 3.0)
74
+
75
+ BUNDLED WITH
76
+ 2.0.1
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~>5.0.0"
6
+ gem "sqlite3", "~>1.3.0"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,169 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ capybara-headless_chrome (0.6.3)
5
+ capybara
6
+ webdrivers
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.0.7.2)
12
+ actionpack (= 5.0.7.2)
13
+ nio4r (>= 1.2, < 3.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.0.7.2)
16
+ actionpack (= 5.0.7.2)
17
+ actionview (= 5.0.7.2)
18
+ activejob (= 5.0.7.2)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.0.7.2)
22
+ actionview (= 5.0.7.2)
23
+ activesupport (= 5.0.7.2)
24
+ rack (~> 2.0)
25
+ rack-test (~> 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.0.7.2)
29
+ activesupport (= 5.0.7.2)
30
+ builder (~> 3.1)
31
+ erubis (~> 2.7.0)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.0.7.2)
35
+ activesupport (= 5.0.7.2)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.0.7.2)
38
+ activesupport (= 5.0.7.2)
39
+ activerecord (5.0.7.2)
40
+ activemodel (= 5.0.7.2)
41
+ activesupport (= 5.0.7.2)
42
+ arel (~> 7.0)
43
+ activesupport (5.0.7.2)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (>= 0.7, < 2)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ addressable (2.6.0)
49
+ public_suffix (>= 2.0.2, < 4.0)
50
+ appraisal (2.2.0)
51
+ bundler
52
+ rake
53
+ thor (>= 0.14.0)
54
+ arel (7.1.4)
55
+ builder (3.2.3)
56
+ byebug (11.0.1)
57
+ capybara (3.23.0)
58
+ addressable
59
+ mini_mime (>= 0.1.3)
60
+ nokogiri (~> 1.8)
61
+ rack (>= 1.6.0)
62
+ rack-test (>= 0.6.3)
63
+ regexp_parser (~> 1.5)
64
+ xpath (~> 3.2)
65
+ childprocess (1.0.1)
66
+ rake (< 13.0)
67
+ concurrent-ruby (1.1.5)
68
+ crass (1.0.4)
69
+ diff-lcs (1.3)
70
+ erubis (2.7.0)
71
+ globalid (0.4.2)
72
+ activesupport (>= 4.2.0)
73
+ i18n (1.6.0)
74
+ concurrent-ruby (~> 1.0)
75
+ loofah (2.2.3)
76
+ crass (~> 1.0.2)
77
+ nokogiri (>= 1.5.9)
78
+ mail (2.7.1)
79
+ mini_mime (>= 0.1.1)
80
+ method_source (0.9.2)
81
+ mini_mime (1.0.1)
82
+ mini_portile2 (2.4.0)
83
+ minitest (5.11.3)
84
+ nio4r (2.3.1)
85
+ nokogiri (1.10.2)
86
+ mini_portile2 (~> 2.4.0)
87
+ public_suffix (3.1.0)
88
+ rack (2.0.6)
89
+ rack-test (0.6.3)
90
+ rack (>= 1.0)
91
+ rails (5.0.7.2)
92
+ actioncable (= 5.0.7.2)
93
+ actionmailer (= 5.0.7.2)
94
+ actionpack (= 5.0.7.2)
95
+ actionview (= 5.0.7.2)
96
+ activejob (= 5.0.7.2)
97
+ activemodel (= 5.0.7.2)
98
+ activerecord (= 5.0.7.2)
99
+ activesupport (= 5.0.7.2)
100
+ bundler (>= 1.3.0)
101
+ railties (= 5.0.7.2)
102
+ sprockets-rails (>= 2.0.0)
103
+ rails-dom-testing (2.0.3)
104
+ activesupport (>= 4.2.0)
105
+ nokogiri (>= 1.6)
106
+ rails-html-sanitizer (1.0.4)
107
+ loofah (~> 2.2, >= 2.2.2)
108
+ railties (5.0.7.2)
109
+ actionpack (= 5.0.7.2)
110
+ activesupport (= 5.0.7.2)
111
+ method_source
112
+ rake (>= 0.8.7)
113
+ thor (>= 0.18.1, < 2.0)
114
+ rake (10.5.0)
115
+ regexp_parser (1.5.1)
116
+ rspec (3.8.0)
117
+ rspec-core (~> 3.8.0)
118
+ rspec-expectations (~> 3.8.0)
119
+ rspec-mocks (~> 3.8.0)
120
+ rspec-core (3.8.0)
121
+ rspec-support (~> 3.8.0)
122
+ rspec-expectations (3.8.2)
123
+ diff-lcs (>= 1.2.0, < 2.0)
124
+ rspec-support (~> 3.8.0)
125
+ rspec-mocks (3.8.0)
126
+ diff-lcs (>= 1.2.0, < 2.0)
127
+ rspec-support (~> 3.8.0)
128
+ rspec-support (3.8.0)
129
+ rubyzip (1.2.3)
130
+ selenium-webdriver (3.142.3)
131
+ childprocess (>= 0.5, < 2.0)
132
+ rubyzip (~> 1.2, >= 1.2.2)
133
+ sprockets (3.7.2)
134
+ concurrent-ruby (~> 1.0)
135
+ rack (> 1, < 3)
136
+ sprockets-rails (3.2.1)
137
+ actionpack (>= 4.0)
138
+ activesupport (>= 4.0)
139
+ sprockets (>= 3.0.0)
140
+ sqlite3 (1.3.13)
141
+ thor (0.20.3)
142
+ thread_safe (0.3.6)
143
+ tzinfo (1.2.5)
144
+ thread_safe (~> 0.1)
145
+ webdrivers (4.0.0)
146
+ nokogiri (~> 1.6)
147
+ rubyzip (~> 1.0)
148
+ selenium-webdriver (~> 3.0)
149
+ websocket-driver (0.6.5)
150
+ websocket-extensions (>= 0.1.0)
151
+ websocket-extensions (0.1.3)
152
+ xpath (3.2.0)
153
+ nokogiri (~> 1.8)
154
+
155
+ PLATFORMS
156
+ ruby
157
+
158
+ DEPENDENCIES
159
+ appraisal
160
+ bundler
161
+ byebug
162
+ capybara-headless_chrome!
163
+ rails (~> 5.0.0)
164
+ rake (~> 10.0)
165
+ rspec (~> 3.0)
166
+ sqlite3 (~> 1.3.0)
167
+
168
+ BUNDLED WITH
169
+ 2.0.1
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~>5.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,167 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ capybara-headless_chrome (0.6.3)
5
+ capybara
6
+ webdrivers
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.1.7)
12
+ actionpack (= 5.1.7)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.1.7)
16
+ actionpack (= 5.1.7)
17
+ actionview (= 5.1.7)
18
+ activejob (= 5.1.7)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.1.7)
22
+ actionview (= 5.1.7)
23
+ activesupport (= 5.1.7)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.1.7)
29
+ activesupport (= 5.1.7)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.1.7)
35
+ activesupport (= 5.1.7)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.1.7)
38
+ activesupport (= 5.1.7)
39
+ activerecord (5.1.7)
40
+ activemodel (= 5.1.7)
41
+ activesupport (= 5.1.7)
42
+ arel (~> 8.0)
43
+ activesupport (5.1.7)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (>= 0.7, < 2)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ addressable (2.6.0)
49
+ public_suffix (>= 2.0.2, < 4.0)
50
+ appraisal (2.2.0)
51
+ bundler
52
+ rake
53
+ thor (>= 0.14.0)
54
+ arel (8.0.0)
55
+ builder (3.2.3)
56
+ byebug (11.0.1)
57
+ capybara (3.23.0)
58
+ addressable
59
+ mini_mime (>= 0.1.3)
60
+ nokogiri (~> 1.8)
61
+ rack (>= 1.6.0)
62
+ rack-test (>= 0.6.3)
63
+ regexp_parser (~> 1.5)
64
+ xpath (~> 3.2)
65
+ childprocess (1.0.1)
66
+ rake (< 13.0)
67
+ concurrent-ruby (1.1.5)
68
+ crass (1.0.4)
69
+ diff-lcs (1.3)
70
+ erubi (1.8.0)
71
+ globalid (0.4.2)
72
+ activesupport (>= 4.2.0)
73
+ i18n (1.6.0)
74
+ concurrent-ruby (~> 1.0)
75
+ loofah (2.2.3)
76
+ crass (~> 1.0.2)
77
+ nokogiri (>= 1.5.9)
78
+ mail (2.7.1)
79
+ mini_mime (>= 0.1.1)
80
+ method_source (0.9.2)
81
+ mini_mime (1.0.1)
82
+ mini_portile2 (2.4.0)
83
+ minitest (5.11.3)
84
+ nio4r (2.3.1)
85
+ nokogiri (1.10.2)
86
+ mini_portile2 (~> 2.4.0)
87
+ public_suffix (3.1.0)
88
+ rack (2.0.6)
89
+ rack-test (1.1.0)
90
+ rack (>= 1.0, < 3)
91
+ rails (5.1.7)
92
+ actioncable (= 5.1.7)
93
+ actionmailer (= 5.1.7)
94
+ actionpack (= 5.1.7)
95
+ actionview (= 5.1.7)
96
+ activejob (= 5.1.7)
97
+ activemodel (= 5.1.7)
98
+ activerecord (= 5.1.7)
99
+ activesupport (= 5.1.7)
100
+ bundler (>= 1.3.0)
101
+ railties (= 5.1.7)
102
+ sprockets-rails (>= 2.0.0)
103
+ rails-dom-testing (2.0.3)
104
+ activesupport (>= 4.2.0)
105
+ nokogiri (>= 1.6)
106
+ rails-html-sanitizer (1.0.4)
107
+ loofah (~> 2.2, >= 2.2.2)
108
+ railties (5.1.7)
109
+ actionpack (= 5.1.7)
110
+ activesupport (= 5.1.7)
111
+ method_source
112
+ rake (>= 0.8.7)
113
+ thor (>= 0.18.1, < 2.0)
114
+ rake (10.5.0)
115
+ regexp_parser (1.5.1)
116
+ rspec (3.8.0)
117
+ rspec-core (~> 3.8.0)
118
+ rspec-expectations (~> 3.8.0)
119
+ rspec-mocks (~> 3.8.0)
120
+ rspec-core (3.8.0)
121
+ rspec-support (~> 3.8.0)
122
+ rspec-expectations (3.8.2)
123
+ diff-lcs (>= 1.2.0, < 2.0)
124
+ rspec-support (~> 3.8.0)
125
+ rspec-mocks (3.8.0)
126
+ diff-lcs (>= 1.2.0, < 2.0)
127
+ rspec-support (~> 3.8.0)
128
+ rspec-support (3.8.0)
129
+ rubyzip (1.2.3)
130
+ selenium-webdriver (3.142.3)
131
+ childprocess (>= 0.5, < 2.0)
132
+ rubyzip (~> 1.2, >= 1.2.2)
133
+ sprockets (3.7.2)
134
+ concurrent-ruby (~> 1.0)
135
+ rack (> 1, < 3)
136
+ sprockets-rails (3.2.1)
137
+ actionpack (>= 4.0)
138
+ activesupport (>= 4.0)
139
+ sprockets (>= 3.0.0)
140
+ thor (0.20.3)
141
+ thread_safe (0.3.6)
142
+ tzinfo (1.2.5)
143
+ thread_safe (~> 0.1)
144
+ webdrivers (4.0.0)
145
+ nokogiri (~> 1.6)
146
+ rubyzip (~> 1.0)
147
+ selenium-webdriver (~> 3.0)
148
+ websocket-driver (0.6.5)
149
+ websocket-extensions (>= 0.1.0)
150
+ websocket-extensions (0.1.3)
151
+ xpath (3.2.0)
152
+ nokogiri (~> 1.8)
153
+
154
+ PLATFORMS
155
+ ruby
156
+
157
+ DEPENDENCIES
158
+ appraisal
159
+ bundler
160
+ byebug
161
+ capybara-headless_chrome!
162
+ rails (~> 5.1.0)
163
+ rake (~> 10.0)
164
+ rspec (~> 3.0)
165
+
166
+ BUNDLED WITH
167
+ 2.0.1
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~>5.2.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,175 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ capybara-headless_chrome (0.6.3)
5
+ capybara
6
+ webdrivers
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.2.3)
12
+ actionpack (= 5.2.3)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailer (5.2.3)
16
+ actionpack (= 5.2.3)
17
+ actionview (= 5.2.3)
18
+ activejob (= 5.2.3)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.2.3)
22
+ actionview (= 5.2.3)
23
+ activesupport (= 5.2.3)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.2.3)
29
+ activesupport (= 5.2.3)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.2.3)
35
+ activesupport (= 5.2.3)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.2.3)
38
+ activesupport (= 5.2.3)
39
+ activerecord (5.2.3)
40
+ activemodel (= 5.2.3)
41
+ activesupport (= 5.2.3)
42
+ arel (>= 9.0)
43
+ activestorage (5.2.3)
44
+ actionpack (= 5.2.3)
45
+ activerecord (= 5.2.3)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.3)
48
+ concurrent-ruby (~> 1.0, >= 1.0.2)
49
+ i18n (>= 0.7, < 2)
50
+ minitest (~> 5.1)
51
+ tzinfo (~> 1.1)
52
+ addressable (2.6.0)
53
+ public_suffix (>= 2.0.2, < 4.0)
54
+ appraisal (2.2.0)
55
+ bundler
56
+ rake
57
+ thor (>= 0.14.0)
58
+ arel (9.0.0)
59
+ builder (3.2.3)
60
+ byebug (11.0.1)
61
+ capybara (3.23.0)
62
+ addressable
63
+ mini_mime (>= 0.1.3)
64
+ nokogiri (~> 1.8)
65
+ rack (>= 1.6.0)
66
+ rack-test (>= 0.6.3)
67
+ regexp_parser (~> 1.5)
68
+ xpath (~> 3.2)
69
+ childprocess (1.0.1)
70
+ rake (< 13.0)
71
+ concurrent-ruby (1.1.5)
72
+ crass (1.0.4)
73
+ diff-lcs (1.3)
74
+ erubi (1.8.0)
75
+ globalid (0.4.2)
76
+ activesupport (>= 4.2.0)
77
+ i18n (1.6.0)
78
+ concurrent-ruby (~> 1.0)
79
+ loofah (2.2.3)
80
+ crass (~> 1.0.2)
81
+ nokogiri (>= 1.5.9)
82
+ mail (2.7.1)
83
+ mini_mime (>= 0.1.1)
84
+ marcel (0.3.3)
85
+ mimemagic (~> 0.3.2)
86
+ method_source (0.9.2)
87
+ mimemagic (0.3.3)
88
+ mini_mime (1.0.1)
89
+ mini_portile2 (2.4.0)
90
+ minitest (5.11.3)
91
+ nio4r (2.3.1)
92
+ nokogiri (1.10.2)
93
+ mini_portile2 (~> 2.4.0)
94
+ public_suffix (3.1.0)
95
+ rack (2.0.6)
96
+ rack-test (1.1.0)
97
+ rack (>= 1.0, < 3)
98
+ rails (5.2.3)
99
+ actioncable (= 5.2.3)
100
+ actionmailer (= 5.2.3)
101
+ actionpack (= 5.2.3)
102
+ actionview (= 5.2.3)
103
+ activejob (= 5.2.3)
104
+ activemodel (= 5.2.3)
105
+ activerecord (= 5.2.3)
106
+ activestorage (= 5.2.3)
107
+ activesupport (= 5.2.3)
108
+ bundler (>= 1.3.0)
109
+ railties (= 5.2.3)
110
+ sprockets-rails (>= 2.0.0)
111
+ rails-dom-testing (2.0.3)
112
+ activesupport (>= 4.2.0)
113
+ nokogiri (>= 1.6)
114
+ rails-html-sanitizer (1.0.4)
115
+ loofah (~> 2.2, >= 2.2.2)
116
+ railties (5.2.3)
117
+ actionpack (= 5.2.3)
118
+ activesupport (= 5.2.3)
119
+ method_source
120
+ rake (>= 0.8.7)
121
+ thor (>= 0.19.0, < 2.0)
122
+ rake (10.5.0)
123
+ regexp_parser (1.5.1)
124
+ rspec (3.8.0)
125
+ rspec-core (~> 3.8.0)
126
+ rspec-expectations (~> 3.8.0)
127
+ rspec-mocks (~> 3.8.0)
128
+ rspec-core (3.8.0)
129
+ rspec-support (~> 3.8.0)
130
+ rspec-expectations (3.8.2)
131
+ diff-lcs (>= 1.2.0, < 2.0)
132
+ rspec-support (~> 3.8.0)
133
+ rspec-mocks (3.8.0)
134
+ diff-lcs (>= 1.2.0, < 2.0)
135
+ rspec-support (~> 3.8.0)
136
+ rspec-support (3.8.0)
137
+ rubyzip (1.2.3)
138
+ selenium-webdriver (3.142.3)
139
+ childprocess (>= 0.5, < 2.0)
140
+ rubyzip (~> 1.2, >= 1.2.2)
141
+ sprockets (3.7.2)
142
+ concurrent-ruby (~> 1.0)
143
+ rack (> 1, < 3)
144
+ sprockets-rails (3.2.1)
145
+ actionpack (>= 4.0)
146
+ activesupport (>= 4.0)
147
+ sprockets (>= 3.0.0)
148
+ thor (0.20.3)
149
+ thread_safe (0.3.6)
150
+ tzinfo (1.2.5)
151
+ thread_safe (~> 0.1)
152
+ webdrivers (4.0.0)
153
+ nokogiri (~> 1.6)
154
+ rubyzip (~> 1.0)
155
+ selenium-webdriver (~> 3.0)
156
+ websocket-driver (0.7.0)
157
+ websocket-extensions (>= 0.1.0)
158
+ websocket-extensions (0.1.3)
159
+ xpath (3.2.0)
160
+ nokogiri (~> 1.8)
161
+
162
+ PLATFORMS
163
+ ruby
164
+
165
+ DEPENDENCIES
166
+ appraisal
167
+ bundler
168
+ byebug
169
+ capybara-headless_chrome!
170
+ rails (~> 5.2.0)
171
+ rake (~> 10.0)
172
+ rspec (~> 3.0)
173
+
174
+ BUNDLED WITH
175
+ 2.0.1
@@ -1,17 +1,21 @@
1
1
  Before do
2
- page.downloads.reset
2
+ if page.driver.class.name == "Capybara::HeadlessChrome::Driver"
3
+ page.downloads.reset
4
+ end
3
5
  end
4
6
 
5
7
  AfterStep do
6
- aggregate_failures 'javascript errors' do
7
- page.javascript_errors.each do |error|
8
- fail error
8
+ if page.driver.class.name == "Capybara::HeadlessChrome::Driver"
9
+ aggregate_failures 'javascript errors' do
10
+ page.javascript_errors.each do |error|
11
+ fail error
12
+ end
9
13
  end
10
- end
11
14
 
12
- page.javascript_warnings.each do |warning|
13
- STDERR.puts 'WARN: javascript warning'
14
- STDERR.puts warning
15
+ page.javascript_warnings.each do |warning|
16
+ STDERR.puts 'WARN: javascript warning'
17
+ STDERR.puts warning
18
+ end
15
19
  end
16
20
  end
17
21
 
@@ -2,6 +2,12 @@ require "webdrivers"
2
2
  require "capybara"
3
3
  require "capybara/headless_chrome/downloads"
4
4
 
5
+ # silence warning with webdrivers ~>3.9
6
+ webdrivers_version = Gem.loaded_specs["webdrivers"].version
7
+ if webdrivers_version >= Gem::Version.new("3.9") && webdrivers_version < Gem::Version.new("4.0")
8
+ Webdrivers.cache_time = 86400
9
+ end
10
+
5
11
  module Capybara
6
12
  module HeadlessChrome
7
13
  class Driver < Capybara::Selenium::Driver
@@ -36,6 +42,7 @@ module Capybara
36
42
  def chrome_capabilities options
37
43
  ::Selenium::WebDriver::Remote::Capabilities.chrome(
38
44
  chromeOptions: {
45
+ w3c: false,
39
46
  args: options_to_arguments(default_chrome_arguments.merge(options)),
40
47
  prefs: chrome_preferences,
41
48
  }
@@ -47,6 +54,8 @@ module Capybara
47
54
  arg = key.to_s.gsub(/_/,'-')
48
55
  if [true, false].include?(value)
49
56
  arg if value
57
+ elsif value.is_a?(String)
58
+ "#{arg}=#{value}"
50
59
  elsif value.is_a?(Array)
51
60
  "#{arg}=#{value.join(",")}"
52
61
  else
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module HeadlessChrome
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-headless_chrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-31 00:00:00.000000000 Z
11
+ date: 2021-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webdrivers
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: appraisal
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  description: A nice and tidy Capybara driver for headless Chrome. Even supports file
84
112
  downloads!
85
113
  email:
@@ -88,9 +116,11 @@ executables: []
88
116
  extensions: []
89
117
  extra_rdoc_files: []
90
118
  files:
119
+ - ".byebug_history"
91
120
  - ".gitignore"
92
121
  - ".rspec"
93
122
  - ".travis.yml"
123
+ - Appraisals
94
124
  - Gemfile
95
125
  - LICENSE.txt
96
126
  - README.md
@@ -98,6 +128,19 @@ files:
98
128
  - bin/console
99
129
  - bin/setup
100
130
  - capybara-headless_chrome.gemspec
131
+ - gemfiles/.bundle/config
132
+ - gemfiles/capybara_2.gemfile
133
+ - gemfiles/capybara_2.gemfile.lock
134
+ - gemfiles/capybara_3.gemfile
135
+ - gemfiles/capybara_3.gemfile.lock
136
+ - gemfiles/latest.gemfile
137
+ - gemfiles/latest.gemfile.lock
138
+ - gemfiles/rails_5.0.gemfile
139
+ - gemfiles/rails_5.0.gemfile.lock
140
+ - gemfiles/rails_5.1.gemfile
141
+ - gemfiles/rails_5.1.gemfile.lock
142
+ - gemfiles/rails_5.2.gemfile
143
+ - gemfiles/rails_5.2.gemfile.lock
101
144
  - lib/capybara/headless_chrome.rb
102
145
  - lib/capybara/headless_chrome/cucumber.rb
103
146
  - lib/capybara/headless_chrome/downloads.rb
@@ -123,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
166
  - !ruby/object:Gem::Version
124
167
  version: '0'
125
168
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.6.14
169
+ rubygems_version: 3.2.3
128
170
  signing_key:
129
171
  specification_version: 4
130
172
  summary: A nice and tidy Capybara driver for headless Chrome