From 81c8fae35ac8501b719ce20c2253e76df64ec4ff Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 11 Jan 2022 16:46:30 +0100 Subject: [PATCH] fix: Require active_support before use This has changed in later releases of ActiveSupport, see this Issue: https://github.com/rails/rails/issues/43851 --- lib/lograge.rb | 1 + lib/lograge/log_subscribers/base.rb | 1 + lib/lograge/ordered_options.rb | 1 + lib/lograge/rails_ext/rack/logger.rb | 1 + spec/log_subscribers/action_cable_spec.rb | 1 + spec/log_subscribers/action_controller_spec.rb | 1 + spec/lograge_spec.rb | 1 + 7 files changed, 7 insertions(+) diff --git a/lib/lograge.rb b/lib/lograge.rb index 64cc7a12..eda6c302 100644 --- a/lib/lograge.rb +++ b/lib/lograge.rb @@ -16,6 +16,7 @@ require 'lograge/log_subscribers/action_controller' require 'lograge/silent_logger' require 'lograge/ordered_options' +require 'active_support' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/string/inflections' diff --git a/lib/lograge/log_subscribers/base.rb b/lib/lograge/log_subscribers/base.rb index adbc322a..b9cbb838 100644 --- a/lib/lograge/log_subscribers/base.rb +++ b/lib/lograge/log_subscribers/base.rb @@ -2,6 +2,7 @@ require 'json' require 'action_pack' +require 'active_support' require 'active_support/core_ext/class/attribute' require 'active_support/log_subscriber' require 'request_store' diff --git a/lib/lograge/ordered_options.rb b/lib/lograge/ordered_options.rb index e15bb3be..82670015 100644 --- a/lib/lograge/ordered_options.rb +++ b/lib/lograge/ordered_options.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require 'active_support' require 'active_support/ordered_options' module Lograge diff --git a/lib/lograge/rails_ext/rack/logger.rb b/lib/lograge/rails_ext/rack/logger.rb index 434ba677..38c937da 100644 --- a/lib/lograge/rails_ext/rack/logger.rb +++ b/lib/lograge/rails_ext/rack/logger.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require 'active_support' require 'active_support/concern' require 'rails/rack/logger' diff --git a/spec/log_subscribers/action_cable_spec.rb b/spec/log_subscribers/action_cable_spec.rb index 06081df0..c1a6c631 100644 --- a/spec/log_subscribers/action_cable_spec.rb +++ b/spec/log_subscribers/action_cable_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'lograge/log_subscribers/action_controller' +require 'active_support' require 'active_support/notifications' require 'active_support/core_ext/string' require 'logger' diff --git a/spec/log_subscribers/action_controller_spec.rb b/spec/log_subscribers/action_controller_spec.rb index d47f22e6..e9a353aa 100644 --- a/spec/log_subscribers/action_controller_spec.rb +++ b/spec/log_subscribers/action_controller_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'lograge/log_subscribers/action_controller' +require 'active_support' require 'active_support/notifications' require 'active_support/core_ext/string' require 'logger' diff --git a/spec/lograge_spec.rb b/spec/lograge_spec.rb index 27ddf003..ebee28d6 100644 --- a/spec/lograge_spec.rb +++ b/spec/lograge_spec.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require 'active_support' require 'active_support/notifications' require 'active_support/core_ext/string' require 'active_support/deprecation'