capybara-webkit 0.4.1 → 0.5.0
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/.gitignore +1 -1
- data/README.md +7 -4
- data/bin/Info.plist +22 -0
- data/capybara-webkit.gemspec +3 -2
- data/lib/capybara/driver/webkit/browser.rb +3 -1
- data/spec/driver_spec.rb +2 -2
- data/src/capybara.js +1 -0
- metadata +8 -18
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -6,13 +6,16 @@ A [capybara](https://github.com/jnicklas/capybara) driver that uses [WebKit](htt
|
|
6
6
|
Dependencies
|
7
7
|
------------
|
8
8
|
|
9
|
-
capybara-webkit depends on a WebKit implementation from Qt, a cross-platform development toolkit. You'll need to download the Qt
|
9
|
+
capybara-webkit depends on a WebKit implementation from Qt, a cross-platform development toolkit. You'll need to download the Qt libraries to build and install the gem.
|
10
10
|
|
11
|
-
|
11
|
+
If you're on OS X, [download the non-debug Cocoa package](http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x). Note that installing Qt via homebrew takes more than an hour, so we don't recommend it.
|
12
12
|
|
13
|
-
If you're on
|
13
|
+
If you're on Ubuntu, you can install the libqt4-dev package. For other Linux distributions, [download this package](http://qt.nokia.com/downloads/linux-x11-cpp).
|
14
14
|
|
15
|
-
|
15
|
+
CI
|
16
|
+
--
|
17
|
+
|
18
|
+
If you're like us, you'll be using capybara-webkit on CI.
|
16
19
|
|
17
20
|
On Linux platforms, capybara-webkit requires an X server to run, although it doesn't create any visible windows. Xvfb works fine for this. You can setup Xvfb yourself and set a DISPLAY variable, or try out the [headless gem](https://github.com/leonid-shevtsov/headless).
|
18
21
|
|
data/bin/Info.plist
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
3
|
+
<plist version="0.9">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleIconFile</key>
|
6
|
+
<string></string>
|
7
|
+
<key>CFBundlePackageType</key>
|
8
|
+
<string>APPL</string>
|
9
|
+
<key>CFBundleGetInfoString</key>
|
10
|
+
<string>Created by Qt/QMake</string>
|
11
|
+
<key>CFBundleSignature</key>
|
12
|
+
<string>????</string>
|
13
|
+
<key>CFBundleExecutable</key>
|
14
|
+
<string>webkit_server</string>
|
15
|
+
<key>CFBundleIdentifier</key>
|
16
|
+
<string>com.yourcompany.webkit_server</string>
|
17
|
+
<key>NOTE</key>
|
18
|
+
<string>This file was generated by Qt/QMake.</string>
|
19
|
+
<key>LSUIElement</key>
|
20
|
+
<string>1</string>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
data/capybara-webkit.gemspec
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "capybara-webkit"
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.5.0"
|
4
4
|
s.authors = ["thoughtbot", "Joe Ferris", "Jason Morrison", "Tristan Dunn",
|
5
5
|
"Joshua Clayton", "Yuichi Tateno", "Aaron Gibralter",
|
6
6
|
"Vasily Reys", "petrushka", "John Bintz", "Chad Pytel",
|
7
|
-
"Christopher Meiklejohn", "John Barker", "Jeremy Wells"
|
7
|
+
"Christopher Meiklejohn", "John Barker", "Jeremy Wells",
|
8
|
+
"Chris Griego", "Shigeya Suzuki"]
|
8
9
|
s.email = "support@thoughtbot.com"
|
9
10
|
s.files = `git ls-files`.split("\n")
|
10
11
|
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
@@ -90,7 +90,9 @@ class Capybara::Driver::Webkit
|
|
90
90
|
|
91
91
|
def read_response
|
92
92
|
response_length = @socket.gets.to_i
|
93
|
-
@socket.read(response_length)
|
93
|
+
response = @socket.read(response_length)
|
94
|
+
response.force_encoding("UTF-8") if response.respond_to?(:force_encoding)
|
95
|
+
response
|
94
96
|
end
|
95
97
|
end
|
96
98
|
end
|
data/spec/driver_spec.rb
CHANGED
@@ -467,12 +467,12 @@ describe Capybara::Driver::Webkit do
|
|
467
467
|
|
468
468
|
it "triggers radio input events" do
|
469
469
|
subject.find("//input[@type='radio']").first.set(true)
|
470
|
-
subject.find("//li").map(&:text).should == %w(click)
|
470
|
+
subject.find("//li").map(&:text).should == %w(click change)
|
471
471
|
end
|
472
472
|
|
473
473
|
it "triggers checkbox events" do
|
474
474
|
subject.find("//input[@type='checkbox']").first.set(true)
|
475
|
-
subject.find("//li").map(&:text).should == %w(click)
|
475
|
+
subject.find("//li").map(&:text).should == %w(click change)
|
476
476
|
end
|
477
477
|
end
|
478
478
|
|
data/src/capybara.js
CHANGED
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-webkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 13
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
- 1
|
10
|
-
version: 0.4.1
|
5
|
+
version: 0.5.0
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- thoughtbot
|
@@ -24,28 +19,25 @@ authors:
|
|
24
19
|
- Christopher Meiklejohn
|
25
20
|
- John Barker
|
26
21
|
- Jeremy Wells
|
22
|
+
- Chris Griego
|
23
|
+
- Shigeya Suzuki
|
27
24
|
autorequire:
|
28
25
|
bindir: bin
|
29
26
|
cert_chain: []
|
30
27
|
|
31
|
-
date: 2011-06-
|
28
|
+
date: 2011-06-14 00:00:00 -04:00
|
32
29
|
default_executable:
|
33
30
|
dependencies:
|
34
31
|
- !ruby/object:Gem::Dependency
|
35
32
|
name: capybara
|
36
|
-
prerelease: false
|
37
33
|
requirement: &id001 !ruby/object:Gem::Requirement
|
38
34
|
none: false
|
39
35
|
requirements:
|
40
36
|
- - ~>
|
41
37
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 13
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
- 4
|
46
|
-
- 1
|
47
38
|
version: 0.4.1
|
48
39
|
type: :runtime
|
40
|
+
prerelease: false
|
49
41
|
version_requirements: *id001
|
50
42
|
description:
|
51
43
|
email: support@thoughtbot.com
|
@@ -63,6 +55,7 @@ files:
|
|
63
55
|
- LICENSE
|
64
56
|
- README.md
|
65
57
|
- Rakefile
|
58
|
+
- bin/Info.plist
|
66
59
|
- capybara-webkit.gemspec
|
67
60
|
- extconf.rb
|
68
61
|
- lib/capybara-webkit.rb
|
@@ -127,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
120
|
requirements:
|
128
121
|
- - ">="
|
129
122
|
- !ruby/object:Gem::Version
|
130
|
-
hash:
|
123
|
+
hash: -100253134270949923
|
131
124
|
segments:
|
132
125
|
- 0
|
133
126
|
version: "0"
|
@@ -136,14 +129,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
129
|
requirements:
|
137
130
|
- - ">="
|
138
131
|
- !ruby/object:Gem::Version
|
139
|
-
hash: 3
|
140
|
-
segments:
|
141
|
-
- 0
|
142
132
|
version: "0"
|
143
133
|
requirements: []
|
144
134
|
|
145
135
|
rubyforge_project:
|
146
|
-
rubygems_version: 1.
|
136
|
+
rubygems_version: 1.6.1
|
147
137
|
signing_key:
|
148
138
|
specification_version: 3
|
149
139
|
summary: Headless Webkit driver for Capybara
|