capybara-webkit 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -1
- data/Gemfile.lock +5 -4
- data/NEWS.md +11 -0
- data/README.md +42 -0
- data/lib/capybara/driver/webkit.rb +7 -2
- data/lib/capybara/driver/webkit/browser.rb +22 -96
- data/lib/capybara/driver/webkit/connection.rb +120 -0
- data/lib/capybara/driver/webkit/version.rb +1 -1
- data/lib/capybara/webkit/matchers.rb +2 -4
- data/lib/capybara_webkit_builder.rb +22 -4
- data/spec/browser_spec.rb +19 -29
- data/spec/connection_spec.rb +54 -0
- data/spec/driver_resize_window_spec.rb +59 -0
- data/spec/driver_spec.rb +175 -27
- data/spec/spec_helper.rb +9 -2
- data/src/Body.h +2 -2
- data/src/ClearCookies.cpp +2 -5
- data/src/ClearCookies.h +2 -2
- data/src/Command.cpp +7 -3
- data/src/Command.h +4 -2
- data/src/CommandFactory.cpp +7 -2
- data/src/CommandFactory.h +1 -1
- data/src/CommandParser.cpp +13 -5
- data/src/CommandParser.h +6 -2
- data/src/Connection.cpp +18 -47
- data/src/Connection.h +5 -7
- data/src/ConsoleMessages.cpp +2 -3
- data/src/ConsoleMessages.h +2 -2
- data/src/CurrentUrl.cpp +3 -6
- data/src/CurrentUrl.h +2 -2
- data/src/Evaluate.cpp +3 -3
- data/src/Evaluate.h +2 -2
- data/src/Execute.cpp +4 -4
- data/src/Execute.h +2 -2
- data/src/Find.cpp +4 -4
- data/src/Find.h +2 -2
- data/src/FrameFocus.cpp +7 -7
- data/src/FrameFocus.h +2 -2
- data/src/GetCookies.cpp +2 -4
- data/src/GetCookies.h +2 -2
- data/src/Header.cpp +4 -4
- data/src/Header.h +2 -2
- data/src/Headers.cpp +2 -3
- data/src/Headers.h +2 -2
- data/src/IgnoreSslErrors.cpp +12 -0
- data/src/IgnoreSslErrors.h +12 -0
- data/src/NetworkAccessManager.cpp +4 -0
- data/src/NetworkAccessManager.h +2 -1
- data/src/Node.cpp +3 -3
- data/src/Node.h +2 -2
- data/src/NullCommand.cpp +10 -0
- data/src/NullCommand.h +11 -0
- data/src/PageLoadingCommand.cpp +46 -0
- data/src/PageLoadingCommand.h +40 -0
- data/src/Render.cpp +5 -6
- data/src/Render.h +2 -2
- data/src/RequestedUrl.cpp +3 -6
- data/src/RequestedUrl.h +2 -2
- data/src/Reset.cpp +8 -7
- data/src/Reset.h +2 -2
- data/src/ResizeWindow.cpp +16 -0
- data/src/ResizeWindow.h +12 -0
- data/src/Response.cpp +6 -1
- data/src/Response.h +4 -2
- data/src/Server.cpp +2 -3
- data/src/Server.h +1 -1
- data/src/SetCookie.cpp +3 -5
- data/src/SetCookie.h +2 -2
- data/src/SetProxy.cpp +7 -9
- data/src/SetProxy.h +2 -2
- data/src/Source.cpp +2 -4
- data/src/Source.h +2 -2
- data/src/Status.cpp +2 -3
- data/src/Status.h +2 -2
- data/src/Url.cpp +3 -6
- data/src/Url.h +2 -2
- data/src/Visit.cpp +4 -13
- data/src/Visit.h +2 -5
- data/src/WebPage.cpp +11 -9
- data/src/WebPage.h +3 -3
- data/src/body.cpp +2 -3
- data/src/capybara.js +58 -3
- data/src/find_command.h +3 -1
- data/src/main.cpp +1 -2
- data/src/webkit_server.pro +8 -0
- metadata +29 -16
data/src/find_command.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#define CHECK_COMMAND(expectedName) \
|
2
2
|
if (strcmp(#expectedName, name) == 0) { \
|
3
|
-
return new expectedName(m_page, this); \
|
3
|
+
return new expectedName(m_page, arguments, this); \
|
4
4
|
}
|
5
5
|
|
6
6
|
CHECK_COMMAND(Visit)
|
@@ -25,3 +25,5 @@ CHECK_COMMAND(SetProxy)
|
|
25
25
|
CHECK_COMMAND(ConsoleMessages)
|
26
26
|
CHECK_COMMAND(RequestedUrl)
|
27
27
|
CHECK_COMMAND(CurrentUrl)
|
28
|
+
CHECK_COMMAND(ResizeWindow)
|
29
|
+
CHECK_COMMAND(IgnoreSslErrors)
|
data/src/main.cpp
CHANGED
@@ -19,9 +19,8 @@ int main(int argc, char **argv) {
|
|
19
19
|
app.setOrganizationDomain("thoughtbot.com");
|
20
20
|
|
21
21
|
QStringList args = app.arguments();
|
22
|
-
bool ignoreSslErrors = args.contains("--ignore-ssl-errors");
|
23
22
|
|
24
|
-
Server server(0
|
23
|
+
Server server(0);
|
25
24
|
|
26
25
|
if (server.start()) {
|
27
26
|
std::cout << "Capybara-webkit server started, listening on port: " << server.server_port() << std::endl;
|
data/src/webkit_server.pro
CHANGED
@@ -2,6 +2,8 @@ TEMPLATE = app
|
|
2
2
|
TARGET = webkit_server
|
3
3
|
DESTDIR = .
|
4
4
|
HEADERS = \
|
5
|
+
IgnoreSslErrors.h \
|
6
|
+
ResizeWindow.h \
|
5
7
|
CurrentUrl.h \
|
6
8
|
RequestedUrl.h \
|
7
9
|
ConsoleMessages.h \
|
@@ -34,8 +36,12 @@ HEADERS = \
|
|
34
36
|
CommandParser.h \
|
35
37
|
CommandFactory.h \
|
36
38
|
SetProxy.h \
|
39
|
+
NullCommand.h \
|
40
|
+
PageLoadingCommand.h \
|
37
41
|
|
38
42
|
SOURCES = \
|
43
|
+
IgnoreSslErrors.cpp \
|
44
|
+
ResizeWindow.cpp \
|
39
45
|
CurrentUrl.cpp \
|
40
46
|
RequestedUrl.cpp \
|
41
47
|
ConsoleMessages.cpp \
|
@@ -69,6 +75,8 @@ SOURCES = \
|
|
69
75
|
CommandParser.cpp \
|
70
76
|
CommandFactory.cpp \
|
71
77
|
SetProxy.cpp \
|
78
|
+
NullCommand.cpp \
|
79
|
+
PageLoadingCommand.cpp \
|
72
80
|
|
73
81
|
RESOURCES = webkit_server.qrc
|
74
82
|
QT += network webkit
|
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: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,11 +13,11 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2012-
|
16
|
+
date: 2012-05-11 00:00:00.000000000Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: capybara
|
20
|
-
requirement: &
|
20
|
+
requirement: &2159329100 !ruby/object:Gem::Requirement
|
21
21
|
none: false
|
22
22
|
requirements:
|
23
23
|
- - ! '>='
|
@@ -28,10 +28,10 @@ dependencies:
|
|
28
28
|
version: '1.2'
|
29
29
|
type: :runtime
|
30
30
|
prerelease: false
|
31
|
-
version_requirements: *
|
31
|
+
version_requirements: *2159329100
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: json
|
34
|
-
requirement: &
|
34
|
+
requirement: &2159328400 !ruby/object:Gem::Requirement
|
35
35
|
none: false
|
36
36
|
requirements:
|
37
37
|
- - ! '>='
|
@@ -39,10 +39,10 @@ dependencies:
|
|
39
39
|
version: '0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
|
-
version_requirements: *
|
42
|
+
version_requirements: *2159328400
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rspec
|
45
|
-
requirement: &
|
45
|
+
requirement: &2159327800 !ruby/object:Gem::Requirement
|
46
46
|
none: false
|
47
47
|
requirements:
|
48
48
|
- - ~>
|
@@ -50,10 +50,10 @@ dependencies:
|
|
50
50
|
version: 2.6.0
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
|
-
version_requirements: *
|
53
|
+
version_requirements: *2159327800
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: sinatra
|
56
|
-
requirement: &
|
56
|
+
requirement: &2159327360 !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
@@ -61,10 +61,10 @@ dependencies:
|
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
|
-
version_requirements: *
|
64
|
+
version_requirements: *2159327360
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: mini_magick
|
67
|
-
requirement: &
|
67
|
+
requirement: &2159326880 !ruby/object:Gem::Requirement
|
68
68
|
none: false
|
69
69
|
requirements:
|
70
70
|
- - ! '>='
|
@@ -72,10 +72,10 @@ dependencies:
|
|
72
72
|
version: '0'
|
73
73
|
type: :development
|
74
74
|
prerelease: false
|
75
|
-
version_requirements: *
|
75
|
+
version_requirements: *2159326880
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: rake
|
78
|
-
requirement: &
|
78
|
+
requirement: &2159326420 !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
81
81
|
- - ! '>='
|
@@ -83,10 +83,10 @@ dependencies:
|
|
83
83
|
version: '0'
|
84
84
|
type: :development
|
85
85
|
prerelease: false
|
86
|
-
version_requirements: *
|
86
|
+
version_requirements: *2159326420
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: appraisal
|
89
|
-
requirement: &
|
89
|
+
requirement: &2159325860 !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
92
92
|
- - ~>
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
version: 0.4.0
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
|
-
version_requirements: *
|
97
|
+
version_requirements: *2159325860
|
98
98
|
description:
|
99
99
|
email: support@thoughtbot.com
|
100
100
|
executables: []
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/capybara-webkit.rb
|
124
124
|
- lib/capybara/driver/webkit.rb
|
125
125
|
- lib/capybara/driver/webkit/browser.rb
|
126
|
+
- lib/capybara/driver/webkit/connection.rb
|
126
127
|
- lib/capybara/driver/webkit/cookie_jar.rb
|
127
128
|
- lib/capybara/driver/webkit/node.rb
|
128
129
|
- lib/capybara/driver/webkit/socket_debugger.rb
|
@@ -132,8 +133,10 @@ files:
|
|
132
133
|
- lib/capybara_webkit_builder.rb
|
133
134
|
- spec/browser_spec.rb
|
134
135
|
- spec/capybara_webkit_builder_spec.rb
|
136
|
+
- spec/connection_spec.rb
|
135
137
|
- spec/cookie_jar_spec.rb
|
136
138
|
- spec/driver_rendering_spec.rb
|
139
|
+
- spec/driver_resize_window_spec.rb
|
137
140
|
- spec/driver_spec.rb
|
138
141
|
- spec/integration/driver_spec.rb
|
139
142
|
- spec/integration/session_spec.rb
|
@@ -168,6 +171,8 @@ files:
|
|
168
171
|
- src/Header.h
|
169
172
|
- src/Headers.cpp
|
170
173
|
- src/Headers.h
|
174
|
+
- src/IgnoreSslErrors.cpp
|
175
|
+
- src/IgnoreSslErrors.h
|
171
176
|
- src/JavascriptInvocation.cpp
|
172
177
|
- src/JavascriptInvocation.h
|
173
178
|
- src/NetworkAccessManager.cpp
|
@@ -176,12 +181,18 @@ files:
|
|
176
181
|
- src/NetworkCookieJar.h
|
177
182
|
- src/Node.cpp
|
178
183
|
- src/Node.h
|
184
|
+
- src/NullCommand.cpp
|
185
|
+
- src/NullCommand.h
|
186
|
+
- src/PageLoadingCommand.cpp
|
187
|
+
- src/PageLoadingCommand.h
|
179
188
|
- src/Render.cpp
|
180
189
|
- src/Render.h
|
181
190
|
- src/RequestedUrl.cpp
|
182
191
|
- src/RequestedUrl.h
|
183
192
|
- src/Reset.cpp
|
184
193
|
- src/Reset.h
|
194
|
+
- src/ResizeWindow.cpp
|
195
|
+
- src/ResizeWindow.h
|
185
196
|
- src/Response.cpp
|
186
197
|
- src/Response.h
|
187
198
|
- src/Server.cpp
|
@@ -238,8 +249,10 @@ summary: Headless Webkit driver for Capybara
|
|
238
249
|
test_files:
|
239
250
|
- spec/browser_spec.rb
|
240
251
|
- spec/capybara_webkit_builder_spec.rb
|
252
|
+
- spec/connection_spec.rb
|
241
253
|
- spec/cookie_jar_spec.rb
|
242
254
|
- spec/driver_rendering_spec.rb
|
255
|
+
- spec/driver_resize_window_spec.rb
|
243
256
|
- spec/driver_spec.rb
|
244
257
|
- spec/integration/driver_spec.rb
|
245
258
|
- spec/integration/session_spec.rb
|