imseng-capybara-webkit 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/.gitignore +21 -0
  2. data/.rspec +2 -0
  3. data/Appraisals +7 -0
  4. data/CONTRIBUTING.md +47 -0
  5. data/ChangeLog +70 -0
  6. data/Gemfile +3 -0
  7. data/LICENSE +19 -0
  8. data/NEWS.md +36 -0
  9. data/README.md +114 -0
  10. data/Rakefile +65 -0
  11. data/bin/Info.plist +22 -0
  12. data/capybara-webkit.gemspec +28 -0
  13. data/extconf.rb +2 -0
  14. data/gemfiles/1.0.gemfile +7 -0
  15. data/gemfiles/1.0.gemfile.lock +70 -0
  16. data/gemfiles/1.1.gemfile +7 -0
  17. data/gemfiles/1.1.gemfile.lock +70 -0
  18. data/lib/capybara/driver/webkit/browser.rb +164 -0
  19. data/lib/capybara/driver/webkit/connection.rb +120 -0
  20. data/lib/capybara/driver/webkit/cookie_jar.rb +55 -0
  21. data/lib/capybara/driver/webkit/node.rb +118 -0
  22. data/lib/capybara/driver/webkit/socket_debugger.rb +43 -0
  23. data/lib/capybara/driver/webkit/version.rb +7 -0
  24. data/lib/capybara/driver/webkit.rb +136 -0
  25. data/lib/capybara/webkit/matchers.rb +37 -0
  26. data/lib/capybara/webkit.rb +13 -0
  27. data/lib/capybara-webkit.rb +1 -0
  28. data/lib/capybara_webkit_builder.rb +68 -0
  29. data/spec/browser_spec.rb +173 -0
  30. data/spec/capybara_webkit_builder_spec.rb +37 -0
  31. data/spec/connection_spec.rb +54 -0
  32. data/spec/cookie_jar_spec.rb +48 -0
  33. data/spec/driver_rendering_spec.rb +80 -0
  34. data/spec/driver_resize_window_spec.rb +59 -0
  35. data/spec/driver_spec.rb +1552 -0
  36. data/spec/integration/driver_spec.rb +20 -0
  37. data/spec/integration/session_spec.rb +137 -0
  38. data/spec/self_signed_ssl_cert.rb +42 -0
  39. data/spec/spec_helper.rb +46 -0
  40. data/src/Body.h +12 -0
  41. data/src/ClearCookies.cpp +15 -0
  42. data/src/ClearCookies.h +11 -0
  43. data/src/Command.cpp +19 -0
  44. data/src/Command.h +31 -0
  45. data/src/CommandFactory.cpp +37 -0
  46. data/src/CommandFactory.h +16 -0
  47. data/src/CommandParser.cpp +76 -0
  48. data/src/CommandParser.h +33 -0
  49. data/src/Connection.cpp +71 -0
  50. data/src/Connection.h +37 -0
  51. data/src/ConsoleMessages.cpp +10 -0
  52. data/src/ConsoleMessages.h +12 -0
  53. data/src/CurrentUrl.cpp +68 -0
  54. data/src/CurrentUrl.h +16 -0
  55. data/src/Evaluate.cpp +84 -0
  56. data/src/Evaluate.h +22 -0
  57. data/src/Execute.cpp +16 -0
  58. data/src/Execute.h +12 -0
  59. data/src/Find.cpp +19 -0
  60. data/src/Find.h +13 -0
  61. data/src/FrameFocus.cpp +66 -0
  62. data/src/FrameFocus.h +28 -0
  63. data/src/GetCookies.cpp +20 -0
  64. data/src/GetCookies.h +14 -0
  65. data/src/Header.cpp +18 -0
  66. data/src/Header.h +11 -0
  67. data/src/Headers.cpp +10 -0
  68. data/src/Headers.h +12 -0
  69. data/src/IgnoreSslErrors.cpp +12 -0
  70. data/src/IgnoreSslErrors.h +12 -0
  71. data/src/JavascriptInvocation.cpp +14 -0
  72. data/src/JavascriptInvocation.h +19 -0
  73. data/src/NetworkAccessManager.cpp +29 -0
  74. data/src/NetworkAccessManager.h +19 -0
  75. data/src/NetworkCookieJar.cpp +101 -0
  76. data/src/NetworkCookieJar.h +15 -0
  77. data/src/Node.cpp +14 -0
  78. data/src/Node.h +13 -0
  79. data/src/NullCommand.cpp +10 -0
  80. data/src/NullCommand.h +11 -0
  81. data/src/PageLoadingCommand.cpp +46 -0
  82. data/src/PageLoadingCommand.h +40 -0
  83. data/src/Render.cpp +18 -0
  84. data/src/Render.h +12 -0
  85. data/src/RequestedUrl.cpp +12 -0
  86. data/src/RequestedUrl.h +12 -0
  87. data/src/Reset.cpp +29 -0
  88. data/src/Reset.h +15 -0
  89. data/src/ResizeWindow.cpp +16 -0
  90. data/src/ResizeWindow.h +12 -0
  91. data/src/Response.cpp +24 -0
  92. data/src/Response.h +15 -0
  93. data/src/Server.cpp +24 -0
  94. data/src/Server.h +21 -0
  95. data/src/SetCookie.cpp +16 -0
  96. data/src/SetCookie.h +11 -0
  97. data/src/SetProxy.cpp +22 -0
  98. data/src/SetProxy.h +11 -0
  99. data/src/Source.cpp +18 -0
  100. data/src/Source.h +19 -0
  101. data/src/Status.cpp +12 -0
  102. data/src/Status.h +12 -0
  103. data/src/UnsupportedContentHandler.cpp +32 -0
  104. data/src/UnsupportedContentHandler.h +18 -0
  105. data/src/Url.cpp +12 -0
  106. data/src/Url.h +12 -0
  107. data/src/Visit.cpp +12 -0
  108. data/src/Visit.h +12 -0
  109. data/src/WebPage.cpp +239 -0
  110. data/src/WebPage.h +58 -0
  111. data/src/body.cpp +10 -0
  112. data/src/capybara.js +315 -0
  113. data/src/find_command.h +29 -0
  114. data/src/main.cpp +33 -0
  115. data/src/webkit_server.pro +85 -0
  116. data/src/webkit_server.qrc +5 -0
  117. data/templates/Command.cpp +10 -0
  118. data/templates/Command.h +12 -0
  119. data/webkit_server.pro +4 -0
  120. metadata +298 -0
@@ -0,0 +1,85 @@
1
+ TEMPLATE = app
2
+ TARGET = webkit_server
3
+ DESTDIR = .
4
+ HEADERS = \
5
+ IgnoreSslErrors.h \
6
+ ResizeWindow.h \
7
+ CurrentUrl.h \
8
+ RequestedUrl.h \
9
+ ConsoleMessages.h \
10
+ WebPage.h \
11
+ Server.h \
12
+ Connection.h \
13
+ Command.h \
14
+ Visit.h \
15
+ Find.h \
16
+ Reset.h \
17
+ Node.h \
18
+ JavascriptInvocation.h \
19
+ Url.h \
20
+ Source.h \
21
+ Evaluate.h \
22
+ Execute.h \
23
+ FrameFocus.h \
24
+ Response.h \
25
+ NetworkAccessManager.h \
26
+ NetworkCookieJar.h \
27
+ Header.h \
28
+ Render.h \
29
+ body.h \
30
+ Status.h \
31
+ Headers.h \
32
+ UnsupportedContentHandler.h \
33
+ SetCookie.h \
34
+ ClearCookies.h \
35
+ GetCookies.h \
36
+ CommandParser.h \
37
+ CommandFactory.h \
38
+ SetProxy.h \
39
+ NullCommand.h \
40
+ PageLoadingCommand.h \
41
+
42
+ SOURCES = \
43
+ IgnoreSslErrors.cpp \
44
+ ResizeWindow.cpp \
45
+ CurrentUrl.cpp \
46
+ RequestedUrl.cpp \
47
+ ConsoleMessages.cpp \
48
+ main.cpp \
49
+ WebPage.cpp \
50
+ Server.cpp \
51
+ Connection.cpp \
52
+ Command.cpp \
53
+ Visit.cpp \
54
+ Find.cpp \
55
+ Reset.cpp \
56
+ Node.cpp \
57
+ JavascriptInvocation.cpp \
58
+ Url.cpp \
59
+ Source.cpp \
60
+ Evaluate.cpp \
61
+ Execute.cpp \
62
+ FrameFocus.cpp \
63
+ Response.cpp \
64
+ NetworkAccessManager.cpp \
65
+ NetworkCookieJar.cpp \
66
+ Header.cpp \
67
+ Render.cpp \
68
+ body.cpp \
69
+ Status.cpp \
70
+ Headers.cpp \
71
+ UnsupportedContentHandler.cpp \
72
+ SetCookie.cpp \
73
+ ClearCookies.cpp \
74
+ GetCookies.cpp \
75
+ CommandParser.cpp \
76
+ CommandFactory.cpp \
77
+ SetProxy.cpp \
78
+ NullCommand.cpp \
79
+ PageLoadingCommand.cpp \
80
+
81
+ RESOURCES = webkit_server.qrc
82
+ QT += network webkit
83
+ CONFIG += console
84
+ CONFIG -= app_bundle
85
+
@@ -0,0 +1,5 @@
1
+ <RCC>
2
+ <qresource prefix="/">
3
+ <file>capybara.js</file>
4
+ </qresource>
5
+ </RCC>
@@ -0,0 +1,10 @@
1
+ #include "NAME.h"
2
+ #include "WebPage.h"
3
+
4
+ NAME::NAME(WebPage *page, QObject *parent) : Command(page, parent) {
5
+ }
6
+
7
+ void NAME::start(QStringList &arguments) {
8
+ Q_UNUSED(arguments);
9
+ }
10
+
@@ -0,0 +1,12 @@
1
+ #include "Command.h"
2
+
3
+ class WebPage;
4
+
5
+ class NAME : public Command {
6
+ Q_OBJECT
7
+
8
+ public:
9
+ NAME(WebPage *page, QObject *parent = 0);
10
+ virtual void start(QStringList &arguments);
11
+ };
12
+
data/webkit_server.pro ADDED
@@ -0,0 +1,4 @@
1
+ TEMPLATE = subdirs
2
+ CONFIG += ordered
3
+ SUBDIRS += src/webkit_server.pro
4
+
metadata ADDED
@@ -0,0 +1,298 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: imseng-capybara-webkit
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.12.1
6
+ platform: ruby
7
+ authors:
8
+ - imseng
9
+ - Thoughtbot
10
+ - Joe Ferris
11
+ - Matt Mongeau
12
+ - Mike Burns
13
+ - Jason Morrison
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+ date: 2013-06-13 00:00:00.000000000 Z
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: capybara
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - '>='
24
+ - !ruby/object:Gem::Version
25
+ version: 1.0.0
26
+ - - <
27
+ - !ruby/object:Gem::Version
28
+ version: '1.2'
29
+ none: false
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: 1.0.0
35
+ - - <
36
+ - !ruby/object:Gem::Version
37
+ version: '1.2'
38
+ none: false
39
+ prerelease: false
40
+ type: :runtime
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ none: false
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ none: false
55
+ prerelease: false
56
+ type: :runtime
57
+ - !ruby/object:Gem::Dependency
58
+ name: rspec
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: 2.6.0
64
+ none: false
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.6.0
70
+ none: false
71
+ prerelease: false
72
+ type: :development
73
+ - !ruby/object:Gem::Dependency
74
+ name: sinatra
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ none: false
81
+ requirement: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ none: false
87
+ prerelease: false
88
+ type: :development
89
+ - !ruby/object:Gem::Dependency
90
+ name: mini_magick
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ none: false
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ none: false
103
+ prerelease: false
104
+ type: :development
105
+ - !ruby/object:Gem::Dependency
106
+ name: rake
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ none: false
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ none: false
119
+ prerelease: false
120
+ type: :development
121
+ - !ruby/object:Gem::Dependency
122
+ name: appraisal
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ~>
126
+ - !ruby/object:Gem::Version
127
+ version: 0.4.0
128
+ none: false
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.4.0
134
+ none: false
135
+ prerelease: false
136
+ type: :development
137
+ description:
138
+ email: darrin.wortlehock@db.com
139
+ executables: []
140
+ extensions:
141
+ - extconf.rb
142
+ extra_rdoc_files: []
143
+ files:
144
+ - .gitignore
145
+ - .rspec
146
+ - Appraisals
147
+ - CONTRIBUTING.md
148
+ - ChangeLog
149
+ - Gemfile
150
+ - LICENSE
151
+ - NEWS.md
152
+ - README.md
153
+ - Rakefile
154
+ - bin/Info.plist
155
+ - capybara-webkit.gemspec
156
+ - extconf.rb
157
+ - gemfiles/1.0.gemfile
158
+ - gemfiles/1.0.gemfile.lock
159
+ - gemfiles/1.1.gemfile
160
+ - gemfiles/1.1.gemfile.lock
161
+ - lib/capybara-webkit.rb
162
+ - lib/capybara/driver/webkit.rb
163
+ - lib/capybara/driver/webkit/browser.rb
164
+ - lib/capybara/driver/webkit/connection.rb
165
+ - lib/capybara/driver/webkit/cookie_jar.rb
166
+ - lib/capybara/driver/webkit/node.rb
167
+ - lib/capybara/driver/webkit/socket_debugger.rb
168
+ - lib/capybara/driver/webkit/version.rb
169
+ - lib/capybara/webkit.rb
170
+ - lib/capybara/webkit/matchers.rb
171
+ - lib/capybara_webkit_builder.rb
172
+ - spec/browser_spec.rb
173
+ - spec/capybara_webkit_builder_spec.rb
174
+ - spec/connection_spec.rb
175
+ - spec/cookie_jar_spec.rb
176
+ - spec/driver_rendering_spec.rb
177
+ - spec/driver_resize_window_spec.rb
178
+ - spec/driver_spec.rb
179
+ - spec/integration/driver_spec.rb
180
+ - spec/integration/session_spec.rb
181
+ - spec/self_signed_ssl_cert.rb
182
+ - spec/spec_helper.rb
183
+ - src/Body.h
184
+ - src/ClearCookies.cpp
185
+ - src/ClearCookies.h
186
+ - src/Command.cpp
187
+ - src/Command.h
188
+ - src/CommandFactory.cpp
189
+ - src/CommandFactory.h
190
+ - src/CommandParser.cpp
191
+ - src/CommandParser.h
192
+ - src/Connection.cpp
193
+ - src/Connection.h
194
+ - src/ConsoleMessages.cpp
195
+ - src/ConsoleMessages.h
196
+ - src/CurrentUrl.cpp
197
+ - src/CurrentUrl.h
198
+ - src/Evaluate.cpp
199
+ - src/Evaluate.h
200
+ - src/Execute.cpp
201
+ - src/Execute.h
202
+ - src/Find.cpp
203
+ - src/Find.h
204
+ - src/FrameFocus.cpp
205
+ - src/FrameFocus.h
206
+ - src/GetCookies.cpp
207
+ - src/GetCookies.h
208
+ - src/Header.cpp
209
+ - src/Header.h
210
+ - src/Headers.cpp
211
+ - src/Headers.h
212
+ - src/IgnoreSslErrors.cpp
213
+ - src/IgnoreSslErrors.h
214
+ - src/JavascriptInvocation.cpp
215
+ - src/JavascriptInvocation.h
216
+ - src/NetworkAccessManager.cpp
217
+ - src/NetworkAccessManager.h
218
+ - src/NetworkCookieJar.cpp
219
+ - src/NetworkCookieJar.h
220
+ - src/Node.cpp
221
+ - src/Node.h
222
+ - src/NullCommand.cpp
223
+ - src/NullCommand.h
224
+ - src/PageLoadingCommand.cpp
225
+ - src/PageLoadingCommand.h
226
+ - src/Render.cpp
227
+ - src/Render.h
228
+ - src/RequestedUrl.cpp
229
+ - src/RequestedUrl.h
230
+ - src/Reset.cpp
231
+ - src/Reset.h
232
+ - src/ResizeWindow.cpp
233
+ - src/ResizeWindow.h
234
+ - src/Response.cpp
235
+ - src/Response.h
236
+ - src/Server.cpp
237
+ - src/Server.h
238
+ - src/SetCookie.cpp
239
+ - src/SetCookie.h
240
+ - src/SetProxy.cpp
241
+ - src/SetProxy.h
242
+ - src/Source.cpp
243
+ - src/Source.h
244
+ - src/Status.cpp
245
+ - src/Status.h
246
+ - src/UnsupportedContentHandler.cpp
247
+ - src/UnsupportedContentHandler.h
248
+ - src/Url.cpp
249
+ - src/Url.h
250
+ - src/Visit.cpp
251
+ - src/Visit.h
252
+ - src/WebPage.cpp
253
+ - src/WebPage.h
254
+ - src/body.cpp
255
+ - src/capybara.js
256
+ - src/find_command.h
257
+ - src/main.cpp
258
+ - src/webkit_server.pro
259
+ - src/webkit_server.qrc
260
+ - templates/Command.cpp
261
+ - templates/Command.h
262
+ - webkit_server.pro
263
+ homepage: http://github.com/imseng/capybara-webkit
264
+ licenses: []
265
+ post_install_message:
266
+ rdoc_options: []
267
+ require_paths:
268
+ - lib
269
+ required_ruby_version: !ruby/object:Gem::Requirement
270
+ requirements:
271
+ - - '>='
272
+ - !ruby/object:Gem::Version
273
+ version: '0'
274
+ none: false
275
+ required_rubygems_version: !ruby/object:Gem::Requirement
276
+ requirements:
277
+ - - '>='
278
+ - !ruby/object:Gem::Version
279
+ version: '0'
280
+ none: false
281
+ requirements: []
282
+ rubyforge_project:
283
+ rubygems_version: 1.8.24
284
+ signing_key:
285
+ specification_version: 3
286
+ summary: Headless Webkit driver for Capybara
287
+ test_files:
288
+ - spec/browser_spec.rb
289
+ - spec/capybara_webkit_builder_spec.rb
290
+ - spec/connection_spec.rb
291
+ - spec/cookie_jar_spec.rb
292
+ - spec/driver_rendering_spec.rb
293
+ - spec/driver_resize_window_spec.rb
294
+ - spec/driver_spec.rb
295
+ - spec/integration/driver_spec.rb
296
+ - spec/integration/session_spec.rb
297
+ - spec/self_signed_ssl_cert.rb
298
+ - spec/spec_helper.rb