From 25469d9622947562a6a70f179a572b4ac8ba438f Mon Sep 17 00:00:00 2001 From: Joshua Young Date: Tue, 30 Apr 2024 13:24:01 +1000 Subject: [PATCH] Address `ActiveSupport::ProxyObject` deprecation on Rails 7.2.0.alpha --- lib/delayed/compatibility.rb | 12 ------------ lib/delayed/message_sending.rb | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/delayed/compatibility.rb b/lib/delayed/compatibility.rb index 72778f9cc..0ef949b7a 100644 --- a/lib/delayed/compatibility.rb +++ b/lib/delayed/compatibility.rb @@ -3,25 +3,13 @@ module Delayed module Compatibility if ActiveSupport::VERSION::MAJOR >= 4 - require 'active_support/proxy_object' - def self.executable_prefix 'bin' end - - def self.proxy_object_class - ActiveSupport::ProxyObject - end else - require 'active_support/basic_object' - def self.executable_prefix 'script' end - - def self.proxy_object_class - ActiveSupport::BasicObject - end end end end diff --git a/lib/delayed/message_sending.rb b/lib/delayed/message_sending.rb index a2808fd39..960b73d0d 100644 --- a/lib/delayed/message_sending.rb +++ b/lib/delayed/message_sending.rb @@ -1,5 +1,5 @@ module Delayed - class DelayProxy < Delayed::Compatibility.proxy_object_class + class DelayProxy < BasicObject def initialize(payload_class, target, options) @payload_class = payload_class @target = target