capybara-webkit 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,6 +11,8 @@ class WebPage : public QWebPage {
11
11
  QString userAgentForUrl(const QUrl &url ) const;
12
12
  void setUserAgent(QString userAgent);
13
13
  int getLastStatus();
14
+ void resetResponseHeaders();
15
+ void setCustomNetworkAccessManager();
14
16
  bool render(const QString &fileName);
15
17
  virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);
16
18
 
@@ -23,6 +25,10 @@ class WebPage : public QWebPage {
23
25
  QString pageHeaders();
24
26
  void frameCreated(QWebFrame *);
25
27
  void replyFinished(QNetworkReply *reply);
28
+ void handleUnsupportedContent(QNetworkReply *reply);
29
+
30
+ signals:
31
+ void pageFinished(bool);
26
32
 
27
33
  protected:
28
34
  virtual void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID);
@@ -38,7 +44,7 @@ class WebPage : public QWebPage {
38
44
  QString getLastAttachedFileName();
39
45
  void loadJavascript();
40
46
  void setUserStylesheet();
41
- int lastStatus;
47
+ int m_lastStatus;
42
48
  QString m_pageHeaders;
43
49
  };
44
50
 
@@ -27,6 +27,10 @@ Capybara = {
27
27
  return results.join(",");
28
28
  },
29
29
 
30
+ isAttached: function(index) {
31
+ return document.evaluate("ancestor-or-self::html", this.nodes[index], null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue != null;
32
+ },
33
+
30
34
  text: function (index) {
31
35
  var node = this.nodes[index];
32
36
  var type = (node.type || node.tagName).toLowerCase();
@@ -16,4 +16,7 @@ CHECK_COMMAND(Header)
16
16
  CHECK_COMMAND(Render)
17
17
  CHECK_COMMAND(Body)
18
18
  CHECK_COMMAND(Status)
19
- CHECK_COMMAND(Headers)
19
+ CHECK_COMMAND(Headers)
20
+ CHECK_COMMAND(SetCookie)
21
+ CHECK_COMMAND(ClearCookies)
22
+ CHECK_COMMAND(GetCookies)
@@ -1,8 +1,63 @@
1
1
  TEMPLATE = app
2
2
  TARGET = webkit_server
3
3
  DESTDIR = .
4
- HEADERS = WebPage.h Server.h Connection.h Command.h Visit.h Find.h Reset.h Node.h JavascriptInvocation.h Url.h Source.h Evaluate.h Execute.h FrameFocus.h Response.h NetworkAccessManager.h Header.h Render.h body.h Status.h Headers.h
5
- SOURCES = main.cpp WebPage.cpp Server.cpp Connection.cpp Command.cpp Visit.cpp Find.cpp Reset.cpp Node.cpp JavascriptInvocation.cpp Url.cpp Source.cpp Evaluate.cpp Execute.cpp FrameFocus.cpp Response.cpp NetworkAccessManager.cpp Header.cpp Render.cpp body.cpp Status.cpp Headers.cpp
4
+ HEADERS = \
5
+ WebPage.h \
6
+ Server.h \
7
+ Connection.h \
8
+ Command.h \
9
+ Visit.h \
10
+ Find.h \
11
+ Reset.h \
12
+ Node.h \
13
+ JavascriptInvocation.h \
14
+ Url.h \
15
+ Source.h \
16
+ Evaluate.h \
17
+ Execute.h \
18
+ FrameFocus.h \
19
+ Response.h \
20
+ NetworkAccessManager.h \
21
+ NetworkCookieJar.h \
22
+ Header.h \
23
+ Render.h \
24
+ body.h \
25
+ Status.h \
26
+ Headers.h \
27
+ UnsupportedContentHandler.h \
28
+ SetCookie.h \
29
+ ClearCookies.h \
30
+ GetCookies.h \
31
+
32
+ SOURCES = \
33
+ main.cpp \
34
+ WebPage.cpp \
35
+ Server.cpp \
36
+ Connection.cpp \
37
+ Command.cpp \
38
+ Visit.cpp \
39
+ Find.cpp \
40
+ Reset.cpp \
41
+ Node.cpp \
42
+ JavascriptInvocation.cpp \
43
+ Url.cpp \
44
+ Source.cpp \
45
+ Evaluate.cpp \
46
+ Execute.cpp \
47
+ FrameFocus.cpp \
48
+ Response.cpp \
49
+ NetworkAccessManager.cpp \
50
+ NetworkCookieJar.cpp \
51
+ Header.cpp \
52
+ Render.cpp \
53
+ body.cpp \
54
+ Status.cpp \
55
+ Headers.cpp \
56
+ UnsupportedContentHandler.cpp \
57
+ SetCookie.cpp \
58
+ ClearCookies.cpp \
59
+ GetCookies.cpp \
60
+
6
61
  RESOURCES = webkit_server.qrc
7
62
  QT += network webkit
8
63
  CONFIG += console
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-webkit
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 3
4
5
  prerelease:
5
- version: 0.6.1
6
+ segments:
7
+ - 0
8
+ - 7
9
+ - 0
10
+ version: 0.7.0
6
11
  platform: ruby
7
12
  authors:
8
13
  - thoughtbot
@@ -25,20 +30,104 @@ autorequire:
25
30
  bindir: bin
26
31
  cert_chain: []
27
32
 
28
- date: 2011-08-25 00:00:00 -04:00
33
+ date: 2011-09-30 00:00:00 -05:00
29
34
  default_executable:
30
35
  dependencies:
31
36
  - !ruby/object:Gem::Dependency
32
- name: capybara
33
- prerelease: false
37
+ type: :runtime
34
38
  requirement: &id001 !ruby/object:Gem::Requirement
35
39
  none: false
36
40
  requirements:
37
- - - ~>
41
+ - - ">="
38
42
  - !ruby/object:Gem::Version
43
+ hash: 23
44
+ segments:
45
+ - 1
46
+ - 0
47
+ - 0
39
48
  version: 1.0.0
40
- type: :runtime
49
+ - - <
50
+ - !ruby/object:Gem::Version
51
+ hash: 11
52
+ segments:
53
+ - 1
54
+ - 2
55
+ version: "1.2"
41
56
  version_requirements: *id001
57
+ name: capybara
58
+ prerelease: false
59
+ - !ruby/object:Gem::Dependency
60
+ type: :development
61
+ requirement: &id002 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ hash: 23
67
+ segments:
68
+ - 2
69
+ - 6
70
+ - 0
71
+ version: 2.6.0
72
+ version_requirements: *id002
73
+ name: rspec
74
+ prerelease: false
75
+ - !ruby/object:Gem::Dependency
76
+ type: :development
77
+ requirement: &id003 !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ version_requirements: *id003
87
+ name: sinatra
88
+ prerelease: false
89
+ - !ruby/object:Gem::Dependency
90
+ type: :development
91
+ requirement: &id004 !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ hash: 3
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ version_requirements: *id004
101
+ name: mini_magick
102
+ prerelease: false
103
+ - !ruby/object:Gem::Dependency
104
+ type: :development
105
+ requirement: &id005 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ hash: 3
111
+ segments:
112
+ - 0
113
+ version: "0"
114
+ version_requirements: *id005
115
+ name: rake
116
+ prerelease: false
117
+ - !ruby/object:Gem::Dependency
118
+ type: :development
119
+ requirement: &id006 !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ hash: 3
125
+ segments:
126
+ - 0
127
+ version: "0"
128
+ version_requirements: *id006
129
+ name: appraisal
130
+ prerelease: false
42
131
  description:
43
132
  email: support@thoughtbot.com
44
133
  executables: []
@@ -50,6 +139,7 @@ extra_rdoc_files: []
50
139
  files:
51
140
  - .gitignore
52
141
  - .rspec
142
+ - Appraisals
53
143
  - CONTRIBUTING.md
54
144
  - Gemfile
55
145
  - Gemfile.lock
@@ -59,11 +149,16 @@ files:
59
149
  - bin/Info.plist
60
150
  - capybara-webkit.gemspec
61
151
  - extconf.rb
152
+ - gemfiles/1.0.gemfile
153
+ - gemfiles/1.0.gemfile.lock
154
+ - gemfiles/1.1.gemfile
155
+ - gemfiles/1.1.gemfile.lock
62
156
  - lib/capybara-webkit.rb
63
157
  - lib/capybara/driver/webkit.rb
64
158
  - lib/capybara/driver/webkit/browser.rb
65
159
  - lib/capybara/driver/webkit/node.rb
66
160
  - lib/capybara/driver/webkit/socket_debugger.rb
161
+ - lib/capybara/webkit.rb
67
162
  - lib/capybara_webkit_builder.rb
68
163
  - spec/browser_spec.rb
69
164
  - spec/driver_rendering_spec.rb
@@ -72,6 +167,8 @@ files:
72
167
  - spec/integration/session_spec.rb
73
168
  - spec/spec_helper.rb
74
169
  - src/Body.h
170
+ - src/ClearCookies.cpp
171
+ - src/ClearCookies.h
75
172
  - src/Command.cpp
76
173
  - src/Command.h
77
174
  - src/Connection.cpp
@@ -84,6 +181,8 @@ files:
84
181
  - src/Find.h
85
182
  - src/FrameFocus.cpp
86
183
  - src/FrameFocus.h
184
+ - src/GetCookies.cpp
185
+ - src/GetCookies.h
87
186
  - src/Header.cpp
88
187
  - src/Header.h
89
188
  - src/Headers.cpp
@@ -92,6 +191,8 @@ files:
92
191
  - src/JavascriptInvocation.h
93
192
  - src/NetworkAccessManager.cpp
94
193
  - src/NetworkAccessManager.h
194
+ - src/NetworkCookieJar.cpp
195
+ - src/NetworkCookieJar.h
95
196
  - src/Node.cpp
96
197
  - src/Node.h
97
198
  - src/Render.cpp
@@ -102,10 +203,14 @@ files:
102
203
  - src/Response.h
103
204
  - src/Server.cpp
104
205
  - src/Server.h
206
+ - src/SetCookie.cpp
207
+ - src/SetCookie.h
105
208
  - src/Source.cpp
106
209
  - src/Source.h
107
210
  - src/Status.cpp
108
211
  - src/Status.h
212
+ - src/UnsupportedContentHandler.cpp
213
+ - src/UnsupportedContentHandler.h
109
214
  - src/Url.cpp
110
215
  - src/Url.h
111
216
  - src/Visit.cpp
@@ -135,17 +240,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
240
  requirements:
136
241
  - - ">="
137
242
  - !ruby/object:Gem::Version
243
+ hash: 3
244
+ segments:
245
+ - 0
138
246
  version: "0"
139
247
  required_rubygems_version: !ruby/object:Gem::Requirement
140
248
  none: false
141
249
  requirements:
142
250
  - - ">="
143
251
  - !ruby/object:Gem::Version
252
+ hash: 3
253
+ segments:
254
+ - 0
144
255
  version: "0"
145
256
  requirements: []
146
257
 
147
258
  rubyforge_project:
148
- rubygems_version: 1.6.2
259
+ rubygems_version: 1.6.1
149
260
  signing_key:
150
261
  specification_version: 3
151
262
  summary: Headless Webkit driver for Capybara