capybara 3.32.1 → 3.32.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.
- checksums.yaml +4 -4
- data/History.md +9 -0
- data/lib/capybara/registrations/servers.rb +1 -1
- data/lib/capybara/result.rb +4 -1
- data/lib/capybara/rspec/matchers/have_text.rb +1 -1
- data/lib/capybara/version.rb +1 -1
- data/spec/result_spec.rb +1 -17
- data/spec/rspec/shared_spec_matchers.rb +2 -2
- 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: 410e79ae955fb505f242247fae85f0b738307e685c2e62cc7a4fda936f5be86a
|
4
|
+
data.tar.gz: d815d9d84f898e72aa08003e3370c673e169e08a794df6804459c18a65d7d367
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60471fefa8d5bc99eddaa19afcd35ff8b382f7fbede21ffac5d402b89ca54d89b9252ebffde8eb0565d820d3d1d0136d943912dd9da18f9366e3b75660870e4e
|
7
|
+
data.tar.gz: 3fb1b539d4a128e6e2ba3f7fcd5e9daff0f64c60691eef1a2c69c166668c3ad28fbd3bbd5414162e73f86fc51e608f18065075b0956f5ea923c572d32d585052
|
data/History.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# Version 3.32.2
|
2
|
+
Release date: 2020-05-16
|
3
|
+
|
4
|
+
### Fixed
|
5
|
+
|
6
|
+
* Don't use lazy enumerator with JRuby due to leaking threads
|
7
|
+
* Ruby 2,7 deprecation warning when registering Webrick [Jon Zeppieri]
|
8
|
+
* `have_text` description [Juan Pablo Rinaldi]
|
9
|
+
|
1
10
|
# Version 3.32.1
|
2
11
|
Release date: 2020-04-05
|
3
12
|
|
@@ -7,7 +7,7 @@ end
|
|
7
7
|
Capybara.register_server :webrick do |app, port, host, **options|
|
8
8
|
require 'rack/handler/webrick'
|
9
9
|
options = { Host: host, Port: port, AccessLog: [], Logger: WEBrick::Log.new(nil, 0) }.merge(options)
|
10
|
-
Rack::Handler::WEBrick.run(app, options)
|
10
|
+
Rack::Handler::WEBrick.run(app, **options)
|
11
11
|
end
|
12
12
|
|
13
13
|
Capybara.register_server :puma do |app, port, host, **options|
|
data/lib/capybara/result.rb
CHANGED
@@ -171,10 +171,13 @@ module Capybara
|
|
171
171
|
@rest ||= @elements - full_results
|
172
172
|
end
|
173
173
|
|
174
|
-
if
|
174
|
+
if RUBY_PLATFORM == 'java'
|
175
175
|
# JRuby < 9.2.8.0 has an issue with lazy enumerators which
|
176
176
|
# causes a concurrency issue with network requests here
|
177
177
|
# https://github.com/jruby/jruby/issues/4212
|
178
|
+
# while JRuby >= 9.2.8.0 leaks threads when using lazy enumerators
|
179
|
+
# https://github.com/teamcapybara/capybara/issues/2349
|
180
|
+
# so disable the use and JRuby users will need to pay a performance penalty
|
178
181
|
def lazy_select_elements(&block)
|
179
182
|
@elements.select(&block).to_enum # non-lazy evaluation
|
180
183
|
end
|
data/lib/capybara/version.rb
CHANGED
data/spec/result_spec.rb
CHANGED
@@ -190,23 +190,7 @@ RSpec.describe Capybara::Result do
|
|
190
190
|
end
|
191
191
|
end
|
192
192
|
|
193
|
-
context 'lazy select' do
|
194
|
-
it 'is compatible' do
|
195
|
-
# This test will let us know when JRuby fixes lazy select so we can re-enable it in Result
|
196
|
-
pending 'JRuby < 9.2.8.0 has an issue with lazy enumberator evaluation' if jruby_lazy_enumerator_workaround?
|
197
|
-
eval_count = 0
|
198
|
-
enum = %w[Text1 Text2 Text3].lazy.select do
|
199
|
-
eval_count += 1
|
200
|
-
true
|
201
|
-
end
|
202
|
-
expect(eval_count).to eq 0
|
203
|
-
enum.next
|
204
|
-
sleep 1
|
205
|
-
expect(eval_count).to eq 1
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
193
|
def jruby_lazy_enumerator_workaround?
|
210
|
-
|
194
|
+
RUBY_PLATFORM == 'java'
|
211
195
|
end
|
212
196
|
end
|
@@ -265,7 +265,7 @@ RSpec.shared_examples Capybara::RSpecMatchers do |session, _mode|
|
|
265
265
|
|
266
266
|
describe 'have_content matcher' do
|
267
267
|
it 'gives proper description' do
|
268
|
-
expect(have_content('Text').description).to eq('text "Text"')
|
268
|
+
expect(have_content('Text').description).to eq('have text "Text"')
|
269
269
|
end
|
270
270
|
|
271
271
|
context 'on a string' do
|
@@ -357,7 +357,7 @@ RSpec.shared_examples Capybara::RSpecMatchers do |session, _mode|
|
|
357
357
|
|
358
358
|
describe 'have_text matcher' do
|
359
359
|
it 'gives proper description' do
|
360
|
-
expect(have_text('Text').description).to eq('text "Text"')
|
360
|
+
expect(have_text('Text').description).to eq('have text "Text"')
|
361
361
|
end
|
362
362
|
|
363
363
|
context 'on a string' do
|
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.32.
|
4
|
+
version: 3.32.2
|
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: 2020-
|
13
|
+
date: 2020-05-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|