capybara 2.15.2 → 2.15.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +6 -0
- data/lib/capybara/session.rb +11 -10
- data/lib/capybara/spec/session/visit_spec.rb +6 -1
- data/lib/capybara/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 900f8b3c6c40c11e73ea6b87c66f457f5dc31ba4
|
4
|
+
data.tar.gz: cc898006a411581c3496edf13da7beedca981972
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a67ce2f18bd4995585b190df6483210f47782282df576d3e46655942f0ec23b962b52027a03fd97f4de48eefa73f931c3675a78388c6341b30c8394961771c0
|
7
|
+
data.tar.gz: '01017609801364f823592cf2a318264613d73e1b6b901e29ab78dbb88612e9694952f5172fa947b8ffc8cb48b9b0f2487768357b2ea81f939276bf53512ac043'
|
data/History.md
CHANGED
data/lib/capybara/session.rb
CHANGED
@@ -257,18 +257,19 @@ module Capybara
|
|
257
257
|
|
258
258
|
uri_base.port ||= @server.port if @server && config.always_include_port
|
259
259
|
|
260
|
-
# TODO - this is only for compatability with previous 2.x behavior that concatenated
|
261
|
-
# Capybara.app_host and a "relative" path - Consider removing in 3.0
|
262
|
-
# @abotalov brought up a good point about this behavior potentially being useful to people
|
263
|
-
# deploying to a subdirectory and/or single page apps where only the url fragment changes
|
264
|
-
if visit_uri.scheme.nil? && uri_base
|
265
|
-
visit_uri.path = uri_base.path + visit_uri.path
|
266
|
-
end
|
267
|
-
|
268
260
|
if uri_base && [nil, 'http', 'https'].include?(visit_uri.scheme)
|
269
|
-
|
270
|
-
|
261
|
+
visit_uri_parts = visit_uri.to_hash.delete_if { |k,v| v.nil? }
|
262
|
+
|
263
|
+
if visit_uri.scheme.nil?
|
264
|
+
# TODO - this is only for compatability with previous 2.x behavior that concatenated
|
265
|
+
# Capybara.app_host and a "relative" path - Consider removing in 3.0
|
266
|
+
# @abotalov brought up a good point about this behavior potentially being useful to people
|
267
|
+
# deploying to a subdirectory and/or single page apps where only the url fragment changes
|
268
|
+
visit_uri_parts[:path] = uri_base.path + visit_uri.path
|
269
|
+
end
|
271
270
|
|
271
|
+
visit_uri = uri_base.merge(visit_uri_parts)
|
272
|
+
end
|
272
273
|
driver.visit(visit_uri.to_s)
|
273
274
|
end
|
274
275
|
|
@@ -113,8 +113,13 @@ Capybara::SpecHelper.spec '#visit' do
|
|
113
113
|
@session.visit('/times')
|
114
114
|
expect(@session).to have_content('redirection complete')
|
115
115
|
end
|
116
|
-
end
|
117
116
|
|
117
|
+
it "should work if `app_host` has a trailing /", requires: [:server] do
|
118
|
+
Capybara.app_host = "http://#{@session.server.host}:#{@session.server.port}/"
|
119
|
+
@session.visit('/')
|
120
|
+
expect(@session).to have_content('Hello world!')
|
121
|
+
end
|
122
|
+
end
|
118
123
|
|
119
124
|
it "should send no referer when visiting a page" do
|
120
125
|
@session.visit '/get_referer'
|
data/lib/capybara/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Walpole
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- gem-public_cert.pem
|
13
|
-
date: 2017-10-
|
13
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|