capybara-webkit 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -4
- data/Gemfile.lock +1 -1
- data/NEWS.md +5 -0
- data/README.md +12 -0
- data/bin/Info.plist +1 -1
- data/gemfiles/2.3.gemfile.lock +1 -1
- data/gemfiles/2.4.gemfile.lock +1 -1
- data/lib/capybara/webkit/version.rb +1 -1
- data/spec/driver_spec.rb +7 -0
- data/src/UnknownUrlHandler.cpp +6 -2
- data/src/UnknownUrlHandler.h +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 776f7b813939278baf6bbc2064faaa21237ce02b
|
4
|
+
data.tar.gz: f9b9712e3594049e0749ece691b185045908946c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad454ce63d42b586f1a0eab271a1ff801aab0cd78eead690a9a51ac9c3e85684bba58f9e7f76da1f169479d3ff48215f641c7fb41ab385693f49247a5d8c6fdb
|
7
|
+
data.tar.gz: a15ec0a814e50c402519dd6c0d46a1d8d3a5ac0d9eb98e6403e29ef9bd025a67a5211515b837b1a733320246d8e5fc68430e7b775ec2d815f8620de25ba7cc38
|
data/.travis.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 1.9.3
|
4
|
-
- 2.1
|
4
|
+
- 2.1
|
5
5
|
- jruby-19mode
|
6
6
|
notifications:
|
7
7
|
email: false
|
@@ -22,7 +22,5 @@ gemfile:
|
|
22
22
|
- gemfiles/2.3.gemfile
|
23
23
|
- gemfiles/2.4.gemfile
|
24
24
|
before_install:
|
25
|
-
- sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
|
26
|
-
- sudo apt-get update
|
27
|
-
- sudo apt-get install libqt5webkit5-dev qtdeclarative5-dev qtlocation5-dev qtsensors5-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev qt4-default
|
25
|
+
- sh -c 'if [ -n "$QMAKE" ]; then sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get install libqt5webkit5-dev qtdeclarative5-dev; fi'
|
28
26
|
install: bundle
|
data/Gemfile.lock
CHANGED
data/NEWS.md
CHANGED
data/README.md
CHANGED
@@ -127,6 +127,18 @@ page.driver.cookies["alpha"]
|
|
127
127
|
page.driver.header 'Referer', 'https://www.thoughtbot.com'
|
128
128
|
```
|
129
129
|
|
130
|
+
**block_unknown_urls**: By default, capybara-webkit will warn when a request is made to a URL other than 127.0.0.1 or localhost. This option will block such unknown URLs instead.
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
page.driver.block_unknown_urls
|
134
|
+
```
|
135
|
+
|
136
|
+
**allow_url**: Allow requests to a URL. This will silence unknown URL warnings, or permit requests to a URL when `block_unknown_urls` is used. Allowed URLs are reset on `Driver#reset!`.
|
137
|
+
|
138
|
+
```ruby
|
139
|
+
page.driver.allow_url 'example.com/*.js'
|
140
|
+
```
|
141
|
+
|
130
142
|
Contributing
|
131
143
|
------------
|
132
144
|
|
data/bin/Info.plist
CHANGED
data/gemfiles/2.3.gemfile.lock
CHANGED
data/gemfiles/2.4.gemfile.lock
CHANGED
data/spec/driver_spec.rb
CHANGED
@@ -2642,6 +2642,7 @@ CACHE MANIFEST
|
|
2642
2642
|
<body>
|
2643
2643
|
<iframe src="http://example.com/path" id="frame"></iframe>
|
2644
2644
|
<iframe src="http://www.example.com" id="frame2"></iframe>
|
2645
|
+
<iframe src="data:text/plain,Hello"></iframe>
|
2645
2646
|
</body>
|
2646
2647
|
</html>
|
2647
2648
|
HTML
|
@@ -2693,6 +2694,12 @@ CACHE MANIFEST
|
|
2693
2694
|
|
2694
2695
|
expect(stderr).not_to include(driver.current_url)
|
2695
2696
|
end
|
2697
|
+
|
2698
|
+
it "does not print a warning for data URIs" do
|
2699
|
+
visit("/")
|
2700
|
+
|
2701
|
+
expect(stderr).not_to include('Request to unknown URL: data:text/plain')
|
2702
|
+
end
|
2696
2703
|
end
|
2697
2704
|
end
|
2698
2705
|
|
data/src/UnknownUrlHandler.cpp
CHANGED
@@ -7,8 +7,7 @@ UnknownUrlHandler::UnknownUrlHandler(
|
|
7
7
|
QObject *parent
|
8
8
|
) : RequestHandler(parent) {
|
9
9
|
m_next = next;
|
10
|
-
|
11
|
-
m_allowedUrls.append(QString("localhost"));
|
10
|
+
allowDefaultUrls();
|
12
11
|
m_mode = WARN;
|
13
12
|
}
|
14
13
|
|
@@ -65,6 +64,11 @@ bool UnknownUrlHandler::isUnknown(QUrl url) {
|
|
65
64
|
|
66
65
|
void UnknownUrlHandler::reset() {
|
67
66
|
m_allowedUrls.clear();
|
67
|
+
allowDefaultUrls();
|
68
|
+
}
|
69
|
+
|
70
|
+
void UnknownUrlHandler::allowDefaultUrls() {
|
68
71
|
m_allowedUrls.append(QString("127.0.0.1"));
|
69
72
|
m_allowedUrls.append(QString("localhost"));
|
73
|
+
m_allowedUrls.append(QString("data:*,*"));
|
70
74
|
}
|
data/src/UnknownUrlHandler.h
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-webkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-01-
|
16
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: capybara
|