capybara-webkit 0.1.2 → 0.1.3
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.
- data/.rvmrc +1 -0
- data/capybara-webkit.gemspec +1 -1
- data/spec/driver_spec.rb +5 -0
- data/src/Url.cpp +3 -1
- metadata +4 -3
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use ruby-1.8.7-p334
|
data/capybara-webkit.gemspec
CHANGED
data/spec/driver_spec.rb
CHANGED
@@ -63,6 +63,11 @@ describe Capybara::Driver::Webkit do
|
|
63
63
|
subject.current_url.should == "http://127.0.0.1:#{port}/hello/world?success=true"
|
64
64
|
end
|
65
65
|
|
66
|
+
it "escapes URLs" do
|
67
|
+
subject.visit("/hello there")
|
68
|
+
subject.current_url.should =~ /hello%20there/
|
69
|
+
end
|
70
|
+
|
66
71
|
it "returns the source code for the page" do
|
67
72
|
subject.source.should =~ %r{<html>.*greeting.*}m
|
68
73
|
end
|
data/src/Url.cpp
CHANGED
@@ -7,7 +7,9 @@ Url::Url(WebPage *page, QObject *parent) : Command(page, parent) {
|
|
7
7
|
void Url::start(QStringList &argments) {
|
8
8
|
Q_UNUSED(argments);
|
9
9
|
|
10
|
-
|
10
|
+
QUrl humanUrl = page()->mainFrame()->url();
|
11
|
+
QByteArray encodedBytes = humanUrl.toEncoded();
|
12
|
+
QString response = QString(encodedBytes);
|
11
13
|
|
12
14
|
emit finished(true, response);
|
13
15
|
}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-webkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- thoughtbot
|
@@ -48,6 +48,7 @@ extra_rdoc_files: []
|
|
48
48
|
files:
|
49
49
|
- .gitignore
|
50
50
|
- .rspec
|
51
|
+
- .rvmrc
|
51
52
|
- Gemfile
|
52
53
|
- Gemfile.lock
|
53
54
|
- LICENSE
|