From 4c9f4f29a01a314e280ca57c86830fbfd222e136 Mon Sep 17 00:00:00 2001 From: Dmitry Vorotilin Date: Wed, 21 Feb 2024 16:24:19 +0300 Subject: [PATCH] fix: CUPRITE_DEBUG should be checked asap --- lib/capybara/cuprite.rb | 2 ++ lib/capybara/cuprite/driver.rb | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capybara/cuprite.rb b/lib/capybara/cuprite.rb index aa1f23d..9b868d3 100644 --- a/lib/capybara/cuprite.rb +++ b/lib/capybara/cuprite.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +ENV["FERRUM_DEBUG"] = "true" if ENV["CUPRITE_DEBUG"] + require "ferrum" require "capybara" require "capybara/cuprite/driver" diff --git a/lib/capybara/cuprite/driver.rb b/lib/capybara/cuprite/driver.rb index 2dfa59f..1338734 100644 --- a/lib/capybara/cuprite/driver.rb +++ b/lib/capybara/cuprite/driver.rb @@ -41,8 +41,6 @@ def initialize(app, options = {}) @options[:browser_options].merge!("remote-allow-origins": "*") end - ENV["FERRUM_DEBUG"] = "true" if ENV["CUPRITE_DEBUG"] - super() end