From 9e0ee5662cd9bf06921e51cd527e064746b82321 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Mon, 27 Mar 2023 18:49:37 +0200 Subject: [PATCH 1/2] Silence rubocop on multiline ternary operators Although no one should write a 10-line ternary, for simple cases is more than ok. Co-Authored-By: Rainer Dema --- .rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index a47c2538..396f746a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -46,3 +46,6 @@ Layout/LineLength: RSpec/FilePath: Exclude: - spec/requests/solidus_stripe/webhooks_controller/**/* + +Style/MultilineTernaryOperator: + Enabled: false From eec0adb1f9c90a90a88c360ef04118f85b2a3cf2 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Mon, 27 Mar 2023 18:48:32 +0200 Subject: [PATCH 2/2] Remove outdated comment on the intent's capture method Co-Authored-By: Rainer Dema --- app/models/solidus_stripe/payment_intent.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/solidus_stripe/payment_intent.rb b/app/models/solidus_stripe/payment_intent.rb index d31077ab..37c9e6f0 100644 --- a/app/models/solidus_stripe/payment_intent.rb +++ b/app/models/solidus_stripe/payment_intent.rb @@ -52,9 +52,6 @@ def create_stripe_intent(stripe_intent_options) order.currency, ), currency: order.currency, - - # The capture method should stay manual in order to - # avoid capturing the money before the order is completed. capture_method: 'manual', setup_future_usage: payment_method.preferred_setup_future_usage.presence, customer: stripe_customer_id,