capybara 3.0.0 → 3.0.1
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.
- checksums.yaml +4 -4
- data/History.md +8 -1
- data/lib/capybara.rb +5 -1
- data/lib/capybara/config.rb +3 -1
- data/lib/capybara/node/matchers.rb +0 -4
- data/lib/capybara/version.rb +1 -1
- data/spec/capybara_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f9f0b3e74df6a318719eb9ad775a72fbe2f4243218bb74e159ce4cc1a08e45
|
4
|
+
data.tar.gz: 72015cfed2914cb5d771bfcfe79c4efada7f19a1c5a3fe4c906404a99377b759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d13268dbcd015ba6f4f38dc6a5d2dbb624fd12b593dc78969eedd56f8a9ab621911818b2ddeaf9d82e13e2a0d40edae34b8de84e1c7fcb7f7c01e7442432ea
|
7
|
+
data.tar.gz: eae1ee3569660c0e34a92154f422d2f1a777767439f3602a9eb827d00b09cdfb60a78e8a91472edee5b78adbd727cccc1c5eaa37c31badd9e56063a7e5eb6c5b
|
data/History.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# Version 3.0.1
|
2
|
+
Release date: 2018-04-06
|
3
|
+
|
4
|
+
### Changed
|
5
|
+
|
6
|
+
* Restored ability for `Capybara.server=` to accept a proc which was accidentally removed in 3.0.0
|
7
|
+
|
1
8
|
# Version 3.0.0
|
2
9
|
Release date: 2018-04-05
|
3
10
|
|
@@ -16,7 +23,7 @@ Release date: 2018-03-23
|
|
16
23
|
|
17
24
|
### Changed
|
18
25
|
|
19
|
-
*
|
26
|
+
* Visibile text whitespace is no longer fully normalized in favor of being more in line with the WebDriver spec for visible text
|
20
27
|
* Drivers are expected to close extra windows when resetting the session
|
21
28
|
* Selenium driver supports Date/Time when filling in date/time/datetime-local inputs
|
22
29
|
* `current_url` returns the url for the top level browsing context
|
data/lib/capybara.rb
CHANGED
@@ -438,7 +438,11 @@ Capybara.register_server :webrick do |app, port, host, **options|
|
|
438
438
|
end
|
439
439
|
|
440
440
|
Capybara.register_server :puma do |app, port, host, **options|
|
441
|
-
|
441
|
+
begin
|
442
|
+
require 'rack/handler/puma'
|
443
|
+
rescue LoadError
|
444
|
+
raise LoadError, "Capybara is unable to load `puma` for its server, please add `puma` to your project or specify a different server via something like `Capybara.server = :webrick`."
|
445
|
+
end
|
442
446
|
# If we just run the Puma Rack handler it installs signal handlers which prevent us from being able to interrupt tests.
|
443
447
|
# Therefore construct and run the Server instance ourselves.
|
444
448
|
# Rack::Handler::Puma.run(app, { Host: host, Port: port, Threads: "0:4", workers: 0, daemon: false }.merge(options))
|
data/lib/capybara/config.rb
CHANGED
@@ -53,7 +53,9 @@ module Capybara
|
|
53
53
|
#
|
54
54
|
def server=(name)
|
55
55
|
name, options = *name if name.is_a? Array
|
56
|
-
@server = if
|
56
|
+
@server = if name.respond_to? :call
|
57
|
+
name
|
58
|
+
elsif options
|
57
59
|
proc { |app, port, host| Capybara.servers[name.to_sym].call(app, port, host, options) }
|
58
60
|
else
|
59
61
|
Capybara.servers[name.to_sym]
|
@@ -622,10 +622,6 @@ module Capybara
|
|
622
622
|
# Checks if the page or current node has the given text content,
|
623
623
|
# ignoring any HTML tags.
|
624
624
|
#
|
625
|
-
# Whitespaces are normalized in both node's text and passed text parameter.
|
626
|
-
# Note that whitespace isn't normalized in passed regexp as normalizing whitespace
|
627
|
-
# in regexp isn't easy and doesn't seem to be worth it.
|
628
|
-
#
|
629
625
|
# By default it will check if the text occurs at least once,
|
630
626
|
# but a different number can be specified.
|
631
627
|
#
|
data/lib/capybara/version.rb
CHANGED
data/spec/capybara_spec.rb
CHANGED
@@ -64,6 +64,18 @@ RSpec.describe Capybara do
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
describe "server=" do
|
68
|
+
after do
|
69
|
+
Capybara.server = :default
|
70
|
+
end
|
71
|
+
|
72
|
+
it "accepts a proc" do
|
73
|
+
server = ->(_app, _port) {}
|
74
|
+
Capybara.server = server
|
75
|
+
expect(Capybara.server).to eq server
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
67
79
|
describe 'app_host' do
|
68
80
|
after do
|
69
81
|
Capybara.app_host = nil
|
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: 3.0.
|
4
|
+
version: 3.0.1
|
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: 2018-04-
|
13
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|