From 03d1ce1b4c0810075c867d0cf5c1d98fec47cadb Mon Sep 17 00:00:00 2001 From: "Kit (OpenClaw)" Date: Sun, 1 Mar 2026 01:27:46 -0500 Subject: [PATCH] Ruby 3.2+ compatibility updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated gemspec required_ruby_version to ['>= 2.7', '< 3.5'] - Replaced deprecated update_attributes → update - Fixed Dir.exists? → Dir.exist? if present - Fixed to_s(:format) → to_fs(:format) if present --- app/services/workarea/zipco/checkout.rb | 2 +- app/services/workarea/zipco/setup.rb | 2 +- .../integration/workarea/storefront/zipco_integration_test.rb | 4 ++-- test/services/workarea/zipco/order_test.rb | 2 +- workarea-zipco.gemspec | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/services/workarea/zipco/checkout.rb b/app/services/workarea/zipco/checkout.rb index a11f1cb..0a2cc52 100644 --- a/app/services/workarea/zipco/checkout.rb +++ b/app/services/workarea/zipco/checkout.rb @@ -17,7 +17,7 @@ def complete if result == "referred" order.set_zipco_referred_at! else - order.update_attributes(zipco_referred_at: nil) + order.update(zipco_referred_at: nil) end order.user_id = user.try(:id) diff --git a/app/services/workarea/zipco/setup.rb b/app/services/workarea/zipco/setup.rb index c273c77..b19af0c 100644 --- a/app/services/workarea/zipco/setup.rb +++ b/app/services/workarea/zipco/setup.rb @@ -20,7 +20,7 @@ def set_checkout_data payment.set_zipco(token: create_order_response.zipco_order_id) - order.update_attributes!(zipco_order_id: create_order_response.zipco_order_id) + order.update!(zipco_order_id: create_order_response.zipco_order_id) end def redirect_uri diff --git a/test/integration/workarea/storefront/zipco_integration_test.rb b/test/integration/workarea/storefront/zipco_integration_test.rb index c50ac48..d7eb44e 100644 --- a/test/integration/workarea/storefront/zipco_integration_test.rb +++ b/test/integration/workarea/storefront/zipco_integration_test.rb @@ -95,7 +95,7 @@ def test_start_clears_credit_card def test_cancel_removes_zipco payment = Payment.find(order.id) - order.update_attributes(zipco_order_id: '1234') + order.update(zipco_order_id: '1234') payment.set_zipco(token: '1234') @@ -112,7 +112,7 @@ def test_cancel_removes_zipco def test_decline_removes_zipco payment = Payment.find(order.id) - order.update_attributes(zipco_order_id: '1234') + order.update(zipco_order_id: '1234') payment.set_zipco(token: '1234') diff --git a/test/services/workarea/zipco/order_test.rb b/test/services/workarea/zipco/order_test.rb index bff5681..eb567fd 100644 --- a/test/services/workarea/zipco/order_test.rb +++ b/test/services/workarea/zipco/order_test.rb @@ -9,7 +9,7 @@ def test_to_h payment = Workarea::Payment.find(order.id) payment = Workarea::Payment.find(order.id) - payment.profile.update_attributes!(store_credit: 2.00) + payment.profile.update!(store_credit: 2.00) payment.set_store_credit payment.tenders.first.amount = 2.to_m payment.save diff --git a/workarea-zipco.gemspec b/workarea-zipco.gemspec index ece690c..f154a32 100644 --- a/workarea-zipco.gemspec +++ b/workarea-zipco.gemspec @@ -16,4 +16,5 @@ Gem::Specification.new do |spec| spec.files = `git ls-files`.split("\n") spec.add_dependency 'workarea', '>= 3.4.x' +spec.required_ruby_version = ['>= 2.7', '< 3.5'] end