1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Also check config.allow_concurrency to match Rails 4.2 behavior for Rack::Lock

This commit is contained in:
Thomas Walpole 2014-09-21 21:42:31 -07:00
parent 1626ddbd73
commit 11da192d7f
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
# Version 2.4.3
Relase date: 2014-09-21
###Fixed
* Update concurrency prevention to match Rails 4.2 behavior
# Version 2.4.2
Release date: 2014-09-20

View file

@ -5,7 +5,7 @@ Capybara.app = Rack::Builder.new do
# Work around an issue where rails allows concurrency in test mode even though eager_load
# is false which can cause an issue with constant loading
if Gem::Version.new(Rails.version) >= Gem::Version.new("4.0")
use Rack::Lock unless Rails.application.config.eager_load || Rails.application.middleware.include?(Rack::Lock)
use Rack::Lock unless Rails.application.config.allow_concurrency || Rails.application.config.eager_load || Rails.application.middleware.include?(Rack::Lock)
end
map "/" do