Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: thoughtbot/capybara-webkit
...
head fork: intentmedia/capybara-webkit
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 7 files changed
  • 0 commit comments
  • 3 contributors
View
30 Gemfile.lock
@@ -1,13 +1,14 @@
PATH
remote: .
specs:
- capybara-webkit (0.10.1)
+ intentmedia-capybara-webkit (0.11.0)
capybara (>= 1.0.0, < 1.2)
json
GEM
remote: http://rubygems.org/
specs:
+ addressable (2.2.7)
appraisal (0.4.0)
bundler
rake
@@ -18,16 +19,21 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- childprocess (0.3.1)
+ childprocess (0.3.2)
ffi (~> 1.0.6)
diff-lcs (1.1.2)
ffi (1.0.11)
- json (1.6.5)
- mime-types (1.17.2)
+ ffi (1.0.11-java)
+ json (1.7.0)
+ json (1.7.0-java)
+ libwebsocket (0.1.3)
+ addressable
+ mime-types (1.18)
mini_magick (3.2.1)
subexec (~> 0.0.4)
- multi_json (1.0.4)
- nokogiri (1.5.0)
+ multi_json (1.3.4)
+ nokogiri (1.5.2)
+ nokogiri (1.5.2-java)
rack (1.3.2)
rack-test (0.6.1)
rack (>= 1.0)
@@ -40,11 +46,12 @@ GEM
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
- rubyzip (0.9.6.1)
- selenium-webdriver (2.19.0)
+ rubyzip (0.9.8)
+ selenium-webdriver (2.21.2)
childprocess (>= 0.2.5)
- ffi (~> 1.0.9)
- multi_json (~> 1.0.4)
+ ffi (~> 1.0)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
rubyzip
sinatra (1.1.2)
rack (~> 1.1)
@@ -55,11 +62,12 @@ GEM
nokogiri (~> 1.3)
PLATFORMS
+ java
ruby
DEPENDENCIES
appraisal (~> 0.4.0)
- capybara-webkit!
+ intentmedia-capybara-webkit!
mini_magick
rake
rspec (~> 2.6.0)
View
3  capybara-webkit.gemspec
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
require "capybara/driver/webkit/version"
Gem::Specification.new do |s|
- s.name = "capybara-webkit"
+ s.name = "intentmedia-capybara-webkit"
s.version = Capybara::Driver::Webkit::VERSION.dup
s.authors = ["thoughtbot", "Joe Ferris", "Matt Mongeau", "Mike Burns", "Jason Morrison"]
s.email = "support@thoughtbot.com"
@@ -25,4 +25,3 @@ Gem::Specification.new do |s|
s.add_development_dependency("rake")
s.add_development_dependency("appraisal", "~> 0.4.0")
end
-
View
7 lib/capybara/driver/webkit/browser.rb
@@ -122,7 +122,7 @@ def get_cookies
def set_proxy(options = {})
options = default_proxy_options.merge(options)
- command("SetProxy", options[:host], options[:port], options[:user], options[:pass])
+ command("SetProxy", options[:type], options[:host], options[:port], options[:user], options[:pass])
end
def clear_proxy
@@ -176,7 +176,7 @@ def forward_stdout(pipe)
@stdout.flush
end
end
- rescue EOFError
+ rescue EOFError, IOError
end
if !defined?(RUBY_ENGINE) || (RUBY_ENGINE == "ruby" && RUBY_VERSION <= "1.8")
@@ -221,13 +221,14 @@ def check
def read_response
response_length = @socket.gets.to_i
- response = @socket.read(response_length)
+ response = response_length > 0 ? @socket.read(response_length) : ''
response.force_encoding("UTF-8") if response.respond_to?(:force_encoding)
response
end
def default_proxy_options
{
+ :type => "http",
:host => "localhost",
:port => "0",
:user => "",
View
2  lib/capybara/driver/webkit/version.rb
@@ -1,7 +1,7 @@
module Capybara
module Driver
class Webkit
- VERSION = '0.11.0'.freeze
+ VERSION = '0.11.0.5'.freeze
end
end
end
View
27 lib/capybara_webkit_builder.rb
@@ -5,34 +5,25 @@ module CapybaraWebkitBuilder
extend self
def make_bin
- ENV['MAKE'] || 'make'
+ make_binaries = ['gmake', 'make']
+ make_binaries.detect { |make| system("which #{make}") }
end
- def qmake_bin
- ENV['QMAKE'] || 'qmake'
- end
-
- def spec
- ENV['SPEC'] || os_spec
- end
-
- def os_spec
+ def makefile
+ qmake_binaries = ['qmake', 'qmake-qt4']
+ qmake = qmake_binaries.detect { |qmake| system("which #{qmake}") }
case RbConfig::CONFIG['host_os']
when /linux/
- "linux-g++"
+ system("#{qmake} -spec linux-g++")
when /freebsd/
- "freebsd-g++"
+ system("#{qmake} -spec freebsd-g++")
else
- "macx-g++"
+ system("#{qmake} -spec macx-g++")
end
end
- def makefile
- system("LANG='en_US.UTF-8' #{qmake_bin} -spec #{spec}")
- end
-
def qmake
- system("LANG='en_US.UTF-8' #{make_bin} qmake")
+ system("#{make_bin} qmake")
end
def build
View
5 spec/driver_spec.rb
@@ -242,6 +242,11 @@
subject.current_url.should == "http://127.0.0.1:#{port}/hello/world?success=true"
end
+ it "does not double-encode URLs" do
+ subject.visit("/hello/world?success=%25true")
+ subject.current_url.should =~ /success=\%25true/
+ end
+
it "returns the current URL when changed by pushState" do
port = subject.instance_variable_get("@rack_server").port
subject.execute_script("window.history.pushState({}, '', '/pushed')")
View
18 src/SetProxy.cpp
@@ -12,12 +12,18 @@ void SetProxy::start(QStringList &arguments)
// default to empty proxy
QNetworkProxy proxy;
- if (arguments.size() > 0)
- proxy = QNetworkProxy(QNetworkProxy::HttpProxy,
- arguments[0],
- (quint16)(arguments[1].toInt()),
- arguments[2],
- arguments[3]);
+ if (arguments.size() > 0) {
+ QNetworkProxy::ProxyType proxyType = QNetworkProxy::HttpProxy;
+
+ if (arguments[0] == "socks5")
+ proxyType = QNetworkProxy::Socks5Proxy;
+
+ proxy = QNetworkProxy(proxyType,
+ arguments[1],
+ (quint16)(arguments[2].toInt()),
+ arguments[3],
+ arguments[4]);
+ }
page()->networkAccessManager()->setProxy(proxy);
emit finished(new Response(true));

No commit comments for this range

Something went wrong with that request. Please try again.