From a670e591fc5dc03c705ee1e5f5d5ad059beae05e Mon Sep 17 00:00:00 2001 From: "Paul B." Date: Thu, 19 Feb 2026 16:57:28 +0100 Subject: [PATCH] cleanup: remove deprecation warning (from rails 8.1) This commit removes the ActiveSupport::Configurable usage which is being deprecated in Rails (it will be removed in rails 8.2). The deprecation warning is being fired in my project using the gem :) ``` DEPRECATION WARNING: ActiveSupport::Configurable is deprecated without replacement, and will be removed in Rails 8.2. ``` --- lib/openapi_contracts.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/openapi_contracts.rb b/lib/openapi_contracts.rb index 282380f..3ca7b12 100644 --- a/lib/openapi_contracts.rb +++ b/lib/openapi_contracts.rb @@ -21,12 +21,10 @@ module OpenapiContracts autoload :PayloadParser, 'openapi_contracts/payload_parser' autoload :Validators, 'openapi_contracts/validators' - include ActiveSupport::Configurable + mattr_accessor :collect_coverage, default: false Env = Struct.new(:operation, :options, :request, :response, keyword_init: true) - config_accessor(:collect_coverage) { false } - module_function def match(doc, response, options = {})