Skip to content

Commit 7c0a076

Browse files
committed
Fix linting errors manually
These were not solved by standardrb --fix.
1 parent b9e4019 commit 7c0a076

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

app/models/solidus_braintree/gateway.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,7 @@ def convert_preference_value(value, type, preference_encryptor = nil)
334334
end
335335

336336
def transaction_options(source, options, submit_for_settlement: false)
337-
params = options.select do |key, _|
338-
ALLOWED_BRAINTREE_OPTIONS.include?(key)
339-
end
337+
params = options.slice(*ALLOWED_BRAINTREE_OPTIONS)
340338

341339
params[:channel] = "Solidus"
342340
params[:options] = {store_in_vault_on_success: store_in_vault}
@@ -345,15 +343,15 @@ def transaction_options(source, options, submit_for_settlement: false)
345343
params[:options][:submit_for_settlement] = true
346344
end
347345

348-
if paypal_email = paypal_payee_email_for(source, options)
346+
if (paypal_email = paypal_payee_email_for(source, options))
349347
params[:options][:paypal] = {payee_email: paypal_email}
350348
end
351349

352350
if source.venmo? && venmo_business_profile_id
353351
params[:options][:venmo] = {profile_id: venmo_business_profile_id}
354352
end
355353

356-
if merchant_account_id = merchant_account_for(source, options)
354+
if (merchant_account_id = merchant_account_for(source, options))
357355
params[:merchant_account_id] = merchant_account_id
358356
end
359357

spec/support/solidus_braintree/vcr.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
uri_match_pattern =
2727
%r{\Ahttps://api\.sandbox\.braintreegateway\.com/merchants/\w+(/.*)\z}
2828

29-
if match = uri.match(uri_match_pattern)
29+
if (match = uri.match(uri_match_pattern))
3030
match.captures.first
3131
end
3232
end

0 commit comments

Comments
 (0)