…to the internet
Commit 2f3832f introduced a bug wherein if the entire page has hidden content, the entire page text is returned as visible text. The bug was introduced to support SVG text handling. The svg element doesn't have an innerText property, but does have textContent property, so the patch was written to fallback on textContent. The thing is, innerText will return an empty string when there is no visible text on the screen, which is a falsey condition, so we fall back to textContent. Thankfully, calling innerText on an svg element returns undefined, so now we can confidently return the empty string when it exists before falling back to textContent. The patch could also be written as: return visible_text == undefined ? node.textContent : visible_text; (double equals should work fine in this case)
This allows one to specify the include and lib paths for gl and zlib. Example: gem install capybara-webkit -- \ --with-gl-dir=/nix/store/1sw1cyny213ih9dpdsq8h2kwqaqcm6vp-mesa-10.2.9 \ --with-zlib-dir=/nix/store/cb649pfdf14335d07jcfmsik7a1rsgbf-zlib-1.2.8 Fixes #695
* Adds `allow_url`, `block_url`, and `block_unknown_url` methods. * Both allow_url and block_url accept wildcards. * Any requests to blocked URLs will be blocked immediately. * Blocked URLs take precedence over allowed URLs. * By default, any requests to localhost and 127.0.0.1 are allowed. * By default, any requests to unknown hosts will print a warning. * `block_unknown_urls` causes unknown hosts to be silently blocked. * `blacklisted_urls=` is deprecated in favor of `block_url`.
NetworkAccessManager was getting pretty complex, and adding something that modifies or intercepts requests is becoming a common change. This change introduces a chain of handlers which can modify a request or return a response of their own. To start with, this extracts the concerns of fixing missing content types, setting custom headers, and intercepting blacklisted requests.
Few weeks ago capybara introduced a new driver method that missed in our driver specification (jnicklas/capybara#1237). After updating gems versions, I run tests and seen an exception: `undefined method `browser_initialized?' for #<Capybara::Webkit::Driver:0xe9854a0>` We can resolve this and possible future updates just inherited from default web driver, for example, like it was implemented in poltergeist web driver (https://github.com/teampoltergeist/poltergeist/blob/master/lib/capybara/poltergeist/driver.rb#L4)