From 6d9a344186092b430b2bbc185d25424fbb8b9205 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Sat, 20 Dec 2025 12:55:27 -0300 Subject: [PATCH] chore: fix linting --- .rubocop.yml | 2 ++ app/controllers/api/v2/accounts/year_in_reviews_controller.rb | 2 +- enterprise/app/services/voice/provider/twilio/adapter.rb | 2 +- spec/enterprise/services/captain/copilot/chat_service_spec.rb | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index de4dfc14a..246f503bb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -355,4 +355,6 @@ Rails/SaveBang: AllowedReceivers: - Stripe::Subscription - Stripe::Customer + - Stripe::Invoice + - Stripe::InvoiceItem - FactoryBot diff --git a/app/controllers/api/v2/accounts/year_in_reviews_controller.rb b/app/controllers/api/v2/accounts/year_in_reviews_controller.rb index 7946614bb..d17b5dc13 100644 --- a/app/controllers/api/v2/accounts/year_in_reviews_controller.rb +++ b/app/controllers/api/v2/accounts/year_in_reviews_controller.rb @@ -18,7 +18,7 @@ class Api::V2::Accounts::YearInReviewsController < Api::V1::Accounts::BaseContro ui_settings = Current.user.ui_settings || {} ui_settings[cache_key] = data - Current.user.update(ui_settings: ui_settings) + Current.user.update!(ui_settings: ui_settings) render json: data end diff --git a/enterprise/app/services/voice/provider/twilio/adapter.rb b/enterprise/app/services/voice/provider/twilio/adapter.rb index 061143f03..d1c44f0ae 100644 --- a/enterprise/app/services/voice/provider/twilio/adapter.rb +++ b/enterprise/app/services/voice/provider/twilio/adapter.rb @@ -4,7 +4,7 @@ class Voice::Provider::Twilio::Adapter end def initiate_call(to:, conference_sid: nil, agent_id: nil) - call = twilio_client.calls.create(**call_params(to)) + call = twilio_client.calls.create(**call_params(to)) # rubocop:disable Rails/SaveBang { provider: 'twilio', diff --git a/spec/enterprise/services/captain/copilot/chat_service_spec.rb b/spec/enterprise/services/captain/copilot/chat_service_spec.rb index 4903fb6a5..3d2f7667d 100644 --- a/spec/enterprise/services/captain/copilot/chat_service_spec.rb +++ b/spec/enterprise/services/captain/copilot/chat_service_spec.rb @@ -26,7 +26,7 @@ RSpec.describe Captain::Copilot::ChatService do end before do - InstallationConfig.find_or_create_by(name: 'CAPTAIN_OPEN_AI_API_KEY') do |c| + InstallationConfig.find_or_create_by!(name: 'CAPTAIN_OPEN_AI_API_KEY') do |c| c.value = 'test-key' end