From 518230e6cf8b7097e4072485e30094763f23523e Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Wed, 2 Sep 2020 15:10:42 +0200 Subject: [PATCH] Maintenance: Disable VCR for local IP connects e.g. Selenium server in Windows development environment. --- spec/support/vcr.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/vcr.rb b/spec/support/vcr.rb index 975697ddd..f00885449 100644 --- a/spec/support/vcr.rb +++ b/spec/support/vcr.rb @@ -6,8 +6,8 @@ VCR.configure do |config| config.ignore_request do |request| uri = URI(request.uri) - ['zammad.com', 'google.com', 'elasticsearch', 'selenium'].any? do |site| - uri.host.include?(site) + ['zammad.com', 'google.com', 'elasticsearch', 'selenium', /^192\.168\.\d+\.\d+$/].any? do |site| + site.is_a?(Regexp) ? uri.host.match?(site) : uri.host.include?(site) end end