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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e457be34204bbe3a7127ca305fdc2f60be46ec3e92249d27ad351f6bd4473f67
4
- data.tar.gz: 9549c4cdc7c22c4c6540c9177aed22bf57e5a5301e97a6e0f407a3a3ef6b0ac9
3
+ metadata.gz: 410e79ae955fb505f242247fae85f0b738307e685c2e62cc7a4fda936f5be86a
4
+ data.tar.gz: d815d9d84f898e72aa08003e3370c673e169e08a794df6804459c18a65d7d367
5
5
  SHA512:
6
- metadata.gz: e6f30d47408a541fdc06b38e53f4a5f9d5cbaad05c1b2d450ea5e1edd101afb7188c6718727beaf232ecf94d595570f92dbe0f1b29d1769c94bf557b8542b335
7
- data.tar.gz: 4cff5a7b19910ff7a136a8e3976194d381aef6e49715480a1b70ea6123412ac7020520eca499a7b717c6c05d578a3216763400e65e2afb7f7f3a1e7b825c3721
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|
@@ -171,10 +171,13 @@ module Capybara
171
171
  @rest ||= @elements - full_results
172
172
  end
173
173
 
174
- if (RUBY_PLATFORM == 'java') && (Gem::Version.new(JRUBY_VERSION) < Gem::Version.new('9.2.8.0'))
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
@@ -15,7 +15,7 @@ module Capybara
15
15
  end
16
16
 
17
17
  def description
18
- "text #{format(text)}"
18
+ "have text #{format(text)}"
19
19
  end
20
20
 
21
21
  def format(content)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.32.1'
4
+ VERSION = '3.32.2'
5
5
  end
@@ -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
- (RUBY_PLATFORM == 'java') && (Gem::Version.new(JRUBY_VERSION) < Gem::Version.new('9.2.8.0'))
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.1
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-04-05 00:00:00.000000000 Z
13
+ date: 2020-05-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable