capybara-webkit 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -6,10 +6,12 @@ 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 Qt to build and install the gem.
9
+ capybara-webkit depends on a WebKit implementation from Qt, a cross-platform development toolkit. You'll need to download the Qt SDK to build and install the gem.
10
10
 
11
11
  * [Download Qt](http://qt.nokia.com/downloads/downloads)
12
12
 
13
+ If you're on Ubuntu, you can install the libqt4-dev package. On Linux platforms, capybara-webkit requires an X server to run, although it doesn't create any visible windows. Xvfb works fine for this.
14
+
13
15
  Usage
14
16
  -----
15
17
 
@@ -28,6 +30,8 @@ About
28
30
 
29
31
  The capybara WebKit driver was written by Joe Ferris, Tristan Dunn, and Jason Morrison from [thoughtbot, inc](http://thoughtbot.com/community).
30
32
 
33
+ ![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
34
+
31
35
  The names and logos for thoughtbot are trademarks of thoughtbot, inc.
32
36
 
33
37
  License
data/Rakefile CHANGED
@@ -47,6 +47,18 @@ unless ENV["BUILD"]
47
47
  package.need_tar = true
48
48
  end
49
49
 
50
+ gem_file = "pkg/#{$specification.name}-#{$specification.version}.gem"
51
+
52
+ desc "Build and install the latest gem"
53
+ task :install => :gem do
54
+ sh("gem install --local #{gem_file}")
55
+ end
56
+
57
+ desc "Build and release the latest gem"
58
+ task :release => :gem do
59
+ sh("gem push #{gem_file}")
60
+ end
61
+
50
62
  desc "Generate a new command called NAME"
51
63
  task :generate_command do
52
64
  name = ENV['NAME'] or raise "Provide a name with NAME="
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "capybara-webkit"
3
- s.version = "0.1.1"
3
+ s.version = "0.1.2"
4
4
  s.authors = ["thoughtbot", "Joe Ferris", "Jason Morrison", "Tristan Dunn"]
5
5
  s.email = "support@thoughtbot.com"
6
6
  s.files = `git ls-files`.split("\n")
@@ -131,6 +131,11 @@ describe Capybara::Driver::Webkit do
131
131
  to raise_error(Capybara::Driver::Webkit::WebkitError)
132
132
  end
133
133
 
134
+ it "doesn't raise an error for Javascript that doesn't return anything" do
135
+ lambda { subject.execute_script(%<(function () { "returns nothing" })()>) }.
136
+ should_not raise_error
137
+ end
138
+
134
139
  it "returns a node's tag name" do
135
140
  subject.find("//p").first.tag_name.should == "p"
136
141
  end
@@ -5,7 +5,8 @@ Execute::Execute(WebPage *page, QObject *parent) : Command(page, parent) {
5
5
  }
6
6
 
7
7
  void Execute::start(QStringList &arguments) {
8
- QVariant result = page()->mainFrame()->evaluateJavaScript(arguments[0]);
8
+ QString script = arguments[0] + QString("; 'success'");
9
+ QVariant result = page()->mainFrame()->evaluateJavaScript(script);
9
10
  QString response;
10
11
  if (result.isValid()) {
11
12
  emit finished(true, response);
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: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-04-06 00:00:00 -04:00
21
+ date: 2011-04-13 00:00:00 -04:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency