capybara-webmock 0.5.2 → 0.5.3

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
  SHA1:
3
- metadata.gz: c09614098d4ec7060779ea0496880133e2549d7d
4
- data.tar.gz: 66c589246da14ff1d6e2d6442c024de7c0e3391b
3
+ metadata.gz: 7bc6c2f9825d515f22f53917af7c84a501656ec3
4
+ data.tar.gz: e30c335727475840e4f5466d26d188ca1b8f2a13
5
5
  SHA512:
6
- metadata.gz: 8226352393af12440c834332f57405083c8a84d73649ba4fdab9c90a695718e41cdd6de6f6ca6bc660fde1996a9e14a27b0181f3b362f58e41b1311cab2445b1
7
- data.tar.gz: 5cc54e55e8e322395620a61f04c7b668f40a4628dc7706a147b5e572c353a07e00349d22f7e992568b94d09b1ffbf9d8049b5989dd9edc9d06ef81dc2a8bb3d9
6
+ metadata.gz: 40ec2c934eadcc69e3e9093909b2669ba3b9fa9e85408d2644af0b00ae8f794002fe833a306b42ef209c7aa61561c6b5a241da4ac4ee9428f6bd88b952b94179
7
+ data.tar.gz: 42716b2af6c19caee69ff215f16953073f1978aaf517c6332deb51a7e556f85bc68eae32618e8af74e0dafacd61bb1c7dc61c2a0702ac53569a61eae40616711
data/README.md CHANGED
@@ -81,6 +81,8 @@ or:
81
81
  ```ruby
82
82
  # Use Chrome Driver
83
83
  Capybara.javascript_driver = :capybara_webmock_chrome
84
+ # or Chrome Driver in headless mode
85
+ Capybara.javascript_driver = :capybara_webmock_chrome_headless
84
86
  ```
85
87
 
86
88
  ```ruby
@@ -88,7 +90,7 @@ Capybara.javascript_driver = :capybara_webmock_chrome
88
90
  Capybara.javascript_driver = :capybara_webmock_poltergeist
89
91
  ```
90
92
 
91
- *NOTE: These are just two default driver wrappers this gem provides. If you are
93
+ *NOTE: These are just some default driver wrappers this gem provides. If you are
92
94
  already using a custom driver profile you can still use `capybara-webmock`, you
93
95
  just need to configure proxy settings to `127.0.0.1:9292`*
94
96
 
@@ -68,7 +68,13 @@ module Capybara
68
68
  end
69
69
 
70
70
  def chrome_options
71
- {args: [ "--proxy-server=127.0.0.1:#{port_number}" ]}
71
+ ::Selenium::WebDriver::Chrome::Options.new.tap do |options|
72
+ options.add_argument "--proxy-server=127.0.0.1:#{port_number}"
73
+ end
74
+ end
75
+
76
+ def chrome_headless_options
77
+ chrome_options.tap { |options| options.headless! }
72
78
  end
73
79
 
74
80
  def phantomjs_options
@@ -162,9 +168,11 @@ Capybara.register_driver :capybara_webmock do |app|
162
168
  end
163
169
 
164
170
  Capybara.register_driver :capybara_webmock_chrome do |app|
165
- Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: {
166
- chromeOptions: Capybara::Webmock.chrome_options
167
- })
171
+ Capybara::Selenium::Driver.new(app, browser: :chrome, options: Capybara::Webmock.chrome_options)
172
+ end
173
+
174
+ Capybara.register_driver :capybara_webmock_chrome_headless do |app|
175
+ Capybara::Selenium::Driver.new(app, browser: :chrome, options: Capybara::Webmock.chrome_headless_options)
168
176
  end
169
177
 
170
178
  Capybara.register_driver :capybara_webmock_poltergeist do |app|
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Webmock
3
- VERSION = '0.5.2'.freeze
3
+ VERSION = '0.5.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-webmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Worth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-18 00:00:00.000000000 Z
12
+ date: 2019-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara