From f8d957a09e0fb9d741a5c396438524488bb9adf4 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 11 Jan 2022 13:54:10 -0800 Subject: [PATCH] Support ActiveSupport v7 https://github.com/excon/excon/runs/4781841441 was failing: ``` Excon instrumentation basic notification - returns ["excon.request", "excon.response"] uninitialized constant ActiveSupport::IsolatedExecutionState (NameError) /home/runner/work/excon/excon/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.1/lib/active_support/notifications.rb:268:in `registry' /home/runner/work/excon/excon/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.1/lib/active_support/notifications.rb:263:in `instrumenter' /home/runner/work/excon/excon/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.1/lib/active_support/notifications.rb:206:in `instrument' ``` As https://github.com/rails/rails/pull/43852 explains, we can just `require active_support` and this will auto-load the correct constants. --- tests/middlewares/instrumentation_tests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/middlewares/instrumentation_tests.rb b/tests/middlewares/instrumentation_tests.rb index 86f3dc28..8d807e5a 100644 --- a/tests/middlewares/instrumentation_tests.rb +++ b/tests/middlewares/instrumentation_tests.rb @@ -1,4 +1,4 @@ -require 'active_support/notifications' +require 'active_support' require 'securerandom' class SimpleInstrumentor