diff --git a/.erb-lint.yml b/.erb-lint.yml index 5ff53cbe0b2..4e5c2b2d772 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -15,6 +15,8 @@ linters: Enabled: false Lint/UselessAssignment: Enabled: false + Style/FrozenStringLiteralComment: + Enabled: false DeprecatedClasses: enabled: true rule_set: diff --git a/.rubocop.yml b/.rubocop.yml index b11c5735c6f..c04b6c3133b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1127,6 +1127,16 @@ Style/For: Enabled: true EnforcedStyle: each +Style/FrozenStringLiteralComment: + Enabled: true + Exclude: + - 'spec/**/*.rb' + - '.irbrc' + - '.rubocop.yml' + - 'Brewfile' + - 'Gemfile' + - 'Rakefile' + Style/GlobalVars: Enabled: true AllowedVariables: [] diff --git a/app/components/accordion_component.rb b/app/components/accordion_component.rb index edddbe113e5..1306c401883 100644 --- a/app/components/accordion_component.rb +++ b/app/components/accordion_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AccordionComponent < BaseComponent renders_one :header diff --git a/app/components/alert_component.rb b/app/components/alert_component.rb index 8cc5647531c..18d55b3782a 100644 --- a/app/components/alert_component.rb +++ b/app/components/alert_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AlertComponent < BaseComponent VALID_TYPES = %i[info success warning error emergency other].freeze diff --git a/app/components/alert_icon_component.rb b/app/components/alert_icon_component.rb index cf0e0b76127..74b146c6c83 100644 --- a/app/components/alert_icon_component.rb +++ b/app/components/alert_icon_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AlertIconComponent < BaseComponent ICON_SOURCE = { warning: 'status/warning.svg', diff --git a/app/components/badge_component.rb b/app/components/badge_component.rb index 2352a2fbf05..a076d174cef 100644 --- a/app/components/badge_component.rb +++ b/app/components/badge_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BadgeComponent < BaseComponent ICONS = %i[ unphishable diff --git a/app/components/barcode_component.rb b/app/components/barcode_component.rb index bd9f4cb9c70..9bba5b77368 100644 --- a/app/components/barcode_component.rb +++ b/app/components/barcode_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'barby' require 'barby/barcode/code_128' require 'barby/outputter/html_outputter' diff --git a/app/components/base_component.rb b/app/components/base_component.rb index 684e313b4b1..1c51428a28a 100644 --- a/app/components/base_component.rb +++ b/app/components/base_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BaseComponent < ViewComponent::Base def before_render render_assets unless rendered_assets? diff --git a/app/components/block_link_component.rb b/app/components/block_link_component.rb index 34f25d68654..7f709a346d0 100644 --- a/app/components/block_link_component.rb +++ b/app/components/block_link_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BlockLinkComponent < BaseComponent attr_reader :url, :action, :new_tab, :tag_options, :component diff --git a/app/components/button_component.rb b/app/components/button_component.rb index b2c60bd4a06..28615b1ac92 100644 --- a/app/components/button_component.rb +++ b/app/components/button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ButtonComponent < BaseComponent attr_reader :action, :icon, :big, :wide, :full_width, :outline, :unstyled, :danger, :tag_options diff --git a/app/components/captcha_submit_button_component.rb b/app/components/captcha_submit_button_component.rb index bc847f9b496..1ea00130bac 100644 --- a/app/components/captcha_submit_button_component.rb +++ b/app/components/captcha_submit_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CaptchaSubmitButtonComponent < BaseComponent attr_reader :form, :action, :tag_options diff --git a/app/components/click_observer_component.rb b/app/components/click_observer_component.rb index a9e4523be3a..d5230ee0d61 100644 --- a/app/components/click_observer_component.rb +++ b/app/components/click_observer_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ClickObserverComponent < BaseComponent attr_reader :event_name, :tag_options diff --git a/app/components/clipboard_button_component.rb b/app/components/clipboard_button_component.rb index 38719624eff..3f43c1e3a84 100644 --- a/app/components/clipboard_button_component.rb +++ b/app/components/clipboard_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ClipboardButtonComponent < BaseComponent attr_reader :clipboard_text, :button_options diff --git a/app/components/countdown_alert_component.rb b/app/components/countdown_alert_component.rb index 053accb7bc3..2b2fcb57652 100644 --- a/app/components/countdown_alert_component.rb +++ b/app/components/countdown_alert_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CountdownAlertComponent < BaseComponent attr_reader :show_at_remaining, :alert_options, :countdown_options, :redirect_url, :tag_options diff --git a/app/components/countdown_component.rb b/app/components/countdown_component.rb index eba0a808340..f56964b7a7c 100644 --- a/app/components/countdown_component.rb +++ b/app/components/countdown_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CountdownComponent < BaseComponent attr_reader :expiration, :update_interval, :start_immediately, :tag_options diff --git a/app/components/download_button_component.rb b/app/components/download_button_component.rb index 5b1d251ad2d..b3efc180306 100644 --- a/app/components/download_button_component.rb +++ b/app/components/download_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DownloadButtonComponent < ButtonComponent attr_reader :file_data, :file_name, :tag_options diff --git a/app/components/flash_component.rb b/app/components/flash_component.rb index 90f465741e4..a09e31605eb 100644 --- a/app/components/flash_component.rb +++ b/app/components/flash_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FlashComponent < BaseComponent VALID_FLASH_TYPES = %w[error info success warning other notice alert].freeze diff --git a/app/components/form_link_component.rb b/app/components/form_link_component.rb index a3ba4823fd3..4e335accfc9 100644 --- a/app/components/form_link_component.rb +++ b/app/components/form_link_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FormLinkComponent < BaseComponent attr_reader :tag_options diff --git a/app/components/icon_component.rb b/app/components/icon_component.rb index 4923b3ea551..31666e78090 100644 --- a/app/components/icon_component.rb +++ b/app/components/icon_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IconComponent < BaseComponent # See: https://github.com/uswds/uswds/tree/develop/src/img/usa-icons ICONS = %i[ diff --git a/app/components/icon_list_component.rb b/app/components/icon_list_component.rb index 72b468f86ee..bbf2aee678f 100644 --- a/app/components/icon_list_component.rb +++ b/app/components/icon_list_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IconListComponent < BaseComponent renders_many :items, ->(**kwargs, &block) do IconListItemComponent.new(icon:, color:, **kwargs, &block) diff --git a/app/components/javascript_required_component.rb b/app/components/javascript_required_component.rb index 4860e28e393..ea0842b88c4 100644 --- a/app/components/javascript_required_component.rb +++ b/app/components/javascript_required_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class JavascriptRequiredComponent < BaseComponent include LinkHelper diff --git a/app/components/login_button_component.rb b/app/components/login_button_component.rb index 7cd247c713f..25b3a7d42b1 100644 --- a/app/components/login_button_component.rb +++ b/app/components/login_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LoginButtonComponent < BaseComponent VALID_COLORS = ['primary', 'primary-darker', 'primary-lighter'].freeze diff --git a/app/components/manageable_authenticator_component.rb b/app/components/manageable_authenticator_component.rb index c6c73796844..412e33e11de 100644 --- a/app/components/manageable_authenticator_component.rb +++ b/app/components/manageable_authenticator_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ManageableAuthenticatorComponent < BaseComponent attr_reader :configuration, :user_session, diff --git a/app/components/memorable_date_component.rb b/app/components/memorable_date_component.rb index bb33200139c..e1cb3f98ace 100644 --- a/app/components/memorable_date_component.rb +++ b/app/components/memorable_date_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ## # Provides a component that accepts a date using the inputs specified # by USWDS here: https://designsystem.digital.gov/components/memorable-date/ diff --git a/app/components/modal_component.rb b/app/components/modal_component.rb index 4ba5028761b..98dac001ad3 100644 --- a/app/components/modal_component.rb +++ b/app/components/modal_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ModalComponent < BaseComponent attr_reader :tag_options diff --git a/app/components/one_time_code_input_component.rb b/app/components/one_time_code_input_component.rb index cc20e173609..a0bbbc2c57f 100644 --- a/app/components/one_time_code_input_component.rb +++ b/app/components/one_time_code_input_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OneTimeCodeInputComponent < BaseComponent attr_reader :form, :name, diff --git a/app/components/page_footer_component.rb b/app/components/page_footer_component.rb index 9cb063b3aaf..522691da39f 100644 --- a/app/components/page_footer_component.rb +++ b/app/components/page_footer_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PageFooterComponent < BaseComponent attr_reader :tag_options diff --git a/app/components/page_heading_component.rb b/app/components/page_heading_component.rb index 244244b6e85..268b946d818 100644 --- a/app/components/page_heading_component.rb +++ b/app/components/page_heading_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PageHeadingComponent < BaseComponent attr_reader :tag_options diff --git a/app/components/password_confirmation_component.rb b/app/components/password_confirmation_component.rb index afb2f909b01..9065e72449c 100644 --- a/app/components/password_confirmation_component.rb +++ b/app/components/password_confirmation_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordConfirmationComponent < BaseComponent attr_reader :form, :field_options, :forbidden_passwords, :tag_options diff --git a/app/components/password_strength_component.rb b/app/components/password_strength_component.rb index 6d431a49ba3..9b9cd76e566 100644 --- a/app/components/password_strength_component.rb +++ b/app/components/password_strength_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordStrengthComponent < BaseComponent attr_reader :input_id, :forbidden_passwords, :minimum_length, :tag_options diff --git a/app/components/password_toggle_component.rb b/app/components/password_toggle_component.rb index 82a1ad840b5..66501609376 100644 --- a/app/components/password_toggle_component.rb +++ b/app/components/password_toggle_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordToggleComponent < BaseComponent attr_reader :form, :field_options, :tag_options diff --git a/app/components/phone_input_component.rb b/app/components/phone_input_component.rb index 53a5781f5f0..2de195bfefb 100644 --- a/app/components/phone_input_component.rb +++ b/app/components/phone_input_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PhoneInputComponent < BaseComponent attr_reader :form, :confirmed_phone, diff --git a/app/components/print_button_component.rb b/app/components/print_button_component.rb index 63e53509a89..0a6cda14694 100644 --- a/app/components/print_button_component.rb +++ b/app/components/print_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PrintButtonComponent < ButtonComponent attr_reader :tag_options diff --git a/app/components/process_list_component.rb b/app/components/process_list_component.rb index ea3879c26d6..0bd4a61108a 100644 --- a/app/components/process_list_component.rb +++ b/app/components/process_list_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ProcessListComponent < BaseComponent renders_many :items, ->(**kwargs, &block) do ProcessListItemComponent.new(heading_level:, **kwargs, &block) diff --git a/app/components/spinner_button_component.rb b/app/components/spinner_button_component.rb index 7bd2e5100aa..64beda14bb8 100644 --- a/app/components/spinner_button_component.rb +++ b/app/components/spinner_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SpinnerButtonComponent < BaseComponent DEFAULT_LONG_WAIT_DURATION = 15.seconds diff --git a/app/components/status_page_component.rb b/app/components/status_page_component.rb index 6733a92978b..43f6e964244 100644 --- a/app/components/status_page_component.rb +++ b/app/components/status_page_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class StatusPageComponent < BaseComponent ICONS = { info: [:question], diff --git a/app/components/step_indicator_component.rb b/app/components/step_indicator_component.rb index 8ba75d30fbf..72e64dae105 100644 --- a/app/components/step_indicator_component.rb +++ b/app/components/step_indicator_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class StepIndicatorComponent < BaseComponent attr_reader :current_step, :locale_scope, :tag_options diff --git a/app/components/step_indicator_step_component.rb b/app/components/step_indicator_step_component.rb index 63584f461ec..44f789380fb 100644 --- a/app/components/step_indicator_step_component.rb +++ b/app/components/step_indicator_step_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class StepIndicatorStepComponent < BaseComponent attr_reader :title, :status, :tag_options diff --git a/app/components/submit_button_component.rb b/app/components/submit_button_component.rb index 862deb5e555..45971938fda 100644 --- a/app/components/submit_button_component.rb +++ b/app/components/submit_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SubmitButtonComponent < ButtonComponent def initialize(big: true, wide: true, **tag_options) super(big:, wide:, **tag_options) diff --git a/app/components/tab_navigation_component.rb b/app/components/tab_navigation_component.rb index 1569e451be5..633182bea89 100644 --- a/app/components/tab_navigation_component.rb +++ b/app/components/tab_navigation_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TabNavigationComponent < BaseComponent attr_reader :label, :routes, :tag_options diff --git a/app/components/tag_component.rb b/app/components/tag_component.rb index 8879506bf55..6209b96dc0a 100644 --- a/app/components/tag_component.rb +++ b/app/components/tag_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TagComponent < BaseComponent attr_reader :big, :informative, :tag_options alias_method :big?, :big diff --git a/app/components/time_component.rb b/app/components/time_component.rb index a18ee5ec32d..70b865c7134 100644 --- a/app/components/time_component.rb +++ b/app/components/time_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TimeComponent < BaseComponent attr_reader :time, :tag_options diff --git a/app/components/troubleshooting_options_component.rb b/app/components/troubleshooting_options_component.rb index e15e6c25ea8..2ac28a3976d 100644 --- a/app/components/troubleshooting_options_component.rb +++ b/app/components/troubleshooting_options_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TroubleshootingOptionsComponent < BaseComponent renders_one :header, 'TroubleshootingOptionsHeadingComponent' renders_many :options, BlockLinkComponent diff --git a/app/components/validated_field_component.rb b/app/components/validated_field_component.rb index d7e07afb34c..4e5c439332d 100644 --- a/app/components/validated_field_component.rb +++ b/app/components/validated_field_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ValidatedFieldComponent < BaseComponent attr_reader :form, :name, :tag_options, :input_type diff --git a/app/components/vendor_outage_alert_component.rb b/app/components/vendor_outage_alert_component.rb index 822ff103efa..1db761b165b 100644 --- a/app/components/vendor_outage_alert_component.rb +++ b/app/components/vendor_outage_alert_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class VendorOutageAlertComponent < BaseComponent include LinkHelper diff --git a/app/components/webauthn_input_component.rb b/app/components/webauthn_input_component.rb index 60d4dc22cf5..8c2b952b5f6 100644 --- a/app/components/webauthn_input_component.rb +++ b/app/components/webauthn_input_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WebauthnInputComponent < BaseComponent attr_reader :platform, :passkey_supported_only, :show_unsupported_passkey, :tag_options diff --git a/app/components/webauthn_verify_button_component.rb b/app/components/webauthn_verify_button_component.rb index a70d3c65a61..6b6a36a2652 100644 --- a/app/components/webauthn_verify_button_component.rb +++ b/app/components/webauthn_verify_button_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WebauthnVerifyButtonComponent < BaseComponent attr_reader :credentials, :user_challenge, :tag_options diff --git a/app/controllers/account_reset/cancel_controller.rb b/app/controllers/account_reset/cancel_controller.rb index 749d8069011..c5757406f9a 100644 --- a/app/controllers/account_reset/cancel_controller.rb +++ b/app/controllers/account_reset/cancel_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class CancelController < ApplicationController def show diff --git a/app/controllers/account_reset/confirm_delete_account_controller.rb b/app/controllers/account_reset/confirm_delete_account_controller.rb index 73f313257f5..c98b50247d7 100644 --- a/app/controllers/account_reset/confirm_delete_account_controller.rb +++ b/app/controllers/account_reset/confirm_delete_account_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class ConfirmDeleteAccountController < ApplicationController def show diff --git a/app/controllers/account_reset/confirm_request_controller.rb b/app/controllers/account_reset/confirm_request_controller.rb index fef469212f9..d6489aeec0f 100644 --- a/app/controllers/account_reset/confirm_request_controller.rb +++ b/app/controllers/account_reset/confirm_request_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class ConfirmRequestController < ApplicationController def show diff --git a/app/controllers/account_reset/delete_account_controller.rb b/app/controllers/account_reset/delete_account_controller.rb index 94e02f119ec..4377dc69bcd 100644 --- a/app/controllers/account_reset/delete_account_controller.rb +++ b/app/controllers/account_reset/delete_account_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class DeleteAccountController < ApplicationController def show diff --git a/app/controllers/account_reset/pending_controller.rb b/app/controllers/account_reset/pending_controller.rb index d1a713ea934..6bc19edcad2 100644 --- a/app/controllers/account_reset/pending_controller.rb +++ b/app/controllers/account_reset/pending_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class PendingController < ApplicationController include UserAuthenticator diff --git a/app/controllers/account_reset/recovery_options_controller.rb b/app/controllers/account_reset/recovery_options_controller.rb index ac8dcd1cac5..1a054e2dab0 100644 --- a/app/controllers/account_reset/recovery_options_controller.rb +++ b/app/controllers/account_reset/recovery_options_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class RecoveryOptionsController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/account_reset/request_controller.rb b/app/controllers/account_reset/request_controller.rb index 7f51aea7740..f279405ad81 100644 --- a/app/controllers/account_reset/request_controller.rb +++ b/app/controllers/account_reset/request_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class RequestController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/accounts/connected_accounts_controller.rb b/app/controllers/accounts/connected_accounts_controller.rb index 00cd3891257..1a01f884a7c 100644 --- a/app/controllers/accounts/connected_accounts_controller.rb +++ b/app/controllers/accounts/connected_accounts_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Accounts class ConnectedAccountsController < ApplicationController include RememberDeviceConcern diff --git a/app/controllers/accounts/history_controller.rb b/app/controllers/accounts/history_controller.rb index 8a2a4e941d6..3a25dddd783 100644 --- a/app/controllers/accounts/history_controller.rb +++ b/app/controllers/accounts/history_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Accounts class HistoryController < ApplicationController include RememberDeviceConcern diff --git a/app/controllers/accounts/personal_keys_controller.rb b/app/controllers/accounts/personal_keys_controller.rb index 08ccfb97899..9888fd45696 100644 --- a/app/controllers/accounts/personal_keys_controller.rb +++ b/app/controllers/accounts/personal_keys_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Accounts # Lets users generate a new personal key class PersonalKeysController < ApplicationController diff --git a/app/controllers/accounts/two_factor_authentication_controller.rb b/app/controllers/accounts/two_factor_authentication_controller.rb index 9b6122b9135..b97e273fa7e 100644 --- a/app/controllers/accounts/two_factor_authentication_controller.rb +++ b/app/controllers/accounts/two_factor_authentication_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Accounts class TwoFactorAuthenticationController < ApplicationController include RememberDeviceConcern diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 95b3f1acff9..53b68f4ab3b 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AccountsController < ApplicationController include RememberDeviceConcern before_action :confirm_two_factor_authenticated diff --git a/app/controllers/analytics_events_controller.rb b/app/controllers/analytics_events_controller.rb index 8071b132717..fb24dd24e01 100644 --- a/app/controllers/analytics_events_controller.rb +++ b/app/controllers/analytics_events_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Serve a static file from Rails so that the CORS middleware can add the correct headers class AnalyticsEventsController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/api/internal/sessions_controller.rb b/app/controllers/api/internal/sessions_controller.rb index eeccb3b2b82..68e7ce6fe91 100644 --- a/app/controllers/api/internal/sessions_controller.rb +++ b/app/controllers/api/internal/sessions_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Api module Internal class SessionsController < ApplicationController diff --git a/app/controllers/api/internal/two_factor_authentication/auth_app_controller.rb b/app/controllers/api/internal/two_factor_authentication/auth_app_controller.rb index f108c15b62a..e2c62d05f74 100644 --- a/app/controllers/api/internal/two_factor_authentication/auth_app_controller.rb +++ b/app/controllers/api/internal/two_factor_authentication/auth_app_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Api module Internal module TwoFactorAuthentication diff --git a/app/controllers/api/internal/two_factor_authentication/piv_cac_controller.rb b/app/controllers/api/internal/two_factor_authentication/piv_cac_controller.rb index ff59834032f..135cd3ab39e 100644 --- a/app/controllers/api/internal/two_factor_authentication/piv_cac_controller.rb +++ b/app/controllers/api/internal/two_factor_authentication/piv_cac_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Api module Internal module TwoFactorAuthentication diff --git a/app/controllers/api/internal/two_factor_authentication/webauthn_controller.rb b/app/controllers/api/internal/two_factor_authentication/webauthn_controller.rb index 77fa7e058e4..a73bb42d332 100644 --- a/app/controllers/api/internal/two_factor_authentication/webauthn_controller.rb +++ b/app/controllers/api/internal/two_factor_authentication/webauthn_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Api module Internal module TwoFactorAuthentication diff --git a/app/controllers/banned_user_controller.rb b/app/controllers/banned_user_controller.rb index 848b9f04010..ab819d2be24 100644 --- a/app/controllers/banned_user_controller.rb +++ b/app/controllers/banned_user_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BannedUserController < ApplicationController def show analytics.banned_user_visited diff --git a/app/controllers/component_preview_controller.rb b/app/controllers/component_preview_controller.rb index 5c188751bc9..389df20c842 100644 --- a/app/controllers/component_preview_controller.rb +++ b/app/controllers/component_preview_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ComponentPreviewController < ViewComponentsController if IdentityConfig.store.component_previews_enabled include ActionView::Helpers::AssetTagHelper diff --git a/app/controllers/concerns/account_reactivation_concern.rb b/app/controllers/concerns/account_reactivation_concern.rb index e751fe090db..ae73ded3431 100644 --- a/app/controllers/concerns/account_reactivation_concern.rb +++ b/app/controllers/concerns/account_reactivation_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReactivationConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/account_reset_concern.rb b/app/controllers/concerns/account_reset_concern.rb index 15457c8fb87..8dfaad21fa9 100644 --- a/app/controllers/concerns/account_reset_concern.rb +++ b/app/controllers/concerns/account_reset_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountResetConcern include ActionView::Helpers::DateHelper def account_reset_deletion_period_interval(user) diff --git a/app/controllers/concerns/api/csrf_token_concern.rb b/app/controllers/concerns/api/csrf_token_concern.rb index 593a24043f2..4ca735481ae 100644 --- a/app/controllers/concerns/api/csrf_token_concern.rb +++ b/app/controllers/concerns/api/csrf_token_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Api module CsrfTokenConcern def add_csrf_token_header_to_response diff --git a/app/controllers/concerns/authorization_count_concern.rb b/app/controllers/concerns/authorization_count_concern.rb index 79b2fcabfd0..8b04f6a8124 100644 --- a/app/controllers/concerns/authorization_count_concern.rb +++ b/app/controllers/concerns/authorization_count_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AuthorizationCountConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/backup_code_reminder_concern.rb b/app/controllers/concerns/backup_code_reminder_concern.rb index 146c2a2af74..8abbe2d568b 100644 --- a/app/controllers/concerns/backup_code_reminder_concern.rb +++ b/app/controllers/concerns/backup_code_reminder_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module BackupCodeReminderConcern def user_needs_backup_code_reminder? user_backup_codes_configured? && user_last_signed_in_more_than_5_months_ago? diff --git a/app/controllers/concerns/billable_event_trackable.rb b/app/controllers/concerns/billable_event_trackable.rb index 13ac781b6f5..5e137df39a3 100644 --- a/app/controllers/concerns/billable_event_trackable.rb +++ b/app/controllers/concerns/billable_event_trackable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module BillableEventTrackable def track_billing_events if current_session_has_been_billed? diff --git a/app/controllers/concerns/effective_user.rb b/app/controllers/concerns/effective_user.rb index 28dd9d51059..5d19f6c1d89 100644 --- a/app/controllers/concerns/effective_user.rb +++ b/app/controllers/concerns/effective_user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EffectiveUser def effective_user return current_user if effective_user_id == current_user&.id diff --git a/app/controllers/concerns/forced_reauthentication_concern.rb b/app/controllers/concerns/forced_reauthentication_concern.rb index 470d16de6c2..5fd8543e83c 100644 --- a/app/controllers/concerns/forced_reauthentication_concern.rb +++ b/app/controllers/concerns/forced_reauthentication_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This module defines an interface for storing when an issuer has forced re-authentication # for an active session. A request to force re-authentication that does not result # in the user needing to re-authenticate due to not being authenticated should be excluded. diff --git a/app/controllers/concerns/fraud_review_concern.rb b/app/controllers/concerns/fraud_review_concern.rb index 585efd4bc7f..a8294c567d8 100644 --- a/app/controllers/concerns/fraud_review_concern.rb +++ b/app/controllers/concerns/fraud_review_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FraudReviewConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/fully_authenticatable.rb b/app/controllers/concerns/fully_authenticatable.rb index baef9a3ebb9..7142607f3f3 100644 --- a/app/controllers/concerns/fully_authenticatable.rb +++ b/app/controllers/concerns/fully_authenticatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FullyAuthenticatable def delete_branded_experience(logout: false) ServiceProviderRequestProxy.delete(request_id) diff --git a/app/controllers/concerns/ial2_profile_concern.rb b/app/controllers/concerns/ial2_profile_concern.rb index aa5263d0e70..44951aefbe0 100644 --- a/app/controllers/concerns/ial2_profile_concern.rb +++ b/app/controllers/concerns/ial2_profile_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Ial2ProfileConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv/ab_test_analytics_concern.rb b/app/controllers/concerns/idv/ab_test_analytics_concern.rb index c7da1aba1dc..580cd6a0785 100644 --- a/app/controllers/concerns/idv/ab_test_analytics_concern.rb +++ b/app/controllers/concerns/idv/ab_test_analytics_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module AbTestAnalyticsConcern include AcuantConcern diff --git a/app/controllers/concerns/idv/acuant_concern.rb b/app/controllers/concerns/idv/acuant_concern.rb index 135c694787d..738c782303b 100644 --- a/app/controllers/concerns/idv/acuant_concern.rb +++ b/app/controllers/concerns/idv/acuant_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module AcuantConcern def acuant_sdk_ab_test_analytics_args diff --git a/app/controllers/concerns/idv/availability_concern.rb b/app/controllers/concerns/idv/availability_concern.rb index d9d70b4305d..7f815241899 100644 --- a/app/controllers/concerns/idv/availability_concern.rb +++ b/app/controllers/concerns/idv/availability_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module AvailabilityConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv/document_capture_concern.rb b/app/controllers/concerns/idv/document_capture_concern.rb index c09714d7eba..713fd03552b 100644 --- a/app/controllers/concerns/idv/document_capture_concern.rb +++ b/app/controllers/concerns/idv/document_capture_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module DocumentCaptureConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb b/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb index 6d5054110e1..50bc59f688a 100644 --- a/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb +++ b/app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module HybridMobile module HybridMobileConcern diff --git a/app/controllers/concerns/idv/phone_otp_rate_limitable.rb b/app/controllers/concerns/idv/phone_otp_rate_limitable.rb index 791ea9b4580..2c625373dae 100644 --- a/app/controllers/concerns/idv/phone_otp_rate_limitable.rb +++ b/app/controllers/concerns/idv/phone_otp_rate_limitable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module PhoneOtpRateLimitable extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv/phone_otp_sendable.rb b/app/controllers/concerns/idv/phone_otp_sendable.rb index 31c5804f667..0bbe3f0f549 100644 --- a/app/controllers/concerns/idv/phone_otp_sendable.rb +++ b/app/controllers/concerns/idv/phone_otp_sendable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module PhoneOtpSendable extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv/step_indicator_concern.rb b/app/controllers/concerns/idv/step_indicator_concern.rb index 0a37ce7947b..117591e7c65 100644 --- a/app/controllers/concerns/idv/step_indicator_concern.rb +++ b/app/controllers/concerns/idv/step_indicator_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module StepIndicatorConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv/verify_info_concern.rb b/app/controllers/concerns/idv/verify_info_concern.rb index 0e10a12aa91..67434e6752a 100644 --- a/app/controllers/concerns/idv/verify_info_concern.rb +++ b/app/controllers/concerns/idv/verify_info_concern.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module Idv module VerifyInfoConcern extend ActiveSupport::Concern - STEP_NAME = 'verify_info'.freeze + STEP_NAME = 'verify_info' def shared_update return if idv_session.verify_info_step_document_capture_session_uuid diff --git a/app/controllers/concerns/idv_session_concern.rb b/app/controllers/concerns/idv_session_concern.rb index 44dd58fd60b..9857ee11ae5 100644 --- a/app/controllers/concerns/idv_session_concern.rb +++ b/app/controllers/concerns/idv_session_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module IdvSessionConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/idv_step_concern.rb b/app/controllers/concerns/idv_step_concern.rb index 4eb382645aa..1344a5c8c3b 100644 --- a/app/controllers/concerns/idv_step_concern.rb +++ b/app/controllers/concerns/idv_step_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module IdvStepConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/mfa_setup_concern.rb b/app/controllers/concerns/mfa_setup_concern.rb index 6120cd979f9..0d5221f8cb4 100644 --- a/app/controllers/concerns/mfa_setup_concern.rb +++ b/app/controllers/concerns/mfa_setup_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module MfaSetupConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/personal_key_concern.rb b/app/controllers/concerns/personal_key_concern.rb index e4b553ccca7..29e1ac9e556 100644 --- a/app/controllers/concerns/personal_key_concern.rb +++ b/app/controllers/concerns/personal_key_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PersonalKeyConcern delegate :active_profile, to: :current_user diff --git a/app/controllers/concerns/piv_cac_concern.rb b/app/controllers/concerns/piv_cac_concern.rb index a305c4d42a9..65f6ddd53d0 100644 --- a/app/controllers/concerns/piv_cac_concern.rb +++ b/app/controllers/concerns/piv_cac_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PivCacConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/rate_limit_concern.rb b/app/controllers/concerns/rate_limit_concern.rb index cb46d134e7b..6bca04be9cc 100644 --- a/app/controllers/concerns/rate_limit_concern.rb +++ b/app/controllers/concerns/rate_limit_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RateLimitConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/reauthentication_required_concern.rb b/app/controllers/concerns/reauthentication_required_concern.rb index b236ab41815..270717b3540 100644 --- a/app/controllers/concerns/reauthentication_required_concern.rb +++ b/app/controllers/concerns/reauthentication_required_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ReauthenticationRequiredConcern include MfaSetupConcern include TwoFactorAuthenticatableMethods diff --git a/app/controllers/concerns/recaptcha_concern.rb b/app/controllers/concerns/recaptcha_concern.rb index 12e7aa6463e..ff5d58b07f0 100644 --- a/app/controllers/concerns/recaptcha_concern.rb +++ b/app/controllers/concerns/recaptcha_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RecaptchaConcern RECAPTCHA_SCRIPT_SRC = [ 'https://www.google.com/recaptcha/', diff --git a/app/controllers/concerns/remember_device_concern.rb b/app/controllers/concerns/remember_device_concern.rb index 62cf154c440..727ceb8ca7c 100644 --- a/app/controllers/concerns/remember_device_concern.rb +++ b/app/controllers/concerns/remember_device_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RememberDeviceConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/render_condition_concern.rb b/app/controllers/concerns/render_condition_concern.rb index e2d69c37690..577f5b3a5be 100644 --- a/app/controllers/concerns/render_condition_concern.rb +++ b/app/controllers/concerns/render_condition_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RenderConditionConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/saml_idp_auth_concern.rb b/app/controllers/concerns/saml_idp_auth_concern.rb index a4373d9ee05..a40172b71ce 100644 --- a/app/controllers/concerns/saml_idp_auth_concern.rb +++ b/app/controllers/concerns/saml_idp_auth_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SamlIdpAuthConcern extend ActiveSupport::Concern extend Forwardable diff --git a/app/controllers/concerns/saml_idp_logout_concern.rb b/app/controllers/concerns/saml_idp_logout_concern.rb index 0c4725d3669..20b8a6bd54c 100644 --- a/app/controllers/concerns/saml_idp_logout_concern.rb +++ b/app/controllers/concerns/saml_idp_logout_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'saml_idp/logout_response_builder' module SamlIdpLogoutConcern diff --git a/app/controllers/concerns/second_mfa_reminder_concern.rb b/app/controllers/concerns/second_mfa_reminder_concern.rb index 704829fe2f7..076cb03d0d0 100644 --- a/app/controllers/concerns/second_mfa_reminder_concern.rb +++ b/app/controllers/concerns/second_mfa_reminder_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SecondMfaReminderConcern def user_needs_second_mfa_reminder? return false if user_has_dismissed_second_mfa_reminder? || user_has_multiple_mfa_methods? diff --git a/app/controllers/concerns/secure_headers_concern.rb b/app/controllers/concerns/secure_headers_concern.rb index e0aecab4451..512027fe20d 100644 --- a/app/controllers/concerns/secure_headers_concern.rb +++ b/app/controllers/concerns/secure_headers_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SecureHeadersConcern extend ActiveSupport::Concern diff --git a/app/controllers/concerns/two_factor_authenticatable.rb b/app/controllers/concerns/two_factor_authenticatable.rb index dcd58755ef0..90b46dbe4e0 100644 --- a/app/controllers/concerns/two_factor_authenticatable.rb +++ b/app/controllers/concerns/two_factor_authenticatable.rb @@ -1,15 +1,17 @@ +# frozen_string_literal: true + module TwoFactorAuthenticatable extend ActiveSupport::Concern include TwoFactorAuthenticatableMethods - NEED_AUTHENTICATION = 'need_two_factor_authentication'.freeze + NEED_AUTHENTICATION = 'need_two_factor_authentication' OTP_LENGTH = 6 DIRECT_OTP_LENGTH = 6 PROOFING_DIRECT_OTP_LENGTH = 6 ALLOWED_OTP_DRIFT_SECONDS = 30 DIRECT_OTP_VALID_FOR_MINUTES = IdentityConfig.store.otp_valid_for DIRECT_OTP_VALID_FOR_SECONDS = DIRECT_OTP_VALID_FOR_MINUTES * 60 - REMEMBER_2FA_COOKIE = 'remember_tfa'.freeze + REMEMBER_2FA_COOKIE = 'remember_tfa' class AuthMethod BACKUP_CODE = 'backup_code' diff --git a/app/controllers/concerns/two_factor_authenticatable_methods.rb b/app/controllers/concerns/two_factor_authenticatable_methods.rb index b39536f9e65..c0b778b283a 100644 --- a/app/controllers/concerns/two_factor_authenticatable_methods.rb +++ b/app/controllers/concerns/two_factor_authenticatable_methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthenticatableMethods extend ActiveSupport::Concern include RememberDeviceConcern diff --git a/app/controllers/concerns/unconfirmed_user_concern.rb b/app/controllers/concerns/unconfirmed_user_concern.rb index fff0089c3d0..71175d710f8 100644 --- a/app/controllers/concerns/unconfirmed_user_concern.rb +++ b/app/controllers/concerns/unconfirmed_user_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UnconfirmedUserConcern include ActionView::Helpers::DateHelper diff --git a/app/controllers/concerns/user_authenticator.rb b/app/controllers/concerns/user_authenticator.rb index 9629ec2a4b9..efdd786e0a5 100644 --- a/app/controllers/concerns/user_authenticator.rb +++ b/app/controllers/concerns/user_authenticator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserAuthenticator def authenticate_user authenticate_user!(force: true) diff --git a/app/controllers/concerns/verify_profile_concern.rb b/app/controllers/concerns/verify_profile_concern.rb index 33d39c7de27..7d9a779a0fe 100644 --- a/app/controllers/concerns/verify_profile_concern.rb +++ b/app/controllers/concerns/verify_profile_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module VerifyProfileConcern private diff --git a/app/controllers/concerns/verify_sp_attributes_concern.rb b/app/controllers/concerns/verify_sp_attributes_concern.rb index d47dbedd138..b761afe010a 100644 --- a/app/controllers/concerns/verify_sp_attributes_concern.rb +++ b/app/controllers/concerns/verify_sp_attributes_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module VerifySpAttributesConcern def needs_completion_screen_reason return nil if sp_session[:issuer].blank? diff --git a/app/controllers/country_support_controller.rb b/app/controllers/country_support_controller.rb index 7903d42e47a..25f57a88e6d 100644 --- a/app/controllers/country_support_controller.rb +++ b/app/controllers/country_support_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CountrySupportController < ApplicationController prepend_before_action :skip_session_load prepend_before_action :skip_session_expiration diff --git a/app/controllers/event_disavowal_controller.rb b/app/controllers/event_disavowal_controller.rb index ac15a556fe1..0c765c96ff6 100644 --- a/app/controllers/event_disavowal_controller.rb +++ b/app/controllers/event_disavowal_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EventDisavowalController < ApplicationController before_action :validate_disavowed_event diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index c779eec499e..9c4c879c753 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EventsController < ApplicationController include RememberDeviceConcern before_action :confirm_two_factor_authenticated diff --git a/app/controllers/forgot_password_controller.rb b/app/controllers/forgot_password_controller.rb index 29e4a664e51..01041297cc2 100644 --- a/app/controllers/forgot_password_controller.rb +++ b/app/controllers/forgot_password_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ForgotPasswordController < ApplicationController def show if session[:email].blank? diff --git a/app/controllers/frontend_log_controller.rb b/app/controllers/frontend_log_controller.rb index 37ee24f6f98..10308982b32 100644 --- a/app/controllers/frontend_log_controller.rb +++ b/app/controllers/frontend_log_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FrontendLogController < ApplicationController respond_to :json diff --git a/app/controllers/health/abstract_health_controller.rb b/app/controllers/health/abstract_health_controller.rb index 1e9f2abcc24..c03b8aaf8c1 100644 --- a/app/controllers/health/abstract_health_controller.rb +++ b/app/controllers/health/abstract_health_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Health class AbstractHealthController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/health/database_controller.rb b/app/controllers/health/database_controller.rb index debd89d5fb5..8ab6986d872 100644 --- a/app/controllers/health/database_controller.rb +++ b/app/controllers/health/database_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Health class DatabaseController < AbstractHealthController private diff --git a/app/controllers/health/health_controller.rb b/app/controllers/health/health_controller.rb index 457bc7e05a2..f7f66ad73ca 100644 --- a/app/controllers/health/health_controller.rb +++ b/app/controllers/health/health_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Health class HealthController < AbstractHealthController private diff --git a/app/controllers/health/outbound_controller.rb b/app/controllers/health/outbound_controller.rb index ec02412cd6d..9d6c638d3c8 100644 --- a/app/controllers/health/outbound_controller.rb +++ b/app/controllers/health/outbound_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Health # Checks outbound network connections class OutboundController < AbstractHealthController diff --git a/app/controllers/idv/address_controller.rb b/app/controllers/idv/address_controller.rb index b32b614c573..0b114849364 100644 --- a/app/controllers/idv/address_controller.rb +++ b/app/controllers/idv/address_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class AddressController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/agreement_controller.rb b/app/controllers/idv/agreement_controller.rb index 8d96f299562..7eb7df6926d 100644 --- a/app/controllers/idv/agreement_controller.rb +++ b/app/controllers/idv/agreement_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class AgreementController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/by_mail/enter_code_controller.rb b/app/controllers/idv/by_mail/enter_code_controller.rb index 1c3b48cbc82..12cc3f1a5a6 100644 --- a/app/controllers/idv/by_mail/enter_code_controller.rb +++ b/app/controllers/idv/by_mail/enter_code_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module ByMail class EnterCodeController < ApplicationController diff --git a/app/controllers/idv/by_mail/enter_code_rate_limited_controller.rb b/app/controllers/idv/by_mail/enter_code_rate_limited_controller.rb index 70b2ee69844..200792223d3 100644 --- a/app/controllers/idv/by_mail/enter_code_rate_limited_controller.rb +++ b/app/controllers/idv/by_mail/enter_code_rate_limited_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module ByMail class EnterCodeRateLimitedController < ApplicationController diff --git a/app/controllers/idv/by_mail/letter_enqueued_controller.rb b/app/controllers/idv/by_mail/letter_enqueued_controller.rb index ee4df2ed592..e144abbb584 100644 --- a/app/controllers/idv/by_mail/letter_enqueued_controller.rb +++ b/app/controllers/idv/by_mail/letter_enqueued_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module ByMail class LetterEnqueuedController < ApplicationController diff --git a/app/controllers/idv/by_mail/request_letter_controller.rb b/app/controllers/idv/by_mail/request_letter_controller.rb index f4e59a71ce2..1663610645f 100644 --- a/app/controllers/idv/by_mail/request_letter_controller.rb +++ b/app/controllers/idv/by_mail/request_letter_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module ByMail class RequestLetterController < ApplicationController diff --git a/app/controllers/idv/cancellations_controller.rb b/app/controllers/idv/cancellations_controller.rb index 9dcaa382bf7..a3ac1ca6b87 100644 --- a/app/controllers/idv/cancellations_controller.rb +++ b/app/controllers/idv/cancellations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class CancellationsController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/capture_doc_status_controller.rb b/app/controllers/idv/capture_doc_status_controller.rb index 4e69fb81765..bcc8907d953 100644 --- a/app/controllers/idv/capture_doc_status_controller.rb +++ b/app/controllers/idv/capture_doc_status_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class CaptureDocStatusController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/confirm_start_over_controller.rb b/app/controllers/idv/confirm_start_over_controller.rb index 923a34de6f6..7067730dfd4 100644 --- a/app/controllers/idv/confirm_start_over_controller.rb +++ b/app/controllers/idv/confirm_start_over_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ConfirmStartOverController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/document_capture_controller.rb b/app/controllers/idv/document_capture_controller.rb index d266ba6297b..3cca276476b 100644 --- a/app/controllers/idv/document_capture_controller.rb +++ b/app/controllers/idv/document_capture_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class DocumentCaptureController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/enter_password_controller.rb b/app/controllers/idv/enter_password_controller.rb index f8a8088c5ec..3b706adb6a6 100644 --- a/app/controllers/idv/enter_password_controller.rb +++ b/app/controllers/idv/enter_password_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class EnterPasswordController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/forgot_password_controller.rb b/app/controllers/idv/forgot_password_controller.rb index fa939fdec10..10d404ff951 100644 --- a/app/controllers/idv/forgot_password_controller.rb +++ b/app/controllers/idv/forgot_password_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ForgotPasswordController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/how_to_verify_controller.rb b/app/controllers/idv/how_to_verify_controller.rb index 2ab4cef383e..e6eee018ee7 100644 --- a/app/controllers/idv/how_to_verify_controller.rb +++ b/app/controllers/idv/how_to_verify_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class HowToVerifyController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/hybrid_handoff_controller.rb b/app/controllers/idv/hybrid_handoff_controller.rb index 0625337bd78..ba99e2d240c 100644 --- a/app/controllers/idv/hybrid_handoff_controller.rb +++ b/app/controllers/idv/hybrid_handoff_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class HybridHandoffController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb b/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb index 53e62bb6356..6dd2cef744e 100644 --- a/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb +++ b/app/controllers/idv/hybrid_mobile/capture_complete_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module HybridMobile class CaptureCompleteController < ApplicationController diff --git a/app/controllers/idv/hybrid_mobile/document_capture_controller.rb b/app/controllers/idv/hybrid_mobile/document_capture_controller.rb index 83892d2d038..df483aa7e8a 100644 --- a/app/controllers/idv/hybrid_mobile/document_capture_controller.rb +++ b/app/controllers/idv/hybrid_mobile/document_capture_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module HybridMobile class DocumentCaptureController < ApplicationController diff --git a/app/controllers/idv/hybrid_mobile/entry_controller.rb b/app/controllers/idv/hybrid_mobile/entry_controller.rb index d609dfa0c4d..50543a02ef9 100644 --- a/app/controllers/idv/hybrid_mobile/entry_controller.rb +++ b/app/controllers/idv/hybrid_mobile/entry_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module HybridMobile # Controller responsible for taking a `document-capture-session` UUID and configuring diff --git a/app/controllers/idv/image_uploads_controller.rb b/app/controllers/idv/image_uploads_controller.rb index e617c4a0c9b..b5d45f192ba 100644 --- a/app/controllers/idv/image_uploads_controller.rb +++ b/app/controllers/idv/image_uploads_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ImageUploadsController < ApplicationController respond_to :json diff --git a/app/controllers/idv/in_person/address_controller.rb b/app/controllers/idv/in_person/address_controller.rb index b2ea205d6dc..b451f3e5a62 100644 --- a/app/controllers/idv/in_person/address_controller.rb +++ b/app/controllers/idv/in_person/address_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class AddressController < ApplicationController diff --git a/app/controllers/idv/in_person/public/usps_locations_controller.rb b/app/controllers/idv/in_person/public/usps_locations_controller.rb index 96566f82cc9..c48ec3cba28 100644 --- a/app/controllers/idv/in_person/public/usps_locations_controller.rb +++ b/app/controllers/idv/in_person/public/usps_locations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson module Public diff --git a/app/controllers/idv/in_person/ready_to_verify_controller.rb b/app/controllers/idv/in_person/ready_to_verify_controller.rb index 26f87f5f2de..36e84d56e96 100644 --- a/app/controllers/idv/in_person/ready_to_verify_controller.rb +++ b/app/controllers/idv/in_person/ready_to_verify_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class ReadyToVerifyController < ApplicationController diff --git a/app/controllers/idv/in_person/ssn_controller.rb b/app/controllers/idv/in_person/ssn_controller.rb index 623083f9f49..ced810f90da 100644 --- a/app/controllers/idv/in_person/ssn_controller.rb +++ b/app/controllers/idv/in_person/ssn_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class SsnController < ApplicationController diff --git a/app/controllers/idv/in_person/usps_locations_controller.rb b/app/controllers/idv/in_person/usps_locations_controller.rb index 67b1f10dc98..ab5f275767e 100644 --- a/app/controllers/idv/in_person/usps_locations_controller.rb +++ b/app/controllers/idv/in_person/usps_locations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'json' module Idv diff --git a/app/controllers/idv/in_person/verify_info_controller.rb b/app/controllers/idv/in_person/verify_info_controller.rb index 3a5af3aa4e8..48e1752342a 100644 --- a/app/controllers/idv/in_person/verify_info_controller.rb +++ b/app/controllers/idv/in_person/verify_info_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class VerifyInfoController < ApplicationController diff --git a/app/controllers/idv/in_person_controller.rb b/app/controllers/idv/in_person_controller.rb index 12644b08a09..e7dce29c66b 100644 --- a/app/controllers/idv/in_person_controller.rb +++ b/app/controllers/idv/in_person_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class InPersonController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/link_sent_controller.rb b/app/controllers/idv/link_sent_controller.rb index 1ae381f7868..15bc80e766e 100644 --- a/app/controllers/idv/link_sent_controller.rb +++ b/app/controllers/idv/link_sent_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class LinkSentController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/mail_only_warning_controller.rb b/app/controllers/idv/mail_only_warning_controller.rb index 6da575a5061..757694223bb 100644 --- a/app/controllers/idv/mail_only_warning_controller.rb +++ b/app/controllers/idv/mail_only_warning_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class MailOnlyWarningController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/not_verified_controller.rb b/app/controllers/idv/not_verified_controller.rb index 31f3902b8ed..5577bb2f67b 100644 --- a/app/controllers/idv/not_verified_controller.rb +++ b/app/controllers/idv/not_verified_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class NotVerifiedController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/otp_verification_controller.rb b/app/controllers/idv/otp_verification_controller.rb index 9274f42206b..483dbf7e0a9 100644 --- a/app/controllers/idv/otp_verification_controller.rb +++ b/app/controllers/idv/otp_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class OtpVerificationController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/personal_key_controller.rb b/app/controllers/idv/personal_key_controller.rb index c90cd6af732..22bf5eaa61a 100644 --- a/app/controllers/idv/personal_key_controller.rb +++ b/app/controllers/idv/personal_key_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PersonalKeyController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/phone_controller.rb b/app/controllers/idv/phone_controller.rb index 61bc17b4157..3a15f231c48 100644 --- a/app/controllers/idv/phone_controller.rb +++ b/app/controllers/idv/phone_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PhoneController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/phone_errors_controller.rb b/app/controllers/idv/phone_errors_controller.rb index 64bcb863185..5f82ed7ff48 100644 --- a/app/controllers/idv/phone_errors_controller.rb +++ b/app/controllers/idv/phone_errors_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PhoneErrorsController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/please_call_controller.rb b/app/controllers/idv/please_call_controller.rb index cb39173da69..5b3eb66be19 100644 --- a/app/controllers/idv/please_call_controller.rb +++ b/app/controllers/idv/please_call_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PleaseCallController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/resend_otp_controller.rb b/app/controllers/idv/resend_otp_controller.rb index 43c28cde358..d33f42b79da 100644 --- a/app/controllers/idv/resend_otp_controller.rb +++ b/app/controllers/idv/resend_otp_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ResendOtpController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/session_errors_controller.rb b/app/controllers/idv/session_errors_controller.rb index 8c0dd5a9f62..9500ca6dd46 100644 --- a/app/controllers/idv/session_errors_controller.rb +++ b/app/controllers/idv/session_errors_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class SessionErrorsController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/sessions_controller.rb b/app/controllers/idv/sessions_controller.rb index 3eaefe7598c..37d98075582 100644 --- a/app/controllers/idv/sessions_controller.rb +++ b/app/controllers/idv/sessions_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class SessionsController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/ssn_controller.rb b/app/controllers/idv/ssn_controller.rb index 5306a836d96..5aa777953ad 100644 --- a/app/controllers/idv/ssn_controller.rb +++ b/app/controllers/idv/ssn_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class SsnController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/unavailable_controller.rb b/app/controllers/idv/unavailable_controller.rb index cc028ae7785..a3fba15759b 100644 --- a/app/controllers/idv/unavailable_controller.rb +++ b/app/controllers/idv/unavailable_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class UnavailableController < ApplicationController ALLOWED_FROM_LOCATIONS = [SignUp::RegistrationsController::CREATE_ACCOUNT] diff --git a/app/controllers/idv/verify_info_controller.rb b/app/controllers/idv/verify_info_controller.rb index cb61fafbd07..744d895e392 100644 --- a/app/controllers/idv/verify_info_controller.rb +++ b/app/controllers/idv/verify_info_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class VerifyInfoController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv/welcome_controller.rb b/app/controllers/idv/welcome_controller.rb index ba1754d6b31..74699676cce 100644 --- a/app/controllers/idv/welcome_controller.rb +++ b/app/controllers/idv/welcome_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class WelcomeController < ApplicationController include Idv::AvailabilityConcern diff --git a/app/controllers/idv_controller.rb b/app/controllers/idv_controller.rb index 767ad6019e8..e2d41392326 100644 --- a/app/controllers/idv_controller.rb +++ b/app/controllers/idv_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IdvController < ApplicationController include IdvSessionConcern include AccountReactivationConcern diff --git a/app/controllers/mfa_confirmation_controller.rb b/app/controllers/mfa_confirmation_controller.rb index c7af1c07fbf..a87a440b6cb 100644 --- a/app/controllers/mfa_confirmation_controller.rb +++ b/app/controllers/mfa_confirmation_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MfaConfirmationController < ApplicationController include MfaSetupConcern before_action :confirm_two_factor_authenticated diff --git a/app/controllers/no_js_controller.rb b/app/controllers/no_js_controller.rb index fdcacc45450..dc13b290432 100644 --- a/app/controllers/no_js_controller.rb +++ b/app/controllers/no_js_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NoJsController < ApplicationController SESSION_KEY = :no_js_css diff --git a/app/controllers/openid_connect/certs_controller.rb b/app/controllers/openid_connect/certs_controller.rb index 6f1e0f9734a..f0640b723be 100644 --- a/app/controllers/openid_connect/certs_controller.rb +++ b/app/controllers/openid_connect/certs_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OpenidConnect class CertsController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/openid_connect/configuration_controller.rb b/app/controllers/openid_connect/configuration_controller.rb index ca858be3188..d87e7987e3d 100644 --- a/app/controllers/openid_connect/configuration_controller.rb +++ b/app/controllers/openid_connect/configuration_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OpenidConnect class ConfigurationController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/openid_connect/token_controller.rb b/app/controllers/openid_connect/token_controller.rb index 4b6155f9b16..de48ebb649d 100644 --- a/app/controllers/openid_connect/token_controller.rb +++ b/app/controllers/openid_connect/token_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OpenidConnect class TokenController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/openid_connect/user_info_controller.rb b/app/controllers/openid_connect/user_info_controller.rb index 23c36b1b022..6c6e0af21f1 100644 --- a/app/controllers/openid_connect/user_info_controller.rb +++ b/app/controllers/openid_connect/user_info_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OpenidConnect class UserInfoController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 826cd2111c0..e337e46d75c 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PagesController < ApplicationController prepend_before_action :skip_session_load prepend_before_action :skip_session_expiration diff --git a/app/controllers/password_capture_controller.rb b/app/controllers/password_capture_controller.rb index 95e1f07be07..de42a2c8d42 100644 --- a/app/controllers/password_capture_controller.rb +++ b/app/controllers/password_capture_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordCaptureController < ApplicationController include Ial2ProfileConcern include TwoFactorAuthenticatableMethods diff --git a/app/controllers/reactivate_account_controller.rb b/app/controllers/reactivate_account_controller.rb index bc76afd778a..6f0e86cf58c 100644 --- a/app/controllers/reactivate_account_controller.rb +++ b/app/controllers/reactivate_account_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ReactivateAccountController < ApplicationController include AccountReactivationConcern diff --git a/app/controllers/redirect/contact_controller.rb b/app/controllers/redirect/contact_controller.rb index 44525f9905d..8d4d667498e 100644 --- a/app/controllers/redirect/contact_controller.rb +++ b/app/controllers/redirect/contact_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Redirect class ContactController < RedirectController def show diff --git a/app/controllers/redirect/help_center_controller.rb b/app/controllers/redirect/help_center_controller.rb index ceee748241d..87d965141ad 100644 --- a/app/controllers/redirect/help_center_controller.rb +++ b/app/controllers/redirect/help_center_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Redirect class HelpCenterController < RedirectController before_action :validate_help_center_article_params diff --git a/app/controllers/redirect/policy_controller.rb b/app/controllers/redirect/policy_controller.rb index 959204edd94..6f7c47adfef 100644 --- a/app/controllers/redirect/policy_controller.rb +++ b/app/controllers/redirect/policy_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Redirect class PolicyController < RedirectController def show diff --git a/app/controllers/redirect/redirect_controller.rb b/app/controllers/redirect/redirect_controller.rb index ad103661aef..47d7fdd6fb8 100644 --- a/app/controllers/redirect/redirect_controller.rb +++ b/app/controllers/redirect/redirect_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Redirect class RedirectController < ApplicationController PERMITTED_LOCATION_PARAMS = [:flow, :step, :location].freeze diff --git a/app/controllers/redirect/return_to_sp_controller.rb b/app/controllers/redirect/return_to_sp_controller.rb index a1a18f0ca9a..80515826c04 100644 --- a/app/controllers/redirect/return_to_sp_controller.rb +++ b/app/controllers/redirect/return_to_sp_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Redirect class ReturnToSpController < Redirect::RedirectController before_action :validate_sp_exists diff --git a/app/controllers/risc/configuration_controller.rb b/app/controllers/risc/configuration_controller.rb index 4d4256ee21b..f5bce10a52d 100644 --- a/app/controllers/risc/configuration_controller.rb +++ b/app/controllers/risc/configuration_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Risc class ConfigurationController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/risc/security_events_controller.rb b/app/controllers/risc/security_events_controller.rb index 5e0be515ece..15dc5bb0024 100644 --- a/app/controllers/risc/security_events_controller.rb +++ b/app/controllers/risc/security_events_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Risc # Controller to receive SET (Security Event Tokens) class SecurityEventsController < ApplicationController diff --git a/app/controllers/robots_controller.rb b/app/controllers/robots_controller.rb index 55c7da0cc13..b86f0145064 100644 --- a/app/controllers/robots_controller.rb +++ b/app/controllers/robots_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RobotsController < ApplicationController ALLOWED_ROUTES = %i[ new_user_session diff --git a/app/controllers/saml_completion_controller.rb b/app/controllers/saml_completion_controller.rb index 6ea37af48ff..a685c699026 100644 --- a/app/controllers/saml_completion_controller.rb +++ b/app/controllers/saml_completion_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Handles the INTERNAL redirect which happens when a service provider authentication request # is passed through the IDP's authentication flow (sign-in, MFA, etc.) # The original request was saved to the sp_session object, so we retrieve it to pass on the diff --git a/app/controllers/saml_idp_controller.rb b/app/controllers/saml_idp_controller.rb index a09148c54af..83fe68307bd 100644 --- a/app/controllers/saml_idp_controller.rb +++ b/app/controllers/saml_idp_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'saml_idp_constants' require 'saml_idp' diff --git a/app/controllers/saml_post_controller.rb b/app/controllers/saml_post_controller.rb index e104801a356..ce60694d52e 100644 --- a/app/controllers/saml_post_controller.rb +++ b/app/controllers/saml_post_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SamlPostController < ApplicationController after_action -> { request.session_options[:skip] = true }, only: :auth skip_before_action :verify_authenticity_token diff --git a/app/controllers/service_provider_controller.rb b/app/controllers/service_provider_controller.rb index cac91f6c920..c8d00a177d8 100644 --- a/app/controllers/service_provider_controller.rb +++ b/app/controllers/service_provider_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ServiceProviderController < ApplicationController protect_from_forgery with: :null_session diff --git a/app/controllers/sign_out_controller.rb b/app/controllers/sign_out_controller.rb index e5c1d6cb09f..9f10b5df728 100644 --- a/app/controllers/sign_out_controller.rb +++ b/app/controllers/sign_out_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SignOutController < ApplicationController include FullyAuthenticatable diff --git a/app/controllers/sign_up/cancellations_controller.rb b/app/controllers/sign_up/cancellations_controller.rb index 9fe393af9c3..4ff4472ff47 100644 --- a/app/controllers/sign_up/cancellations_controller.rb +++ b/app/controllers/sign_up/cancellations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class CancellationsController < ApplicationController before_action :find_user diff --git a/app/controllers/sign_up/completions_controller.rb b/app/controllers/sign_up/completions_controller.rb index c21f2e40510..19b4c451bb2 100644 --- a/app/controllers/sign_up/completions_controller.rb +++ b/app/controllers/sign_up/completions_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class CompletionsController < ApplicationController include SecureHeadersConcern diff --git a/app/controllers/sign_up/email_confirmations_controller.rb b/app/controllers/sign_up/email_confirmations_controller.rb index 5123e10dabc..c34e52b8f31 100644 --- a/app/controllers/sign_up/email_confirmations_controller.rb +++ b/app/controllers/sign_up/email_confirmations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class EmailConfirmationsController < ApplicationController include UnconfirmedUserConcern diff --git a/app/controllers/sign_up/email_resend_controller.rb b/app/controllers/sign_up/email_resend_controller.rb index ac27816669a..016d16ad19d 100644 --- a/app/controllers/sign_up/email_resend_controller.rb +++ b/app/controllers/sign_up/email_resend_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class EmailResendController < ApplicationController def new diff --git a/app/controllers/sign_up/emails_controller.rb b/app/controllers/sign_up/emails_controller.rb index e0a61a1eaee..b46b4df0fd8 100644 --- a/app/controllers/sign_up/emails_controller.rb +++ b/app/controllers/sign_up/emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class EmailsController < ApplicationController def show diff --git a/app/controllers/sign_up/passwords_controller.rb b/app/controllers/sign_up/passwords_controller.rb index 5fc4a7d1aa4..cf86c1452fd 100644 --- a/app/controllers/sign_up/passwords_controller.rb +++ b/app/controllers/sign_up/passwords_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class PasswordsController < ApplicationController include UnconfirmedUserConcern diff --git a/app/controllers/sign_up/registrations_controller.rb b/app/controllers/sign_up/registrations_controller.rb index 1052ed33f7f..0a639228e17 100644 --- a/app/controllers/sign_up/registrations_controller.rb +++ b/app/controllers/sign_up/registrations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SignUp class RegistrationsController < ApplicationController include ApplicationHelper # for ial2_requested? diff --git a/app/controllers/test/device_profiling_controller.rb b/app/controllers/test/device_profiling_controller.rb index 7b4c47abbc2..a1e132ae092 100644 --- a/app/controllers/test/device_profiling_controller.rb +++ b/app/controllers/test/device_profiling_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test class DeviceProfilingController < ApplicationController prepend_before_action :skip_session_load diff --git a/app/controllers/test/fake_s3_controller.rb b/app/controllers/test/fake_s3_controller.rb index 7d59e4ee469..160f13f1ffa 100644 --- a/app/controllers/test/fake_s3_controller.rb +++ b/app/controllers/test/fake_s3_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test class FakeS3Controller < ApplicationController skip_before_action :verify_authenticity_token diff --git a/app/controllers/test/oidc_test_controller.rb b/app/controllers/test/oidc_test_controller.rb index a77b4849e8e..dd366676911 100644 --- a/app/controllers/test/oidc_test_controller.rb +++ b/app/controllers/test/oidc_test_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require './spec/support/oidc_auth_helper' module Test class OidcTestController < ApplicationController diff --git a/app/controllers/test/piv_cac_authentication_test_subject_controller.rb b/app/controllers/test/piv_cac_authentication_test_subject_controller.rb index c0093dc1265..8f9be071add 100644 --- a/app/controllers/test/piv_cac_authentication_test_subject_controller.rb +++ b/app/controllers/test/piv_cac_authentication_test_subject_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'digest' # This is only used in development mode. Routes aren't constructed unless diff --git a/app/controllers/test/push_notification_controller.rb b/app/controllers/test/push_notification_controller.rb index bd36bf3c3fc..e1eff4cb573 100644 --- a/app/controllers/test/push_notification_controller.rb +++ b/app/controllers/test/push_notification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test class PushNotificationController < ApplicationController layout 'no_card' diff --git a/app/controllers/test/saml_test_controller.rb b/app/controllers/test/saml_test_controller.rb index 69ba3a7ec96..a6f07a70068 100644 --- a/app/controllers/test/saml_test_controller.rb +++ b/app/controllers/test/saml_test_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'saml_idp_constants' require 'saml_idp/logout_request_builder' require './spec/support/saml_auth_helper' diff --git a/app/controllers/test/session_data_controller.rb b/app/controllers/test/session_data_controller.rb index 1199b5725f3..05d2d1d7468 100644 --- a/app/controllers/test/session_data_controller.rb +++ b/app/controllers/test/session_data_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test # Controller that echoes back session info, only for testing class SessionDataController < ApplicationController diff --git a/app/controllers/test/telephony_controller.rb b/app/controllers/test/telephony_controller.rb index 3ed7732836c..9247af0a6e1 100644 --- a/app/controllers/test/telephony_controller.rb +++ b/app/controllers/test/telephony_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test class TelephonyController < ApplicationController layout 'no_card' diff --git a/app/controllers/two_factor_authentication/backup_code_verification_controller.rb b/app/controllers/two_factor_authentication/backup_code_verification_controller.rb index d7818e091e1..19ad610ec59 100644 --- a/app/controllers/two_factor_authentication/backup_code_verification_controller.rb +++ b/app/controllers/two_factor_authentication/backup_code_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class BackupCodeVerificationController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/two_factor_authentication/options_controller.rb b/app/controllers/two_factor_authentication/options_controller.rb index 4149798ac87..fec6acb3a8d 100644 --- a/app/controllers/two_factor_authentication/options_controller.rb +++ b/app/controllers/two_factor_authentication/options_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class OptionsController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/two_factor_authentication/otp_verification_controller.rb b/app/controllers/two_factor_authentication/otp_verification_controller.rb index 2f57b2d6286..5e6edaf46ca 100644 --- a/app/controllers/two_factor_authentication/otp_verification_controller.rb +++ b/app/controllers/two_factor_authentication/otp_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class OtpVerificationController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/two_factor_authentication/personal_key_verification_controller.rb b/app/controllers/two_factor_authentication/personal_key_verification_controller.rb index 1f46304ab10..64b0a8c85c8 100644 --- a/app/controllers/two_factor_authentication/personal_key_verification_controller.rb +++ b/app/controllers/two_factor_authentication/personal_key_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PersonalKeyVerificationController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb b/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb index baa7da1f935..39b89f881fa 100644 --- a/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb +++ b/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PivCacVerificationController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/two_factor_authentication/sms_opt_in_controller.rb b/app/controllers/two_factor_authentication/sms_opt_in_controller.rb index 63c548dbe2f..339ff519730 100644 --- a/app/controllers/two_factor_authentication/sms_opt_in_controller.rb +++ b/app/controllers/two_factor_authentication/sms_opt_in_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SmsOptInController < ApplicationController before_action :load_phone diff --git a/app/controllers/two_factor_authentication/totp_verification_controller.rb b/app/controllers/two_factor_authentication/totp_verification_controller.rb index 0860c2b8c32..eaed664380a 100644 --- a/app/controllers/two_factor_authentication/totp_verification_controller.rb +++ b/app/controllers/two_factor_authentication/totp_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class TotpVerificationController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/two_factor_authentication/webauthn_verification_controller.rb b/app/controllers/two_factor_authentication/webauthn_verification_controller.rb index f4cd119bc25..9ef3e53ed32 100644 --- a/app/controllers/two_factor_authentication/webauthn_verification_controller.rb +++ b/app/controllers/two_factor_authentication/webauthn_verification_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication # The WebauthnVerificationController class is responsible webauthn verification at sign in class WebauthnVerificationController < ApplicationController diff --git a/app/controllers/users/auth_app_controller.rb b/app/controllers/users/auth_app_controller.rb index 2082362dc04..729ca14469d 100644 --- a/app/controllers/users/auth_app_controller.rb +++ b/app/controllers/users/auth_app_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class AuthAppController < ApplicationController include ReauthenticationRequiredConcern diff --git a/app/controllers/users/authorization_confirmation_controller.rb b/app/controllers/users/authorization_confirmation_controller.rb index 7c674a6aa12..209e81951c2 100644 --- a/app/controllers/users/authorization_confirmation_controller.rb +++ b/app/controllers/users/authorization_confirmation_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class AuthorizationConfirmationController < ApplicationController include AuthorizationCountConcern diff --git a/app/controllers/users/backup_code_setup_controller.rb b/app/controllers/users/backup_code_setup_controller.rb index b99d1dd31a9..27cbf2c5a32 100644 --- a/app/controllers/users/backup_code_setup_controller.rb +++ b/app/controllers/users/backup_code_setup_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class BackupCodeSetupController < ApplicationController include TwoFactorAuthenticatableMethods diff --git a/app/controllers/users/delete_controller.rb b/app/controllers/users/delete_controller.rb index ddb024c8ead..7ad65cab568 100644 --- a/app/controllers/users/delete_controller.rb +++ b/app/controllers/users/delete_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class DeleteController < ApplicationController include ReauthenticationRequiredConcern diff --git a/app/controllers/users/edit_phone_controller.rb b/app/controllers/users/edit_phone_controller.rb index bf4326dde62..85eb00f8b3b 100644 --- a/app/controllers/users/edit_phone_controller.rb +++ b/app/controllers/users/edit_phone_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class EditPhoneController < ApplicationController include RememberDeviceConcern diff --git a/app/controllers/users/email_confirmations_controller.rb b/app/controllers/users/email_confirmations_controller.rb index 862072cfae6..fdd01844ad0 100644 --- a/app/controllers/users/email_confirmations_controller.rb +++ b/app/controllers/users/email_confirmations_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class EmailConfirmationsController < ApplicationController def create diff --git a/app/controllers/users/email_language_controller.rb b/app/controllers/users/email_language_controller.rb index faf27edbafb..33eb44d1f57 100644 --- a/app/controllers/users/email_language_controller.rb +++ b/app/controllers/users/email_language_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class EmailLanguageController < ApplicationController before_action :confirm_two_factor_authenticated diff --git a/app/controllers/users/emails_controller.rb b/app/controllers/users/emails_controller.rb index d6b70f0394b..a56e932bc03 100644 --- a/app/controllers/users/emails_controller.rb +++ b/app/controllers/users/emails_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class EmailsController < ApplicationController include ReauthenticationRequiredConcern diff --git a/app/controllers/users/forget_all_browsers_controller.rb b/app/controllers/users/forget_all_browsers_controller.rb index c03396a4faa..2dc96c7e5bc 100644 --- a/app/controllers/users/forget_all_browsers_controller.rb +++ b/app/controllers/users/forget_all_browsers_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class ForgetAllBrowsersController < ApplicationController before_action :confirm_two_factor_authenticated diff --git a/app/controllers/users/passwords_controller.rb b/app/controllers/users/passwords_controller.rb index 8fab9ad5cb7..a7d2cad33c7 100644 --- a/app/controllers/users/passwords_controller.rb +++ b/app/controllers/users/passwords_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PasswordsController < ApplicationController include ReauthenticationRequiredConcern diff --git a/app/controllers/users/personal_keys_controller.rb b/app/controllers/users/personal_keys_controller.rb index 5e6e818cf09..836ab3c24e5 100644 --- a/app/controllers/users/personal_keys_controller.rb +++ b/app/controllers/users/personal_keys_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users # Handles updating a user's personal key if it used for 2FA (legacy behavior) class PersonalKeysController < ApplicationController diff --git a/app/controllers/users/phone_setup_controller.rb b/app/controllers/users/phone_setup_controller.rb index b125d8eebdd..9dfe68896ee 100644 --- a/app/controllers/users/phone_setup_controller.rb +++ b/app/controllers/users/phone_setup_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PhoneSetupController < ApplicationController include TwoFactorAuthenticatableMethods diff --git a/app/controllers/users/piv_cac_authentication_setup_controller.rb b/app/controllers/users/piv_cac_authentication_setup_controller.rb index d6c30f2106d..f2d1986940d 100644 --- a/app/controllers/users/piv_cac_authentication_setup_controller.rb +++ b/app/controllers/users/piv_cac_authentication_setup_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PivCacAuthenticationSetupController < ApplicationController include TwoFactorAuthenticatableMethods diff --git a/app/controllers/users/piv_cac_controller.rb b/app/controllers/users/piv_cac_controller.rb index e5905967232..d540809d666 100644 --- a/app/controllers/users/piv_cac_controller.rb +++ b/app/controllers/users/piv_cac_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PivCacController < ApplicationController include ReauthenticationRequiredConcern diff --git a/app/controllers/users/piv_cac_login_controller.rb b/app/controllers/users/piv_cac_login_controller.rb index 9e9b542ef16..7daf4dc762d 100644 --- a/app/controllers/users/piv_cac_login_controller.rb +++ b/app/controllers/users/piv_cac_login_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PivCacLoginController < ApplicationController include PivCacConcern diff --git a/app/controllers/users/piv_cac_setup_from_sign_in_controller.rb b/app/controllers/users/piv_cac_setup_from_sign_in_controller.rb index ebea1debf03..75a03214dcf 100644 --- a/app/controllers/users/piv_cac_setup_from_sign_in_controller.rb +++ b/app/controllers/users/piv_cac_setup_from_sign_in_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PivCacSetupFromSignInController < ApplicationController include TwoFactorAuthenticatableMethods diff --git a/app/controllers/users/please_call_controller.rb b/app/controllers/users/please_call_controller.rb index d0826ce9b03..8e5e8adfb7d 100644 --- a/app/controllers/users/please_call_controller.rb +++ b/app/controllers/users/please_call_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class PleaseCallController < ApplicationController before_action :confirm_two_factor_authenticated diff --git a/app/controllers/users/reset_passwords_controller.rb b/app/controllers/users/reset_passwords_controller.rb index 8ea9158e821..dfff6ab03ec 100644 --- a/app/controllers/users/reset_passwords_controller.rb +++ b/app/controllers/users/reset_passwords_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class ResetPasswordsController < Devise::PasswordsController include AuthorizationCountConcern diff --git a/app/controllers/users/rules_of_use_controller.rb b/app/controllers/users/rules_of_use_controller.rb index 47701a3bd4d..39b2c2ed6b2 100644 --- a/app/controllers/users/rules_of_use_controller.rb +++ b/app/controllers/users/rules_of_use_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class RulesOfUseController < ApplicationController include SecureHeadersConcern diff --git a/app/controllers/users/second_mfa_reminder_controller.rb b/app/controllers/users/second_mfa_reminder_controller.rb index 80f2f49b713..8820fd3dcc5 100644 --- a/app/controllers/users/second_mfa_reminder_controller.rb +++ b/app/controllers/users/second_mfa_reminder_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class SecondMfaReminderController < ApplicationController include SecureHeadersConcern diff --git a/app/controllers/users/service_provider_inactive_controller.rb b/app/controllers/users/service_provider_inactive_controller.rb index 1be7cb73cf7..7afe1f10426 100644 --- a/app/controllers/users/service_provider_inactive_controller.rb +++ b/app/controllers/users/service_provider_inactive_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class ServiceProviderInactiveController < ApplicationController include FullyAuthenticatable diff --git a/app/controllers/users/service_provider_revoke_controller.rb b/app/controllers/users/service_provider_revoke_controller.rb index 941637e0c90..b304cd6fc56 100644 --- a/app/controllers/users/service_provider_revoke_controller.rb +++ b/app/controllers/users/service_provider_revoke_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class ServiceProviderRevokeController < ApplicationController before_action :confirm_two_factor_authenticated diff --git a/app/controllers/users/sp_handoff_bounced_controller.rb b/app/controllers/users/sp_handoff_bounced_controller.rb index 9b244c92ccb..97799b02e6e 100644 --- a/app/controllers/users/sp_handoff_bounced_controller.rb +++ b/app/controllers/users/sp_handoff_bounced_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class SpHandoffBouncedController < Devise::SessionsController def bounced diff --git a/app/controllers/users/totp_setup_controller.rb b/app/controllers/users/totp_setup_controller.rb index 552326465d5..ade7c281565 100644 --- a/app/controllers/users/totp_setup_controller.rb +++ b/app/controllers/users/totp_setup_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class TotpSetupController < ApplicationController include TwoFactorAuthenticatableMethods diff --git a/app/controllers/users/two_factor_authentication_controller.rb b/app/controllers/users/two_factor_authentication_controller.rb index ec8980a3a9f..2daffe146ad 100644 --- a/app/controllers/users/two_factor_authentication_controller.rb +++ b/app/controllers/users/two_factor_authentication_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class TwoFactorAuthenticationController < ApplicationController include TwoFactorAuthenticatable diff --git a/app/controllers/users/two_factor_authentication_setup_controller.rb b/app/controllers/users/two_factor_authentication_setup_controller.rb index 33dfa20635e..d631b5b4e0c 100644 --- a/app/controllers/users/two_factor_authentication_setup_controller.rb +++ b/app/controllers/users/two_factor_authentication_setup_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class TwoFactorAuthenticationSetupController < ApplicationController include UserAuthenticator diff --git a/app/controllers/users/verify_password_controller.rb b/app/controllers/users/verify_password_controller.rb index fc017680bcb..a75f6b6a0c9 100644 --- a/app/controllers/users/verify_password_controller.rb +++ b/app/controllers/users/verify_password_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class VerifyPasswordController < ApplicationController include AccountReactivationConcern diff --git a/app/controllers/users/verify_personal_key_controller.rb b/app/controllers/users/verify_personal_key_controller.rb index 63406069873..d92815acac7 100644 --- a/app/controllers/users/verify_personal_key_controller.rb +++ b/app/controllers/users/verify_personal_key_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class VerifyPersonalKeyController < ApplicationController include AccountReactivationConcern diff --git a/app/controllers/users/webauthn_controller.rb b/app/controllers/users/webauthn_controller.rb index 58d4fea1322..ddc13846239 100644 --- a/app/controllers/users/webauthn_controller.rb +++ b/app/controllers/users/webauthn_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class WebauthnController < ApplicationController include ReauthenticationRequiredConcern diff --git a/app/controllers/users/webauthn_setup_controller.rb b/app/controllers/users/webauthn_setup_controller.rb index d8bd370c509..31ccc66063b 100644 --- a/app/controllers/users/webauthn_setup_controller.rb +++ b/app/controllers/users/webauthn_setup_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Users class WebauthnSetupController < ApplicationController include TwoFactorAuthenticatableMethods diff --git a/app/controllers/vendor_outage_controller.rb b/app/controllers/vendor_outage_controller.rb index e49392e522f..8593d74f648 100644 --- a/app/controllers/vendor_outage_controller.rb +++ b/app/controllers/vendor_outage_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class VendorOutageController < ApplicationController def show outage_status = OutageStatus.new diff --git a/app/decorators/device_decorator.rb b/app/decorators/device_decorator.rb index 00329ee5272..18212d720f6 100644 --- a/app/decorators/device_decorator.rb +++ b/app/decorators/device_decorator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + DeviceDecorator = Struct.new(:device) do delegate :last_used_at, :id, to: :device diff --git a/app/decorators/email_context.rb b/app/decorators/email_context.rb index 70191fb5001..2f41693a362 100644 --- a/app/decorators/email_context.rb +++ b/app/decorators/email_context.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EmailContext attr_reader :user diff --git a/app/decorators/event_decorator.rb b/app/decorators/event_decorator.rb index 497a23ab8fe..d6b15d19993 100644 --- a/app/decorators/event_decorator.rb +++ b/app/decorators/event_decorator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + EventDecorator = Struct.new(:event) do def event_type I18n.t("event_types.#{event.event_type}", app_name: APP_NAME) diff --git a/app/decorators/mfa_context.rb b/app/decorators/mfa_context.rb index b57ee3ddf2d..ea5280fa0d8 100644 --- a/app/decorators/mfa_context.rb +++ b/app/decorators/mfa_context.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MfaContext attr_reader :user diff --git a/app/decorators/null_service_provider_session.rb b/app/decorators/null_service_provider_session.rb index 0e924008481..a7024670293 100644 --- a/app/decorators/null_service_provider_session.rb +++ b/app/decorators/null_service_provider_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NullServiceProviderSession def initialize(view_context: nil) @view_context = view_context diff --git a/app/decorators/service_provider_session.rb b/app/decorators/service_provider_session.rb index f2423015d32..2cd97bb39be 100644 --- a/app/decorators/service_provider_session.rb +++ b/app/decorators/service_provider_session.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + class ServiceProviderSession include ActionView::Helpers::TranslationHelper include Rails.application.routes.url_helpers - DEFAULT_LOGO = 'generic.svg'.freeze + DEFAULT_LOGO = 'generic.svg' def initialize(sp:, view_context:, sp_session:, service_provider_request:) @sp = sp diff --git a/app/forms/add_user_email_form.rb b/app/forms/add_user_email_form.rb index 3912d26071a..99530bb5bb2 100644 --- a/app/forms/add_user_email_form.rb +++ b/app/forms/add_user_email_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserEmailForm include ActiveModel::Model include FormAddEmailValidator diff --git a/app/forms/backup_code_setup_form.rb b/app/forms/backup_code_setup_form.rb index dc4136a1968..ab8b9cbd525 100644 --- a/app/forms/backup_code_setup_form.rb +++ b/app/forms/backup_code_setup_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BackupCodeSetupForm include ActiveModel::Model diff --git a/app/forms/backup_code_verification_form.rb b/app/forms/backup_code_verification_form.rb index ffcbb068a8c..3ca8e9b6cc2 100644 --- a/app/forms/backup_code_verification_form.rb +++ b/app/forms/backup_code_verification_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BackupCodeVerificationForm include ActiveModel::Model diff --git a/app/forms/concerns/piv_cac_form_helpers.rb b/app/forms/concerns/piv_cac_form_helpers.rb index 1c46b3affd3..348d035cab0 100644 --- a/app/forms/concerns/piv_cac_form_helpers.rb +++ b/app/forms/concerns/piv_cac_form_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PivCacFormHelpers extend ActiveSupport::Concern diff --git a/app/forms/delete_user_email_form.rb b/app/forms/delete_user_email_form.rb index 05e81f18477..c34c2c9e82b 100644 --- a/app/forms/delete_user_email_form.rb +++ b/app/forms/delete_user_email_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DeleteUserEmailForm include ActiveModel::Model diff --git a/app/forms/edit_phone_form.rb b/app/forms/edit_phone_form.rb index 4e3b615fdd4..688ddf99a12 100644 --- a/app/forms/edit_phone_form.rb +++ b/app/forms/edit_phone_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EditPhoneForm include ActiveModel::Model diff --git a/app/forms/event_disavowal/password_reset_from_disavowal_form.rb b/app/forms/event_disavowal/password_reset_from_disavowal_form.rb index ba222e008ff..4c486f9dded 100644 --- a/app/forms/event_disavowal/password_reset_from_disavowal_form.rb +++ b/app/forms/event_disavowal/password_reset_from_disavowal_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EventDisavowal class PasswordResetFromDisavowalForm include ActiveModel::Model diff --git a/app/forms/frontend_error_form.rb b/app/forms/frontend_error_form.rb index 5c8e91929f8..e7fcd196efc 100644 --- a/app/forms/frontend_error_form.rb +++ b/app/forms/frontend_error_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FrontendErrorForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper diff --git a/app/forms/gpo_verify_form.rb b/app/forms/gpo_verify_form.rb index 5ef87a0f890..9d573091aab 100644 --- a/app/forms/gpo_verify_form.rb +++ b/app/forms/gpo_verify_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoVerifyForm include ActiveModel::Model diff --git a/app/forms/idv/address_form.rb b/app/forms/idv/address_form.rb index 87c45ba41d2..904fe0341b6 100644 --- a/app/forms/idv/address_form.rb +++ b/app/forms/idv/address_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class AddressForm include ActiveModel::Model diff --git a/app/forms/idv/api_image_upload_form.rb b/app/forms/idv/api_image_upload_form.rb index 9c0cabade23..e47d367005f 100644 --- a/app/forms/idv/api_image_upload_form.rb +++ b/app/forms/idv/api_image_upload_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ApiImageUploadForm include ActiveModel::Model diff --git a/app/forms/idv/consent_form.rb b/app/forms/idv/consent_form.rb index 9a11113d77e..cfb15586aec 100644 --- a/app/forms/idv/consent_form.rb +++ b/app/forms/idv/consent_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ConsentForm include ActiveModel::Model diff --git a/app/forms/idv/doc_pii_form.rb b/app/forms/idv/doc_pii_form.rb index a23ab59de45..b37946160a2 100644 --- a/app/forms/idv/doc_pii_form.rb +++ b/app/forms/idv/doc_pii_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class DocPiiForm include ActiveModel::Model diff --git a/app/forms/idv/document_capture_session_form.rb b/app/forms/idv/document_capture_session_form.rb index bc9d40d9dd1..159db4e347a 100644 --- a/app/forms/idv/document_capture_session_form.rb +++ b/app/forms/idv/document_capture_session_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class DocumentCaptureSessionForm include ActiveModel::Model diff --git a/app/forms/idv/how_to_verify_form.rb b/app/forms/idv/how_to_verify_form.rb index f23329917b1..bb4eed1adb8 100644 --- a/app/forms/idv/how_to_verify_form.rb +++ b/app/forms/idv/how_to_verify_form.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + module Idv class HowToVerifyForm include ActiveModel::Model - REMOTE = 'remote'.freeze - IPP = 'ipp'.freeze + REMOTE = 'remote' + IPP = 'ipp' attr_reader :selection diff --git a/app/forms/idv/in_person/address_form.rb b/app/forms/idv/in_person/address_form.rb index d0dadd4780e..5f45050d78f 100644 --- a/app/forms/idv/in_person/address_form.rb +++ b/app/forms/idv/in_person/address_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class AddressForm diff --git a/app/forms/idv/phone_confirmation_otp_verification_form.rb b/app/forms/idv/phone_confirmation_otp_verification_form.rb index 0dc6cb0f23e..892ee2bc538 100644 --- a/app/forms/idv/phone_confirmation_otp_verification_form.rb +++ b/app/forms/idv/phone_confirmation_otp_verification_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PhoneConfirmationOtpVerificationForm attr_reader :user, :user_phone_confirmation_session, :irs_attempts_api_tracker, :code diff --git a/app/forms/idv/phone_form.rb b/app/forms/idv/phone_form.rb index 8e90ed47f79..0b8839e8a28 100644 --- a/app/forms/idv/phone_form.rb +++ b/app/forms/idv/phone_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PhoneForm include ActiveModel::Model diff --git a/app/forms/idv/ssn_format_form.rb b/app/forms/idv/ssn_format_form.rb index 12e725f8f11..fb00638ea5d 100644 --- a/app/forms/idv/ssn_format_form.rb +++ b/app/forms/idv/ssn_format_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class SsnFormatForm include ActiveModel::Model diff --git a/app/forms/idv/state_id_form.rb b/app/forms/idv/state_id_form.rb index dc901868abb..c61e6e5fca5 100644 --- a/app/forms/idv/state_id_form.rb +++ b/app/forms/idv/state_id_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class StateIdForm include ActiveModel::Model diff --git a/app/forms/new_phone_form.rb b/app/forms/new_phone_form.rb index d36f1660bf1..c79ea4a8420 100644 --- a/app/forms/new_phone_form.rb +++ b/app/forms/new_phone_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NewPhoneForm include ActiveModel::Model include FormPhoneValidator diff --git a/app/forms/openid_connect_logout_form.rb b/app/forms/openid_connect_logout_form.rb index 0995ec9efb2..6dbf8734518 100644 --- a/app/forms/openid_connect_logout_form.rb +++ b/app/forms/openid_connect_logout_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OpenidConnectLogoutForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper diff --git a/app/forms/openid_connect_token_form.rb b/app/forms/openid_connect_token_form.rb index ecdaac39e36..d9af0890798 100644 --- a/app/forms/openid_connect_token_form.rb +++ b/app/forms/openid_connect_token_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OpenidConnectTokenForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper @@ -15,7 +17,7 @@ class OpenidConnectTokenForm attr_reader(*ATTRS) - CLIENT_ASSERTION_TYPE = 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'.freeze + CLIENT_ASSERTION_TYPE = 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer' validates_inclusion_of :grant_type, in: %w[authorization_code] validates_inclusion_of :client_assertion_type, diff --git a/app/forms/otp_delivery_selection_form.rb b/app/forms/otp_delivery_selection_form.rb index d7ab392b408..1f98e9cbfbb 100644 --- a/app/forms/otp_delivery_selection_form.rb +++ b/app/forms/otp_delivery_selection_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OtpDeliverySelectionForm include ActiveModel::Model include OtpDeliveryPreferenceValidator diff --git a/app/forms/password_form.rb b/app/forms/password_form.rb index 413bb3e0aad..897923d0038 100644 --- a/app/forms/password_form.rb +++ b/app/forms/password_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordForm include ActiveModel::Model include FormPasswordValidator diff --git a/app/forms/password_reset_email_form.rb b/app/forms/password_reset_email_form.rb index e86fa29feae..2b7137b9a60 100644 --- a/app/forms/password_reset_email_form.rb +++ b/app/forms/password_reset_email_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordResetEmailForm include ActiveModel::Model include FormEmailValidator diff --git a/app/forms/personal_key_form.rb b/app/forms/personal_key_form.rb index e30b9345b2d..7f7191603cf 100644 --- a/app/forms/personal_key_form.rb +++ b/app/forms/personal_key_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PersonalKeyForm include ActiveModel::Model include PersonalKeyValidator diff --git a/app/forms/register_user_email_form.rb b/app/forms/register_user_email_form.rb index af13f0fca32..c705c3e4652 100644 --- a/app/forms/register_user_email_form.rb +++ b/app/forms/register_user_email_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RegisterUserEmailForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper diff --git a/app/forms/resend_email_confirmation_form.rb b/app/forms/resend_email_confirmation_form.rb index d622305818e..020b9e8b85b 100644 --- a/app/forms/resend_email_confirmation_form.rb +++ b/app/forms/resend_email_confirmation_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ResendEmailConfirmationForm include ActiveModel::Model diff --git a/app/forms/reset_password_form.rb b/app/forms/reset_password_form.rb index 96c8f7fb051..8a16dad1d57 100644 --- a/app/forms/reset_password_form.rb +++ b/app/forms/reset_password_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ResetPasswordForm include ActiveModel::Model include FormPasswordValidator diff --git a/app/forms/rules_of_use_form.rb b/app/forms/rules_of_use_form.rb index 9afab866334..a111cfd20cc 100644 --- a/app/forms/rules_of_use_form.rb +++ b/app/forms/rules_of_use_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RulesOfUseForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper diff --git a/app/forms/security_event_form.rb b/app/forms/security_event_form.rb index 06b15e743d9..687a8f6bd8e 100644 --- a/app/forms/security_event_form.rb +++ b/app/forms/security_event_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Handles SET events (Security Event Tokens) class SecurityEventForm include ActionView::Helpers::TranslationHelper @@ -6,14 +8,14 @@ class SecurityEventForm # From https://tools.ietf.org/html/draft-ietf-secevent-http-push-00#section-2.3 module ErrorCodes - DUP = 'dup'.freeze - JWS = 'jws'.freeze - JWT_AUD = 'jwtAud'.freeze - JWT_CRYPTO = 'jwtCrypto'.freeze - JWT_HDR = 'jwtHdr'.freeze - JWT_PARSE = 'jwtParse'.freeze - SET_DATA = 'setData'.freeze - SET_TYPE = 'setType'.freeze + DUP = 'dup' + JWS = 'jws' + JWT_AUD = 'jwtAud' + JWT_CRYPTO = 'jwtCrypto' + JWT_HDR = 'jwtHdr' + JWT_PARSE = 'jwtParse' + SET_DATA = 'setData' + SET_TYPE = 'setType' end validate :validate_iss diff --git a/app/forms/totp_setup_form.rb b/app/forms/totp_setup_form.rb index 5974b9fea06..8f04facd34a 100644 --- a/app/forms/totp_setup_form.rb +++ b/app/forms/totp_setup_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TotpSetupForm include ActiveModel::Model diff --git a/app/forms/totp_verification_form.rb b/app/forms/totp_verification_form.rb index 69161dec934..94721bf4b6a 100644 --- a/app/forms/totp_verification_form.rb +++ b/app/forms/totp_verification_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TotpVerificationForm def initialize(user, code) @user = user diff --git a/app/forms/two_factor_authentication/auth_app_delete_form.rb b/app/forms/two_factor_authentication/auth_app_delete_form.rb index 6a49f4513e4..ea7274d2bd3 100644 --- a/app/forms/two_factor_authentication/auth_app_delete_form.rb +++ b/app/forms/two_factor_authentication/auth_app_delete_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class AuthAppDeleteForm include ActiveModel::Model diff --git a/app/forms/two_factor_authentication/auth_app_update_form.rb b/app/forms/two_factor_authentication/auth_app_update_form.rb index cd6bb2dbcbb..cbecad4c8e5 100644 --- a/app/forms/two_factor_authentication/auth_app_update_form.rb +++ b/app/forms/two_factor_authentication/auth_app_update_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class AuthAppUpdateForm include ActiveModel::Model diff --git a/app/forms/two_factor_authentication/piv_cac_delete_form.rb b/app/forms/two_factor_authentication/piv_cac_delete_form.rb index 5b4a9da898f..4570546fcfb 100644 --- a/app/forms/two_factor_authentication/piv_cac_delete_form.rb +++ b/app/forms/two_factor_authentication/piv_cac_delete_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PivCacDeleteForm include ActiveModel::Model diff --git a/app/forms/two_factor_authentication/piv_cac_update_form.rb b/app/forms/two_factor_authentication/piv_cac_update_form.rb index 2c8144f6072..bbce096d865 100644 --- a/app/forms/two_factor_authentication/piv_cac_update_form.rb +++ b/app/forms/two_factor_authentication/piv_cac_update_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PivCacUpdateForm include ActiveModel::Model diff --git a/app/forms/two_factor_authentication/webauthn_delete_form.rb b/app/forms/two_factor_authentication/webauthn_delete_form.rb index 73756f39434..8d965a66dd5 100644 --- a/app/forms/two_factor_authentication/webauthn_delete_form.rb +++ b/app/forms/two_factor_authentication/webauthn_delete_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class WebauthnDeleteForm include ActiveModel::Model diff --git a/app/forms/two_factor_authentication/webauthn_update_form.rb b/app/forms/two_factor_authentication/webauthn_update_form.rb index abb537eb7fd..6d104afe8ab 100644 --- a/app/forms/two_factor_authentication/webauthn_update_form.rb +++ b/app/forms/two_factor_authentication/webauthn_update_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class WebauthnUpdateForm include ActiveModel::Model diff --git a/app/forms/two_factor_login_options_form.rb b/app/forms/two_factor_login_options_form.rb index d328c09fb0b..9de0e02f158 100644 --- a/app/forms/two_factor_login_options_form.rb +++ b/app/forms/two_factor_login_options_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TwoFactorLoginOptionsForm include ActiveModel::Model diff --git a/app/forms/two_factor_options_form.rb b/app/forms/two_factor_options_form.rb index 8f0333fa1ab..1a13bac7f80 100644 --- a/app/forms/two_factor_options_form.rb +++ b/app/forms/two_factor_options_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TwoFactorOptionsForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper diff --git a/app/forms/update_email_language_form.rb b/app/forms/update_email_language_form.rb index 6449154f933..99b42521d30 100644 --- a/app/forms/update_email_language_form.rb +++ b/app/forms/update_email_language_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UpdateEmailLanguageForm include ActiveModel::Model diff --git a/app/forms/update_user_password_form.rb b/app/forms/update_user_password_form.rb index 9bda95c022e..f8254b0f8c5 100644 --- a/app/forms/update_user_password_form.rb +++ b/app/forms/update_user_password_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UpdateUserPasswordForm include ActiveModel::Model include FormPasswordValidator diff --git a/app/forms/user_piv_cac_login_form.rb b/app/forms/user_piv_cac_login_form.rb index e4e7e83368d..cf6c8810139 100644 --- a/app/forms/user_piv_cac_login_form.rb +++ b/app/forms/user_piv_cac_login_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UserPivCacLoginForm include ActiveModel::Model include PivCacFormHelpers diff --git a/app/forms/user_piv_cac_setup_form.rb b/app/forms/user_piv_cac_setup_form.rb index eb4df3cf97b..e99b965c497 100644 --- a/app/forms/user_piv_cac_setup_form.rb +++ b/app/forms/user_piv_cac_setup_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UserPivCacSetupForm include ActiveModel::Model include PivCacFormHelpers diff --git a/app/forms/user_piv_cac_verification_form.rb b/app/forms/user_piv_cac_verification_form.rb index 66131e32a6a..d479f2c6e68 100644 --- a/app/forms/user_piv_cac_verification_form.rb +++ b/app/forms/user_piv_cac_verification_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UserPivCacVerificationForm include ActiveModel::Model include PivCacFormHelpers diff --git a/app/forms/verify_password_form.rb b/app/forms/verify_password_form.rb index e7457a9a908..02aea64add5 100644 --- a/app/forms/verify_password_form.rb +++ b/app/forms/verify_password_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class VerifyPasswordForm include ActiveModel::Model diff --git a/app/forms/verify_personal_key_form.rb b/app/forms/verify_personal_key_form.rb index 1c4fdfdbfb5..ed56ae5e6f6 100644 --- a/app/forms/verify_personal_key_form.rb +++ b/app/forms/verify_personal_key_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class VerifyPersonalKeyForm include ActiveModel::Model include PersonalKeyValidator diff --git a/app/forms/webauthn_setup_form.rb b/app/forms/webauthn_setup_form.rb index 84678797690..bd3e701a3c6 100644 --- a/app/forms/webauthn_setup_form.rb +++ b/app/forms/webauthn_setup_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WebauthnSetupForm include ActiveModel::Model diff --git a/app/forms/webauthn_verification_form.rb b/app/forms/webauthn_verification_form.rb index 492df43286d..b34a436f9e8 100644 --- a/app/forms/webauthn_verification_form.rb +++ b/app/forms/webauthn_verification_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # The WebauthnVerificationForm class is responsible for validating webauthn verification input class WebauthnVerificationForm include ActiveModel::Model diff --git a/app/forms/webauthn_visit_form.rb b/app/forms/webauthn_visit_form.rb index d299057e0b1..df3b35dc3b3 100644 --- a/app/forms/webauthn_visit_form.rb +++ b/app/forms/webauthn_visit_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WebauthnVisitForm include ActiveModel::Model include ActionView::Helpers::UrlHelper diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index 39d2f12754e..e2b60db5214 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FormHelper # This method is single statement spread across many lines for readability def us_states_territories diff --git a/app/helpers/go_back_helper.rb b/app/helpers/go_back_helper.rb index 9a89ce9efef..968e9d098b6 100644 --- a/app/helpers/go_back_helper.rb +++ b/app/helpers/go_back_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module GoBackHelper def go_back_path referer_string = request.referer diff --git a/app/helpers/locale_helper.rb b/app/helpers/locale_helper.rb index 756bbe8faf7..67706bc1cea 100644 --- a/app/helpers/locale_helper.rb +++ b/app/helpers/locale_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module LocaleHelper def locale_url_param active_locale = I18n.locale diff --git a/app/helpers/opt_in_helper.rb b/app/helpers/opt_in_helper.rb index fc7a5e3f3eb..5db0323aa5c 100644 --- a/app/helpers/opt_in_helper.rb +++ b/app/helpers/opt_in_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OptInHelper def opt_in_analytics_properties if IdentityConfig.store.in_person_proofing_opt_in_enabled diff --git a/app/helpers/session_timeout_warning_helper.rb b/app/helpers/session_timeout_warning_helper.rb index 03d2a15a3bf..c2a93a3cee8 100644 --- a/app/helpers/session_timeout_warning_helper.rb +++ b/app/helpers/session_timeout_warning_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SessionTimeoutWarningHelper def session_timeout_frequency IdentityConfig.store.session_check_frequency diff --git a/app/helpers/stylesheet_helper.rb b/app/helpers/stylesheet_helper.rb index 938310b8a1e..ba2de558b67 100644 --- a/app/helpers/stylesheet_helper.rb +++ b/app/helpers/stylesheet_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Rails/HelperInstanceVariable module StylesheetHelper def stylesheet_tag_once(*names) diff --git a/app/jobs/address_proofing_job.rb b/app/jobs/address_proofing_job.rb index 9a757726b7f..a4a1e08c88d 100644 --- a/app/jobs/address_proofing_job.rb +++ b/app/jobs/address_proofing_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddressProofingJob < ApplicationJob include JobHelpers::StaleJobHelper diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index 7009094ac53..212d15aa107 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ApplicationJob < ActiveJob::Base self.log_arguments = false # Automatically retry jobs that encountered a deadlock diff --git a/app/jobs/fraud_rejection_daily_job.rb b/app/jobs/fraud_rejection_daily_job.rb index 0df32ea88aa..86635c3c419 100644 --- a/app/jobs/fraud_rejection_daily_job.rb +++ b/app/jobs/fraud_rejection_daily_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FraudRejectionDailyJob < ApplicationJob queue_as :low diff --git a/app/jobs/get_usps_proofing_results_job.rb b/app/jobs/get_usps_proofing_results_job.rb index acf9b287ff8..d7222a3856a 100644 --- a/app/jobs/get_usps_proofing_results_job.rb +++ b/app/jobs/get_usps_proofing_results_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GetUspsProofingResultsJob < ApplicationJob MILLISECONDS_PER_SECOND = 1000.0 # Specify float value to use floating point math IPP_STATUS_PASSED = 'In-person passed' diff --git a/app/jobs/get_usps_ready_proofing_results_job.rb b/app/jobs/get_usps_ready_proofing_results_job.rb index b0203406d22..b668ce81c38 100644 --- a/app/jobs/get_usps_ready_proofing_results_job.rb +++ b/app/jobs/get_usps_ready_proofing_results_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GetUspsReadyProofingResultsJob < GetUspsProofingResultsJob private diff --git a/app/jobs/get_usps_waiting_proofing_results_job.rb b/app/jobs/get_usps_waiting_proofing_results_job.rb index 1faeac8412b..a5bda9dfa26 100644 --- a/app/jobs/get_usps_waiting_proofing_results_job.rb +++ b/app/jobs/get_usps_waiting_proofing_results_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GetUspsWaitingProofingResultsJob < GetUspsProofingResultsJob private diff --git a/app/jobs/gpo_daily_job.rb b/app/jobs/gpo_daily_job.rb index f913744be5e..b1b421b9c60 100644 --- a/app/jobs/gpo_daily_job.rb +++ b/app/jobs/gpo_daily_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoDailyJob < ApplicationJob queue_as :low diff --git a/app/jobs/gpo_expiration_job.rb b/app/jobs/gpo_expiration_job.rb index dc57a0f97ab..201a1c69c1e 100644 --- a/app/jobs/gpo_expiration_job.rb +++ b/app/jobs/gpo_expiration_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoExpirationJob < ApplicationJob queue_as :low diff --git a/app/jobs/gpo_reminder_job.rb b/app/jobs/gpo_reminder_job.rb index 5345a0a8bc9..2d721caea0d 100644 --- a/app/jobs/gpo_reminder_job.rb +++ b/app/jobs/gpo_reminder_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoReminderJob < ApplicationJob queue_as :low diff --git a/app/jobs/heartbeat_job.rb b/app/jobs/heartbeat_job.rb index 3c092e9203d..7aa6cdf8736 100644 --- a/app/jobs/heartbeat_job.rb +++ b/app/jobs/heartbeat_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class HeartbeatJob < ApplicationJob queue_as :default diff --git a/app/jobs/in_person/enrollments_ready_for_status_check/batch_processor.rb b/app/jobs/in_person/enrollments_ready_for_status_check/batch_processor.rb index 2098bda3cae..7868a8367ac 100644 --- a/app/jobs/in_person/enrollments_ready_for_status_check/batch_processor.rb +++ b/app/jobs/in_person/enrollments_ready_for_status_check/batch_processor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InPerson::EnrollmentsReadyForStatusCheck class BatchProcessor # @param [InPerson::EnrollmentsReadyForStatusCheck::ErrorReporter] error_reporter diff --git a/app/jobs/in_person/enrollments_ready_for_status_check/enrollment_pipeline.rb b/app/jobs/in_person/enrollments_ready_for_status_check/enrollment_pipeline.rb index 380ea603d0b..fb2f8a0d060 100644 --- a/app/jobs/in_person/enrollments_ready_for_status_check/enrollment_pipeline.rb +++ b/app/jobs/in_person/enrollments_ready_for_status_check/enrollment_pipeline.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InPerson::EnrollmentsReadyForStatusCheck class EnrollmentPipeline # @param [InPerson::EnrollmentsReadyForStatusCheck::ErrorReporter] error_reporter diff --git a/app/jobs/in_person/enrollments_ready_for_status_check/error_reporter.rb b/app/jobs/in_person/enrollments_ready_for_status_check/error_reporter.rb index 31c2f2d2f1a..efa87cca410 100644 --- a/app/jobs/in_person/enrollments_ready_for_status_check/error_reporter.rb +++ b/app/jobs/in_person/enrollments_ready_for_status_check/error_reporter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InPerson module EnrollmentsReadyForStatusCheck class ErrorReporter diff --git a/app/jobs/in_person/enrollments_ready_for_status_check/sqs_batch_wrapper.rb b/app/jobs/in_person/enrollments_ready_for_status_check/sqs_batch_wrapper.rb index 6c834b08b2f..2e1b799c944 100644 --- a/app/jobs/in_person/enrollments_ready_for_status_check/sqs_batch_wrapper.rb +++ b/app/jobs/in_person/enrollments_ready_for_status_check/sqs_batch_wrapper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InPerson::EnrollmentsReadyForStatusCheck class SqsBatchWrapper # @param [Aws::SQS::Client] sqs_client AWS SQS Client diff --git a/app/jobs/in_person/enrollments_ready_for_status_check_job.rb b/app/jobs/in_person/enrollments_ready_for_status_check_job.rb index 3c7c48d1988..ba8e2f82017 100644 --- a/app/jobs/in_person/enrollments_ready_for_status_check_job.rb +++ b/app/jobs/in_person/enrollments_ready_for_status_check_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module InPerson # This job checks a queue regularly to determine whether USPS has notitied us # about whether an in-person enrollment is ready to have its status checked. If diff --git a/app/jobs/job_helpers/encryption_helper.rb b/app/jobs/job_helpers/encryption_helper.rb index f632ca409bf..3e648cd0736 100644 --- a/app/jobs/job_helpers/encryption_helper.rb +++ b/app/jobs/job_helpers/encryption_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module JobHelpers class EncryptionHelper def decrypt(data:, iv:, key:) diff --git a/app/jobs/job_helpers/s3_helper.rb b/app/jobs/job_helpers/s3_helper.rb index 614cf435ef6..a095ccb0382 100644 --- a/app/jobs/job_helpers/s3_helper.rb +++ b/app/jobs/job_helpers/s3_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module JobHelpers class S3Helper def s3_url?(url) diff --git a/app/jobs/job_helpers/stale_job_helper.rb b/app/jobs/job_helpers/stale_job_helper.rb index 151a406f937..e96e8077da4 100644 --- a/app/jobs/job_helpers/stale_job_helper.rb +++ b/app/jobs/job_helpers/stale_job_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module JobHelpers module StaleJobHelper class StaleJobError < StandardError; end diff --git a/app/jobs/job_helpers/timer.rb b/app/jobs/job_helpers/timer.rb index 7942bc88815..7e5ed536444 100644 --- a/app/jobs/job_helpers/timer.rb +++ b/app/jobs/job_helpers/timer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'time' module JobHelpers diff --git a/app/jobs/phone_number_opt_out_sync_job.rb b/app/jobs/phone_number_opt_out_sync_job.rb index a1f67341c8e..9576ceeae7c 100644 --- a/app/jobs/phone_number_opt_out_sync_job.rb +++ b/app/jobs/phone_number_opt_out_sync_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PhoneNumberOptOutSyncJob < ApplicationJob queue_as :long_running diff --git a/app/jobs/reports/agreement_summary_report.rb b/app/jobs/reports/agreement_summary_report.rb index f7fef643f1d..38493af7987 100644 --- a/app/jobs/reports/agreement_summary_report.rb +++ b/app/jobs/reports/agreement_summary_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'csv' module Reports class AgreementSummaryReport < BaseReport - REPORT_NAME = 'agreement-summary-report'.freeze + REPORT_NAME = 'agreement-summary-report' def perform(_date) csv = build_report diff --git a/app/jobs/reports/authentication_report.rb b/app/jobs/reports/authentication_report.rb index 4c06d40ae65..516e0eec45e 100644 --- a/app/jobs/reports/authentication_report.rb +++ b/app/jobs/reports/authentication_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'reporting/authentication_report' module Reports diff --git a/app/jobs/reports/base_report.rb b/app/jobs/reports/base_report.rb index e15bacb4143..3e38421f56c 100644 --- a/app/jobs/reports/base_report.rb +++ b/app/jobs/reports/base_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'identity/hostdata' module Reports diff --git a/app/jobs/reports/combined_invoice_supplement_report.rb b/app/jobs/reports/combined_invoice_supplement_report.rb index a265aeb4c0b..fad65ab07c4 100644 --- a/app/jobs/reports/combined_invoice_supplement_report.rb +++ b/app/jobs/reports/combined_invoice_supplement_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'csv' module Reports class CombinedInvoiceSupplementReport < BaseReport - REPORT_NAME = 'combined-invoice-supplement-report'.freeze + REPORT_NAME = 'combined-invoice-supplement-report' def perform(_date) csv = build_csv(IaaReportingHelper.iaas) diff --git a/app/jobs/reports/daily_auths_report.rb b/app/jobs/reports/daily_auths_report.rb index 0dd550321bb..b8ab5c6f334 100644 --- a/app/jobs/reports/daily_auths_report.rb +++ b/app/jobs/reports/daily_auths_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reports class DailyAuthsReport < BaseReport REPORT_NAME = 'daily-auths-report' diff --git a/app/jobs/reports/daily_dropoffs_report.rb b/app/jobs/reports/daily_dropoffs_report.rb index a69ec6e6bbc..01807089f73 100644 --- a/app/jobs/reports/daily_dropoffs_report.rb +++ b/app/jobs/reports/daily_dropoffs_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' module Reports diff --git a/app/jobs/reports/daily_registrations_report.rb b/app/jobs/reports/daily_registrations_report.rb index 09ecb803397..9ed3fd62ac6 100644 --- a/app/jobs/reports/daily_registrations_report.rb +++ b/app/jobs/reports/daily_registrations_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reports class DailyRegistrationsReport < BaseReport REPORT_NAME = 'daily-registrations-report' diff --git a/app/jobs/reports/deleted_user_accounts_report.rb b/app/jobs/reports/deleted_user_accounts_report.rb index 5bdd18925d4..7e1a80aaa1b 100644 --- a/app/jobs/reports/deleted_user_accounts_report.rb +++ b/app/jobs/reports/deleted_user_accounts_report.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require 'identity/hostdata' require 'csv' module Reports class DeletedUserAccountsReport < BaseReport - REPORT_NAME = 'deleted-user-accounts-report'.freeze + REPORT_NAME = 'deleted-user-accounts-report' def perform(_date) configs = IdentityConfig.store.deleted_user_accounts_report_configs @@ -26,7 +28,7 @@ def perform(_date) private def deleted_user_accounts_data_for_issuers(issuers) - csv = CSV.new('', row_sep: "\r\n") + csv = CSV.new(+'', row_sep: "\r\n") issuers.each do |issuer| transaction_with_timeout do rows = DeletedAccountsReport.call(issuer, 10_000) diff --git a/app/jobs/reports/duplicate_ssn_report.rb b/app/jobs/reports/duplicate_ssn_report.rb index 59f31b56fb4..2e727d77e16 100644 --- a/app/jobs/reports/duplicate_ssn_report.rb +++ b/app/jobs/reports/duplicate_ssn_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' module Reports diff --git a/app/jobs/reports/fraud_metrics_report.rb b/app/jobs/reports/fraud_metrics_report.rb index 12aca5bf475..33aa19c5685 100644 --- a/app/jobs/reports/fraud_metrics_report.rb +++ b/app/jobs/reports/fraud_metrics_report.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require 'csv' require 'reporting/fraud_metrics_lg99_report' module Reports class FraudMetricsReport < BaseReport - REPORT_NAME = 'fraud-metrics-report'.freeze + REPORT_NAME = 'fraud-metrics-report' attr_reader :report_date diff --git a/app/jobs/reports/identity_verification_report.rb b/app/jobs/reports/identity_verification_report.rb index fa5f2fc41df..f54bfbb4ea9 100644 --- a/app/jobs/reports/identity_verification_report.rb +++ b/app/jobs/reports/identity_verification_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'reporting/identity_verification_report' module Reports class IdentityVerificationReport < BaseReport - REPORT_NAME = 'identity-verification-report'.freeze + REPORT_NAME = 'identity-verification-report' attr_accessor :report_date diff --git a/app/jobs/reports/month_helper.rb b/app/jobs/reports/month_helper.rb index dd39a32d2ea..d99f82ddb16 100644 --- a/app/jobs/reports/month_helper.rb +++ b/app/jobs/reports/month_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reports module MonthHelper module_function diff --git a/app/jobs/reports/monthly_gpo_letter_requests_report.rb b/app/jobs/reports/monthly_gpo_letter_requests_report.rb index 3df8f434f47..4776b8be807 100644 --- a/app/jobs/reports/monthly_gpo_letter_requests_report.rb +++ b/app/jobs/reports/monthly_gpo_letter_requests_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'identity/hostdata' module Reports class MonthlyGpoLetterRequestsReport < BaseReport - REPORT_NAME = 'monthly-usps-letter-requests-report'.freeze + REPORT_NAME = 'monthly-usps-letter-requests-report' def perform(_date, start_time: first_of_this_month, end_time: end_of_today) daily_results = transaction_with_timeout do diff --git a/app/jobs/reports/monthly_key_metrics_report.rb b/app/jobs/reports/monthly_key_metrics_report.rb index e472f3f7f0c..af8a0b92002 100644 --- a/app/jobs/reports/monthly_key_metrics_report.rb +++ b/app/jobs/reports/monthly_key_metrics_report.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require 'csv' require 'reporting/proofing_rate_report' module Reports class MonthlyKeyMetricsReport < BaseReport - REPORT_NAME = 'monthly-key-metrics-report'.freeze + REPORT_NAME = 'monthly-key-metrics-report' attr_reader :report_date diff --git a/app/jobs/reports/query_helpers.rb b/app/jobs/reports/query_helpers.rb index 54d76f05dad..85415af4869 100644 --- a/app/jobs/reports/query_helpers.rb +++ b/app/jobs/reports/query_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reports module QueryHelpers def quote(value) diff --git a/app/jobs/reports/sp_active_users_report.rb b/app/jobs/reports/sp_active_users_report.rb index a597e9cbf38..f12619d1a40 100644 --- a/app/jobs/reports/sp_active_users_report.rb +++ b/app/jobs/reports/sp_active_users_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'identity/hostdata' module Reports class SpActiveUsersReport < BaseReport - REPORT_NAME = 'sp-active-users-report'.freeze + REPORT_NAME = 'sp-active-users-report' # This daily job captures the total number of active users per SP from the beginning of the the # current fiscal year until now. diff --git a/app/jobs/reports/sp_issuer_user_counts_report.rb b/app/jobs/reports/sp_issuer_user_counts_report.rb index d1c75e1f7c9..4e1afc11066 100644 --- a/app/jobs/reports/sp_issuer_user_counts_report.rb +++ b/app/jobs/reports/sp_issuer_user_counts_report.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + module Reports class SpIssuerUserCountsReport < BaseReport - REPORT_NAME = 'sp-issuer-user-counts-report'.freeze + REPORT_NAME = 'sp-issuer-user-counts-report' def perform(_date) configs = IdentityConfig.store.sp_issuer_user_counts_report_configs diff --git a/app/jobs/reports/sp_user_counts_report.rb b/app/jobs/reports/sp_user_counts_report.rb index 2304f951d55..73744e96e2b 100644 --- a/app/jobs/reports/sp_user_counts_report.rb +++ b/app/jobs/reports/sp_user_counts_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'identity/hostdata' module Reports class SpUserCountsReport < BaseReport - REPORT_NAME = 'sp-user-counts-report'.freeze + REPORT_NAME = 'sp-user-counts-report' def perform(_date) user_counts = transaction_with_timeout do diff --git a/app/jobs/reports/total_ial2_costs_report.rb b/app/jobs/reports/total_ial2_costs_report.rb index 071133d3b79..9af3aaf94f9 100644 --- a/app/jobs/reports/total_ial2_costs_report.rb +++ b/app/jobs/reports/total_ial2_costs_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'csv' module Reports class TotalIal2CostsReport < BaseReport - REPORT_NAME = 'total-ial2-costs'.freeze + REPORT_NAME = 'total-ial2-costs' NUM_LOOKBACK_DAYS = 45 def perform(date) diff --git a/app/jobs/reports/total_monthly_auths_report.rb b/app/jobs/reports/total_monthly_auths_report.rb index 89683294f85..f4fdffc44e3 100644 --- a/app/jobs/reports/total_monthly_auths_report.rb +++ b/app/jobs/reports/total_monthly_auths_report.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + require 'identity/hostdata' module Reports class TotalMonthlyAuthsReport < BaseReport - REPORT_NAME = 'total-monthly-auths-report'.freeze + REPORT_NAME = 'total-monthly-auths-report' def perform(_date) auth_counts = Db::MonthlySpAuthCount::TotalMonthlyAuthCounts.call diff --git a/app/jobs/reports/verification_failures_report.rb b/app/jobs/reports/verification_failures_report.rb index 90cf4d511be..4a8e4c03d25 100644 --- a/app/jobs/reports/verification_failures_report.rb +++ b/app/jobs/reports/verification_failures_report.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + require 'identity/hostdata' require 'csv' require 'fugit' module Reports class VerificationFailuresReport < BaseReport - REPORT_NAME = 'verification-failures-report'.freeze + REPORT_NAME = 'verification-failures-report' def perform(date) csv_reports = [] @@ -21,7 +23,7 @@ def perform(date) private def verification_errors_data_for_issuers(date, report_name, issuers) - csv = CSV.new('', row_sep: "\r\n") + csv = CSV.new(+'', row_sep: "\r\n") csv << %w[uuid welcome_view_at error_code] issuers.each do |issuer| transaction_with_timeout do diff --git a/app/jobs/resolution_proofing_job.rb b/app/jobs/resolution_proofing_job.rb index b1934f1b620..868cc78ae71 100644 --- a/app/jobs/resolution_proofing_job.rb +++ b/app/jobs/resolution_proofing_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ResolutionProofingJob < ApplicationJob include JobHelpers::StaleJobHelper diff --git a/app/jobs/risc_delivery_job.rb b/app/jobs/risc_delivery_job.rb index f6a4aa8bd21..b9d566335c0 100644 --- a/app/jobs/risc_delivery_job.rb +++ b/app/jobs/risc_delivery_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RiscDeliveryJob < ApplicationJob queue_as :low diff --git a/app/jobs/threat_metrix_js_verification_job.rb b/app/jobs/threat_metrix_js_verification_job.rb index dbfbf90c252..15d94804c64 100644 --- a/app/jobs/threat_metrix_js_verification_job.rb +++ b/app/jobs/threat_metrix_js_verification_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ThreatMetrixJsVerificationJob < ApplicationJob queue_as :default diff --git a/app/jobs/usps_auth_token_refresh_job.rb b/app/jobs/usps_auth_token_refresh_job.rb index 0299966c374..0cc066b6268 100644 --- a/app/jobs/usps_auth_token_refresh_job.rb +++ b/app/jobs/usps_auth_token_refresh_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UspsAuthTokenRefreshJob < ApplicationJob queue_as :default diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb index bfe7f2d475c..1c997e62271 100644 --- a/app/mailers/report_mailer.rb +++ b/app/mailers/report_mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' require 'caxlsx' diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 5027083feb7..2d93d530235 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # UserMailer handles all email sending to the User class. It expects to be called using `with` # that receives a `user` and `email_address`. This pattern is preferred as the User and # EmailAddress database records are needed across any email being sent. diff --git a/app/models/account_reset_request.rb b/app/models/account_reset_request.rb index 9080493eb66..0e4cd85d53a 100644 --- a/app/models/account_reset_request.rb +++ b/app/models/account_reset_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AccountResetRequest < ApplicationRecord self.ignored_columns = %w[reported_fraud_at] diff --git a/app/models/agency.rb b/app/models/agency.rb index 52e6cbf1767..c1a4496be4c 100644 --- a/app/models/agency.rb +++ b/app/models/agency.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agency < ApplicationRecord has_many :agency_identities, dependent: :destroy # rubocop:disable Rails/HasManyOrHasOneDependent diff --git a/app/models/agency_identity.rb b/app/models/agency_identity.rb index b36d11bf973..73bd9a274d7 100644 --- a/app/models/agency_identity.rb +++ b/app/models/agency_identity.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AgencyIdentity < ApplicationRecord belongs_to :user belongs_to :agency diff --git a/app/models/agreements/iaa.rb b/app/models/agreements/iaa.rb index 96536292dec..5fed7771f3b 100644 --- a/app/models/agreements/iaa.rb +++ b/app/models/agreements/iaa.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Abstract class to combine IaaGtcs and IaaOrders for JSON serialization module Agreements class Iaa diff --git a/app/models/agreements/iaa_gtc.rb b/app/models/agreements/iaa_gtc.rb index e75ade61478..919b46ff887 100644 --- a/app/models/agreements/iaa_gtc.rb +++ b/app/models/agreements/iaa_gtc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::IaaGtc < ApplicationRecord self.table_name = 'iaa_gtcs' diff --git a/app/models/agreements/iaa_order.rb b/app/models/agreements/iaa_order.rb index 703d604ad89..846e98d3f57 100644 --- a/app/models/agreements/iaa_order.rb +++ b/app/models/agreements/iaa_order.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::IaaOrder < ApplicationRecord self.table_name = 'iaa_orders' diff --git a/app/models/agreements/integration.rb b/app/models/agreements/integration.rb index e02da85aa2f..cb32e11c5e6 100644 --- a/app/models/agreements/integration.rb +++ b/app/models/agreements/integration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::Integration < ApplicationRecord self.table_name = 'integrations' diff --git a/app/models/agreements/integration_status.rb b/app/models/agreements/integration_status.rb index 77d5d46cdd4..27dbe4cada6 100644 --- a/app/models/agreements/integration_status.rb +++ b/app/models/agreements/integration_status.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::IntegrationStatus < ApplicationRecord self.table_name = 'integration_statuses' diff --git a/app/models/agreements/integration_usage.rb b/app/models/agreements/integration_usage.rb index efcc4d81e6e..37ee0b17827 100644 --- a/app/models/agreements/integration_usage.rb +++ b/app/models/agreements/integration_usage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::IntegrationUsage < ApplicationRecord self.table_name = 'integration_usages' diff --git a/app/models/agreements/partner_account.rb b/app/models/agreements/partner_account.rb index acd626c5d6b..8c77c157e16 100644 --- a/app/models/agreements/partner_account.rb +++ b/app/models/agreements/partner_account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::PartnerAccount < ApplicationRecord self.table_name = 'partner_accounts' diff --git a/app/models/agreements/partner_account_status.rb b/app/models/agreements/partner_account_status.rb index ff265800f20..85b17f80cad 100644 --- a/app/models/agreements/partner_account_status.rb +++ b/app/models/agreements/partner_account_status.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Agreements::PartnerAccountStatus < ApplicationRecord self.table_name = 'partner_account_statuses' diff --git a/app/models/application_record.rb b/app/models/application_record.rb index a53896e314c..1b05976a6e1 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ApplicationRecord < ActiveRecord::Base self.abstract_class = true diff --git a/app/models/auth_app_configuration.rb b/app/models/auth_app_configuration.rb index a0dc3abe526..35c51ea70d6 100644 --- a/app/models/auth_app_configuration.rb +++ b/app/models/auth_app_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AuthAppConfiguration < ApplicationRecord include EncryptableAttribute diff --git a/app/models/backup_code_configuration.rb b/app/models/backup_code_configuration.rb index 8cbb9e0f825..1fc4e5e8600 100644 --- a/app/models/backup_code_configuration.rb +++ b/app/models/backup_code_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BackupCodeConfiguration < ApplicationRecord NUM_WORDS = 3 diff --git a/app/models/concerns/backup_code_encrypted_attribute_overrides.rb b/app/models/concerns/backup_code_encrypted_attribute_overrides.rb index 495b610fb59..420be26e629 100644 --- a/app/models/concerns/backup_code_encrypted_attribute_overrides.rb +++ b/app/models/concerns/backup_code_encrypted_attribute_overrides.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module BackupCodeEncryptedAttributeOverrides extend ActiveSupport::Concern diff --git a/app/models/concerns/deprecated_user_attributes.rb b/app/models/concerns/deprecated_user_attributes.rb index d89542cb4ec..e77dded3c97 100644 --- a/app/models/concerns/deprecated_user_attributes.rb +++ b/app/models/concerns/deprecated_user_attributes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DeprecatedUserAttributes extend ActiveSupport::Concern diff --git a/app/models/concerns/encryptable_attribute.rb b/app/models/concerns/encryptable_attribute.rb index 0ff599f51db..9ad7a2554db 100644 --- a/app/models/concerns/encryptable_attribute.rb +++ b/app/models/concerns/encryptable_attribute.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EncryptableAttribute extend ActiveSupport::Concern diff --git a/app/models/concerns/non_null_uuid.rb b/app/models/concerns/non_null_uuid.rb index 807db2e5cd4..6fdee21300d 100644 --- a/app/models/concerns/non_null_uuid.rb +++ b/app/models/concerns/non_null_uuid.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Default populates a uuid field with a v4 UUID. module NonNullUuid extend ActiveSupport::Concern diff --git a/app/models/concerns/user_access_key_overrides.rb b/app/models/concerns/user_access_key_overrides.rb index 54ba8e86e46..5806728174d 100644 --- a/app/models/concerns/user_access_key_overrides.rb +++ b/app/models/concerns/user_access_key_overrides.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # In order to perform scrypt calculation of password in a single # place for both password and PII encryption, we override # a few methods to build the encrypted_password via UserAccessKey diff --git a/app/models/concerns/user_encrypted_attribute_overrides.rb b/app/models/concerns/user_encrypted_attribute_overrides.rb index 5370e00ab3a..c4fa99107db 100644 --- a/app/models/concerns/user_encrypted_attribute_overrides.rb +++ b/app/models/concerns/user_encrypted_attribute_overrides.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserEncryptedAttributeOverrides extend ActiveSupport::Concern diff --git a/app/models/concerns/user_otp_methods.rb b/app/models/concerns/user_otp_methods.rb index 80a54a1ca9b..8f5140a854a 100644 --- a/app/models/concerns/user_otp_methods.rb +++ b/app/models/concerns/user_otp_methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'otp_code_generator' module UserOtpMethods diff --git a/app/models/deleted_user.rb b/app/models/deleted_user.rb index 2628a6e4d1f..84035546acd 100644 --- a/app/models/deleted_user.rb +++ b/app/models/deleted_user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DeletedUser < ApplicationRecord def self.create_from_user(user) return unless user diff --git a/app/models/device.rb b/app/models/device.rb index 89941e00b1a..92ff248fd46 100644 --- a/app/models/device.rb +++ b/app/models/device.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Device < ApplicationRecord belongs_to :user # rubocop:disable Rails/HasManyOrHasOneDependent diff --git a/app/models/disposable_email_domain.rb b/app/models/disposable_email_domain.rb index 919224a8ec1..6a5322631f7 100644 --- a/app/models/disposable_email_domain.rb +++ b/app/models/disposable_email_domain.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DisposableEmailDomain < ApplicationRecord def self.disposable?(domain) exists?(name: subdomains(domain)) diff --git a/app/models/doc_auth_log.rb b/app/models/doc_auth_log.rb index fd30c565d72..498147064e9 100644 --- a/app/models/doc_auth_log.rb +++ b/app/models/doc_auth_log.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DocAuthLog < ApplicationRecord belongs_to :user diff --git a/app/models/document_capture_session.rb b/app/models/document_capture_session.rb index c2a42e5c118..7e6ddec3c07 100644 --- a/app/models/document_capture_session.rb +++ b/app/models/document_capture_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DocumentCaptureSession < ApplicationRecord include NonNullUuid include ApplicationHelper diff --git a/app/models/email_address.rb b/app/models/email_address.rb index b02f68b965f..544c86b7236 100644 --- a/app/models/email_address.rb +++ b/app/models/email_address.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EmailAddress < ApplicationRecord include EncryptableAttribute diff --git a/app/models/event.rb b/app/models/event.rb index 43e2e22ca89..13c07d6bdd4 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Event < ApplicationRecord belongs_to :user belongs_to :device diff --git a/app/models/federated_protocols/oidc.rb b/app/models/federated_protocols/oidc.rb index be1605d9b6d..60673b75728 100644 --- a/app/models/federated_protocols/oidc.rb +++ b/app/models/federated_protocols/oidc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FederatedProtocols class Oidc def initialize(request) diff --git a/app/models/federated_protocols/saml.rb b/app/models/federated_protocols/saml.rb index 43ab83c5f22..51690325be3 100644 --- a/app/models/federated_protocols/saml.rb +++ b/app/models/federated_protocols/saml.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FederatedProtocols class Saml def initialize(request) diff --git a/app/models/fraud_review_request.rb b/app/models/fraud_review_request.rb index d4f8a39325a..882b2a57a9b 100644 --- a/app/models/fraud_review_request.rb +++ b/app/models/fraud_review_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FraudReviewRequest < ApplicationRecord include NonNullUuid diff --git a/app/models/gpo_confirmation.rb b/app/models/gpo_confirmation.rb index 8edfdd3eb7e..04a99d6e903 100644 --- a/app/models/gpo_confirmation.rb +++ b/app/models/gpo_confirmation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoConfirmation < ApplicationRecord self.table_name = 'usps_confirmations' diff --git a/app/models/gpo_confirmation_code.rb b/app/models/gpo_confirmation_code.rb index 7c34fe6cec2..a986d76b4c8 100644 --- a/app/models/gpo_confirmation_code.rb +++ b/app/models/gpo_confirmation_code.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoConfirmationCode < ApplicationRecord self.ignored_columns = [:bounced_at] diff --git a/app/models/in_person_enrollment.rb b/app/models/in_person_enrollment.rb index ec2324b27c9..4b028f28a2e 100644 --- a/app/models/in_person_enrollment.rb +++ b/app/models/in_person_enrollment.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'securerandom' class InPersonEnrollment < ApplicationRecord diff --git a/app/models/letter_requests_to_gpo_ftp_log.rb b/app/models/letter_requests_to_gpo_ftp_log.rb index f38ac4575e1..e564ac32d13 100644 --- a/app/models/letter_requests_to_gpo_ftp_log.rb +++ b/app/models/letter_requests_to_gpo_ftp_log.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LetterRequestsToGpoFtpLog < ApplicationRecord self.table_name = 'letter_requests_to_usps_ftp_logs' diff --git a/app/models/notification_phone_configuration.rb b/app/models/notification_phone_configuration.rb index 0dac0f13f7f..84a1998d3a8 100644 --- a/app/models/notification_phone_configuration.rb +++ b/app/models/notification_phone_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NotificationPhoneConfiguration < ApplicationRecord include EncryptableAttribute diff --git a/app/models/null_identity.rb b/app/models/null_identity.rb index 3a6b3de676d..276664906a3 100644 --- a/app/models/null_identity.rb +++ b/app/models/null_identity.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + # Null object pattern substitute for ServiceProviderIdentity class NullIdentity - SERVICE_PROVIDER = 'null-identity-service-provider'.freeze + SERVICE_PROVIDER = 'null-identity-service-provider' def service_provider SERVICE_PROVIDER diff --git a/app/models/personal_key_configuration.rb b/app/models/personal_key_configuration.rb index 22938693a7b..55ae14c09c5 100644 --- a/app/models/personal_key_configuration.rb +++ b/app/models/personal_key_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PersonalKeyConfiguration # This is a wrapping class that lets us interface with the personal key configuration in a # manner consistent with phone and webauthn configurations. diff --git a/app/models/phone_configuration.rb b/app/models/phone_configuration.rb index 7aec13dd78e..132a0f79b78 100644 --- a/app/models/phone_configuration.rb +++ b/app/models/phone_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PhoneConfiguration < ApplicationRecord include EncryptableAttribute diff --git a/app/models/phone_number_opt_out.rb b/app/models/phone_number_opt_out.rb index 868e26c5781..84e99871c50 100644 --- a/app/models/phone_number_opt_out.rb +++ b/app/models/phone_number_opt_out.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Represents a record of a phone number that has been opted out of SMS in AWS Pinpoint # AWS maintains separate opt-out lists per region, so this helps us keep track across regions class PhoneNumberOptOut < ApplicationRecord diff --git a/app/models/piv_cac_configuration.rb b/app/models/piv_cac_configuration.rb index 29ff9b5a920..89e5b5b5715 100644 --- a/app/models/piv_cac_configuration.rb +++ b/app/models/piv_cac_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PivCacConfiguration < ApplicationRecord belongs_to :user diff --git a/app/models/profile.rb b/app/models/profile.rb index 843c68f6460..c74ba71f725 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Profile < ApplicationRecord belongs_to :user # rubocop:disable Rails/InverseOf diff --git a/app/models/proofing_component.rb b/app/models/proofing_component.rb index 011ca97381a..55ef4d750f0 100644 --- a/app/models/proofing_component.rb +++ b/app/models/proofing_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ProofingComponent < ApplicationRecord belongs_to :user end diff --git a/app/models/registration_log.rb b/app/models/registration_log.rb index 5f3121154a2..79536c5fd8b 100644 --- a/app/models/registration_log.rb +++ b/app/models/registration_log.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RegistrationLog < ApplicationRecord belongs_to :user end diff --git a/app/models/security_event.rb b/app/models/security_event.rb index b2eba1ef210..0422a7e0c6e 100644 --- a/app/models/security_event.rb +++ b/app/models/security_event.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + class SecurityEvent < ApplicationRecord - AUTHORIZATION_FRAUD_DETECTED = 'https://schemas.login.gov/secevent/risc/event-type/authorization-fraud-detected'.freeze - IDENTITY_FRAUD_DETECTED = 'https://schemas.login.gov/secevent/risc/event-type/identity-fraud-detected'.freeze + AUTHORIZATION_FRAUD_DETECTED = 'https://schemas.login.gov/secevent/risc/event-type/authorization-fraud-detected' + IDENTITY_FRAUD_DETECTED = 'https://schemas.login.gov/secevent/risc/event-type/identity-fraud-detected' EVENT_TYPES = [ AUTHORIZATION_FRAUD_DETECTED, diff --git a/app/models/service_provider_identity.rb b/app/models/service_provider_identity.rb index 7c93219416d..84dcc6d148a 100644 --- a/app/models/service_provider_identity.rb +++ b/app/models/service_provider_identity.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Joins Users to ServiceProviders class ServiceProviderIdentity < ApplicationRecord self.table_name = :identities diff --git a/app/models/service_provider_request.rb b/app/models/service_provider_request.rb index 61e5365b83f..d036d82dff0 100644 --- a/app/models/service_provider_request.rb +++ b/app/models/service_provider_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ServiceProviderRequest # WARNING - Modification of these params requires particular care # since these objects are serialized to/from Redis and may be present diff --git a/app/models/sign_in_restriction.rb b/app/models/sign_in_restriction.rb index 24fc8866ce1..5e7207bce32 100644 --- a/app/models/sign_in_restriction.rb +++ b/app/models/sign_in_restriction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SignInRestriction < ApplicationRecord belongs_to :user end diff --git a/app/models/sp_cost.rb b/app/models/sp_cost.rb index 3f5a4ccb877..197104af5ef 100644 --- a/app/models/sp_cost.rb +++ b/app/models/sp_cost.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + class SpCost < ApplicationRecord end diff --git a/app/models/sp_return_log.rb b/app/models/sp_return_log.rb index 77032573923..8ab7430aa6c 100644 --- a/app/models/sp_return_log.rb +++ b/app/models/sp_return_log.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SpReturnLog < ApplicationRecord # rubocop:disable Rails/InverseOf belongs_to :user diff --git a/app/models/suspended_email.rb b/app/models/suspended_email.rb index 884837d00ad..4e3567b48a6 100644 --- a/app/models/suspended_email.rb +++ b/app/models/suspended_email.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SuspendedEmail < ApplicationRecord belongs_to :email_address validates :digested_base_email, presence: true diff --git a/app/models/user.rb b/app/models/user.rb index 0a7d8f74bb3..46cfa4074df 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class User < ApplicationRecord include NonNullUuid diff --git a/app/models/webauthn_configuration.rb b/app/models/webauthn_configuration.rb index e50c1201e19..cf57bac4d54 100644 --- a/app/models/webauthn_configuration.rb +++ b/app/models/webauthn_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WebauthnConfiguration < ApplicationRecord belongs_to :user validates :name, presence: true diff --git a/app/models/worker_job_application_record.rb b/app/models/worker_job_application_record.rb index 9d797423691..dba93683a44 100644 --- a/app/models/worker_job_application_record.rb +++ b/app/models/worker_job_application_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Rails/ApplicationRecord class WorkerJobApplicationRecord < ActiveRecord::Base self.abstract_class = true diff --git a/app/policies/email_policy.rb b/app/policies/email_policy.rb index d5f01cba3b3..676936dadb6 100644 --- a/app/policies/email_policy.rb +++ b/app/policies/email_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EmailPolicy def initialize(user) @user = EmailContext.new(user) diff --git a/app/policies/idv/flow_policy.rb b/app/policies/idv/flow_policy.rb index c11c1374a9a..31be5aaed63 100644 --- a/app/policies/idv/flow_policy.rb +++ b/app/policies/idv/flow_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class FlowPolicy attr_reader :idv_session, :user diff --git a/app/policies/idv/step_info.rb b/app/policies/idv/step_info.rb index e5b06df542c..20647d4f828 100644 --- a/app/policies/idv/step_info.rb +++ b/app/policies/idv/step_info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class StepInfo include ActiveModel::Validations diff --git a/app/policies/mfa_policy.rb b/app/policies/mfa_policy.rb index 7037e3c5840..6c217e3bb07 100644 --- a/app/policies/mfa_policy.rb +++ b/app/policies/mfa_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MfaPolicy def initialize(user) @user = user diff --git a/app/policies/pending_profile_policy.rb b/app/policies/pending_profile_policy.rb index 5af24f8e6f0..934b66de9fa 100644 --- a/app/policies/pending_profile_policy.rb +++ b/app/policies/pending_profile_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PendingProfilePolicy def initialize(user:, resolved_authn_context_result:, biometric_comparison_requested:) @user = user diff --git a/app/policies/service_provider_mfa_policy.rb b/app/policies/service_provider_mfa_policy.rb index c505a549c87..2db2ca5756c 100644 --- a/app/policies/service_provider_mfa_policy.rb +++ b/app/policies/service_provider_mfa_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ServiceProviderMfaPolicy attr_reader :mfa_context, :auth_methods_session, :resolved_authn_context_result diff --git a/app/policies/two_factor_authentication/auth_app_policy.rb b/app/policies/two_factor_authentication/auth_app_policy.rb index ed9d8053f85..90eae6cc3ee 100644 --- a/app/policies/two_factor_authentication/auth_app_policy.rb +++ b/app/policies/two_factor_authentication/auth_app_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class AuthAppPolicy def initialize(user) diff --git a/app/policies/two_factor_authentication/backup_code_policy.rb b/app/policies/two_factor_authentication/backup_code_policy.rb index 828790c6b0e..c16f011d66b 100644 --- a/app/policies/two_factor_authentication/backup_code_policy.rb +++ b/app/policies/two_factor_authentication/backup_code_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class BackupCodePolicy def initialize(user) diff --git a/app/policies/two_factor_authentication/personal_key_policy.rb b/app/policies/two_factor_authentication/personal_key_policy.rb index 3c886133caa..23a5eca7702 100644 --- a/app/policies/two_factor_authentication/personal_key_policy.rb +++ b/app/policies/two_factor_authentication/personal_key_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication # Checks if a user has a personal key as a 2FA method # (legacy 2FA, independent of having one for a profile) diff --git a/app/policies/two_factor_authentication/phone_policy.rb b/app/policies/two_factor_authentication/phone_policy.rb index ccdc0887e73..898c023e024 100644 --- a/app/policies/two_factor_authentication/phone_policy.rb +++ b/app/policies/two_factor_authentication/phone_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PhonePolicy def initialize(user) diff --git a/app/policies/two_factor_authentication/piv_cac_policy.rb b/app/policies/two_factor_authentication/piv_cac_policy.rb index bc801df83b4..2d4ff446a4e 100644 --- a/app/policies/two_factor_authentication/piv_cac_policy.rb +++ b/app/policies/two_factor_authentication/piv_cac_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PivCacPolicy def initialize(user) diff --git a/app/policies/two_factor_authentication/webauthn_policy.rb b/app/policies/two_factor_authentication/webauthn_policy.rb index 4ef62e41f70..5c608df36e9 100644 --- a/app/policies/two_factor_authentication/webauthn_policy.rb +++ b/app/policies/two_factor_authentication/webauthn_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication # The WebauthnPolicy class is responsible for handling the user policy of webauthn class WebauthnPolicy diff --git a/app/presenters/account_reset/pending_presenter.rb b/app/presenters/account_reset/pending_presenter.rb index 3325adec06d..30a159399bb 100644 --- a/app/presenters/account_reset/pending_presenter.rb +++ b/app/presenters/account_reset/pending_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class PendingPresenter include AccountResetConcern diff --git a/app/presenters/account_show_presenter.rb b/app/presenters/account_show_presenter.rb index 0a5025603aa..0b944d8f4f4 100644 --- a/app/presenters/account_show_presenter.rb +++ b/app/presenters/account_show_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AccountShowPresenter attr_reader :user, :decrypted_pii, :locked_for_session, :pii, :sp_session_request_url, :sp_name diff --git a/app/presenters/cancellation_presenter.rb b/app/presenters/cancellation_presenter.rb index 163a2767590..c6ab593a8b1 100644 --- a/app/presenters/cancellation_presenter.rb +++ b/app/presenters/cancellation_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CancellationPresenter include Rails.application.routes.url_helpers diff --git a/app/presenters/completions_presenter.rb b/app/presenters/completions_presenter.rb index 0a22209d908..95fc2e11ee0 100644 --- a/app/presenters/completions_presenter.rb +++ b/app/presenters/completions_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CompletionsPresenter attr_reader :current_user, :current_sp, :decrypted_pii, :requested_attributes, :completion_context diff --git a/app/presenters/confirm_delete_email_presenter.rb b/app/presenters/confirm_delete_email_presenter.rb index 1daf2d16802..a26f3a57192 100644 --- a/app/presenters/confirm_delete_email_presenter.rb +++ b/app/presenters/confirm_delete_email_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ConfirmDeleteEmailPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/confirmation_email_presenter.rb b/app/presenters/confirmation_email_presenter.rb index e1f61df6b33..4fd7e55b8f2 100644 --- a/app/presenters/confirmation_email_presenter.rb +++ b/app/presenters/confirmation_email_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ConfirmationEmailPresenter include ::NewRelic::Agent::MethodTracer diff --git a/app/presenters/eastern_time_presenter.rb b/app/presenters/eastern_time_presenter.rb index 91ac214ab7c..152219955fc 100644 --- a/app/presenters/eastern_time_presenter.rb +++ b/app/presenters/eastern_time_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EasternTimePresenter def initialize(timestamp) @timestamp = timestamp diff --git a/app/presenters/idv/address_presenter.rb b/app/presenters/idv/address_presenter.rb index b42aa09590d..26ca19b177d 100644 --- a/app/presenters/idv/address_presenter.rb +++ b/app/presenters/idv/address_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class AddressPresenter def initialize(pii:) diff --git a/app/presenters/idv/by_mail/request_letter_presenter.rb b/app/presenters/idv/by_mail/request_letter_presenter.rb index 7660de584e0..349e7554619 100644 --- a/app/presenters/idv/by_mail/request_letter_presenter.rb +++ b/app/presenters/idv/by_mail/request_letter_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module ByMail class RequestLetterPresenter diff --git a/app/presenters/idv/cancellations_presenter.rb b/app/presenters/idv/cancellations_presenter.rb index 0990eb9d8c6..c77158499b7 100644 --- a/app/presenters/idv/cancellations_presenter.rb +++ b/app/presenters/idv/cancellations_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class CancellationsPresenter include Rails.application.routes.url_helpers diff --git a/app/presenters/idv/in_person/ready_to_verify_presenter.rb b/app/presenters/idv/in_person/ready_to_verify_presenter.rb index 3398cb572c9..c84b0eb2e57 100644 --- a/app/presenters/idv/in_person/ready_to_verify_presenter.rb +++ b/app/presenters/idv/in_person/ready_to_verify_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class ReadyToVerifyPresenter diff --git a/app/presenters/idv/in_person/verification_results_email_presenter.rb b/app/presenters/idv/in_person/verification_results_email_presenter.rb index 98523931bbf..2a11a73351a 100644 --- a/app/presenters/idv/in_person/verification_results_email_presenter.rb +++ b/app/presenters/idv/in_person/verification_results_email_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class VerificationResultsEmailPresenter diff --git a/app/presenters/idv/otp_verification_presenter.rb b/app/presenters/idv/otp_verification_presenter.rb index 0dc0c25afcf..4041c782ad6 100644 --- a/app/presenters/idv/otp_verification_presenter.rb +++ b/app/presenters/idv/otp_verification_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class OtpVerificationPresenter include ActionView::Helpers::UrlHelper diff --git a/app/presenters/idv/ssn_presenter.rb b/app/presenters/idv/ssn_presenter.rb index 10cf6719116..e767c908fda 100644 --- a/app/presenters/idv/ssn_presenter.rb +++ b/app/presenters/idv/ssn_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class SsnPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/idv/welcome_presenter.rb b/app/presenters/idv/welcome_presenter.rb index dd4c6d414db..fa8df449334 100644 --- a/app/presenters/idv/welcome_presenter.rb +++ b/app/presenters/idv/welcome_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class WelcomePresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/image_upload_response_presenter.rb b/app/presenters/image_upload_response_presenter.rb index dc18ba68c3c..1751a82e723 100644 --- a/app/presenters/image_upload_response_presenter.rb +++ b/app/presenters/image_upload_response_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ImageUploadResponsePresenter include Rails.application.routes.url_helpers diff --git a/app/presenters/mfa_confirmation_presenter.rb b/app/presenters/mfa_confirmation_presenter.rb index 716009fbb8c..6cbb22d07e3 100644 --- a/app/presenters/mfa_confirmation_presenter.rb +++ b/app/presenters/mfa_confirmation_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MfaConfirmationPresenter def initialize(show_skip_additional_mfa_link: true, webauthn_platform_set_up_successful: false) @show_skip_additional_mfa_link = show_skip_additional_mfa_link diff --git a/app/presenters/navigation_presenter.rb b/app/presenters/navigation_presenter.rb index ddb443953f8..599d04df9be 100644 --- a/app/presenters/navigation_presenter.rb +++ b/app/presenters/navigation_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NavigationPresenter include Rails.application.routes.url_helpers diff --git a/app/presenters/openid_connect_certs_presenter.rb b/app/presenters/openid_connect_certs_presenter.rb index 83c5b82e70f..245bbcbffb9 100644 --- a/app/presenters/openid_connect_certs_presenter.rb +++ b/app/presenters/openid_connect_certs_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OpenidConnectCertsPresenter def certs { diff --git a/app/presenters/openid_connect_configuration_presenter.rb b/app/presenters/openid_connect_configuration_presenter.rb index d25b0ec8fb0..7ce82970471 100644 --- a/app/presenters/openid_connect_configuration_presenter.rb +++ b/app/presenters/openid_connect_configuration_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OpenidConnectConfigurationPresenter include Rails.application.routes.url_helpers diff --git a/app/presenters/openid_connect_user_info_presenter.rb b/app/presenters/openid_connect_user_info_presenter.rb index 83497940179..95b1cdcfad4 100644 --- a/app/presenters/openid_connect_user_info_presenter.rb +++ b/app/presenters/openid_connect_user_info_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OpenidConnectUserInfoPresenter include Rails.application.routes.url_helpers diff --git a/app/presenters/piv_cac_authentication_login_presenter.rb b/app/presenters/piv_cac_authentication_login_presenter.rb index a78cfdbb1e3..d65e870e0d2 100644 --- a/app/presenters/piv_cac_authentication_login_presenter.rb +++ b/app/presenters/piv_cac_authentication_login_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PivCacAuthenticationLoginPresenter include Rails.application.routes.url_helpers include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/piv_cac_authentication_setup_base_presenter.rb b/app/presenters/piv_cac_authentication_setup_base_presenter.rb index bdc3e95729d..53b711aaf6e 100644 --- a/app/presenters/piv_cac_authentication_setup_base_presenter.rb +++ b/app/presenters/piv_cac_authentication_setup_base_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PivCacAuthenticationSetupBasePresenter < SetupPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/piv_cac_authentication_setup_presenter.rb b/app/presenters/piv_cac_authentication_setup_presenter.rb index 493f6aea1f5..ebc45ffe432 100644 --- a/app/presenters/piv_cac_authentication_setup_presenter.rb +++ b/app/presenters/piv_cac_authentication_setup_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PivCacAuthenticationSetupPresenter < PivCacAuthenticationSetupBasePresenter def title t('titles.piv_cac_setup.new') diff --git a/app/presenters/piv_cac_error_presenter.rb b/app/presenters/piv_cac_error_presenter.rb index f41c2388152..f2602f256a0 100644 --- a/app/presenters/piv_cac_error_presenter.rb +++ b/app/presenters/piv_cac_error_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PivCacErrorPresenter include Rails.application.routes.url_helpers include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/risc_configuration_presenter.rb b/app/presenters/risc_configuration_presenter.rb index b05571234ae..59756c11e4d 100644 --- a/app/presenters/risc_configuration_presenter.rb +++ b/app/presenters/risc_configuration_presenter.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + # https://openid.net/specs/openid-risc-profile-1_0-ID1.html#discovery class RiscConfigurationPresenter include Rails.application.routes.url_helpers - DELIVERY_METHOD_PUSH = 'https://schemas.openid.net/secevent/risc/delivery-method/push'.freeze + DELIVERY_METHOD_PUSH = 'https://schemas.openid.net/secevent/risc/delivery-method/push' def configuration { diff --git a/app/presenters/saml_request_presenter.rb b/app/presenters/saml_request_presenter.rb index 32f1433409b..fb1d0d410c9 100644 --- a/app/presenters/saml_request_presenter.rb +++ b/app/presenters/saml_request_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SamlRequestPresenter ATTRIBUTE_TO_FRIENDLY_NAME_MAP = { email: :email, diff --git a/app/presenters/session_timeout_modal_presenter.rb b/app/presenters/session_timeout_modal_presenter.rb index c7e5b8f82a6..38353f568d7 100644 --- a/app/presenters/session_timeout_modal_presenter.rb +++ b/app/presenters/session_timeout_modal_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SessionTimeoutModalPresenter def initialize(user_fully_authenticated:) @user_fully_authenticated = user_fully_authenticated diff --git a/app/presenters/setup_presenter.rb b/app/presenters/setup_presenter.rb index d0c862a7640..f31b17ada7d 100644 --- a/app/presenters/setup_presenter.rb +++ b/app/presenters/setup_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SetupPresenter attr_reader :current_user, :user_fully_authenticated, :user_opted_remember_device_cookie diff --git a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb index 5ff7bc822d3..2f04465e8ee 100644 --- a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class AuthenticatorDeliveryPresenter < TwoFactorAuthCode::GenericDeliveryPresenter def header diff --git a/app/presenters/two_factor_auth_code/backup_code_presenter.rb b/app/presenters/two_factor_auth_code/backup_code_presenter.rb index 4dd6a264147..3f3286168b5 100644 --- a/app/presenters/two_factor_auth_code/backup_code_presenter.rb +++ b/app/presenters/two_factor_auth_code/backup_code_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class BackupCodePresenter < TwoFactorAuthCode::GenericDeliveryPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb index e61593d7567..7a4b46a379d 100644 --- a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class GenericDeliveryPresenter include ActionView::Helpers::TagHelper diff --git a/app/presenters/two_factor_auth_code/max_attempts_reached_presenter.rb b/app/presenters/two_factor_auth_code/max_attempts_reached_presenter.rb index 0f638ab5719..ca1fbd2bfe9 100644 --- a/app/presenters/two_factor_auth_code/max_attempts_reached_presenter.rb +++ b/app/presenters/two_factor_auth_code/max_attempts_reached_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class MaxAttemptsReachedPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_auth_code/personal_key_presenter.rb b/app/presenters/two_factor_auth_code/personal_key_presenter.rb index b9820962987..d1d7dac89c3 100644 --- a/app/presenters/two_factor_auth_code/personal_key_presenter.rb +++ b/app/presenters/two_factor_auth_code/personal_key_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class PersonalKeyPresenter < TwoFactorAuthCode::GenericDeliveryPresenter def initialize; end diff --git a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb index d3bf7d1a287..1d558f1fe64 100644 --- a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class PhoneDeliveryPresenter < TwoFactorAuthCode::GenericDeliveryPresenter include ActionView::Helpers::UrlHelper diff --git a/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb b/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb index 4e77b7851ad..306cb0a9ca9 100644 --- a/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb +++ b/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class PivCacAuthenticationPresenter < TwoFactorAuthCode::GenericDeliveryPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_auth_code/sms_opt_in_presenter.rb b/app/presenters/two_factor_auth_code/sms_opt_in_presenter.rb index 9e5d1753ccf..de1ea93466a 100644 --- a/app/presenters/two_factor_auth_code/sms_opt_in_presenter.rb +++ b/app/presenters/two_factor_auth_code/sms_opt_in_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode class SmsOptInPresenter < GenericDeliveryPresenter def initialize; end diff --git a/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb b/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb index a10b736f9f5..d56df649526 100644 --- a/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb +++ b/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthCode # The WebauthnAuthenticationPresenter class is the presenter for webauthn verification class WebauthnAuthenticationPresenter < TwoFactorAuthCode::GenericDeliveryPresenter diff --git a/app/presenters/two_factor_authentication/piv_cac_edit_presenter.rb b/app/presenters/two_factor_authentication/piv_cac_edit_presenter.rb index d643ea4ab48..6816644fc98 100644 --- a/app/presenters/two_factor_authentication/piv_cac_edit_presenter.rb +++ b/app/presenters/two_factor_authentication/piv_cac_edit_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class PivCacEditPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_authentication/set_up_auth_app_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_auth_app_selection_presenter.rb index 13ba2bfc7f2..55246a25a3b 100644 --- a/app/presenters/two_factor_authentication/set_up_auth_app_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_auth_app_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpAuthAppSelectionPresenter < SetUpSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/set_up_backup_code_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_backup_code_selection_presenter.rb index 1fc04b34685..2a9b832e227 100644 --- a/app/presenters/two_factor_authentication/set_up_backup_code_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_backup_code_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpBackupCodeSelectionPresenter < SetUpSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/set_up_phone_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_phone_selection_presenter.rb index 6e970d2345c..65ddff762d7 100644 --- a/app/presenters/two_factor_authentication/set_up_phone_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_phone_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpPhoneSelectionPresenter < SetUpSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/set_up_piv_cac_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_piv_cac_selection_presenter.rb index 0f6d3d81e97..79b9dc5b540 100644 --- a/app/presenters/two_factor_authentication/set_up_piv_cac_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_piv_cac_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpPivCacSelectionPresenter < SetUpSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/set_up_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_selection_presenter.rb index 0fb69e59fbb..798cd289c67 100644 --- a/app/presenters/two_factor_authentication/set_up_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpSelectionPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb index 68534b8b775..a4fef5d7285 100644 --- a/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpWebauthnPlatformSelectionPresenter < SetUpSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/set_up_webauthn_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_webauthn_selection_presenter.rb index c39f854f6de..8249103ea3a 100644 --- a/app/presenters/two_factor_authentication/set_up_webauthn_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_webauthn_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SetUpWebauthnSelectionPresenter < SetUpSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/sign_in_auth_app_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_auth_app_selection_presenter.rb index a3fc889ecdd..a9e06b579aa 100644 --- a/app/presenters/two_factor_authentication/sign_in_auth_app_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_auth_app_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInAuthAppSelectionPresenter < SignInSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/sign_in_backup_code_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_backup_code_selection_presenter.rb index b9e315c4719..936d247dbb3 100644 --- a/app/presenters/two_factor_authentication/sign_in_backup_code_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_backup_code_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInBackupCodeSelectionPresenter < SignInSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/sign_in_personal_key_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_personal_key_selection_presenter.rb index b0fd6aeb722..89fdca45097 100644 --- a/app/presenters/two_factor_authentication/sign_in_personal_key_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_personal_key_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInPersonalKeySelectionPresenter < SignInSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/sign_in_phone_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_phone_selection_presenter.rb index c36193f4aa9..b9137f51c46 100644 --- a/app/presenters/two_factor_authentication/sign_in_phone_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_phone_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInPhoneSelectionPresenter < SignInSelectionPresenter attr_reader :configuration, :user, :delivery_method diff --git a/app/presenters/two_factor_authentication/sign_in_piv_cac_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_piv_cac_selection_presenter.rb index 8b709c2c87b..cb66efbcdff 100644 --- a/app/presenters/two_factor_authentication/sign_in_piv_cac_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_piv_cac_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInPivCacSelectionPresenter < SignInSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/sign_in_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_selection_presenter.rb index f954551b94a..ca21f132126 100644 --- a/app/presenters/two_factor_authentication/sign_in_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInSelectionPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb index 85c6b710991..61024f9b02f 100644 --- a/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInWebauthnPlatformSelectionPresenter < SignInSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/sign_in_webauthn_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_webauthn_selection_presenter.rb index b38ed74d4d1..d3ef8344d85 100644 --- a/app/presenters/two_factor_authentication/sign_in_webauthn_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_webauthn_selection_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class SignInWebauthnSelectionPresenter < SignInSelectionPresenter def type diff --git a/app/presenters/two_factor_authentication/webauthn_edit_presenter.rb b/app/presenters/two_factor_authentication/webauthn_edit_presenter.rb index f9baa4cb0c5..2ce901b134e 100644 --- a/app/presenters/two_factor_authentication/webauthn_edit_presenter.rb +++ b/app/presenters/two_factor_authentication/webauthn_edit_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TwoFactorAuthentication class WebauthnEditPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_login_options_presenter.rb b/app/presenters/two_factor_login_options_presenter.rb index cff2c81bfb0..3a9488f22dc 100644 --- a/app/presenters/two_factor_login_options_presenter.rb +++ b/app/presenters/two_factor_login_options_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TwoFactorLoginOptionsPresenter < TwoFactorAuthCode::GenericDeliveryPresenter include AccountResetConcern include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/two_factor_options_presenter.rb b/app/presenters/two_factor_options_presenter.rb index 89fe306c1b9..76e8c3b361a 100644 --- a/app/presenters/two_factor_options_presenter.rb +++ b/app/presenters/two_factor_options_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class TwoFactorOptionsPresenter include ActionView::Helpers::TranslationHelper diff --git a/app/presenters/utc_time_presenter.rb b/app/presenters/utc_time_presenter.rb index a454f01c955..17c36e364f0 100644 --- a/app/presenters/utc_time_presenter.rb +++ b/app/presenters/utc_time_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UtcTimePresenter def initialize(timestamp) @timestamp = timestamp diff --git a/app/presenters/webauthn_setup_presenter.rb b/app/presenters/webauthn_setup_presenter.rb index e385a199b30..7fbcc3810d0 100644 --- a/app/presenters/webauthn_setup_presenter.rb +++ b/app/presenters/webauthn_setup_presenter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WebauthnSetupPresenter < SetupPresenter include Rails.application.routes.url_helpers include ActionView::Helpers::UrlHelper diff --git a/app/services/access_token_verifier.rb b/app/services/access_token_verifier.rb index 8a0ed0410d5..7b66f46a65b 100644 --- a/app/services/access_token_verifier.rb +++ b/app/services/access_token_verifier.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AccessTokenVerifier include ActionView::Helpers::TranslationHelper include ActiveModel::Model diff --git a/app/services/account_reset/cancel.rb b/app/services/account_reset/cancel.rb index a43fabae485..7e8d0f5649f 100644 --- a/app/services/account_reset/cancel.rb +++ b/app/services/account_reset/cancel.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class Cancel include ActiveModel::Model diff --git a/app/services/account_reset/cancel_request_for_user.rb b/app/services/account_reset/cancel_request_for_user.rb index 78a9b34145f..3ef053f2ab5 100644 --- a/app/services/account_reset/cancel_request_for_user.rb +++ b/app/services/account_reset/cancel_request_for_user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class CancelRequestForUser attr_reader :user diff --git a/app/services/account_reset/create_request.rb b/app/services/account_reset/create_request.rb index 61da2996239..f1a22b61e8f 100644 --- a/app/services/account_reset/create_request.rb +++ b/app/services/account_reset/create_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class CreateRequest include AccountResetConcern diff --git a/app/services/account_reset/delete_account.rb b/app/services/account_reset/delete_account.rb index 2c95ab0ceda..332dc98133e 100644 --- a/app/services/account_reset/delete_account.rb +++ b/app/services/account_reset/delete_account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class DeleteAccount include ActiveModel::Model diff --git a/app/services/account_reset/find_pending_request_for_user.rb b/app/services/account_reset/find_pending_request_for_user.rb index 79ca655beba..99ad93b7e57 100644 --- a/app/services/account_reset/find_pending_request_for_user.rb +++ b/app/services/account_reset/find_pending_request_for_user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class FindPendingRequestForUser include AccountResetConcern diff --git a/app/services/account_reset/grant_request.rb b/app/services/account_reset/grant_request.rb index 0dec3f3d27f..36793c7b01e 100644 --- a/app/services/account_reset/grant_request.rb +++ b/app/services/account_reset/grant_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class GrantRequest def initialize(user) diff --git a/app/services/account_reset/grant_requests_and_send_emails.rb b/app/services/account_reset/grant_requests_and_send_emails.rb index 8e4f1fa1696..74687d5404d 100644 --- a/app/services/account_reset/grant_requests_and_send_emails.rb +++ b/app/services/account_reset/grant_requests_and_send_emails.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class GrantRequestsAndSendEmails < ApplicationJob queue_as :long_running diff --git a/app/services/account_reset/notify_user_of_request_cancellation.rb b/app/services/account_reset/notify_user_of_request_cancellation.rb index d570fc9b44e..37bba9d379a 100644 --- a/app/services/account_reset/notify_user_of_request_cancellation.rb +++ b/app/services/account_reset/notify_user_of_request_cancellation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class NotifyUserOfRequestCancellation attr_reader :user diff --git a/app/services/account_reset/track_irs_event.rb b/app/services/account_reset/track_irs_event.rb index b858979091f..d0bd8fde275 100644 --- a/app/services/account_reset/track_irs_event.rb +++ b/app/services/account_reset/track_irs_event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Mixin for account reset event tracking # Assumes these methods exist on the including class: # - sp diff --git a/app/services/account_reset/validate_cancel_token.rb b/app/services/account_reset/validate_cancel_token.rb index 58a9c08bdd9..799fe265390 100644 --- a/app/services/account_reset/validate_cancel_token.rb +++ b/app/services/account_reset/validate_cancel_token.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class ValidateCancelToken include ActiveModel::Model diff --git a/app/services/account_reset/validate_granted_token.rb b/app/services/account_reset/validate_granted_token.rb index 4550d0615d1..a3d66de8bc6 100644 --- a/app/services/account_reset/validate_granted_token.rb +++ b/app/services/account_reset/validate_granted_token.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset class ValidateGrantedToken include ActiveModel::Model diff --git a/app/services/agency_identity_linker.rb b/app/services/agency_identity_linker.rb index 28467bff9c8..5a7dcc45775 100644 --- a/app/services/agency_identity_linker.rb +++ b/app/services/agency_identity_linker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AgencyIdentityLinker def initialize(sp_identity) @sp_identity = sp_identity diff --git a/app/services/agency_seeder.rb b/app/services/agency_seeder.rb index b1068f9ef0f..7a86e291308 100644 --- a/app/services/agency_seeder.rb +++ b/app/services/agency_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Update Agency from config/agencies.yml (all environments in rake db:seed) class AgencySeeder def initialize( diff --git a/app/services/agreements/base_seeder.rb b/app/services/agreements/base_seeder.rb index 11856ceede3..09f38980ea4 100644 --- a/app/services/agreements/base_seeder.rb +++ b/app/services/agreements/base_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class BaseSeeder def initialize(rails_env: Rails.env, yaml_path: 'config') diff --git a/app/services/agreements/iaa_gtc_seeder.rb b/app/services/agreements/iaa_gtc_seeder.rb index 3fc041c56cb..366d65f5c81 100644 --- a/app/services/agreements/iaa_gtc_seeder.rb +++ b/app/services/agreements/iaa_gtc_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class IaaGtcSeeder < BaseSeeder # The core functionality of this class is defined in BaseSeeder diff --git a/app/services/agreements/iaa_order_seeder.rb b/app/services/agreements/iaa_order_seeder.rb index e3d8a12647a..8a76c3450c0 100644 --- a/app/services/agreements/iaa_order_seeder.rb +++ b/app/services/agreements/iaa_order_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class IaaOrderSeeder < BaseSeeder # The core functionality of this class is defined in BaseSeeder diff --git a/app/services/agreements/integration_seeder.rb b/app/services/agreements/integration_seeder.rb index 99421a90f8c..3904cfb7a8d 100644 --- a/app/services/agreements/integration_seeder.rb +++ b/app/services/agreements/integration_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class IntegrationSeeder < BaseSeeder # The core functionality of this class is defined in BaseSeeder diff --git a/app/services/agreements/integration_status_seeder.rb b/app/services/agreements/integration_status_seeder.rb index 059e540ac03..752a16441e0 100644 --- a/app/services/agreements/integration_status_seeder.rb +++ b/app/services/agreements/integration_status_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class IntegrationStatusSeeder < BaseSeeder # The core functionality of this class is defined in BaseSeeder diff --git a/app/services/agreements/partner_account_seeder.rb b/app/services/agreements/partner_account_seeder.rb index 003bc7ca273..bac2ef63d34 100644 --- a/app/services/agreements/partner_account_seeder.rb +++ b/app/services/agreements/partner_account_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class PartnerAccountSeeder < BaseSeeder # The core functionality of this class is defined in BaseSeeder diff --git a/app/services/agreements/partner_account_status_seeder.rb b/app/services/agreements/partner_account_status_seeder.rb index d63d22a98d7..c0505558a10 100644 --- a/app/services/agreements/partner_account_status_seeder.rb +++ b/app/services/agreements/partner_account_status_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Agreements class PartnerAccountStatusSeeder < BaseSeeder # The core functionality of this class is defined in BaseSeeder diff --git a/app/services/attribute_asserter.rb b/app/services/attribute_asserter.rb index f700f9142af..dd36578fc7b 100644 --- a/app/services/attribute_asserter.rb +++ b/app/services/attribute_asserter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringex/unidecoder' require 'stringex/core_ext' diff --git a/app/services/auth_methods_session.rb b/app/services/auth_methods_session.rb index aad390dc576..7f1db175d35 100644 --- a/app/services/auth_methods_session.rb +++ b/app/services/auth_methods_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AuthMethodsSession attr_reader :user_session diff --git a/app/services/authn_context_resolver.rb b/app/services/authn_context_resolver.rb index 3971431d3bc..6495c2c2bec 100644 --- a/app/services/authn_context_resolver.rb +++ b/app/services/authn_context_resolver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AuthnContextResolver attr_reader :service_provider, :vtr, :acr_values diff --git a/app/services/backup_code_generator.rb b/app/services/backup_code_generator.rb index b8683674a39..575d3f9e019 100644 --- a/app/services/backup_code_generator.rb +++ b/app/services/backup_code_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'digest' class BackupCodeGenerator diff --git a/app/services/banned_user_resolver.rb b/app/services/banned_user_resolver.rb index df903618bb7..ed5a7c98fbe 100644 --- a/app/services/banned_user_resolver.rb +++ b/app/services/banned_user_resolver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BannedUserResolver attr_reader :user diff --git a/app/services/barcode_outputter.rb b/app/services/barcode_outputter.rb index 81def048093..7050fc76926 100644 --- a/app/services/barcode_outputter.rb +++ b/app/services/barcode_outputter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'barby' require 'barby/barcode/code_128' require 'barby/outputter/png_outputter' diff --git a/app/services/binary_search_sorted_hash_file.rb b/app/services/binary_search_sorted_hash_file.rb index 180f7514435..98c98da27c1 100644 --- a/app/services/binary_search_sorted_hash_file.rb +++ b/app/services/binary_search_sorted_hash_file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BinarySearchSortedHashFile include ::NewRelic::Agent::MethodTracer diff --git a/app/services/browser_cache.rb b/app/services/browser_cache.rb index a72c9fd0b02..802a7ba40f3 100644 --- a/app/services/browser_cache.rb +++ b/app/services/browser_cache.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BrowserCache @cache = LruRedux::Cache.new(1_000) DEFAULT_BROWSER = Browser.new(nil) diff --git a/app/services/browser_support.rb b/app/services/browser_support.rb index 83ea8482bfe..4b36a73cf45 100644 --- a/app/services/browser_support.rb +++ b/app/services/browser_support.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class BrowserSupport @cache = LruRedux::Cache.new(1_000) diff --git a/app/services/calendar_service.rb b/app/services/calendar_service.rb index 87c5ec3c1a6..9bc036aef86 100644 --- a/app/services/calendar_service.rb +++ b/app/services/calendar_service.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CalendarService # https://www.opm.gov/policy-data-oversight/snow-dismissal-procedures/federal-holidays diff --git a/app/services/cloud_front_header_parser.rb b/app/services/cloud_front_header_parser.rb index f350ae2d38a..026897c41fd 100644 --- a/app/services/cloud_front_header_parser.rb +++ b/app/services/cloud_front_header_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CloudFrontHeaderParser def initialize(request) @request = request diff --git a/app/services/completions_decider.rb b/app/services/completions_decider.rb index 33d8abee8d3..096d13a8fcd 100644 --- a/app/services/completions_decider.rb +++ b/app/services/completions_decider.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CompletionsDecider def initialize(user_agent:, request_url:) @user_agent = user_agent diff --git a/app/services/database_health_checker.rb b/app/services/database_health_checker.rb index 0b5a17ad72c..dc2a921f5c8 100644 --- a/app/services/database_health_checker.rb +++ b/app/services/database_health_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DatabaseHealthChecker module_function diff --git a/app/services/date_parser.rb b/app/services/date_parser.rb index 6e57fe61432..7ed82ed5c05 100644 --- a/app/services/date_parser.rb +++ b/app/services/date_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DateParser AMERICAN_REGEX = %r{(?\d{1,2})/(?\d{1,2})/(?\d{4})} diff --git a/app/services/db/add_document_verification_and_selfie_costs.rb b/app/services/db/add_document_verification_and_selfie_costs.rb index 96192917989..e5b6c9770ef 100644 --- a/app/services/db/add_document_verification_and_selfie_costs.rb +++ b/app/services/db/add_document_verification_and_selfie_costs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db class AddDocumentVerificationAndSelfieCosts def initialize(user_id:, service_provider:, liveness_checking_enabled:) diff --git a/app/services/db/auth_app_configuration.rb b/app/services/db/auth_app_configuration.rb index 10a893ab95a..2d3d7df5acd 100644 --- a/app/services/db/auth_app_configuration.rb +++ b/app/services/db/auth_app_configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db class AuthAppConfiguration def self.create(user, otp_secret_key, totp_timestamp, name = Time.zone.now.to_s) diff --git a/app/services/db/identity/sp_active_user_counts.rb b/app/services/db/identity/sp_active_user_counts.rb index 27ebaa44414..73d7bdc9bf5 100644 --- a/app/services/db/identity/sp_active_user_counts.rb +++ b/app/services/db/identity/sp_active_user_counts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db module Identity class SpActiveUserCounts diff --git a/app/services/db/identity/sp_user_counts.rb b/app/services/db/identity/sp_user_counts.rb index 100a484a5d4..8629fb931de 100644 --- a/app/services/db/identity/sp_user_counts.rb +++ b/app/services/db/identity/sp_user_counts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db module Identity class SpUserCounts diff --git a/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts.rb b/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts.rb index 9c0dbf1d7c2..e51021fde7b 100644 --- a/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts.rb +++ b/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db module MonthlySpAuthCount class TotalMonthlyAuthCounts diff --git a/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb b/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb index 8592d67f6cf..ecc6c25f46b 100644 --- a/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb +++ b/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db module MonthlySpAuthCount # Similar to TotalMonthlyAuthCounts, but scopes authorizations to within diff --git a/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb b/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb index 9be3ac84bd0..de3a6873bcd 100644 --- a/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb +++ b/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db module MonthlySpAuthCount module UniqueMonthlyAuthCountsByIaa diff --git a/app/services/db/sp_cost/add_sp_cost.rb b/app/services/db/sp_cost/add_sp_cost.rb index ea31d8d9b1f..35f223ce5a7 100644 --- a/app/services/db/sp_cost/add_sp_cost.rb +++ b/app/services/db/sp_cost/add_sp_cost.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Db module SpCost class AddSpCost diff --git a/app/services/deleted_accounts_report.rb b/app/services/deleted_accounts_report.rb index 4c6c04a3699..c147352cda3 100644 --- a/app/services/deleted_accounts_report.rb +++ b/app/services/deleted_accounts_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DeletedAccountsReport def self.call(service_provider, days_ago) report_sql = <<~SQL diff --git a/app/services/device_name.rb b/app/services/device_name.rb index 0b73b3bef9d..2918b8baa30 100644 --- a/app/services/device_name.rb +++ b/app/services/device_name.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DeviceName def self.from_user_agent(user_agent) browser = BrowserCache.parse(user_agent) diff --git a/app/services/displayable_pii_formatter.rb b/app/services/displayable_pii_formatter.rb index 3ddc2531bca..a9c61ad1580 100644 --- a/app/services/displayable_pii_formatter.rb +++ b/app/services/displayable_pii_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DisplayablePiiFormatter FormattedPii = Struct.new( :email, :all_emails, :verified_at, :x509_subject, :x509_issuer, :full_name, diff --git a/app/services/doc_auth/classification_concern.rb b/app/services/doc_auth/classification_concern.rb index e7b6c83c791..7aedc9cb15d 100644 --- a/app/services/doc_auth/classification_concern.rb +++ b/app/services/doc_auth/classification_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module ClassificationConcern extend ActiveSupport::Concern diff --git a/app/services/doc_auth/error_result.rb b/app/services/doc_auth/error_result.rb index 9a0cacaedb0..2949426d440 100644 --- a/app/services/doc_auth/error_result.rb +++ b/app/services/doc_auth/error_result.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth class ErrorResult def initialize(error = nil, side = nil) diff --git a/app/services/doc_auth/errors.rb b/app/services/doc_auth/errors.rb index 4399f67cfd4..bf645210e15 100644 --- a/app/services/doc_auth/errors.rb +++ b/app/services/doc_auth/errors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module Errors # HTTP Status Codes diff --git a/app/services/doc_auth/image_sources.rb b/app/services/doc_auth/image_sources.rb index d81e3c1bed8..69bf17ae5c2 100644 --- a/app/services/doc_auth/image_sources.rb +++ b/app/services/doc_auth/image_sources.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module ImageSources ACUANT_SDK = :acuant_sdk diff --git a/app/services/doc_auth/lexis_nexis/config.rb b/app/services/doc_auth/lexis_nexis/config.rb index d17321ae892..52a5ee050be 100644 --- a/app/services/doc_auth/lexis_nexis/config.rb +++ b/app/services/doc_auth/lexis_nexis/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis Config = RedactedStruct.new( diff --git a/app/services/doc_auth/lexis_nexis/doc_pii_reader.rb b/app/services/doc_auth/lexis_nexis/doc_pii_reader.rb index 6fbe3ab1bb7..ab960428b51 100644 --- a/app/services/doc_auth/lexis_nexis/doc_pii_reader.rb +++ b/app/services/doc_auth/lexis_nexis/doc_pii_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis module DocPiiReader diff --git a/app/services/doc_auth/lexis_nexis/image_metrics_reader.rb b/app/services/doc_auth/lexis_nexis/image_metrics_reader.rb index 953d31fb8fb..96dfa2bf1ed 100644 --- a/app/services/doc_auth/lexis_nexis/image_metrics_reader.rb +++ b/app/services/doc_auth/lexis_nexis/image_metrics_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis module ImageMetricsReader diff --git a/app/services/doc_auth/lexis_nexis/issuer_types.rb b/app/services/doc_auth/lexis_nexis/issuer_types.rb index 1240d843bdc..47c02788515 100644 --- a/app/services/doc_auth/lexis_nexis/issuer_types.rb +++ b/app/services/doc_auth/lexis_nexis/issuer_types.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis module IssuerTypes diff --git a/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb b/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb index 44ad6f5a56d..92000c2ea25 100644 --- a/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb +++ b/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis class LexisNexisClient diff --git a/app/services/doc_auth/lexis_nexis/request.rb b/app/services/doc_auth/lexis_nexis/request.rb index a15b1669e9d..5de35610644 100644 --- a/app/services/doc_auth/lexis_nexis/request.rb +++ b/app/services/doc_auth/lexis_nexis/request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis class Request diff --git a/app/services/doc_auth/lexis_nexis/requests/true_id_request.rb b/app/services/doc_auth/lexis_nexis/requests/true_id_request.rb index 45b14623ec2..4d8a934a091 100644 --- a/app/services/doc_auth/lexis_nexis/requests/true_id_request.rb +++ b/app/services/doc_auth/lexis_nexis/requests/true_id_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis module Requests diff --git a/app/services/doc_auth/lexis_nexis/result_codes.rb b/app/services/doc_auth/lexis_nexis/result_codes.rb index b24e8332f52..d046f297d6f 100644 --- a/app/services/doc_auth/lexis_nexis/result_codes.rb +++ b/app/services/doc_auth/lexis_nexis/result_codes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module LexisNexis module ResultCodes diff --git a/app/services/doc_auth/mock/config.rb b/app/services/doc_auth/mock/config.rb index d8bf7b7c1d9..1976cae432d 100644 --- a/app/services/doc_auth/mock/config.rb +++ b/app/services/doc_auth/mock/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module Mock Config = RedactedStruct.new( diff --git a/app/services/doc_auth/mock/doc_auth_mock_client.rb b/app/services/doc_auth/mock/doc_auth_mock_client.rb index 60836784d1d..46e8471794a 100644 --- a/app/services/doc_auth/mock/doc_auth_mock_client.rb +++ b/app/services/doc_auth/mock/doc_auth_mock_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module Mock class DocAuthMockClient diff --git a/app/services/doc_auth/mock/result_response.rb b/app/services/doc_auth/mock/result_response.rb index 6155b5f05d8..ee0025e4be1 100644 --- a/app/services/doc_auth/mock/result_response.rb +++ b/app/services/doc_auth/mock/result_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module Mock class ResultResponse < DocAuth::Response diff --git a/app/services/doc_auth/processed_alert_to_log_alert_formatter.rb b/app/services/doc_auth/processed_alert_to_log_alert_formatter.rb index 830d3f5e51d..6bfba928a89 100644 --- a/app/services/doc_auth/processed_alert_to_log_alert_formatter.rb +++ b/app/services/doc_auth/processed_alert_to_log_alert_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth class ProcessedAlertToLogAlertFormatter def log_alerts(alerts) diff --git a/app/services/doc_auth/request_error.rb b/app/services/doc_auth/request_error.rb index 78bbdfbfb33..50ad9872b67 100644 --- a/app/services/doc_auth/request_error.rb +++ b/app/services/doc_auth/request_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth class RequestError < StandardError attr_reader :error_code diff --git a/app/services/doc_auth/response.rb b/app/services/doc_auth/response.rb index 994f0b3b229..64e60231114 100644 --- a/app/services/doc_auth/response.rb +++ b/app/services/doc_auth/response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth class Response include ApplicationHelper diff --git a/app/services/doc_auth/selfie_concern.rb b/app/services/doc_auth/selfie_concern.rb index 89e562168fd..9cbc24fbada 100644 --- a/app/services/doc_auth/selfie_concern.rb +++ b/app/services/doc_auth/selfie_concern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DocAuth module SelfieConcern extend ActiveSupport::Concern diff --git a/app/services/doc_auth_router.rb b/app/services/doc_auth_router.rb index f82d2ebeeb6..29e615654ef 100644 --- a/app/services/doc_auth_router.rb +++ b/app/services/doc_auth_router.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Helps route between various doc auth backends module DocAuthRouter ERROR_TRANSLATIONS = { diff --git a/app/services/duration_parser.rb b/app/services/duration_parser.rb index 5b26c14950d..fa04bd1fbc4 100644 --- a/app/services/duration_parser.rb +++ b/app/services/duration_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Parses duration strings ("1d", 2w", "3m", "4y" into ActiveSupport::Durations) class DurationParser attr_reader :value diff --git a/app/services/email_confirmation_token_validator.rb b/app/services/email_confirmation_token_validator.rb index c589bd4974d..49baae8350b 100644 --- a/app/services/email_confirmation_token_validator.rb +++ b/app/services/email_confirmation_token_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EmailConfirmationTokenValidator include ActiveModel::Model diff --git a/app/services/email_normalizer.rb b/app/services/email_normalizer.rb index 4c298cbe8cb..ba66230c1ff 100644 --- a/app/services/email_normalizer.rb +++ b/app/services/email_normalizer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'resolv' # Class to help normalize email addresses for services like Gmail that let users diff --git a/app/services/encrypted_attribute.rb b/app/services/encrypted_attribute.rb index f509e15c75e..4d587d2752e 100644 --- a/app/services/encrypted_attribute.rb +++ b/app/services/encrypted_attribute.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EncryptedAttribute extend Forwardable diff --git a/app/services/encrypted_document_storage/document_writer.rb b/app/services/encrypted_document_storage/document_writer.rb index 6dbadc84114..7861bd4ad57 100644 --- a/app/services/encrypted_document_storage/document_writer.rb +++ b/app/services/encrypted_document_storage/document_writer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EncryptedDocumentStorage class DocumentWriter def encrypt_and_write_document( diff --git a/app/services/encrypted_document_storage/local_storage.rb b/app/services/encrypted_document_storage/local_storage.rb index e55be4b1092..ba94ad7165a 100644 --- a/app/services/encrypted_document_storage/local_storage.rb +++ b/app/services/encrypted_document_storage/local_storage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EncryptedDocumentStorage class LocalStorage # Used in tests to verify results diff --git a/app/services/encrypted_document_storage/s3_storage.rb b/app/services/encrypted_document_storage/s3_storage.rb index 5acc8979252..664908b6535 100644 --- a/app/services/encrypted_document_storage/s3_storage.rb +++ b/app/services/encrypted_document_storage/s3_storage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EncryptedDocumentStorage class S3Storage def write_image(encrypted_image:, name:) diff --git a/app/services/encrypted_document_storage/write_document_result.rb b/app/services/encrypted_document_storage/write_document_result.rb index 4e9a21e1107..7c5bfc8d008 100644 --- a/app/services/encrypted_document_storage/write_document_result.rb +++ b/app/services/encrypted_document_storage/write_document_result.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EncryptedDocumentStorage WriteDocumentResult = Struct.new( :front_filename, diff --git a/app/services/encrypted_redis_struct_storage.rb b/app/services/encrypted_redis_struct_storage.rb index 80a4e8d674b..5792ddecb13 100644 --- a/app/services/encrypted_redis_struct_storage.rb +++ b/app/services/encrypted_redis_struct_storage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Use this class to store a plain Struct in redis. It will be stored # encrypted and by default will expire, the struct must have a +redis_key_prefix+ # class method diff --git a/app/services/encryption/contextless_kms_client.rb b/app/services/encryption/contextless_kms_client.rb index 3a8bd8b5a4d..23494bfef0d 100644 --- a/app/services/encryption/contextless_kms_client.rb +++ b/app/services/encryption/contextless_kms_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption class ContextlessKmsClient include Encodable diff --git a/app/services/encryption/encodable.rb b/app/services/encryption/encodable.rb index 1c726e60603..0692919ebf3 100644 --- a/app/services/encryption/encodable.rb +++ b/app/services/encryption/encodable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption module Encodable extend ActiveSupport::Concern diff --git a/app/services/encryption/encryption_error.rb b/app/services/encryption/encryption_error.rb index 95696c009e3..25aa2fba968 100644 --- a/app/services/encryption/encryption_error.rb +++ b/app/services/encryption/encryption_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption class EncryptionError < StandardError end diff --git a/app/services/encryption/encryptors/aes_encryptor.rb b/app/services/encryption/encryptors/aes_encryptor.rb index 72f95130eed..ead67006d30 100644 --- a/app/services/encryption/encryptors/aes_encryptor.rb +++ b/app/services/encryption/encryptors/aes_encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This module is still needed by existing functionality, but any new AES encryption # should prefer using AesEncryptorV2 and AesCipherV2. module Encryption @@ -5,7 +7,7 @@ module Encryptors class AesEncryptor include Encodable - DELIMITER = '.'.freeze + DELIMITER = '.' # "It is a riddle, wrapped in a mystery, inside an enigma; but perhaps there is a key." # - Winston Churchill, https://en.wiktionary.org/wiki/a_riddle_wrapped_up_in_an_enigma diff --git a/app/services/encryption/encryptors/aes_encryptor_v2.rb b/app/services/encryption/encryptors/aes_encryptor_v2.rb index 8c5a0d04325..7c056cfd442 100644 --- a/app/services/encryption/encryptors/aes_encryptor_v2.rb +++ b/app/services/encryption/encryptors/aes_encryptor_v2.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption module Encryptors class AesEncryptorV2 diff --git a/app/services/encryption/encryptors/attribute_encryptor.rb b/app/services/encryption/encryptors/attribute_encryptor.rb index 658fc18d26b..5698e11aaff 100644 --- a/app/services/encryption/encryptors/attribute_encryptor.rb +++ b/app/services/encryption/encryptors/attribute_encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption module Encryptors class AttributeEncryptor diff --git a/app/services/encryption/encryptors/background_proofing_arg_encryptor.rb b/app/services/encryption/encryptors/background_proofing_arg_encryptor.rb index eb012994157..7c395905e9f 100644 --- a/app/services/encryption/encryptors/background_proofing_arg_encryptor.rb +++ b/app/services/encryption/encryptors/background_proofing_arg_encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption module Encryptors class BackgroundProofingArgEncryptor diff --git a/app/services/encryption/encryptors/pii_encryptor.rb b/app/services/encryption/encryptors/pii_encryptor.rb index af5ec65e9f2..0a74c3e9903 100644 --- a/app/services/encryption/encryptors/pii_encryptor.rb +++ b/app/services/encryption/encryptors/pii_encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption module Encryptors class PiiEncryptor diff --git a/app/services/encryption/kms_logger.rb b/app/services/encryption/kms_logger.rb index 0f469171ab6..4276f9d2e98 100644 --- a/app/services/encryption/kms_logger.rb +++ b/app/services/encryption/kms_logger.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption class KmsLogger def self.log(action, key_id:, context: nil) diff --git a/app/services/encryption/password_verifier.rb b/app/services/encryption/password_verifier.rb index edcc30a2b3c..d8bd2ec082f 100644 --- a/app/services/encryption/password_verifier.rb +++ b/app/services/encryption/password_verifier.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption class PasswordVerifier include ::NewRelic::Agent::MethodTracer diff --git a/app/services/encryption/regional_ciphertext_pair.rb b/app/services/encryption/regional_ciphertext_pair.rb index 1c5ab32b013..a3d3a6ef370 100644 --- a/app/services/encryption/regional_ciphertext_pair.rb +++ b/app/services/encryption/regional_ciphertext_pair.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Encryption::RegionalCiphertextPair = RedactedStruct.new( :single_region_ciphertext, :multi_region_ciphertext, keyword_init: true ) do diff --git a/app/services/encryption/uak_password_verifier.rb b/app/services/encryption/uak_password_verifier.rb index 90db6834164..fad98691fd0 100644 --- a/app/services/encryption/uak_password_verifier.rb +++ b/app/services/encryption/uak_password_verifier.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Encryption class UakPasswordVerifier PasswordDigest = RedactedStruct.new( diff --git a/app/services/encryption/user_access_key.rb b/app/services/encryption/user_access_key.rb index a0e2801dd5f..854ba65e65d 100644 --- a/app/services/encryption/user_access_key.rb +++ b/app/services/encryption/user_access_key.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # UserAccessKey outputs various key hashing related to NIST encryption. # # Generate and store a 128-bit salt S. diff --git a/app/services/event_disavowal/build_disavowed_event_analytics_attributes.rb b/app/services/event_disavowal/build_disavowed_event_analytics_attributes.rb index 497cd0f1f60..a5d26252cfa 100644 --- a/app/services/event_disavowal/build_disavowed_event_analytics_attributes.rb +++ b/app/services/event_disavowal/build_disavowed_event_analytics_attributes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EventDisavowal class BuildDisavowedEventAnalyticsAttributes def self.call(event) diff --git a/app/services/event_disavowal/disavow_event.rb b/app/services/event_disavowal/disavow_event.rb index e5cf7c444df..4fef5324804 100644 --- a/app/services/event_disavowal/disavow_event.rb +++ b/app/services/event_disavowal/disavow_event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EventDisavowal class DisavowEvent attr_reader :event diff --git a/app/services/event_disavowal/find_disavowed_event.rb b/app/services/event_disavowal/find_disavowed_event.rb index 88e0e0d26de..8d8a62e951f 100644 --- a/app/services/event_disavowal/find_disavowed_event.rb +++ b/app/services/event_disavowal/find_disavowed_event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EventDisavowal class FindDisavowedEvent attr_reader :disavowal_token diff --git a/app/services/event_disavowal/validate_disavowed_event.rb b/app/services/event_disavowal/validate_disavowed_event.rb index 6ee19e7725d..657408aab81 100644 --- a/app/services/event_disavowal/validate_disavowed_event.rb +++ b/app/services/event_disavowal/validate_disavowed_event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module EventDisavowal class ValidateDisavowedEvent include ActiveModel::Model diff --git a/app/services/flow/base_flow.rb b/app/services/flow/base_flow.rb index 8eb95e01a69..4f9ca188018 100644 --- a/app/services/flow/base_flow.rb +++ b/app/services/flow/base_flow.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Flow class BaseFlow include Failure diff --git a/app/services/flow/base_step.rb b/app/services/flow/base_step.rb index 3488e3a1246..b273da8fd12 100644 --- a/app/services/flow/base_step.rb +++ b/app/services/flow/base_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Flow class BaseStep include Rails.application.routes.url_helpers diff --git a/app/services/flow/failure.rb b/app/services/flow/failure.rb index c84beedae71..23ac1d45e92 100644 --- a/app/services/flow/failure.rb +++ b/app/services/flow/failure.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Flow module Failure private diff --git a/app/services/flow/flow_state_machine.rb b/app/services/flow/flow_state_machine.rb index cb0c48fc7ac..496467167a5 100644 --- a/app/services/flow/flow_state_machine.rb +++ b/app/services/flow/flow_state_machine.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Flow module FlowStateMachine extend ActiveSupport::Concern diff --git a/app/services/forbidden_passwords.rb b/app/services/forbidden_passwords.rb index b200e8e6d89..40317df3903 100644 --- a/app/services/forbidden_passwords.rb +++ b/app/services/forbidden_passwords.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ForbiddenPasswords def initialize(email) @email = email diff --git a/app/services/forget_all_browsers.rb b/app/services/forget_all_browsers.rb index 2b992ea8a25..2877af5f983 100644 --- a/app/services/forget_all_browsers.rb +++ b/app/services/forget_all_browsers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ForgetAllBrowsers attr_reader :user, :remember_device_revoked_at diff --git a/app/services/form_response.rb b/app/services/form_response.rb index e7947483ffd..5c1f405e602 100644 --- a/app/services/form_response.rb +++ b/app/services/form_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FormResponse attr_reader :errors, :extra, :serialize_error_details_only diff --git a/app/services/fraud_review_checker.rb b/app/services/fraud_review_checker.rb index c9941aeb04b..3ffe066588b 100644 --- a/app/services/fraud_review_checker.rb +++ b/app/services/fraud_review_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FraudReviewChecker attr_reader :user diff --git a/app/services/frontend_error_logger.rb b/app/services/frontend_error_logger.rb index d292ab2a57a..3037954aa51 100644 --- a/app/services/frontend_error_logger.rb +++ b/app/services/frontend_error_logger.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FrontendErrorLogger class FrontendError < StandardError; end diff --git a/app/services/frontend_logger.rb b/app/services/frontend_logger.rb index 3b0ec281906..b64384e8819 100644 --- a/app/services/frontend_logger.rb +++ b/app/services/frontend_logger.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FrontendLogger attr_reader :analytics, :event_map diff --git a/app/services/funnel/doc_auth/register_step.rb b/app/services/funnel/doc_auth/register_step.rb index 8e2a63f9b14..b2e3b70e542 100644 --- a/app/services/funnel/doc_auth/register_step.rb +++ b/app/services/funnel/doc_auth/register_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Funnel module DocAuth class RegisterStep diff --git a/app/services/funnel/doc_auth/register_submit_step.rb b/app/services/funnel/doc_auth/register_submit_step.rb index 59f7e2221df..2bc4ead02a7 100644 --- a/app/services/funnel/doc_auth/register_submit_step.rb +++ b/app/services/funnel/doc_auth/register_submit_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Funnel module DocAuth class RegisterSubmitStep diff --git a/app/services/funnel/doc_auth/register_view_step.rb b/app/services/funnel/doc_auth/register_view_step.rb index 9d5c34df40d..67165aaf943 100644 --- a/app/services/funnel/doc_auth/register_view_step.rb +++ b/app/services/funnel/doc_auth/register_view_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Funnel module DocAuth class RegisterViewStep diff --git a/app/services/funnel/doc_auth/reset_steps.rb b/app/services/funnel/doc_auth/reset_steps.rb index 694bfc1c34b..609f17b1b5f 100644 --- a/app/services/funnel/doc_auth/reset_steps.rb +++ b/app/services/funnel/doc_auth/reset_steps.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Funnel module DocAuth class ResetSteps diff --git a/app/services/funnel/registration/add_mfa.rb b/app/services/funnel/registration/add_mfa.rb index 200da332e7c..14ac8595e3c 100644 --- a/app/services/funnel/registration/add_mfa.rb +++ b/app/services/funnel/registration/add_mfa.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Funnel module Registration class AddMfa diff --git a/app/services/funnel/registration/total_registered_count.rb b/app/services/funnel/registration/total_registered_count.rb index 691735f74fa..ae7301b89c2 100644 --- a/app/services/funnel/registration/total_registered_count.rb +++ b/app/services/funnel/registration/total_registered_count.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Funnel module Registration class TotalRegisteredCount diff --git a/app/services/google_policy_site.rb b/app/services/google_policy_site.rb index 49740b129f6..893092f681b 100644 --- a/app/services/google_policy_site.rb +++ b/app/services/google_policy_site.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GooglePolicySite BASE_URL = URI('https://policies.google.com').freeze diff --git a/app/services/gpo_confirmation_exporter.rb b/app/services/gpo_confirmation_exporter.rb index 3c7e3e5c9f8..b2d48b24b6a 100644 --- a/app/services/gpo_confirmation_exporter.rb +++ b/app/services/gpo_confirmation_exporter.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + require 'csv' class GpoConfirmationExporter - DELIMITER = '|'.freeze - LINE_ENDING = "\r\n".freeze - HEADER_ROW_ID = '01'.freeze - CONTENT_ROW_ID = '02'.freeze + DELIMITER = '|' + LINE_ENDING = "\r\n" + HEADER_ROW_ID = '01' + CONTENT_ROW_ID = '02' def initialize(confirmations) @confirmations = confirmations diff --git a/app/services/gpo_confirmation_maker.rb b/app/services/gpo_confirmation_maker.rb index be87a77705b..8d9d4041259 100644 --- a/app/services/gpo_confirmation_maker.rb +++ b/app/services/gpo_confirmation_maker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoConfirmationMaker class InvalidEntryError < StandardError def initialize(reason) diff --git a/app/services/gpo_confirmation_uploader.rb b/app/services/gpo_confirmation_uploader.rb index e3c682da106..315c649a244 100644 --- a/app/services/gpo_confirmation_uploader.rb +++ b/app/services/gpo_confirmation_uploader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoConfirmationUploader class InvalidGpoConfirmationsPresent < StandardError; end diff --git a/app/services/gpo_daily_test_sender.rb b/app/services/gpo_daily_test_sender.rb index 15a49244baa..4a94683e4fc 100644 --- a/app/services/gpo_daily_test_sender.rb +++ b/app/services/gpo_daily_test_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Mails a letter to the designated receiver class GpoDailyTestSender def run diff --git a/app/services/gpo_reminder_sender.rb b/app/services/gpo_reminder_sender.rb index 31b6e22811e..b8eabb9a1eb 100644 --- a/app/services/gpo_reminder_sender.rb +++ b/app/services/gpo_reminder_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class GpoReminderSender LOCAL_DATABASE_TIMEOUT = 60_000 diff --git a/app/services/health_check_summary.rb b/app/services/health_check_summary.rb index 8000480f552..4bfb82a030a 100644 --- a/app/services/health_check_summary.rb +++ b/app/services/health_check_summary.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + HealthCheckSummary = Struct.new(:healthy, :result, keyword_init: true) do def as_json(*args) to_h.as_json(*args) diff --git a/app/services/iaa_reporting_helper.rb b/app/services/iaa_reporting_helper.rb index 979fb466b01..e6318c4167d 100644 --- a/app/services/iaa_reporting_helper.rb +++ b/app/services/iaa_reporting_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module IaaReportingHelper module_function diff --git a/app/services/id_token_builder.rb b/app/services/id_token_builder.rb index 482c5c0a0cf..8a61ac5b8ca 100644 --- a/app/services/id_token_builder.rb +++ b/app/services/id_token_builder.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + class IdTokenBuilder - JWT_SIGNING_ALGORITHM = 'RS256'.freeze + JWT_SIGNING_ALGORITHM = 'RS256' NUM_BYTES_FIRST_128_BITS = 128 / 8 attr_reader :identity, :now diff --git a/app/services/identity_linker.rb b/app/services/identity_linker.rb index 75a7e4b50dc..b34f76077f7 100644 --- a/app/services/identity_linker.rb +++ b/app/services/identity_linker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IdentityLinker attr_reader :user, :service_provider diff --git a/app/services/idv/actions/in_person/cancel_update_state_id_action.rb b/app/services/idv/actions/in_person/cancel_update_state_id_action.rb index febd4daa72f..3dd0e1516d6 100644 --- a/app/services/idv/actions/in_person/cancel_update_state_id_action.rb +++ b/app/services/idv/actions/in_person/cancel_update_state_id_action.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module Actions module InPerson diff --git a/app/services/idv/actions/in_person/redo_state_id_action.rb b/app/services/idv/actions/in_person/redo_state_id_action.rb index dd7025865e7..59d4337e197 100644 --- a/app/services/idv/actions/in_person/redo_state_id_action.rb +++ b/app/services/idv/actions/in_person/redo_state_id_action.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module Actions module InPerson diff --git a/app/services/idv/agent.rb b/app/services/idv/agent.rb index abad581798c..02d4e2792b0 100644 --- a/app/services/idv/agent.rb +++ b/app/services/idv/agent.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class Agent def initialize(applicant) diff --git a/app/services/idv/analytics_events_enhancer.rb b/app/services/idv/analytics_events_enhancer.rb index 188d381d165..cef6153fd73 100644 --- a/app/services/idv/analytics_events_enhancer.rb +++ b/app/services/idv/analytics_events_enhancer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module AnalyticsEventsEnhancer IGNORED_METHODS = %i[ diff --git a/app/services/idv/cancel_verification_attempt.rb b/app/services/idv/cancel_verification_attempt.rb index 377fb7ff8b6..4911ef26766 100644 --- a/app/services/idv/cancel_verification_attempt.rb +++ b/app/services/idv/cancel_verification_attempt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class CancelVerificationAttempt attr_reader :user diff --git a/app/services/idv/data_url_image.rb b/app/services/idv/data_url_image.rb index 5fa71a7a27c..b5d47b96205 100644 --- a/app/services/idv/data_url_image.rb +++ b/app/services/idv/data_url_image.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class DataUrlImage class InvalidUrlFormatError < StandardError; end diff --git a/app/services/idv/doc_auth_form_response.rb b/app/services/idv/doc_auth_form_response.rb index f21f5498a3c..34f6c74fc99 100644 --- a/app/services/idv/doc_auth_form_response.rb +++ b/app/services/idv/doc_auth_form_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv # A custom form response with additional noop methods to allow merging with DocAuth responses class DocAuthFormResponse < ::FormResponse diff --git a/app/services/idv/duplicate_ssn_finder.rb b/app/services/idv/duplicate_ssn_finder.rb index 7a4f7da0245..715a7b1b45b 100644 --- a/app/services/idv/duplicate_ssn_finder.rb +++ b/app/services/idv/duplicate_ssn_finder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class DuplicateSsnFinder attr_reader :ssn, :user diff --git a/app/services/idv/flows/in_person_flow.rb b/app/services/idv/flows/in_person_flow.rb index 825b8274984..f6b95105694 100644 --- a/app/services/idv/flows/in_person_flow.rb +++ b/app/services/idv/flows/in_person_flow.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module Flows class InPersonFlow < Flow::BaseFlow diff --git a/app/services/idv/gpo_mail.rb b/app/services/idv/gpo_mail.rb index 569c6447f8e..1d14ca87fa8 100644 --- a/app/services/idv/gpo_mail.rb +++ b/app/services/idv/gpo_mail.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class GpoMail def initialize(current_user) diff --git a/app/services/idv/in_person/completion_survey_sender.rb b/app/services/idv/in_person/completion_survey_sender.rb index 1d8551cec0a..a295d6d27b0 100644 --- a/app/services/idv/in_person/completion_survey_sender.rb +++ b/app/services/idv/in_person/completion_survey_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class CompletionSurveySender diff --git a/app/services/idv/in_person/enrollment_code_formatter.rb b/app/services/idv/in_person/enrollment_code_formatter.rb index fc387858b6a..fc8ebca9c46 100644 --- a/app/services/idv/in_person/enrollment_code_formatter.rb +++ b/app/services/idv/in_person/enrollment_code_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson class EnrollmentCodeFormatter diff --git a/app/services/idv/in_person_config.rb b/app/services/idv/in_person_config.rb index 12c34485fba..ff388a57a7f 100644 --- a/app/services/idv/in_person_config.rb +++ b/app/services/idv/in_person_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class InPersonConfig def self.enabled_for_issuer?(issuer) diff --git a/app/services/idv/lexis_nexis_instant_verify.rb b/app/services/idv/lexis_nexis_instant_verify.rb index 4d814ee659f..b4558b03087 100644 --- a/app/services/idv/lexis_nexis_instant_verify.rb +++ b/app/services/idv/lexis_nexis_instant_verify.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class LexisNexisInstantVerify attr_reader :document_capture_session_uuid diff --git a/app/services/idv/phone_confirmation_session.rb b/app/services/idv/phone_confirmation_session.rb index 6465c6895fe..5653bede092 100644 --- a/app/services/idv/phone_confirmation_session.rb +++ b/app/services/idv/phone_confirmation_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PhoneConfirmationSession attr_reader :code, :phone, :sent_at, :delivery_method diff --git a/app/services/idv/phone_step.rb b/app/services/idv/phone_step.rb index 5635e5f37cc..0bd91802d14 100644 --- a/app/services/idv/phone_step.rb +++ b/app/services/idv/phone_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class PhoneStep def initialize(idv_session:, trace_id:, analytics:, attempts_tracker:) diff --git a/app/services/idv/profile_logging.rb b/app/services/idv/profile_logging.rb index 5f113451c19..2c0c9ae95ed 100644 --- a/app/services/idv/profile_logging.rb +++ b/app/services/idv/profile_logging.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv ProfileLogging = Struct.new(:profile) do def as_json diff --git a/app/services/idv/profile_maker.rb b/app/services/idv/profile_maker.rb index 597e3d19714..982ea822513 100644 --- a/app/services/idv/profile_maker.rb +++ b/app/services/idv/profile_maker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class ProfileMaker attr_reader :pii_attributes diff --git a/app/services/idv/proofing_components_logging.rb b/app/services/idv/proofing_components_logging.rb index 98a499d18d3..d6f31ced71c 100644 --- a/app/services/idv/proofing_components_logging.rb +++ b/app/services/idv/proofing_components_logging.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv ProofingComponentsLogging = Struct.new(:proofing_components) do def as_json(*) diff --git a/app/services/idv/send_phone_confirmation_otp.rb b/app/services/idv/send_phone_confirmation_otp.rb index 102305e6075..a32b078c3f2 100644 --- a/app/services/idv/send_phone_confirmation_otp.rb +++ b/app/services/idv/send_phone_confirmation_otp.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class SendPhoneConfirmationOtp attr_reader :telephony_response diff --git a/app/services/idv/session.rb b/app/services/idv/session.rb index 534a07ff45c..93c464fa02e 100644 --- a/app/services/idv/session.rb +++ b/app/services/idv/session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv class Session VALID_SESSION_ATTRIBUTES = %i[ diff --git a/app/services/idv/steps/doc_auth_base_step.rb b/app/services/idv/steps/doc_auth_base_step.rb index 64679881331..a59b560c99c 100644 --- a/app/services/idv/steps/doc_auth_base_step.rb +++ b/app/services/idv/steps/doc_auth_base_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module Steps class DocAuthBaseStep < Flow::BaseStep diff --git a/app/services/idv/steps/in_person/state_id_step.rb b/app/services/idv/steps/in_person/state_id_step.rb index 0bd872e2bf2..4d1a10458d9 100644 --- a/app/services/idv/steps/in_person/state_id_step.rb +++ b/app/services/idv/steps/in_person/state_id_step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module Steps module InPerson diff --git a/app/services/ip_geocoder.rb b/app/services/ip_geocoder.rb index 69fb112d6a4..5b74e055c65 100644 --- a/app/services/ip_geocoder.rb +++ b/app/services/ip_geocoder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IpGeocoder def initialize(ip) @ip = ip diff --git a/app/services/irs_attempts_api/attempt_event.rb b/app/services/irs_attempts_api/attempt_event.rb index 299b84d8282..37ae548c1ac 100644 --- a/app/services/irs_attempts_api/attempt_event.rb +++ b/app/services/irs_attempts_api/attempt_event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module IrsAttemptsApi class AttemptEvent end diff --git a/app/services/irs_attempts_api/tracker.rb b/app/services/irs_attempts_api/tracker.rb index 2d0fc63cf23..5d9959076ec 100644 --- a/app/services/irs_attempts_api/tracker.rb +++ b/app/services/irs_attempts_api/tracker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module IrsAttemptsApi class Tracker include TrackerEvents diff --git a/app/services/key_rotator/attribute_encryption.rb b/app/services/key_rotator/attribute_encryption.rb index bd3ca84ea21..57549aff85b 100644 --- a/app/services/key_rotator/attribute_encryption.rb +++ b/app/services/key_rotator/attribute_encryption.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module KeyRotator class AttributeEncryption def initialize(model) diff --git a/app/services/key_rotator/hmac_fingerprinter.rb b/app/services/key_rotator/hmac_fingerprinter.rb index c63e729b65e..f2fa5b5797d 100644 --- a/app/services/key_rotator/hmac_fingerprinter.rb +++ b/app/services/key_rotator/hmac_fingerprinter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module KeyRotator class HmacFingerprinter def rotate(user:, pii_attributes: nil, profile: nil) diff --git a/app/services/link_locale_resolver.rb b/app/services/link_locale_resolver.rb index 8a843ec13bd..791b7159d42 100644 --- a/app/services/link_locale_resolver.rb +++ b/app/services/link_locale_resolver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LinkLocaleResolver def self.locale locale = I18n.locale diff --git a/app/services/locale_chooser.rb b/app/services/locale_chooser.rb index 7bdac3e389b..77b297cb297 100644 --- a/app/services/locale_chooser.rb +++ b/app/services/locale_chooser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LocaleChooser include HttpAcceptLanguage::EasyAccess diff --git a/app/services/multi_health_checker.rb b/app/services/multi_health_checker.rb index c19c086db62..40b86a4c276 100644 --- a/app/services/multi_health_checker.rb +++ b/app/services/multi_health_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MultiHealthChecker Summary = Struct.new(:statuses) do def healthy? diff --git a/app/services/null_service_provider_request.rb b/app/services/null_service_provider_request.rb index e495c64e8f4..7fd1e3b34e1 100644 --- a/app/services/null_service_provider_request.rb +++ b/app/services/null_service_provider_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NullServiceProviderRequest def uuid; end diff --git a/app/services/otp_preference_updater.rb b/app/services/otp_preference_updater.rb index 112d77c717c..8e5078ed5ae 100644 --- a/app/services/otp_preference_updater.rb +++ b/app/services/otp_preference_updater.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OtpPreferenceUpdater def initialize(user:, preference:, phone_id:, default: nil) @user = user diff --git a/app/services/otp_rate_limiter.rb b/app/services/otp_rate_limiter.rb index 192536da69f..8f6869a552d 100644 --- a/app/services/otp_rate_limiter.rb +++ b/app/services/otp_rate_limiter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OtpRateLimiter def initialize(phone:, user:, phone_confirmed:) @phone = phone diff --git a/app/services/out_of_band_session_accessor.rb b/app/services/out_of_band_session_accessor.rb index 319053c4659..da497b440dd 100644 --- a/app/services/out_of_band_session_accessor.rb +++ b/app/services/out_of_band_session_accessor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Provides a wrapper for accessing the redis cache out-of-band (using only the # session UUID) instead of having access to the user session from Devise/Warden. # Should only used outside of a normal browser session (such as the OpenID diff --git a/app/services/outage_status.rb b/app/services/outage_status.rb index 871ef778816..35dffd3d631 100644 --- a/app/services/outage_status.rb +++ b/app/services/outage_status.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OutageStatus include ActionView::Helpers::TranslationHelper diff --git a/app/services/outbound_health_checker.rb b/app/services/outbound_health_checker.rb index 0a08af3989c..32863df5c0a 100644 --- a/app/services/outbound_health_checker.rb +++ b/app/services/outbound_health_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Checks outbound network connections module OutboundHealthChecker module_function diff --git a/app/services/parse_controller_from_referer.rb b/app/services/parse_controller_from_referer.rb index 2558d5b3544..959a39a446c 100644 --- a/app/services/parse_controller_from_referer.rb +++ b/app/services/parse_controller_from_referer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ParseControllerFromReferer def initialize(referer) @referer = referer diff --git a/app/services/password_reset_token_validator.rb b/app/services/password_reset_token_validator.rb index 6b410353de8..43f3691c69d 100644 --- a/app/services/password_reset_token_validator.rb +++ b/app/services/password_reset_token_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PasswordResetTokenValidator include ActiveModel::Model diff --git a/app/services/personal_key_formatter.rb b/app/services/personal_key_formatter.rb index 544c82ba5b3..8b80d962067 100644 --- a/app/services/personal_key_formatter.rb +++ b/app/services/personal_key_formatter.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + class PersonalKeyFormatter CHAR_COUNT = RandomPhrase::WORD_LENGTH WORD_COUNT = IdentityConfig.store.recovery_code_length - VALID_CHAR = '[a-zA-Z0-9]'.freeze + VALID_CHAR = '[a-zA-Z0-9]' VALID_WORD = "#{VALID_CHAR}{#{CHAR_COUNT}}".freeze REGEXP_STRING = "(?:#{VALID_WORD}([\\s\\-])?){#{WORD_COUNT - 1}}#{VALID_WORD}".freeze REGEXP = /\A#{REGEXP_STRING}\Z/o diff --git a/app/services/personal_key_generator.rb b/app/services/personal_key_generator.rb index f0df7ef4688..98cd02d8c4e 100644 --- a/app/services/personal_key_generator.rb +++ b/app/services/personal_key_generator.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + class PersonalKeyGenerator attr_reader :user_access_key, :length - INVALID_CODE = 'meaningless string that RandomPhrase will never generate'.freeze + INVALID_CODE = 'meaningless string that RandomPhrase will never generate' def initialize(user, length: 4) @user = user diff --git a/app/services/phone_formatter.rb b/app/services/phone_formatter.rb index 0e2c3618473..c975c55a680 100644 --- a/app/services/phone_formatter.rb +++ b/app/services/phone_formatter.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + module PhoneFormatter - DEFAULT_COUNTRY = 'US'.freeze + DEFAULT_COUNTRY = 'US' def self.format(phone, country_code: nil) country_code = DEFAULT_COUNTRY if country_code.nil? && !phone&.start_with?('+') diff --git a/app/services/phone_number_capabilities.rb b/app/services/phone_number_capabilities.rb index 9c6734f9a8b..f29298e0a36 100644 --- a/app/services/phone_number_capabilities.rb +++ b/app/services/phone_number_capabilities.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PhoneNumberCapabilities def self.load_config YAML.load_file( diff --git a/app/services/phone_recaptcha_validator.rb b/app/services/phone_recaptcha_validator.rb index 1b5df12162b..7705416ca4c 100644 --- a/app/services/phone_recaptcha_validator.rb +++ b/app/services/phone_recaptcha_validator.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + class PhoneRecaptchaValidator - RECAPTCHA_ACTION = 'phone_setup'.freeze + RECAPTCHA_ACTION = 'phone_setup' attr_reader :parsed_phone, :validator_class, :validator_args diff --git a/app/services/pii/attributes.rb b/app/services/pii/attributes.rb index 751335388c7..c9edf807fce 100644 --- a/app/services/pii/attributes.rb +++ b/app/services/pii/attributes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Pii DEPRECATED_PII_ATTRIBUTES = [ :otp, # https://github.com/18F/identity-idp/pull/1661 diff --git a/app/services/pii/cacher.rb b/app/services/pii/cacher.rb index 4d22331d1e8..cf47175d2b4 100644 --- a/app/services/pii/cacher.rb +++ b/app/services/pii/cacher.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Pii class Cacher attr_reader :user, :user_session diff --git a/app/services/pii/fingerprinter.rb b/app/services/pii/fingerprinter.rb index f3d244d5a33..8de8eb4d25b 100644 --- a/app/services/pii/fingerprinter.rb +++ b/app/services/pii/fingerprinter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Pii class Fingerprinter def self.current_key diff --git a/app/services/pii/re_encryptor.rb b/app/services/pii/re_encryptor.rb index c622147cc68..290fdba005b 100644 --- a/app/services/pii/re_encryptor.rb +++ b/app/services/pii/re_encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Pii class ReEncryptor def initialize(user: nil, user_session: nil) diff --git a/app/services/piv_cac_service.rb b/app/services/piv_cac_service.rb index 9754b1be04f..f85279f4a22 100644 --- a/app/services/piv_cac_service.rb +++ b/app/services/piv_cac_service.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'base64' require 'cgi' diff --git a/app/services/profanity_detector.rb b/app/services/profanity_detector.rb index e7e88f1a5c7..a69e7a8a1e2 100644 --- a/app/services/profanity_detector.rb +++ b/app/services/profanity_detector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Detects profanity in a string, the list of profane words # comes from the profanity_filter gem for now module ProfanityDetector diff --git a/app/services/proofing/aamva/applicant.rb b/app/services/proofing/aamva/applicant.rb index d521a6cd384..4d7da4e039c 100644 --- a/app/services/proofing/aamva/applicant.rb +++ b/app/services/proofing/aamva/applicant.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'date' require 'hashie/mash' diff --git a/app/services/proofing/aamva/authentication_client.rb b/app/services/proofing/aamva/authentication_client.rb index d0896e2f53a..ad4b209863a 100644 --- a/app/services/proofing/aamva/authentication_client.rb +++ b/app/services/proofing/aamva/authentication_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Aamva class AuthenticationClient diff --git a/app/services/proofing/aamva/authentication_error.rb b/app/services/proofing/aamva/authentication_error.rb index 3deb39e43dc..9e520ae983c 100644 --- a/app/services/proofing/aamva/authentication_error.rb +++ b/app/services/proofing/aamva/authentication_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Aamva class AuthenticationError < StandardError; end diff --git a/app/services/proofing/aamva/hmac_secret.rb b/app/services/proofing/aamva/hmac_secret.rb index f8d5a10785d..a1e7926b743 100644 --- a/app/services/proofing/aamva/hmac_secret.rb +++ b/app/services/proofing/aamva/hmac_secret.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'base64' require 'openssl' diff --git a/app/services/proofing/aamva/proofer.rb b/app/services/proofing/aamva/proofer.rb index ac20f64b969..0daa79f0e08 100644 --- a/app/services/proofing/aamva/proofer.rb +++ b/app/services/proofing/aamva/proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Aamva class Proofer diff --git a/app/services/proofing/aamva/request/authentication_token_request.rb b/app/services/proofing/aamva/request/authentication_token_request.rb index 88b1f88cc81..b9f6de2a099 100644 --- a/app/services/proofing/aamva/request/authentication_token_request.rb +++ b/app/services/proofing/aamva/request/authentication_token_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'base64' require 'erb' require 'faraday' @@ -11,10 +13,10 @@ module Proofing module Aamva module Request class AuthenticationTokenRequest - DEFAULT_AUTH_URL = 'https://authentication-cert.aamva.org/Authentication/Authenticate.svc'.freeze - CONTENT_TYPE = 'application/soap+xml;charset=UTF-8'.freeze + DEFAULT_AUTH_URL = 'https://authentication-cert.aamva.org/Authentication/Authenticate.svc' + CONTENT_TYPE = 'application/soap+xml;charset=UTF-8' SOAP_ACTION = - '"http://aamva.org/authentication/3.1.0/IAuthenticationService/Authenticate"'.freeze + '"http://aamva.org/authentication/3.1.0/IAuthenticationService/Authenticate"' attr_reader :config, :body, :headers, :url attr_reader :security_context_token_identifier, :security_context_token_reference diff --git a/app/services/proofing/aamva/request/security_token_request.rb b/app/services/proofing/aamva/request/security_token_request.rb index 73e7cfa2892..3051d508589 100644 --- a/app/services/proofing/aamva/request/security_token_request.rb +++ b/app/services/proofing/aamva/request/security_token_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'erb' require 'faraday' require 'openssl' @@ -10,10 +12,10 @@ module Proofing module Aamva module Request class SecurityTokenRequest - DEFAULT_AUTH_URL = 'https://authentication-cert.aamva.org/Authentication/Authenticate.svc'.freeze - CONTENT_TYPE = 'application/soap+xml;charset=UTF-8'.freeze + DEFAULT_AUTH_URL = 'https://authentication-cert.aamva.org/Authentication/Authenticate.svc' + CONTENT_TYPE = 'application/soap+xml;charset=UTF-8' SOAP_ACTION = - '"http://aamva.org/authentication/3.1.0/IAuthenticationService/Authenticate"'.freeze + '"http://aamva.org/authentication/3.1.0/IAuthenticationService/Authenticate"' attr_reader :config, :body, :headers, :url diff --git a/app/services/proofing/aamva/request/verification_request.rb b/app/services/proofing/aamva/request/verification_request.rb index 2035d41588b..df38c8b2d3f 100644 --- a/app/services/proofing/aamva/request/verification_request.rb +++ b/app/services/proofing/aamva/request/verification_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'erb' require 'faraday' require 'rexml/document' @@ -9,11 +11,11 @@ module Proofing module Aamva module Request class VerificationRequest - CONTENT_TYPE = 'application/soap+xml;charset=UTF-8'.freeze + CONTENT_TYPE = 'application/soap+xml;charset=UTF-8' DEFAULT_VERIFICATION_URL = - 'https://verificationservices-cert.aamva.org:18449/dldv/2.1/online'.freeze + 'https://verificationservices-cert.aamva.org:18449/dldv/2.1/online' SOAP_ACTION = - '"http://aamva.org/dldv/wsdl/2.1/IDLDVService21/VerifyDriverLicenseData"'.freeze + '"http://aamva.org/dldv/wsdl/2.1/IDLDVService21/VerifyDriverLicenseData"' extend Forwardable diff --git a/app/services/proofing/aamva/response/authentication_token_response.rb b/app/services/proofing/aamva/response/authentication_token_response.rb index 541585bdda0..ccc332df43d 100644 --- a/app/services/proofing/aamva/response/authentication_token_response.rb +++ b/app/services/proofing/aamva/response/authentication_token_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Aamva module Response diff --git a/app/services/proofing/aamva/response/security_token_response.rb b/app/services/proofing/aamva/response/security_token_response.rb index 0b2d52760ff..135ea1aa583 100644 --- a/app/services/proofing/aamva/response/security_token_response.rb +++ b/app/services/proofing/aamva/response/security_token_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rexml/document' require 'rexml/xpath' diff --git a/app/services/proofing/aamva/response/verification_response.rb b/app/services/proofing/aamva/response/verification_response.rb index 32d2e05b462..b26c6e20f69 100644 --- a/app/services/proofing/aamva/response/verification_response.rb +++ b/app/services/proofing/aamva/response/verification_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rexml/document' require 'rexml/xpath' diff --git a/app/services/proofing/aamva/soap_error_handler.rb b/app/services/proofing/aamva/soap_error_handler.rb index b8bbaf704f2..c37d19f8d05 100644 --- a/app/services/proofing/aamva/soap_error_handler.rb +++ b/app/services/proofing/aamva/soap_error_handler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rexml/document' require 'rexml/xpath' diff --git a/app/services/proofing/aamva/verification_client.rb b/app/services/proofing/aamva/verification_client.rb index a9911c19bbf..4f4818156f9 100644 --- a/app/services/proofing/aamva/verification_client.rb +++ b/app/services/proofing/aamva/verification_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Aamva class VerificationClient diff --git a/app/services/proofing/aamva/verification_error.rb b/app/services/proofing/aamva/verification_error.rb index 277396eacf6..f94fd48b468 100644 --- a/app/services/proofing/aamva/verification_error.rb +++ b/app/services/proofing/aamva/verification_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Aamva class VerificationError < StandardError; end diff --git a/app/services/proofing/address_result.rb b/app/services/proofing/address_result.rb index 46134ba93f3..4a0bca23ec7 100644 --- a/app/services/proofing/address_result.rb +++ b/app/services/proofing/address_result.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing class AddressResult attr_reader :success, diff --git a/app/services/proofing/ddp_result.rb b/app/services/proofing/ddp_result.rb index 2cea4402148..d00e5e1109e 100644 --- a/app/services/proofing/ddp_result.rb +++ b/app/services/proofing/ddp_result.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing class DdpResult attr_reader :exception diff --git a/app/services/proofing/lexis_nexis/authenticated_request.rb b/app/services/proofing/lexis_nexis/authenticated_request.rb index c98c9abd0b3..84f42644e4c 100644 --- a/app/services/proofing/lexis_nexis/authenticated_request.rb +++ b/app/services/proofing/lexis_nexis/authenticated_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis class AuthenticatedRequest < Request diff --git a/app/services/proofing/lexis_nexis/config.rb b/app/services/proofing/lexis_nexis/config.rb index 23c634dc233..a09f4e3fd25 100644 --- a/app/services/proofing/lexis_nexis/config.rb +++ b/app/services/proofing/lexis_nexis/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis Config = RedactedStruct.new( diff --git a/app/services/proofing/lexis_nexis/date_formatter.rb b/app/services/proofing/lexis_nexis/date_formatter.rb index a678d82a799..8e6f439a31f 100644 --- a/app/services/proofing/lexis_nexis/date_formatter.rb +++ b/app/services/proofing/lexis_nexis/date_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis class DateFormatter diff --git a/app/services/proofing/lexis_nexis/ddp/proofer.rb b/app/services/proofing/lexis_nexis/ddp/proofer.rb index 5091d5b4e07..246c6957955 100644 --- a/app/services/proofing/lexis_nexis/ddp/proofer.rb +++ b/app/services/proofing/lexis_nexis/ddp/proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module Ddp diff --git a/app/services/proofing/lexis_nexis/ddp/response_redacter.rb b/app/services/proofing/lexis_nexis/ddp/response_redacter.rb index b03e9de29a6..377f13e0b5b 100644 --- a/app/services/proofing/lexis_nexis/ddp/response_redacter.rb +++ b/app/services/proofing/lexis_nexis/ddp/response_redacter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module Ddp diff --git a/app/services/proofing/lexis_nexis/ddp/verification_request.rb b/app/services/proofing/lexis_nexis/ddp/verification_request.rb index 2123c42e929..a918500fb93 100644 --- a/app/services/proofing/lexis_nexis/ddp/verification_request.rb +++ b/app/services/proofing/lexis_nexis/ddp/verification_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module Ddp diff --git a/app/services/proofing/lexis_nexis/instant_verify/check_to_attribute_mapper.rb b/app/services/proofing/lexis_nexis/instant_verify/check_to_attribute_mapper.rb index 266debdec04..a978cbe2753 100644 --- a/app/services/proofing/lexis_nexis/instant_verify/check_to_attribute_mapper.rb +++ b/app/services/proofing/lexis_nexis/instant_verify/check_to_attribute_mapper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module InstantVerify diff --git a/app/services/proofing/lexis_nexis/instant_verify/proofer.rb b/app/services/proofing/lexis_nexis/instant_verify/proofer.rb index b47f7b5f468..5e330e2275e 100644 --- a/app/services/proofing/lexis_nexis/instant_verify/proofer.rb +++ b/app/services/proofing/lexis_nexis/instant_verify/proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module InstantVerify diff --git a/app/services/proofing/lexis_nexis/instant_verify/verification_request.rb b/app/services/proofing/lexis_nexis/instant_verify/verification_request.rb index 957d524101e..ebdba9e1b29 100644 --- a/app/services/proofing/lexis_nexis/instant_verify/verification_request.rb +++ b/app/services/proofing/lexis_nexis/instant_verify/verification_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module InstantVerify diff --git a/app/services/proofing/lexis_nexis/phone_finder/proofer.rb b/app/services/proofing/lexis_nexis/phone_finder/proofer.rb index c5eb9e08180..f7f69bf01aa 100644 --- a/app/services/proofing/lexis_nexis/phone_finder/proofer.rb +++ b/app/services/proofing/lexis_nexis/phone_finder/proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module PhoneFinder diff --git a/app/services/proofing/lexis_nexis/phone_finder/verification_request.rb b/app/services/proofing/lexis_nexis/phone_finder/verification_request.rb index 78e1f541cbc..740124d7848 100644 --- a/app/services/proofing/lexis_nexis/phone_finder/verification_request.rb +++ b/app/services/proofing/lexis_nexis/phone_finder/verification_request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis module PhoneFinder diff --git a/app/services/proofing/lexis_nexis/request.rb b/app/services/proofing/lexis_nexis/request.rb index 4fcdbdb136f..e54e0cf8e6a 100644 --- a/app/services/proofing/lexis_nexis/request.rb +++ b/app/services/proofing/lexis_nexis/request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis class RequestError < StandardError; end diff --git a/app/services/proofing/lexis_nexis/request_signer.rb b/app/services/proofing/lexis_nexis/request_signer.rb index dd43ede313c..81735476689 100644 --- a/app/services/proofing/lexis_nexis/request_signer.rb +++ b/app/services/proofing/lexis_nexis/request_signer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis class RequestSigner diff --git a/app/services/proofing/lexis_nexis/response.rb b/app/services/proofing/lexis_nexis/response.rb index fa36d289852..4bbe9ce2de6 100644 --- a/app/services/proofing/lexis_nexis/response.rb +++ b/app/services/proofing/lexis_nexis/response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis class Response diff --git a/app/services/proofing/lexis_nexis/verification_error_parser.rb b/app/services/proofing/lexis_nexis/verification_error_parser.rb index 880a7f96077..668d88a8171 100644 --- a/app/services/proofing/lexis_nexis/verification_error_parser.rb +++ b/app/services/proofing/lexis_nexis/verification_error_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module LexisNexis class VerificationErrorParser diff --git a/app/services/proofing/mock/address_mock_client.rb b/app/services/proofing/mock/address_mock_client.rb index be7fe7d8f49..02eeb73677a 100644 --- a/app/services/proofing/mock/address_mock_client.rb +++ b/app/services/proofing/mock/address_mock_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Mock class AddressMockClient diff --git a/app/services/proofing/mock/ddp_mock_client.rb b/app/services/proofing/mock/ddp_mock_client.rb index 167152f026b..18282101261 100644 --- a/app/services/proofing/mock/ddp_mock_client.rb +++ b/app/services/proofing/mock/ddp_mock_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Mock class DdpMockClient diff --git a/app/services/proofing/mock/device_profiling_backend.rb b/app/services/proofing/mock/device_profiling_backend.rb index f323b3d26a3..5f14549555d 100644 --- a/app/services/proofing/mock/device_profiling_backend.rb +++ b/app/services/proofing/mock/device_profiling_backend.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Mock class DeviceProfilingBackend diff --git a/app/services/proofing/mock/resolution_mock_client.rb b/app/services/proofing/mock/resolution_mock_client.rb index 9d61efad4c7..2d5260dd50d 100644 --- a/app/services/proofing/mock/resolution_mock_client.rb +++ b/app/services/proofing/mock/resolution_mock_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Mock class ResolutionMockClient diff --git a/app/services/proofing/resolution/progressive_proofer.rb b/app/services/proofing/resolution/progressive_proofer.rb index eddbd58229b..fb92d7d12be 100644 --- a/app/services/proofing/resolution/progressive_proofer.rb +++ b/app/services/proofing/resolution/progressive_proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Resolution # Uses a combination of LexisNexis InstantVerify and AAMVA checks to verify that diff --git a/app/services/proofing/resolution/result.rb b/app/services/proofing/resolution/result.rb index c1ddd571012..e9c07bfed68 100644 --- a/app/services/proofing/resolution/result.rb +++ b/app/services/proofing/resolution/result.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Resolution class Result diff --git a/app/services/proofing/resolution/result_adjudicator.rb b/app/services/proofing/resolution/result_adjudicator.rb index 0d71af7f763..3fc07cb3483 100644 --- a/app/services/proofing/resolution/result_adjudicator.rb +++ b/app/services/proofing/resolution/result_adjudicator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing module Resolution class ResultAdjudicator diff --git a/app/services/proofing/timeout_error.rb b/app/services/proofing/timeout_error.rb index 40dc6049043..afd40756cbe 100644 --- a/app/services/proofing/timeout_error.rb +++ b/app/services/proofing/timeout_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Proofing class TimeoutError < StandardError end diff --git a/app/services/push_notification/account_disabled_event.rb b/app/services/push_notification/account_disabled_event.rb index d35ec8acd8a..3a76dee11cd 100644 --- a/app/services/push_notification/account_disabled_event.rb +++ b/app/services/push_notification/account_disabled_event.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + module PushNotification # This is used for account suspension class AccountDisabledEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/account-disabled'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/account-disabled' attr_reader :user diff --git a/app/services/push_notification/account_enabled_event.rb b/app/services/push_notification/account_enabled_event.rb index 759d2436230..dec316f5ecc 100644 --- a/app/services/push_notification/account_enabled_event.rb +++ b/app/services/push_notification/account_enabled_event.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + module PushNotification # This is used for account reinstatement class AccountEnabledEvent include IssSubEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/account-enabled'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/account-enabled' attr_reader :user diff --git a/app/services/push_notification/account_purged_event.rb b/app/services/push_notification/account_purged_event.rb index 0c0daa100c2..68d7a874643 100644 --- a/app/services/push_notification/account_purged_event.rb +++ b/app/services/push_notification/account_purged_event.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module PushNotification class AccountPurgedEvent include IssSubEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/account-purged'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/account-purged' attr_reader :user diff --git a/app/services/push_notification/email_changed_event.rb b/app/services/push_notification/email_changed_event.rb index b716c713d6b..6ad09f4ad29 100644 --- a/app/services/push_notification/email_changed_event.rb +++ b/app/services/push_notification/email_changed_event.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + module PushNotification class EmailChangedEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/identifier-changed'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/identifier-changed' attr_reader :user, :email diff --git a/app/services/push_notification/http_push.rb b/app/services/push_notification/http_push.rb index 7744fb757b4..57a53dae816 100644 --- a/app/services/push_notification/http_push.rb +++ b/app/services/push_notification/http_push.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PushNotification # Delivers SETs (Security Event Tokens) via the HTTP Push protocol # https://tools.ietf.org/html/draft-ietf-secevent-http-push-00 diff --git a/app/services/push_notification/identifier_recycled_event.rb b/app/services/push_notification/identifier_recycled_event.rb index f8433726f75..0bf4473956e 100644 --- a/app/services/push_notification/identifier_recycled_event.rb +++ b/app/services/push_notification/identifier_recycled_event.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + module PushNotification class IdentifierRecycledEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/identifier-recycled'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/identifier-recycled' attr_reader :user, :email diff --git a/app/services/push_notification/iss_sub_event.rb b/app/services/push_notification/iss_sub_event.rb index 34a0b8b85c8..8f923fe97b4 100644 --- a/app/services/push_notification/iss_sub_event.rb +++ b/app/services/push_notification/iss_sub_event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PushNotification module IssSubEvent def payload(iss_sub:) diff --git a/app/services/push_notification/local_event_queue.rb b/app/services/push_notification/local_event_queue.rb index c2f85a0f386..5d00ec8e6ff 100644 --- a/app/services/push_notification/local_event_queue.rb +++ b/app/services/push_notification/local_event_queue.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PushNotification class LocalEventQueue class << self diff --git a/app/services/push_notification/mfa_limit_account_locked_event.rb b/app/services/push_notification/mfa_limit_account_locked_event.rb index 681fd8a3845..5e5f9a4ac3a 100644 --- a/app/services/push_notification/mfa_limit_account_locked_event.rb +++ b/app/services/push_notification/mfa_limit_account_locked_event.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + module PushNotification class MfaLimitAccountLockedEvent include IssSubEvent EVENT_TYPE = - 'https://schemas.login.gov/secevent/risc/event-type/mfa-limit-account-locked'.freeze + 'https://schemas.login.gov/secevent/risc/event-type/mfa-limit-account-locked' attr_reader :user diff --git a/app/services/push_notification/password_reset_event.rb b/app/services/push_notification/password_reset_event.rb index b969b52f522..0d01529eda3 100644 --- a/app/services/push_notification/password_reset_event.rb +++ b/app/services/push_notification/password_reset_event.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module PushNotification class PasswordResetEvent include IssSubEvent - EVENT_TYPE = 'https://schemas.login.gov/secevent/risc/event-type/password-reset'.freeze + EVENT_TYPE = 'https://schemas.login.gov/secevent/risc/event-type/password-reset' attr_reader :user diff --git a/app/services/push_notification/recovery_activated_event.rb b/app/services/push_notification/recovery_activated_event.rb index c72e06c5979..77a1e03f735 100644 --- a/app/services/push_notification/recovery_activated_event.rb +++ b/app/services/push_notification/recovery_activated_event.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module PushNotification class RecoveryActivatedEvent include IssSubEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/recovery-activated'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/recovery-activated' attr_reader :user diff --git a/app/services/push_notification/recovery_information_changed_event.rb b/app/services/push_notification/recovery_information_changed_event.rb index 1fd51a06098..a2bf5751927 100644 --- a/app/services/push_notification/recovery_information_changed_event.rb +++ b/app/services/push_notification/recovery_information_changed_event.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module PushNotification class RecoveryInformationChangedEvent include IssSubEvent - EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/recovery-information-changed'.freeze + EVENT_TYPE = 'https://schemas.openid.net/secevent/risc/event-type/recovery-information-changed' attr_reader :user diff --git a/app/services/push_notification/reproof_completed_event.rb b/app/services/push_notification/reproof_completed_event.rb index 6ef5b75c31e..b026ae08f46 100644 --- a/app/services/push_notification/reproof_completed_event.rb +++ b/app/services/push_notification/reproof_completed_event.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module PushNotification class ReproofCompletedEvent include IssSubEvent - EVENT_TYPE = 'https://schemas.login.gov/secevent/risc/event-type/reproof-completed'.freeze + EVENT_TYPE = 'https://schemas.login.gov/secevent/risc/event-type/reproof-completed' attr_reader :user diff --git a/app/services/pwned_passwords/lookup_password.rb b/app/services/pwned_passwords/lookup_password.rb index 2751a1eac3d..a6cf40b7036 100644 --- a/app/services/pwned_passwords/lookup_password.rb +++ b/app/services/pwned_passwords/lookup_password.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PwnedPasswords class LookupPassword PWNED_PASSWORD_FILE = Rails.root.join(IdentityConfig.store.pwned_passwords_file_path).freeze diff --git a/app/services/random_phrase.rb b/app/services/random_phrase.rb index 8e9aab77e3e..1c445ec4897 100644 --- a/app/services/random_phrase.rb +++ b/app/services/random_phrase.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Helper for generating and normalizing random strings, that can be formatted as groups of 4 letters class RandomPhrase attr_reader :words, :separator diff --git a/app/services/rate_limiter.rb b/app/services/rate_limiter.rb index 67f7f06f7f1..41700da49e1 100644 --- a/app/services/rate_limiter.rb +++ b/app/services/rate_limiter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This class is similar to RedisRateLimiter, but differs in that # the rate limit period begins once the maximum number of allowed # attempts has been reached. diff --git a/app/services/reactivate_account_session.rb b/app/services/reactivate_account_session.rb index b8d646a86cb..f4dda994260 100644 --- a/app/services/reactivate_account_session.rb +++ b/app/services/reactivate_account_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ReactivateAccountSession SESSION_KEY = :reactivate_account diff --git a/app/services/recaptcha_enterprise_validator.rb b/app/services/recaptcha_enterprise_validator.rb index b8628ffdcfc..8eddb0d9b10 100644 --- a/app/services/recaptcha_enterprise_validator.rb +++ b/app/services/recaptcha_enterprise_validator.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + class RecaptchaEnterpriseValidator < RecaptchaValidator - BASE_VERIFICATION_ENDPOINT = 'https://recaptchaenterprise.googleapis.com/v1/projects'.freeze + BASE_VERIFICATION_ENDPOINT = 'https://recaptchaenterprise.googleapis.com/v1/projects' private diff --git a/app/services/recaptcha_mock_validator.rb b/app/services/recaptcha_mock_validator.rb index fc915dbc289..a06d4e2ffd2 100644 --- a/app/services/recaptcha_mock_validator.rb +++ b/app/services/recaptcha_mock_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RecaptchaMockValidator < RecaptchaValidator attr_reader :score diff --git a/app/services/recaptcha_validator.rb b/app/services/recaptcha_validator.rb index fca81da7151..95769a31473 100644 --- a/app/services/recaptcha_validator.rb +++ b/app/services/recaptcha_validator.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + class RecaptchaValidator - VERIFICATION_ENDPOINT = 'https://www.google.com/recaptcha/api/siteverify'.freeze + VERIFICATION_ENDPOINT = 'https://www.google.com/recaptcha/api/siteverify' RESULT_ERRORS = ['missing-input-secret', 'invalid-input-secret'] VALID_RECAPTCHA_VERSIONS = [2, 3] diff --git a/app/services/redis_rate_limiter.rb b/app/services/redis_rate_limiter.rb index 18bbe69b23a..016d2912b4c 100644 --- a/app/services/redis_rate_limiter.rb +++ b/app/services/redis_rate_limiter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Implementation of https://redis.com/redis-best-practices/basic-rate-limiting/ class RedisRateLimiter class LimitError < StandardError; end diff --git a/app/services/remember_device_cookie.rb b/app/services/remember_device_cookie.rb index ba4e67a9a45..9b7d6ac37e7 100644 --- a/app/services/remember_device_cookie.rb +++ b/app/services/remember_device_cookie.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + class RememberDeviceCookie - COOKIE_ROLE = 'remember_me'.freeze + COOKIE_ROLE = 'remember_me' attr_reader :user_id, :created_at diff --git a/app/services/reporting/account_deletion_rate_report.rb b/app/services/reporting/account_deletion_rate_report.rb index 8e25f860595..ed87253b8b6 100644 --- a/app/services/reporting/account_deletion_rate_report.rb +++ b/app/services/reporting/account_deletion_rate_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting class AccountDeletionRateReport attr_reader :report_date diff --git a/app/services/reporting/account_reuse_report.rb b/app/services/reporting/account_reuse_report.rb index da5ea4f9c98..001a53bc00f 100644 --- a/app/services/reporting/account_reuse_report.rb +++ b/app/services/reporting/account_reuse_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting class AccountReuseReport attr_reader :report_date diff --git a/app/services/reporting/active_users_count_report.rb b/app/services/reporting/active_users_count_report.rb index a254a78fd8d..ed1bda940ed 100644 --- a/app/services/reporting/active_users_count_report.rb +++ b/app/services/reporting/active_users_count_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting class ActiveUsersCountReport attr_reader :report_date diff --git a/app/services/reporting/agency_and_sp_report.rb b/app/services/reporting/agency_and_sp_report.rb index 4af70f8b350..e120c81236d 100644 --- a/app/services/reporting/agency_and_sp_report.rb +++ b/app/services/reporting/agency_and_sp_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting class AgencyAndSpReport attr_reader :report_date diff --git a/app/services/reporting/emailable_report.rb b/app/services/reporting/emailable_report.rb index de9eb62f538..94207c49736 100644 --- a/app/services/reporting/emailable_report.rb +++ b/app/services/reporting/emailable_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting # Represents tabular data and how to render the table in an email body and # name it as an attachment diff --git a/app/services/request_password_reset.rb b/app/services/request_password_reset.rb index 84a7ac1d9c5..d69741d6548 100644 --- a/app/services/request_password_reset.rb +++ b/app/services/request_password_reset.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RequestPasswordReset = RedactedStruct.new( :email, :request_id, :analytics, :irs_attempts_api_tracker, keyword_init: true, diff --git a/app/services/reset_user_password.rb b/app/services/reset_user_password.rb index 400df73db3e..d9cd79ee3a4 100644 --- a/app/services/reset_user_password.rb +++ b/app/services/reset_user_password.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ResetUserPassword def initialize(user:, remember_device_revoked_at: nil) @user = user diff --git a/app/services/revoke_service_provider_consent.rb b/app/services/revoke_service_provider_consent.rb index b6ee1ad046a..fac37a2c4eb 100644 --- a/app/services/revoke_service_provider_consent.rb +++ b/app/services/revoke_service_provider_consent.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RevokeServiceProviderConsent attr_reader :identity, :now diff --git a/app/services/saml_endpoint.rb b/app/services/saml_endpoint.rb index 340954a3cd3..226d106f4dd 100644 --- a/app/services/saml_endpoint.rb +++ b/app/services/saml_endpoint.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SamlEndpoint attr_reader :year diff --git a/app/services/saml_request_parser.rb b/app/services/saml_request_parser.rb index d2dabb77f78..bf1e3a760ee 100644 --- a/app/services/saml_request_parser.rb +++ b/app/services/saml_request_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SamlRequestParser URI_PATTERN = Saml::Idp::Constants::REQUESTED_ATTRIBUTES_CLASSREF diff --git a/app/services/saml_request_validator.rb b/app/services/saml_request_validator.rb index c1e7dda0f98..cddcd59198b 100644 --- a/app/services/saml_request_validator.rb +++ b/app/services/saml_request_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SamlRequestValidator include ActiveModel::Model diff --git a/app/services/send_add_email_confirmation.rb b/app/services/send_add_email_confirmation.rb index a263c83efc4..cc9eb7dc7d8 100644 --- a/app/services/send_add_email_confirmation.rb +++ b/app/services/send_add_email_confirmation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SendAddEmailConfirmation attr_reader :user diff --git a/app/services/send_sign_up_email_confirmation.rb b/app/services/send_sign_up_email_confirmation.rb index fb2a4626ab7..4768c1942bf 100644 --- a/app/services/send_sign_up_email_confirmation.rb +++ b/app/services/send_sign_up_email_confirmation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SendSignUpEmailConfirmation include ::NewRelic::Agent::MethodTracer diff --git a/app/services/service_provider_request_handler.rb b/app/services/service_provider_request_handler.rb index bd62d915a9c..19eb1974195 100644 --- a/app/services/service_provider_request_handler.rb +++ b/app/services/service_provider_request_handler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ServiceProviderRequestHandler def initialize(url:, session:, protocol_request:, protocol:) @url = url diff --git a/app/services/service_provider_request_proxy.rb b/app/services/service_provider_request_proxy.rb index a7a8f983366..049d293fa35 100644 --- a/app/services/service_provider_request_proxy.rb +++ b/app/services/service_provider_request_proxy.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + # Drop in replacement for ServiceProviderRequest. Moves us from Postgres to Redis # To manage the migration and still respect in flight transactions code will default # to checking the db if no redis object is available. Following release can remove db dependence. # To migrate code simply replace ServiceProviderRequest with ServiceProviderRequestProxy class ServiceProviderRequestProxy - REDIS_KEY_PREFIX = 'redis-pool:spr:'.freeze + REDIS_KEY_PREFIX = 'redis-pool:spr:' # This is used to support the .last method. That method is only used in the # test environment diff --git a/app/services/service_provider_seeder.rb b/app/services/service_provider_seeder.rb index 1fb1b0ce8ab..75205634a5e 100644 --- a/app/services/service_provider_seeder.rb +++ b/app/services/service_provider_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Update ServiceProvider from config/service_providers.yml (all environments in rake db:seed) class ServiceProviderSeeder class ExtraServiceProviderError < StandardError; end diff --git a/app/services/service_provider_session_creator.rb b/app/services/service_provider_session_creator.rb index b85e540079f..9d42e5f8649 100644 --- a/app/services/service_provider_session_creator.rb +++ b/app/services/service_provider_session_creator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ServiceProviderSessionCreator def initialize(sp:, view_context:, sp_session:, service_provider_request:) @sp = sp diff --git a/app/services/service_provider_updater.rb b/app/services/service_provider_updater.rb index ccece2020ee..f8bbab9effa 100644 --- a/app/services/service_provider_updater.rb +++ b/app/services/service_provider_updater.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Update ServiceProvider table by pulling from the Dashboard app API (lower environments only) class ServiceProviderUpdater SP_PROTECTED_ATTRIBUTES = %i[ diff --git a/app/services/sp_handoff_bounce/add_handoff_time_to_session.rb b/app/services/sp_handoff_bounce/add_handoff_time_to_session.rb index feaa37377eb..e3f96b83ccf 100644 --- a/app/services/sp_handoff_bounce/add_handoff_time_to_session.rb +++ b/app/services/sp_handoff_bounce/add_handoff_time_to_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SpHandoffBounce class AddHandoffTimeToSession def self.call(session) diff --git a/app/services/sp_handoff_bounce/is_bounced.rb b/app/services/sp_handoff_bounce/is_bounced.rb index 92df5a17b18..5c4db9ebe6d 100644 --- a/app/services/sp_handoff_bounce/is_bounced.rb +++ b/app/services/sp_handoff_bounce/is_bounced.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SpHandoffBounce class IsBounced def self.call(session) diff --git a/app/services/sp_return_url_resolver.rb b/app/services/sp_return_url_resolver.rb index 724f5a03d19..58e679723cf 100644 --- a/app/services/sp_return_url_resolver.rb +++ b/app/services/sp_return_url_resolver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class SpReturnUrlResolver attr_reader :service_provider, :oidc_state, :oidc_redirect_uri diff --git a/app/services/ssn_formatter.rb b/app/services/ssn_formatter.rb index 9ce3d8c8573..9adcc26dab3 100644 --- a/app/services/ssn_formatter.rb +++ b/app/services/ssn_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SsnFormatter def self.format(ssn) normalized_ssn = normalize(ssn) diff --git a/app/services/status_page.rb b/app/services/status_page.rb index a21accc5960..c783f3688ef 100644 --- a/app/services/status_page.rb +++ b/app/services/status_page.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + class StatusPage - BASE_URL = 'https://status.login.gov/'.freeze + BASE_URL = 'https://status.login.gov/' def self.base_url BASE_URL diff --git a/app/services/store_sp_metadata_in_session.rb b/app/services/store_sp_metadata_in_session.rb index 81638b02059..96469e4c34b 100644 --- a/app/services/store_sp_metadata_in_session.rb +++ b/app/services/store_sp_metadata_in_session.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class StoreSpMetadataInSession def initialize(session:, request_id:) @session = session diff --git a/app/services/string_redacter.rb b/app/services/string_redacter.rb index 128d6955844..52949bfeba6 100644 --- a/app/services/string_redacter.rb +++ b/app/services/string_redacter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module StringRedacter module_function diff --git a/app/services/test/single_logout_service.rb b/app/services/test/single_logout_service.rb index 48f3deb66d8..57cc2cf6fd1 100644 --- a/app/services/test/single_logout_service.rb +++ b/app/services/test/single_logout_service.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test class SingleLogoutService def initialize(params, settings) diff --git a/app/services/test/slo_response_decoder.rb b/app/services/test/slo_response_decoder.rb index b8b4043993c..302a78fe431 100644 --- a/app/services/test/slo_response_decoder.rb +++ b/app/services/test/slo_response_decoder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Test class SloResponseDecoder def initialize(params, settings) diff --git a/app/services/time_service.rb b/app/services/time_service.rb index 06c916e0dcf..bba021cc68d 100644 --- a/app/services/time_service.rb +++ b/app/services/time_service.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TimeService # Helper to round a Time instance to a particular interval # @param [Time] time diff --git a/app/services/update_user.rb b/app/services/update_user.rb index 0ba47d6c107..ea2aa5e3ecf 100644 --- a/app/services/update_user.rb +++ b/app/services/update_user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UpdateUser def initialize(user:, attributes:) @user = user diff --git a/app/services/uri_service.rb b/app/services/uri_service.rb index d5e8b0100e8..33682357580 100644 --- a/app/services/uri_service.rb +++ b/app/services/uri_service.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UriService def self.params(original_uri) uri = URI(original_uri) diff --git a/app/services/user_alerts/alert_user_about_account_rejected.rb b/app/services/user_alerts/alert_user_about_account_rejected.rb index c8544acc1cd..3a664229755 100644 --- a/app/services/user_alerts/alert_user_about_account_rejected.rb +++ b/app/services/user_alerts/alert_user_about_account_rejected.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserAlerts class AlertUserAboutAccountRejected def self.call(user) diff --git a/app/services/user_alerts/alert_user_about_account_verified.rb b/app/services/user_alerts/alert_user_about_account_verified.rb index 5d4d0cf4459..4ad165888d4 100644 --- a/app/services/user_alerts/alert_user_about_account_verified.rb +++ b/app/services/user_alerts/alert_user_about_account_verified.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserAlerts class AlertUserAboutAccountVerified def self.call(user:, date_time:, sp_name:) diff --git a/app/services/user_alerts/alert_user_about_new_device.rb b/app/services/user_alerts/alert_user_about_new_device.rb index 1c572e39541..f2fec1b5462 100644 --- a/app/services/user_alerts/alert_user_about_new_device.rb +++ b/app/services/user_alerts/alert_user_about_new_device.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserAlerts class AlertUserAboutNewDevice def self.call(user, device, disavowal_token) diff --git a/app/services/user_alerts/alert_user_about_password_change.rb b/app/services/user_alerts/alert_user_about_password_change.rb index afbf087f2d2..ae2045b429d 100644 --- a/app/services/user_alerts/alert_user_about_password_change.rb +++ b/app/services/user_alerts/alert_user_about_password_change.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserAlerts class AlertUserAboutPasswordChange def self.call(user, disavowal_token) diff --git a/app/services/user_alerts/alert_user_about_personal_key_sign_in.rb b/app/services/user_alerts/alert_user_about_personal_key_sign_in.rb index 4dc8d13d6d7..aeabc79cacb 100644 --- a/app/services/user_alerts/alert_user_about_personal_key_sign_in.rb +++ b/app/services/user_alerts/alert_user_about_personal_key_sign_in.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UserAlerts class AlertUserAboutPersonalKeySignIn # @return [FormResponse] diff --git a/app/services/user_event_creator.rb b/app/services/user_event_creator.rb index 922eb54c60c..180ef6d0a73 100644 --- a/app/services/user_event_creator.rb +++ b/app/services/user_event_creator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UserEventCreator COOKIE_LENGTH = 128 diff --git a/app/services/user_profiles_encryptor.rb b/app/services/user_profiles_encryptor.rb index 751f6b1a1c7..4ecf6db53f9 100644 --- a/app/services/user_profiles_encryptor.rb +++ b/app/services/user_profiles_encryptor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class UserProfilesEncryptor class MissingPiiError < StandardError end diff --git a/app/services/user_seeder.rb b/app/services/user_seeder.rb index 1e640304788..be4778cf6f4 100644 --- a/app/services/user_seeder.rb +++ b/app/services/user_seeder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' class UserSeeder @@ -57,7 +59,7 @@ def run private - PASSWORD = 'S00per Seekr3t'.freeze + PASSWORD = 'S00per Seekr3t' PII_ATTRS = %w[ first_name diff --git a/app/services/user_session_context.rb b/app/services/user_session_context.rb index 5e047ef3bba..a934cdcb3f9 100644 --- a/app/services/user_session_context.rb +++ b/app/services/user_session_context.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + class UserSessionContext - AUTHENTICATION_CONTEXT = 'authentication'.freeze - REAUTHENTICATION_CONTEXT = 'reauthentication'.freeze - CONFIRMATION_CONTEXT = 'confirmation'.freeze + AUTHENTICATION_CONTEXT = 'authentication' + REAUTHENTICATION_CONTEXT = 'reauthentication' + CONFIRMATION_CONTEXT = 'confirmation' def self.authentication_context?(context) context == AUTHENTICATION_CONTEXT diff --git a/app/services/usps_in_person_proofing/applicant.rb b/app/services/usps_in_person_proofing/applicant.rb index e5c3ae43c1f..a7db0cd867d 100644 --- a/app/services/usps_in_person_proofing/applicant.rb +++ b/app/services/usps_in_person_proofing/applicant.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing Applicant = Struct.new( :unique_id, :first_name, :last_name, :address, :city, :state, :zip_code, diff --git a/app/services/usps_in_person_proofing/date_validator.rb b/app/services/usps_in_person_proofing/date_validator.rb index 02b66c6df4d..b2e18984d55 100644 --- a/app/services/usps_in_person_proofing/date_validator.rb +++ b/app/services/usps_in_person_proofing/date_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing # Validator that can be attached to a form or other model # to verify that specific supported fields are comparable to other dates. diff --git a/app/services/usps_in_person_proofing/enrollment_helper.rb b/app/services/usps_in_person_proofing/enrollment_helper.rb index 3173c5494fb..ff0f6eb50e0 100644 --- a/app/services/usps_in_person_proofing/enrollment_helper.rb +++ b/app/services/usps_in_person_proofing/enrollment_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing class EnrollmentHelper class << self diff --git a/app/services/usps_in_person_proofing/exception.rb b/app/services/usps_in_person_proofing/exception.rb index 3dc734a221c..93cab95caf6 100644 --- a/app/services/usps_in_person_proofing/exception.rb +++ b/app/services/usps_in_person_proofing/exception.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing module Exception class RequestEnrollException < StandardError diff --git a/app/services/usps_in_person_proofing/mock/fixtures.rb b/app/services/usps_in_person_proofing/mock/fixtures.rb index 0ad8ebc2fc5..485891789b2 100644 --- a/app/services/usps_in_person_proofing/mock/fixtures.rb +++ b/app/services/usps_in_person_proofing/mock/fixtures.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing module Mock class Fixtures diff --git a/app/services/usps_in_person_proofing/mock/proofer.rb b/app/services/usps_in_person_proofing/mock/proofer.rb index 43cd4fdd60c..9325d878054 100644 --- a/app/services/usps_in_person_proofing/mock/proofer.rb +++ b/app/services/usps_in_person_proofing/mock/proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing module Mock class Proofer < UspsInPersonProofing::Proofer diff --git a/app/services/usps_in_person_proofing/post_office.rb b/app/services/usps_in_person_proofing/post_office.rb index eb69e755632..f2350621978 100644 --- a/app/services/usps_in_person_proofing/post_office.rb +++ b/app/services/usps_in_person_proofing/post_office.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing PostOffice = Struct.new( :address, diff --git a/app/services/usps_in_person_proofing/proofer.rb b/app/services/usps_in_person_proofing/proofer.rb index 367affec59b..b4f52e5e8ee 100644 --- a/app/services/usps_in_person_proofing/proofer.rb +++ b/app/services/usps_in_person_proofing/proofer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing class Proofer AUTH_TOKEN_CACHE_KEY = :usps_ippaas_api_auth_token diff --git a/app/services/usps_in_person_proofing/response/request_enroll_response.rb b/app/services/usps_in_person_proofing/response/request_enroll_response.rb index a6468c25d0f..8e2528e8029 100644 --- a/app/services/usps_in_person_proofing/response/request_enroll_response.rb +++ b/app/services/usps_in_person_proofing/response/request_enroll_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing module Response class RequestEnrollResponse diff --git a/app/services/usps_in_person_proofing/transliterable_validator.rb b/app/services/usps_in_person_proofing/transliterable_validator.rb index ce966221caa..4ace39caec1 100644 --- a/app/services/usps_in_person_proofing/transliterable_validator.rb +++ b/app/services/usps_in_person_proofing/transliterable_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module UspsInPersonProofing # Validator that can be attached to a form or other model # to verify that specific supported fields are transliterable diff --git a/app/services/usps_in_person_proofing/transliterator.rb b/app/services/usps_in_person_proofing/transliterator.rb index 0f4fe333ba5..9bb036d0229 100644 --- a/app/services/usps_in_person_proofing/transliterator.rb +++ b/app/services/usps_in_person_proofing/transliterator.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + module UspsInPersonProofing class Transliterator # This is the default. May not be able to override this in current version. - REPLACEMENT = '?'.freeze + REPLACEMENT = '?' # Container to hold the results of transliteration TransliterationResult = Struct.new( diff --git a/app/services/uuid_reporter.rb b/app/services/uuid_reporter.rb index c42311397cf..a8348eaee36 100644 --- a/app/services/uuid_reporter.rb +++ b/app/services/uuid_reporter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' class UuidReporter diff --git a/app/services/verification_failures_report.rb b/app/services/verification_failures_report.rb index d8d40b82c06..32c7511f129 100644 --- a/app/services/verification_failures_report.rb +++ b/app/services/verification_failures_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class VerificationFailuresReport def self.call(service_provider, start_time, end_time) report_sql = <<~SQL diff --git a/app/services/vot/component_value.rb b/app/services/vot/component_value.rb index e724d49c06f..2eccdf1efec 100644 --- a/app/services/vot/component_value.rb +++ b/app/services/vot/component_value.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Vot ComponentValue = Data.define(:name, :description, :implied_component_values, :requirements) end diff --git a/app/services/vot/legacy_component_values.rb b/app/services/vot/legacy_component_values.rb index 5ac5bab7836..9d0a905cd3b 100644 --- a/app/services/vot/legacy_component_values.rb +++ b/app/services/vot/legacy_component_values.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Vot module LegacyComponentValues ## Identity proofing ACR values diff --git a/app/services/vot/parser.rb b/app/services/vot/parser.rb index 8073e8374fa..2931d3cd9d5 100644 --- a/app/services/vot/parser.rb +++ b/app/services/vot/parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Vot class Parser class ParseException < StandardError; end diff --git a/app/services/vot/supported_component_values.rb b/app/services/vot/supported_component_values.rb index 8329e88b3bc..9f41950bb63 100644 --- a/app/services/vot/supported_component_values.rb +++ b/app/services/vot/supported_component_values.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Vot module SupportedComponentValues C1 = ComponentValue.new( diff --git a/app/services/x509/attribute.rb b/app/services/x509/attribute.rb index b3563e8d0f3..7b9c4bce214 100644 --- a/app/services/x509/attribute.rb +++ b/app/services/x509/attribute.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringex/unidecoder' require 'stringex/core_ext' diff --git a/app/services/x509/attributes.rb b/app/services/x509/attributes.rb index 69753e5a867..84574acf116 100644 --- a/app/services/x509/attributes.rb +++ b/app/services/x509/attributes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module X509 Attributes = Struct.new( :subject, :issuer, :presented diff --git a/app/validators/account_reset/cancel_token_validator.rb b/app/validators/account_reset/cancel_token_validator.rb index 9e7a749f89f..012d3c11697 100644 --- a/app/validators/account_reset/cancel_token_validator.rb +++ b/app/validators/account_reset/cancel_token_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset module CancelTokenValidator extend ActiveSupport::Concern diff --git a/app/validators/account_reset/granted_token_validator.rb b/app/validators/account_reset/granted_token_validator.rb index ac9d794d3ea..a9042806552 100644 --- a/app/validators/account_reset/granted_token_validator.rb +++ b/app/validators/account_reset/granted_token_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AccountReset module GrantedTokenValidator extend ActiveSupport::Concern diff --git a/app/validators/form_add_email_validator.rb b/app/validators/form_add_email_validator.rb index 93f71232de2..d0437658355 100644 --- a/app/validators/form_add_email_validator.rb +++ b/app/validators/form_add_email_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FormAddEmailValidator extend ActiveSupport::Concern diff --git a/app/validators/form_email_validator.rb b/app/validators/form_email_validator.rb index 96ad1ab3011..8c47b001b2b 100644 --- a/app/validators/form_email_validator.rb +++ b/app/validators/form_email_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FormEmailValidator extend ActiveSupport::Concern include ActionView::Helpers::TranslationHelper diff --git a/app/validators/form_password_validator.rb b/app/validators/form_password_validator.rb index 2f83c7e86b6..0c7dcc906c6 100644 --- a/app/validators/form_password_validator.rb +++ b/app/validators/form_password_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FormPasswordValidator extend ActiveSupport::Concern diff --git a/app/validators/form_phone_validator.rb b/app/validators/form_phone_validator.rb index d19b7c13d0f..0d0d6c16cd5 100644 --- a/app/validators/form_phone_validator.rb +++ b/app/validators/form_phone_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FormPhoneValidator extend ActiveSupport::Concern diff --git a/app/validators/idv/form_address_validator.rb b/app/validators/idv/form_address_validator.rb index 16158a64889..f01b3b94426 100644 --- a/app/validators/idv/form_address_validator.rb +++ b/app/validators/idv/form_address_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module FormAddressValidator extend ActiveSupport::Concern diff --git a/app/validators/idv/form_ssn_format_validator.rb b/app/validators/idv/form_ssn_format_validator.rb index 4ec8935d2d8..389fd89a20b 100644 --- a/app/validators/idv/form_ssn_format_validator.rb +++ b/app/validators/idv/form_ssn_format_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module FormSsnFormatValidator extend ActiveSupport::Concern diff --git a/app/validators/idv/form_state_id_validator.rb b/app/validators/idv/form_state_id_validator.rb index 389eb10f61e..46e42d623be 100644 --- a/app/validators/idv/form_state_id_validator.rb +++ b/app/validators/idv/form_state_id_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module FormStateIdValidator extend ActiveSupport::Concern diff --git a/app/validators/idv/in_person/form_address_validator.rb b/app/validators/idv/in_person/form_address_validator.rb index 00a44ca4d36..de05fe0f7e5 100644 --- a/app/validators/idv/in_person/form_address_validator.rb +++ b/app/validators/idv/in_person/form_address_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idv module InPerson module FormAddressValidator diff --git a/app/validators/multiple_mfa_options_validator.rb b/app/validators/multiple_mfa_options_validator.rb index ccf8a02e79b..77815e5e1d9 100644 --- a/app/validators/multiple_mfa_options_validator.rb +++ b/app/validators/multiple_mfa_options_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MultipleMfaOptionsValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) return if MfaPolicy.new(value).multiple_factors_enabled? diff --git a/app/validators/otp_delivery_preference_validator.rb b/app/validators/otp_delivery_preference_validator.rb index a93b1096020..6a96d61180d 100644 --- a/app/validators/otp_delivery_preference_validator.rb +++ b/app/validators/otp_delivery_preference_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module OtpDeliveryPreferenceValidator extend ActiveSupport::Concern diff --git a/app/validators/owned_by_user_validator.rb b/app/validators/owned_by_user_validator.rb index 24c81f147b6..36c3aa07014 100644 --- a/app/validators/owned_by_user_validator.rb +++ b/app/validators/owned_by_user_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OwnedByUserValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) return if value.user&.id == record.user&.id diff --git a/app/validators/personal_key_validator.rb b/app/validators/personal_key_validator.rb index 06ab9893e69..7ea7e7d75af 100644 --- a/app/validators/personal_key_validator.rb +++ b/app/validators/personal_key_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PersonalKeyValidator extend ActiveSupport::Concern diff --git a/app/validators/redirect_uri_validator.rb b/app/validators/redirect_uri_validator.rb index b88281168a0..e74f9461672 100644 --- a/app/validators/redirect_uri_validator.rb +++ b/app/validators/redirect_uri_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RedirectUriValidator extend ActiveSupport::Concern diff --git a/config.ru b/config.ru index c83e59dd895..037a9fcac6c 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file is used by Rack-based servers to start the application. # Don't buffer stdout. We want logs to be available in real time. diff --git a/config/application.rb b/config/application.rb index 5fd04470072..c4cbe173642 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'boot' require 'active_record/railtie' @@ -22,7 +24,7 @@ require_relative '../lib/mailer_sensitive_information_checker' -APP_NAME = 'Login.gov'.freeze +APP_NAME = 'Login.gov' module Identity class Application < Rails::Application diff --git a/config/boot.rb b/config/boot.rb index 3b3fabce76a..4dc057f5aa2 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + # if we're on a server, always default to production -ENV['RAILS_ENV'] ||= 'production'.freeze if File.exist?('/etc/login.gov/info/domain') +ENV['RAILS_ENV'] ||= 'production' if File.exist?('/etc/login.gov/info/domain') ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) diff --git a/config/environment.rb b/config/environment.rb index 426333bb469..d5abe55806c 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Load the Rails application. require_relative 'application' diff --git a/config/environments/development.rb b/config/environments/development.rb index 585317584b8..9d2303fc94f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do config.cache_classes = false config.eager_load = false diff --git a/config/environments/production.rb b/config/environments/production.rb index 5ef37b59d9b..5097c9f195f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do config.cache_classes = true config.cache_store = :redis_cache_store, { url: IdentityConfig.store.redis_url, pool: false } diff --git a/config/environments/test.rb b/config/environments/test.rb index 57cb8880d9c..2abaa4644e9 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do config.active_job.queue_adapter = :test config.cache_classes = false diff --git a/config/initializers/01_redis.rb b/config/initializers/01_redis.rb index 1385069fa7d..0c1303739a7 100644 --- a/config/initializers/01_redis.rb +++ b/config/initializers/01_redis.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file is renamed to 01_redis.rb so that this file is loaded before rack_attack.rb. # This is done because rack_attack.rb needs to reference the Throttle pool defined here. REDIS_POOL = ConnectionPool.new(size: IdentityConfig.store.redis_pool_size) do diff --git a/config/initializers/ab_tests.rb b/config/initializers/ab_tests.rb index d2e47e5b64d..acedc4faf4f 100644 --- a/config/initializers/ab_tests.rb +++ b/config/initializers/ab_tests.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'ab_test_bucket' module AbTests diff --git a/config/initializers/app_artifacts.rb b/config/initializers/app_artifacts.rb index 6d008630e68..d9486fc409b 100644 --- a/config/initializers/app_artifacts.rb +++ b/config/initializers/app_artifacts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'app_artifacts' AppArtifacts.setup do |store| diff --git a/config/initializers/asset_tag_helper_patch.rb b/config/initializers/asset_tag_helper_patch.rb index bc125d1ed61..a60c2950232 100644 --- a/config/initializers/asset_tag_helper_patch.rb +++ b/config/initializers/asset_tag_helper_patch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActionView module Helpers module AssetTagHelper diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index f2deae0bf7a..6f1ca9f3022 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. require 'extensions/propshaft/asset' diff --git a/config/initializers/aws.rb b/config/initializers/aws.rb index a8cece2570f..87826ef0b67 100644 --- a/config/initializers/aws.rb +++ b/config/initializers/aws.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + pattern = ':client_class :http_response_status_code :time :retries :operation [:error_class :error_message]' log_formatter = Aws::Log::Formatter.new(pattern) diff --git a/config/initializers/browser.rb b/config/initializers/browser.rb index cb1e61937e6..78229186795 100644 --- a/config/initializers/browser.rb +++ b/config/initializers/browser.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + require 'browser/aliases' Browser::Base.include(Browser::Aliases) diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 29d2b0e5002..35546e897f0 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'feature_management' # rubocop:disable Metrics/BlockLength diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index 7f70458dee6..0a23b25ec7c 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 41c9682b0ca..683412da5f8 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'saml_idp_constants' require 'custom_devise_failure_app' require 'mailable' diff --git a/config/initializers/ext_action_mailer.rb b/config/initializers/ext_action_mailer.rb index f7b6717d418..23c45ac6d6d 100644 --- a/config/initializers/ext_action_mailer.rb +++ b/config/initializers/ext_action_mailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Monkeypatches the MessageDelivery to add deliver_now_or_later that # can route between #deliver_now and #deliver_later module DeliverLaterArgumentChecker diff --git a/config/initializers/ext_digest.rb b/config/initializers/ext_digest.rb index 90fa8004f5e..4de49e7c77b 100644 --- a/config/initializers/ext_digest.rb +++ b/config/initializers/ext_digest.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'base64' module Digest diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 7dff3266f9f..a1242f1817a 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. SAFE_KEYS = %w[ action @@ -12,7 +14,7 @@ utf8 ].freeze -SANITIZED_VALUE = '[FILTERED]'.freeze +SANITIZED_VALUE = '[FILTERED]' Rails.application.config.filter_parameters << lambda do |key, value| if value.respond_to?(:replace) diff --git a/config/initializers/geocoder.rb b/config/initializers/geocoder.rb index be8397965ca..ff4f03e8937 100644 --- a/config/initializers/geocoder.rb +++ b/config/initializers/geocoder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # For some reason the test result class does not impelement the `language=` # method. This patches an empty method onto it to prevent NoMethodErrors in # the tests diff --git a/config/initializers/job_configurations.rb b/config/initializers/job_configurations.rb index cae7cac66ac..dd6d90d39d8 100644 --- a/config/initializers/job_configurations.rb +++ b/config/initializers/job_configurations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + cron_5m = '0/5 * * * *' cron_12m = '0/12 * * * *' cron_1h = '0 * * * *' diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 2476136fc3c..20103ad3259 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Mime::Type.register 'application/secevent+jwt', :secevent_jwt diff --git a/config/initializers/new_relic.rb b/config/initializers/new_relic.rb index cdbf7fa15c5..e49d8cabc54 100644 --- a/config/initializers/new_relic.rb +++ b/config/initializers/new_relic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # monkeypatch to prevent new relic from truncating backtraces. # stack length is not currently configurable in new relic. # The MAX_BACKTRACE_FRAMES constant is commented out for reference diff --git a/config/initializers/new_relic_tracers.rb b/config/initializers/new_relic_tracers.rb index dfe1881dcc1..7c66c0d6fa1 100644 --- a/config/initializers/new_relic_tracers.rb +++ b/config/initializers/new_relic_tracers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ## Add NR tracers to methods so we can trace execution in the NR dashboard ## Ref: https://docs.newrelic.com/docs/agents/ruby-agent/api-guides/ruby-custom-instrumentation require 'new_relic/agent/method_tracer' diff --git a/config/initializers/phonelib.rb b/config/initializers/phonelib.rb index e9c07fae9d5..8ed7e93308e 100644 --- a/config/initializers/phonelib.rb +++ b/config/initializers/phonelib.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Phonelib.default_country = 'US' diff --git a/config/initializers/piv_cac_initializer.rb b/config/initializers/piv_cac_initializer.rb index 9bc1b679d79..ee377064ccf 100644 --- a/config/initializers/piv_cac_initializer.rb +++ b/config/initializers/piv_cac_initializer.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + require 'piv_cac/check_config' PivCac::CheckConfig.call diff --git a/config/initializers/prometheus_exporter.rb b/config/initializers/prometheus_exporter.rb index d1dd65d3289..cfbd3e51990 100644 --- a/config/initializers/prometheus_exporter.rb +++ b/config/initializers/prometheus_exporter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Initialize the prometheus exporter if IdentityConfig.store.prometheus_exporter diff --git a/config/initializers/rack_mini_profiler.rb b/config/initializers/rack_mini_profiler.rb index a97a0d5fd43..6fbe8d0b400 100644 --- a/config/initializers/rack_mini_profiler.rb +++ b/config/initializers/rack_mini_profiler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if Rails.env.development? && IdentityConfig.store.rack_mini_profiler require 'rack-mini-profiler' diff --git a/config/initializers/rack_timeout.rb b/config/initializers/rack_timeout.rb index a6e0df3b7eb..b378cb3bcf1 100644 --- a/config/initializers/rack_timeout.rb +++ b/config/initializers/rack_timeout.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rack/timeout/base' module Rack diff --git a/config/initializers/safe_migrations.rb b/config/initializers/safe_migrations.rb index 2be30e06c41..f9a0be2fa01 100644 --- a/config/initializers/safe_migrations.rb +++ b/config/initializers/safe_migrations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'deploy/migration_statement_timeout' ActiveSupport.on_load(:active_record) do diff --git a/config/initializers/saml_idp.rb b/config/initializers/saml_idp.rb index af52ccd80a9..0a21994ef18 100644 --- a/config/initializers/saml_idp.rb +++ b/config/initializers/saml_idp.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'feature_management' SamlIdp.configure do |config| diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 833a6b1df51..9633a8e7d56 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Rails.application.config.secret_key_base = IdentityConfig.store.secret_key_base diff --git a/config/initializers/ses_delivery_method.rb b/config/initializers/ses_delivery_method.rb index 18ce2b81620..58a07656d0d 100644 --- a/config/initializers/ses_delivery_method.rb +++ b/config/initializers/ses_delivery_method.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + require Rails.root.join('lib', 'aws', 'ses.rb') ActionMailer::Base.add_delivery_method :ses, Aws::SES::Base diff --git a/config/initializers/session_limitable.rb b/config/initializers/session_limitable.rb index f570a9b5d5e..34893a5c417 100644 --- a/config/initializers/session_limitable.rb +++ b/config/initializers/session_limitable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # After each sign in, update unique_session_id. # This is only triggered when the user is explicitly set (with set_user) # and on authentication. Retrieving the user from session (:fetch) does diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 46321d2b554..b2002fb3957 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + require 'session_encryptor' -APPLICATION_SESSION_COOKIE_KEY = '_identity_idp_session'.freeze +APPLICATION_SESSION_COOKIE_KEY = '_identity_idp_session' Rails.application.config.session_store( :redis_session_store, diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index 0b88110069b..495a1fa99b1 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Metrics/BlockLength SimpleForm.setup do |config| require Rails.root.join('lib', 'extensions', 'simple_form', 'error_notification') diff --git a/config/initializers/strong_migrations.rb b/config/initializers/strong_migrations.rb index 7e693f8e9ef..b7e3d6c5a8a 100644 --- a/config/initializers/strong_migrations.rb +++ b/config/initializers/strong_migrations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # id columns are generated as bigint, and we sometimes use constraint-less integer columns # that reference another table. To ensure we use bigint for those columns, this check raises # if a column is added that uses :integer and the column_name ends with "_id". diff --git a/config/initializers/telephony.rb b/config/initializers/telephony.rb index e3abf57ef02..d64dc8f19c2 100644 --- a/config/initializers/telephony.rb +++ b/config/initializers/telephony.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'telephony' require 'pinpoint_supported_countries' diff --git a/config/initializers/unused_identity_config_keys.rb b/config/initializers/unused_identity_config_keys.rb index 4311d8a6dba..bfcfd64c62c 100644 --- a/config/initializers/unused_identity_config_keys.rb +++ b/config/initializers/unused_identity_config_keys.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if IdentityConfig.unused_keys.present? Rails.logger.warn({ name: 'unused_identity_config_keys', keys: IdentityConfig.unused_keys }) end diff --git a/config/initializers/valid_email.rb b/config/initializers/valid_email.rb index 52bc34bfa1d..85ce45ae2d1 100644 --- a/config/initializers/valid_email.rb +++ b/config/initializers/valid_email.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + BanDisposableEmailValidator.config = IdentityConfig.store.disposable_email_services MxValidator.config[:timeouts] = [IdentityConfig.store.mx_timeout] diff --git a/config/initializers/webauthn.rb b/config/initializers/webauthn.rb index ee859787720..beeb3f7ae9a 100644 --- a/config/initializers/webauthn.rb +++ b/config/initializers/webauthn.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + WebAuthn.configure do |config| config.algorithms.concat(%w[ES384 ES512 PS384 PS512]) end diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 33725e95fd2..246168a421c 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which diff --git a/config/puma.rb b/config/puma.rb index ecdf05663f9..a5e275e300c 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This configuration file will be evaluated by Puma. The top-level methods that # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. @@ -37,10 +39,10 @@ port ENV.fetch('PORT', 3000) # Specifies the `environment` that Puma will run in. -environment ENV.fetch('RAILS_ENV') { 'development' } +environment ENV.fetch('RAILS_ENV', 'development') # Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch('PIDFILE') { 'tmp/pids/server.pid' } +pidfile ENV.fetch('PIDFILE', 'tmp/pids/server.pid') # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb index 6d02f4143b9..9a443c0028b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.routes.draw do # Non i18n routes. Alphabetically sorted. get '/api/analytics-events' => 'analytics_events#index' diff --git a/db/seeds.rb b/db/seeds.rb index 1889793d403..15f53c778d7 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # add config/service_providers.yml if ENV['KUBERNETES_REVIEW_APP'] == 'true' && ENV['DASHBOARD_URL'].present? dashboard_url = ENV['DASHBOARD_URL'] diff --git a/lib/aamva_test.rb b/lib/aamva_test.rb index 5779ed401d7..c61f3c63029 100644 --- a/lib/aamva_test.rb +++ b/lib/aamva_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Helper that checks connectivity with AAMVA class AamvaTest def test_connectivity diff --git a/lib/ab_test_bucket.rb b/lib/ab_test_bucket.rb index 9746892d84b..046f95190a7 100644 --- a/lib/ab_test_bucket.rb +++ b/lib/ab_test_bucket.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AbTestBucket attr_reader :buckets, :experiment_name, :default_bucket diff --git a/lib/action_account.rb b/lib/action_account.rb index 8d838fe3a92..01ca3984e45 100644 --- a/lib/action_account.rb +++ b/lib/action_account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative './script_base' # rubocop:disable Metrics/BlockLength diff --git a/lib/action_mailer/log_subscriber.rb b/lib/action_mailer/log_subscriber.rb index 441c5eda629..0f85564f433 100644 --- a/lib/action_mailer/log_subscriber.rb +++ b/lib/action_mailer/log_subscriber.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # By default, when emails are delivered via ActiveJob, the recipients' email # is logged in a line like "Sent mail to test@test.com". Rails does not provide # an easy way to filter out emails from the logs. To protect user privacy, we diff --git a/lib/analytics_events_documenter.rb b/lib/analytics_events_documenter.rb index 5bdae731f39..a3b7ecf775d 100644 --- a/lib/analytics_events_documenter.rb +++ b/lib/analytics_events_documenter.rb @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + require 'yard' require 'json' require 'optparse' diff --git a/lib/app_artifacts.rb b/lib/app_artifacts.rb index 82160a429dd..31f2ebb82c7 100644 --- a/lib/app_artifacts.rb +++ b/lib/app_artifacts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AppArtifacts class MissingArtifactError < StandardError; end diff --git a/lib/aws/ses.rb b/lib/aws/ses.rb index c69b253edee..032a93c1964 100644 --- a/lib/aws/ses.rb +++ b/lib/aws/ses.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ## # ActionMailer delivery method for SES inspired by https://github.com/drewblas/aws-ses # diff --git a/lib/cleanup/destroy_unused_providers.rb b/lib/cleanup/destroy_unused_providers.rb index 5e9fcb0248c..2dda8ce3f16 100644 --- a/lib/cleanup/destroy_unused_providers.rb +++ b/lib/cleanup/destroy_unused_providers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require './lib/cleanup/destroyable_records' # Remove unused issuers # diff --git a/lib/cleanup/destroyable_records.rb b/lib/cleanup/destroyable_records.rb index a329b1a3cd9..74eaf2ec134 100644 --- a/lib/cleanup/destroyable_records.rb +++ b/lib/cleanup/destroyable_records.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DestroyableRecords attr_reader :service_provider, :integration, :issuer, :stdin, :stdout diff --git a/lib/component_preview_csp.rb b/lib/component_preview_csp.rb index 02ca266ff02..377e62fdbff 100644 --- a/lib/component_preview_csp.rb +++ b/lib/component_preview_csp.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative './identity_config' class ComponentPreviewCsp diff --git a/lib/custom_devise_failure_app.rb b/lib/custom_devise_failure_app.rb index 4b725d7f175..0baa4d2f346 100644 --- a/lib/custom_devise_failure_app.rb +++ b/lib/custom_devise_failure_app.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This class overrides the default `i18n_message` defined by Devise # in order to allow customizing the `devise.failure.invalid` and # 'devise.failure.not_found_in_database' error messages with a link diff --git a/lib/data_pull.rb b/lib/data_pull.rb index 671efa0c8bb..83fb688c803 100644 --- a/lib/data_pull.rb +++ b/lib/data_pull.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative './script_base' class DataPull diff --git a/lib/data_requests/deployed.rb b/lib/data_requests/deployed.rb index c8a2faeb0bf..a3d1e82b79c 100644 --- a/lib/data_requests/deployed.rb +++ b/lib/data_requests/deployed.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'data_requests/deployed/create_email_addresses_report' require 'data_requests/deployed/create_mfa_configurations_report' require 'data_requests/deployed/create_user_events_report' diff --git a/lib/data_requests/deployed/create_email_addresses_report.rb b/lib/data_requests/deployed/create_email_addresses_report.rb index 7ddbcaaabd0..1b4679e4341 100644 --- a/lib/data_requests/deployed/create_email_addresses_report.rb +++ b/lib/data_requests/deployed/create_email_addresses_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DataRequests module Deployed class CreateEmailAddressesReport diff --git a/lib/data_requests/deployed/create_mfa_configurations_report.rb b/lib/data_requests/deployed/create_mfa_configurations_report.rb index 6a2f97e0b69..3a52f2e743c 100644 --- a/lib/data_requests/deployed/create_mfa_configurations_report.rb +++ b/lib/data_requests/deployed/create_mfa_configurations_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DataRequests module Deployed class CreateMfaConfigurationsReport diff --git a/lib/data_requests/deployed/create_user_events_report.rb b/lib/data_requests/deployed/create_user_events_report.rb index 12826fa64ca..2463f5675dc 100644 --- a/lib/data_requests/deployed/create_user_events_report.rb +++ b/lib/data_requests/deployed/create_user_events_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DataRequests module Deployed class CreateUserEventsReport diff --git a/lib/data_requests/deployed/create_user_report.rb b/lib/data_requests/deployed/create_user_report.rb index 16deb4423b5..062e65ab571 100644 --- a/lib/data_requests/deployed/create_user_report.rb +++ b/lib/data_requests/deployed/create_user_report.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DataRequests module Deployed class CreateUserReport diff --git a/lib/data_requests/deployed/lookup_shared_device_users.rb b/lib/data_requests/deployed/lookup_shared_device_users.rb index 95c40299206..ed69a23c8e8 100644 --- a/lib/data_requests/deployed/lookup_shared_device_users.rb +++ b/lib/data_requests/deployed/lookup_shared_device_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DataRequests module Deployed ## diff --git a/lib/data_requests/deployed/lookup_user_by_uuid.rb b/lib/data_requests/deployed/lookup_user_by_uuid.rb index 9db30e5bdcc..bb1620f6943 100644 --- a/lib/data_requests/deployed/lookup_user_by_uuid.rb +++ b/lib/data_requests/deployed/lookup_user_by_uuid.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module DataRequests module Deployed class LookupUserByUuid diff --git a/lib/data_requests/local.rb b/lib/data_requests/local.rb index 363e3762a23..79b2dd0ae25 100644 --- a/lib/data_requests/local.rb +++ b/lib/data_requests/local.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'data_requests/local/fetch_cloudwatch_logs' require 'data_requests/local/write_cloudwatch_logs' require 'data_requests/local/write_user_events' diff --git a/lib/data_requests/local/fetch_cloudwatch_logs.rb b/lib/data_requests/local/fetch_cloudwatch_logs.rb index 733d155cf37..f9474818dfc 100644 --- a/lib/data_requests/local/fetch_cloudwatch_logs.rb +++ b/lib/data_requests/local/fetch_cloudwatch_logs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'reporting/cloudwatch_client' module DataRequests diff --git a/lib/data_requests/local/write_cloudwatch_logs.rb b/lib/data_requests/local/write_cloudwatch_logs.rb index 9805edd5877..39a8a2648e1 100644 --- a/lib/data_requests/local/write_cloudwatch_logs.rb +++ b/lib/data_requests/local/write_cloudwatch_logs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' module DataRequests diff --git a/lib/data_requests/local/write_user_events.rb b/lib/data_requests/local/write_user_events.rb index f60fafce969..e4a661db209 100644 --- a/lib/data_requests/local/write_user_events.rb +++ b/lib/data_requests/local/write_user_events.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' module DataRequests diff --git a/lib/data_requests/local/write_user_info.rb b/lib/data_requests/local/write_user_info.rb index 389d0a2d230..0617faa5542 100644 --- a/lib/data_requests/local/write_user_info.rb +++ b/lib/data_requests/local/write_user_info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'csv' module DataRequests diff --git a/lib/deploy/activate.rb b/lib/deploy/activate.rb index 4bb9c1ad577..a57feb4ea7d 100644 --- a/lib/deploy/activate.rb +++ b/lib/deploy/activate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_support/core_ext/hash/deep_merge' require 'logger' require 'identity/hostdata' diff --git a/lib/deploy/migration_statement_timeout.rb b/lib/deploy/migration_statement_timeout.rb index 055d33d61e5..7fa9a80221c 100644 --- a/lib/deploy/migration_statement_timeout.rb +++ b/lib/deploy/migration_statement_timeout.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Deploy module MigrationStatementTimeout def connection diff --git a/lib/email_delivery_observer.rb b/lib/email_delivery_observer.rb index a2376bfc74b..1843a6bb9cc 100644 --- a/lib/email_delivery_observer.rb +++ b/lib/email_delivery_observer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class EmailDeliveryObserver def self.delivered_email(mail) metadata = mail.instance_variable_get(:@_metadata) || {} diff --git a/lib/env_irb_prompt.rb b/lib/env_irb_prompt.rb index 9d31d869bd2..0d09ed2fb86 100644 --- a/lib/env_irb_prompt.rb +++ b/lib/env_irb_prompt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'socket' class EnvIrbPrompt diff --git a/lib/extensions/propshaft/asset.rb b/lib/extensions/propshaft/asset.rb index e7c0aa61f37..7acc19c3758 100644 --- a/lib/extensions/propshaft/asset.rb +++ b/lib/extensions/propshaft/asset.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Monkey-patch Propshaft::Asset to produce a shorter digest as an optimization to built output size. # # See: https://github.com/rails/propshaft/blob/main/lib/propshaft/asset.rb diff --git a/lib/extensions/simple_form/components/html5_no_aria_required.rb b/lib/extensions/simple_form/components/html5_no_aria_required.rb index 3fe8668babf..49c33f8a802 100644 --- a/lib/extensions/simple_form/components/html5_no_aria_required.rb +++ b/lib/extensions/simple_form/components/html5_no_aria_required.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SimpleForm module Components module HTML5NoAriaRequired diff --git a/lib/extensions/simple_form/components/submit_component.rb b/lib/extensions/simple_form/components/submit_component.rb index 2c69eb999d0..dc67be2da47 100644 --- a/lib/extensions/simple_form/components/submit_component.rb +++ b/lib/extensions/simple_form/components/submit_component.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module SubmitComponent def submit(*args, &block) options = args.extract_options! diff --git a/lib/extensions/simple_form/error_notification.rb b/lib/extensions/simple_form/error_notification.rb index 7622a37e4eb..e1ff6b9f3e4 100644 --- a/lib/extensions/simple_form/error_notification.rb +++ b/lib/extensions/simple_form/error_notification.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Monkey-patch SimpleForm::ErrorNotification to customize markup to reuse alert partial, which # requires more markup customization than is possible through default options. # diff --git a/lib/feature_management.rb b/lib/feature_management.rb index 2dc4f82cf63..7e628fea0ba 100644 --- a/lib/feature_management.rb +++ b/lib/feature_management.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class FeatureManagement def self.telephony_test_adapter? IdentityConfig.store.telephony_adapter == 'test' diff --git a/lib/fingerprinter.rb b/lib/fingerprinter.rb index ee254da1746..24b6631d8de 100644 --- a/lib/fingerprinter.rb +++ b/lib/fingerprinter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Fingerprinter def self.fingerprint_cert(ssl_cert) return nil unless ssl_cert diff --git a/lib/good_job_connection_pool_size.rb b/lib/good_job_connection_pool_size.rb index 86708575219..7273125f4ff 100644 --- a/lib/good_job_connection_pool_size.rb +++ b/lib/good_job_connection_pool_size.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This class provides a starting point to dynamically calculate the number of database connections # needed for our multi-threaded GoodJob deployment. Each process will create # a certain number of threads based on configuration in the environment. diff --git a/lib/headers_filter.rb b/lib/headers_filter.rb index e613c7efa6a..31d28f20ca0 100644 --- a/lib/headers_filter.rb +++ b/lib/headers_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rack/headers_filter' # Expands on Rack::HeadersFilter to delete additional headers diff --git a/lib/identity_config.rb b/lib/identity_config.rb index 9e72d906ce0..1d20b00ad6e 100644 --- a/lib/identity_config.rb +++ b/lib/identity_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class IdentityConfig GIT_SHA = `git rev-parse --short=8 HEAD`.chomp GIT_TAG = `git tag --points-at HEAD`.chomp.split("\n").first diff --git a/lib/identity_job_log_subscriber.rb b/lib/identity_job_log_subscriber.rb index d22e984f174..baaad9fc29f 100644 --- a/lib/identity_job_log_subscriber.rb +++ b/lib/identity_job_log_subscriber.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # ActiveJob events documentation: # https://edgeguides.rubyonrails.org/active_support_instrumentation.html#active-job # https://github.com/rails/rails/blob/v6.1.3.1/activejob/lib/active_job/log_subscriber.rb diff --git a/lib/idp/constants.rb b/lib/idp/constants.rb index b12c884dbcd..78b043696f6 100644 --- a/lib/idp/constants.rb +++ b/lib/idp/constants.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Idp module Constants AVAILABLE_LOCALES = %w[en es fr] diff --git a/lib/linters/analytics_event_name_linter.rb b/lib/linters/analytics_event_name_linter.rb index e4d7f2fd321..8bd9aa8f5d4 100644 --- a/lib/linters/analytics_event_name_linter.rb +++ b/lib/linters/analytics_event_name_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp diff --git a/lib/linters/errors_add_linter.rb b/lib/linters/errors_add_linter.rb index 606dcba01f2..a6298430c40 100644 --- a/lib/linters/errors_add_linter.rb +++ b/lib/linters/errors_add_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp @@ -13,7 +15,7 @@ module IdentityIdp # errors.add(:iss, 'invalid issuer', type: :invalid_issuer) # class ErrorsAddLinter < RuboCop::Cop::Cop - MSG = 'Please set a unique key for this error'.freeze + MSG = 'Please set a unique key for this error' RESTRICT_ON_SEND = [:add] diff --git a/lib/linters/image_size_linter.rb b/lib/linters/image_size_linter.rb index 7a23a49b8e1..d5be254c484 100644 --- a/lib/linters/image_size_linter.rb +++ b/lib/linters/image_size_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp @@ -14,7 +16,7 @@ module IdentityIdp # image_tag 'example.svg', width: 10, height: 20 # class ImageSizeLinter < RuboCop::Cop::Cop - MSG = 'Assign width and height to images'.freeze + MSG = 'Assign width and height to images' RESTRICT_ON_SEND = [:image_tag] diff --git a/lib/linters/localized_validation_message_linter.rb b/lib/linters/localized_validation_message_linter.rb index 3fa85eb83c7..04f791d07fd 100644 --- a/lib/linters/localized_validation_message_linter.rb +++ b/lib/linters/localized_validation_message_linter.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp class LocalizedValidationMessageLinter < RuboCop::Cop::Cop - MSG = 'Use proc when translating validation message'.freeze + MSG = 'Use proc when translating validation message' RESTRICT_ON_SEND = [ :validate, diff --git a/lib/linters/mail_later_linter.rb b/lib/linters/mail_later_linter.rb index 578571f84b5..cb70b536f08 100644 --- a/lib/linters/mail_later_linter.rb +++ b/lib/linters/mail_later_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp @@ -15,7 +17,7 @@ module IdentityIdp # ReportMailer.report_mail(data).deliver_now # class MailLaterLinter < RuboCop::Cop::Cop - MSG = 'Please send mail using deliver_now_or_later instead'.freeze + MSG = 'Please send mail using deliver_now_or_later instead' RESTRICT_ON_SEND = [:deliver_now, :deliver_later].freeze diff --git a/lib/linters/redirect_back_linter.rb b/lib/linters/redirect_back_linter.rb index 199882a57bb..81fea5c0eca 100644 --- a/lib/linters/redirect_back_linter.rb +++ b/lib/linters/redirect_back_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp @@ -15,7 +17,7 @@ module IdentityIdp # redirect_back fallback_location: '/', allow_other_host: false # class RedirectBackLinter < RuboCop::Cop::Cop - MSG = 'Please set a fallback_location and the allow_other_host parameter to false'.freeze + MSG = 'Please set a fallback_location and the allow_other_host parameter to false' RESTRICT_ON_SEND = [:redirect_back] diff --git a/lib/linters/url_options_linter.rb b/lib/linters/url_options_linter.rb index 3d57edfce40..0c2303bdab7 100644 --- a/lib/linters/url_options_linter.rb +++ b/lib/linters/url_options_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module RuboCop module Cop module IdentityIdp @@ -32,7 +34,7 @@ module IdentityIdp # end # class UrlOptionsLinter < RuboCop::Cop::Cop - MSG = 'Please define url_options when including Rails.application.routes.url_helpers'.freeze + MSG = 'Please define url_options when including Rails.application.routes.url_helpers' RESTRICT_ON_SEND = [:include].freeze diff --git a/lib/mailable.rb b/lib/mailable.rb index be0fae93017..eb4707772d9 100644 --- a/lib/mailable.rb +++ b/lib/mailable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Mailable extend ActiveSupport::Concern diff --git a/lib/mailer_sensitive_information_checker.rb b/lib/mailer_sensitive_information_checker.rb index 061dcf0297e..ac22a3cdcc2 100644 --- a/lib/mailer_sensitive_information_checker.rb +++ b/lib/mailer_sensitive_information_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MailerSensitiveInformationChecker class SensitiveKeyError < StandardError; end diff --git a/lib/makefile_help_parser.rb b/lib/makefile_help_parser.rb index c3eb675cf3b..2664f300ba3 100644 --- a/lib/makefile_help_parser.rb +++ b/lib/makefile_help_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'open3' # Parses comment strings (## help) out of the Makefile diff --git a/lib/otp_code_generator.rb b/lib/otp_code_generator.rb index 4c801d63eb6..3a84d64e6f3 100644 --- a/lib/otp_code_generator.rb +++ b/lib/otp_code_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'securerandom' class OtpCodeGenerator diff --git a/lib/pinpoint_supported_countries.rb b/lib/pinpoint_supported_countries.rb index f76cc3e2008..2532a3ec43f 100644 --- a/lib/pinpoint_supported_countries.rb +++ b/lib/pinpoint_supported_countries.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_support/core_ext/hash/except' require 'faraday' require 'nokogiri' @@ -6,8 +8,8 @@ # Scrapes HTML tables from Pinpoint help sites to parse out supported countries, and # puts them in a format compatible with country_dialing_codes.yml class PinpointSupportedCountries - PINPOINT_SMS_URL = 'https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html'.freeze - PINPOINT_VOICE_URL = 'https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-voice-support-by-country.html'.freeze + PINPOINT_SMS_URL = 'https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html' + PINPOINT_VOICE_URL = 'https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-voice-support-by-country.html' # The list of countries where we have our sender ID registered SENDER_ID_COUNTRIES = %w[ diff --git a/lib/piv_cac/check_config.rb b/lib/piv_cac/check_config.rb index aa785793c86..dc983281290 100644 --- a/lib/piv_cac/check_config.rb +++ b/lib/piv_cac/check_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module PivCac class CheckConfig def self.call diff --git a/lib/pwned_password_downloader.rb b/lib/pwned_password_downloader.rb index f49d7f0bba8..7b4371d18da 100755 --- a/lib/pwned_password_downloader.rb +++ b/lib/pwned_password_downloader.rb @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + require 'fileutils' require 'net/http/persistent' require 'retries' diff --git a/lib/query_tracker.rb b/lib/query_tracker.rb index c9d12c200fc..9f89059a03a 100644 --- a/lib/query_tracker.rb +++ b/lib/query_tracker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pg_query' # Tracks queries by table diff --git a/lib/reporting/cloudwatch_client.rb b/lib/reporting/cloudwatch_client.rb index 338869c0121..ba67c0f1bf1 100644 --- a/lib/reporting/cloudwatch_client.rb +++ b/lib/reporting/cloudwatch_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'aws-sdk-cloudwatchlogs' require 'ruby-progressbar' require 'identity/hostdata' diff --git a/lib/reporting/cloudwatch_query_quoting.rb b/lib/reporting/cloudwatch_query_quoting.rb index 4994181129d..dea8c828575 100644 --- a/lib/reporting/cloudwatch_query_quoting.rb +++ b/lib/reporting/cloudwatch_query_quoting.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting module CloudwatchQueryQuoting # Quotes a string or array to be used as a literal diff --git a/lib/reporting/cloudwatch_query_time_slice.rb b/lib/reporting/cloudwatch_query_time_slice.rb index 0a713952480..dd3da2fa717 100644 --- a/lib/reporting/cloudwatch_query_time_slice.rb +++ b/lib/reporting/cloudwatch_query_time_slice.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Reporting module CloudwatchQueryTimeSlice # @param [String] value a string such as 1min, 2h, 3d, 4w, 5mon, 6y diff --git a/lib/reporting/command_line_options.rb b/lib/reporting/command_line_options.rb index 67285d84439..1403911ed76 100644 --- a/lib/reporting/command_line_options.rb +++ b/lib/reporting/command_line_options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'reporting/cloudwatch_query_time_slice' module Reporting diff --git a/lib/reporting/unknown_progress_bar.rb b/lib/reporting/unknown_progress_bar.rb index a12bde5669b..4917573a188 100644 --- a/lib/reporting/unknown_progress_bar.rb +++ b/lib/reporting/unknown_progress_bar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'ruby-progressbar' module Reporting diff --git a/lib/saml_idp_constants.rb b/lib/saml_idp_constants.rb index 81f2ba1651d..f210d301b82 100644 --- a/lib/saml_idp_constants.rb +++ b/lib/saml_idp_constants.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'idp/constants' # rubocop:disable Layout/LineLength @@ -5,10 +7,10 @@ module Saml module Idp module Constants - LOA1_AUTHN_CONTEXT_CLASSREF = 'http://idmanagement.gov/ns/assurance/loa/1'.freeze - LOA3_AUTHN_CONTEXT_CLASSREF = 'http://idmanagement.gov/ns/assurance/loa/3'.freeze + LOA1_AUTHN_CONTEXT_CLASSREF = 'http://idmanagement.gov/ns/assurance/loa/1' + LOA3_AUTHN_CONTEXT_CLASSREF = 'http://idmanagement.gov/ns/assurance/loa/3' - IAL_AUTHN_CONTEXT_PREFIX = 'http://idmanagement.gov/ns/assurance/ial'.freeze + IAL_AUTHN_CONTEXT_PREFIX = 'http://idmanagement.gov/ns/assurance/ial' IAL1_AUTHN_CONTEXT_CLASSREF = "#{IAL_AUTHN_CONTEXT_PREFIX}/1".freeze IAL2_AUTHN_CONTEXT_CLASSREF = "#{IAL_AUTHN_CONTEXT_PREFIX}/2".freeze IALMAX_AUTHN_CONTEXT_CLASSREF = "#{IAL_AUTHN_CONTEXT_PREFIX}/0".freeze @@ -17,8 +19,8 @@ module Constants urn:oasis:names:tc:SAML:2.0:ac:classes:Password urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport ].freeze - DEFAULT_AAL_AUTHN_CONTEXT_CLASSREF = 'urn:gov:gsa:ac:classes:sp:PasswordProtectedTransport:duo'.freeze - AAL_AUTHN_CONTEXT_PREFIX = 'http://idmanagement.gov/ns/assurance/aal'.freeze + DEFAULT_AAL_AUTHN_CONTEXT_CLASSREF = 'urn:gov:gsa:ac:classes:sp:PasswordProtectedTransport:duo' + AAL_AUTHN_CONTEXT_PREFIX = 'http://idmanagement.gov/ns/assurance/aal' AAL1_AUTHN_CONTEXT_CLASSREF = "#{AAL_AUTHN_CONTEXT_PREFIX}/1".freeze AAL2_AUTHN_CONTEXT_CLASSREF = "#{AAL_AUTHN_CONTEXT_PREFIX}/2".freeze AAL2_PHISHING_RESISTANT_AUTHN_CONTEXT_CLASSREF = "#{AAL_AUTHN_CONTEXT_PREFIX}/2?phishing_resistant=true".freeze @@ -26,11 +28,11 @@ module Constants AAL3_AUTHN_CONTEXT_CLASSREF = "#{AAL_AUTHN_CONTEXT_PREFIX}/3".freeze AAL3_HSPD12_AUTHN_CONTEXT_CLASSREF = "#{AAL_AUTHN_CONTEXT_PREFIX}/3?hspd12=true".freeze - NAME_ID_FORMAT_PERSISTENT = 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'.freeze - NAME_ID_FORMAT_EMAIL = 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'.freeze + NAME_ID_FORMAT_PERSISTENT = 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' + NAME_ID_FORMAT_EMAIL = 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' VALID_NAME_ID_FORMATS = [NAME_ID_FORMAT_PERSISTENT, NAME_ID_FORMAT_EMAIL].freeze - REQUESTED_ATTRIBUTES_CLASSREF = 'http://idmanagement.gov/ns/requested_attributes?ReqAttr='.freeze + REQUESTED_ATTRIBUTES_CLASSREF = 'http://idmanagement.gov/ns/requested_attributes?ReqAttr=' VALID_AUTHN_CONTEXTS = IdentityConfig.store.valid_authn_contexts IAL2_AUTHN_CONTEXTS = [IAL2_AUTHN_CONTEXT_CLASSREF, LOA3_AUTHN_CONTEXT_CLASSREF].freeze diff --git a/lib/script_base.rb b/lib/script_base.rb index fcdf5890221..01352c25dee 100644 --- a/lib/script_base.rb +++ b/lib/script_base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'optparse' class ScriptBase diff --git a/lib/tasks/account_reset.rake b/lib/tasks/account_reset.rake index 03e014f54bb..fdc6522fa04 100644 --- a/lib/tasks/account_reset.rake +++ b/lib/tasks/account_reset.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :account_reset do desc 'Send Notifications' task send_notifications: :environment do diff --git a/lib/tasks/activate.rake b/lib/tasks/activate.rake index 710e828d55c..9de75728a74 100644 --- a/lib/tasks/activate.rake +++ b/lib/tasks/activate.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :deploy do desc 'Run activate script' # rubocop:disable Rails/RakeEnvironment diff --git a/lib/tasks/backfill_in_person_pending_at.rake b/lib/tasks/backfill_in_person_pending_at.rake index bbc1a1a181c..840bbea85db 100644 --- a/lib/tasks/backfill_in_person_pending_at.rake +++ b/lib/tasks/backfill_in_person_pending_at.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :profiles do desc 'Backfill the in_person_verification_pending_at value column.' diff --git a/lib/tasks/check_for_pending_migrations.rake b/lib/tasks/check_for_pending_migrations.rake index 2b61a10bcff..279798d8c20 100644 --- a/lib/tasks/check_for_pending_migrations.rake +++ b/lib/tasks/check_for_pending_migrations.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :db do desc 'Raise an error if migrations are pending' task check_for_pending_migrations: :environment do diff --git a/lib/tasks/convert_application_yml_to_proper_types.rake b/lib/tasks/convert_application_yml_to_proper_types.rake index d0e555fbadd..1b3e41d9cc0 100644 --- a/lib/tasks/convert_application_yml_to_proper_types.rake +++ b/lib/tasks/convert_application_yml_to_proper_types.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :convert_application_yml_to_proper_types do desc 'Take application.yml input file and convert to proper type' task :convert, [:filename] => :environment do |t, args| diff --git a/lib/tasks/data_requests.rake b/lib/tasks/data_requests.rake index 038af267649..8727246f4b2 100644 --- a/lib/tasks/data_requests.rake +++ b/lib/tasks/data_requests.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :data_requests do # UUIDS=123abc,456def rake data_requests:lookup_users_by_device desc 'Recursively lookup users using a network of shared devices' diff --git a/lib/tasks/db_readonly_user.rake b/lib/tasks/db_readonly_user.rake index 310adca1c57..cfa88a5243c 100644 --- a/lib/tasks/db_readonly_user.rake +++ b/lib/tasks/db_readonly_user.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :db do desc 'Create readonly database user and grant read access to all tables' task grant_readonly_access: :environment do diff --git a/lib/tasks/db_sp_return_logs_index.rake b/lib/tasks/db_sp_return_logs_index.rake index 1a50f235784..310d506d1f2 100644 --- a/lib/tasks/db_sp_return_logs_index.rake +++ b/lib/tasks/db_sp_return_logs_index.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :db do desc 'Tear down and recreate the sp_return_logs index' task rebuild_sp_return_logs_index: :environment do diff --git a/lib/tasks/deleted_accounts.rake b/lib/tasks/deleted_accounts.rake index 637a567a179..dd4a668edd2 100644 --- a/lib/tasks/deleted_accounts.rake +++ b/lib/tasks/deleted_accounts.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :deleted_accounts do task :report, %i[service_provider days_ago] => [:environment] do |_task, args| ActiveRecord::Base.connection.execute('SET statement_timeout = 0') diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index e56ce40347e..f24664d0356 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :dev do desc 'Sample data for local development environment' task prime: :environment do diff --git a/lib/tasks/disposable_email_domains.rake b/lib/tasks/disposable_email_domains.rake index 9ecf648f51e..a53d1ffef67 100644 --- a/lib/tasks/disposable_email_domains.rake +++ b/lib/tasks/disposable_email_domains.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Rails/SkipsModelValidations require 'csv' namespace :disposable_email_domains do diff --git a/lib/tasks/multi_region_kms.rake b/lib/tasks/multi_region_kms.rake index 879667128d8..a0a8030536c 100644 --- a/lib/tasks/multi_region_kms.rake +++ b/lib/tasks/multi_region_kms.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :multi_region_kms do desc 'Confirm that the multi-region KMS inner-layers are the same for both ciphertexts' task check_inner_layer: :environment do |_task, _args| diff --git a/lib/tasks/newrelic.rake b/lib/tasks/newrelic.rake index 9ecfe0b4490..9c1162c445a 100644 --- a/lib/tasks/newrelic.rake +++ b/lib/tasks/newrelic.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :newrelic do ## # This task is essentially the same as running the following: diff --git a/lib/tasks/partners.rake b/lib/tasks/partners.rake index 566ccb809f7..f0ca844302f 100644 --- a/lib/tasks/partners.rake +++ b/lib/tasks/partners.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :partners do desc 'Provision dummy IAL2 users from CSV file' task seed_users: :environment do diff --git a/lib/tasks/remove_verified_at_for_non_verified.rake b/lib/tasks/remove_verified_at_for_non_verified.rake index ee6a0d1c598..86bd7ce770e 100644 --- a/lib/tasks/remove_verified_at_for_non_verified.rake +++ b/lib/tasks/remove_verified_at_for_non_verified.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :profiles do desc 'Remove verified_at if a profile is gpo, fraud pending or fraud rejected' diff --git a/lib/tasks/rotate.rake b/lib/tasks/rotate.rake index 18530150120..64fc1b1f88c 100644 --- a/lib/tasks/rotate.rake +++ b/lib/tasks/rotate.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :rotate do # benchmark: 100k updates in 00:28:35 with cost '800$8$1$' # e.g. diff --git a/lib/tasks/service_providers.rake b/lib/tasks/service_providers.rake index 36fe3c5de0a..54bcef15e6d 100644 --- a/lib/tasks/service_providers.rake +++ b/lib/tasks/service_providers.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :service_providers do # rubocop:disable Rails/SkipsModelValidations task backfill_help_texts: [:environment] do |_task| diff --git a/lib/tasks/test.rake b/lib/tasks/test.rake index 11423437a53..e2cc49c5347 100644 --- a/lib/tasks/test.rake +++ b/lib/tasks/test.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :test do # Use `> log/test.log` to empty test.log before re-running tests to get an accurate list # Note you must run tests with `COVERAGE=true` to generate scannable logs. diff --git a/lib/telephony.rb b/lib/telephony.rb index ac43d2f3698..5ae161b5a1e 100644 --- a/lib/telephony.rb +++ b/lib/telephony.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'aws-sdk-pinpoint' require 'aws-sdk-pinpointsmsvoice' require 'forwardable' diff --git a/lib/telephony/alert_sender.rb b/lib/telephony/alert_sender.rb index adc2a149af7..ae326f81ce5 100644 --- a/lib/telephony/alert_sender.rb +++ b/lib/telephony/alert_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony class AlertSender SMS_MAX_LENGTH = 160 diff --git a/lib/telephony/configuration.rb b/lib/telephony/configuration.rb index 56feec80013..0e6f575810c 100644 --- a/lib/telephony/configuration.rb +++ b/lib/telephony/configuration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'logger' module Telephony diff --git a/lib/telephony/errors.rb b/lib/telephony/errors.rb index 62453eec2f9..35bd6b2afec 100644 --- a/lib/telephony/errors.rb +++ b/lib/telephony/errors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony class TelephonyError < StandardError def friendly_message diff --git a/lib/telephony/otp_sender.rb b/lib/telephony/otp_sender.rb index 93a1f28be89..cb12ee43882 100644 --- a/lib/telephony/otp_sender.rb +++ b/lib/telephony/otp_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony class OtpSender attr_reader :recipient_phone, :otp, :expiration, :otp_format, :channel, :domain, :country_code, diff --git a/lib/telephony/phone_number_info.rb b/lib/telephony/phone_number_info.rb index d4687125106..8ae41b356eb 100644 --- a/lib/telephony/phone_number_info.rb +++ b/lib/telephony/phone_number_info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony # @!attribute [r] carrier # @return [String, nil] the carrier for the phone number diff --git a/lib/telephony/pinpoint/aws_credential_builder.rb b/lib/telephony/pinpoint/aws_credential_builder.rb index e51df7cd155..e2203eaabbe 100644 --- a/lib/telephony/pinpoint/aws_credential_builder.rb +++ b/lib/telephony/pinpoint/aws_credential_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Pinpoint class AwsCredentialBuilder diff --git a/lib/telephony/pinpoint/opt_out_manager.rb b/lib/telephony/pinpoint/opt_out_manager.rb index 40e67bc5c8a..fbc4991492d 100644 --- a/lib/telephony/pinpoint/opt_out_manager.rb +++ b/lib/telephony/pinpoint/opt_out_manager.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Pinpoint class OptOutManager diff --git a/lib/telephony/pinpoint/pinpoint_helper.rb b/lib/telephony/pinpoint/pinpoint_helper.rb index 917096a4a19..cf0a8a13932 100644 --- a/lib/telephony/pinpoint/pinpoint_helper.rb +++ b/lib/telephony/pinpoint/pinpoint_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Pinpoint module PinpointHelper diff --git a/lib/telephony/pinpoint/sms_sender.rb b/lib/telephony/pinpoint/sms_sender.rb index 69fccf8e5e3..ce0700f4f53 100644 --- a/lib/telephony/pinpoint/sms_sender.rb +++ b/lib/telephony/pinpoint/sms_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'time' module Telephony diff --git a/lib/telephony/pinpoint/voice_sender.rb b/lib/telephony/pinpoint/voice_sender.rb index 7696109d4f4..738e4e0d9a5 100644 --- a/lib/telephony/pinpoint/voice_sender.rb +++ b/lib/telephony/pinpoint/voice_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'time' module Telephony diff --git a/lib/telephony/response.rb b/lib/telephony/response.rb index 7ab61646f71..4ff725b85f8 100644 --- a/lib/telephony/response.rb +++ b/lib/telephony/response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony class Response attr_reader :error, :extra diff --git a/lib/telephony/test/call.rb b/lib/telephony/test/call.rb index a1da22775f8..c25d6019b35 100644 --- a/lib/telephony/test/call.rb +++ b/lib/telephony/test/call.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Test class Call diff --git a/lib/telephony/test/message.rb b/lib/telephony/test/message.rb index aeed39313d9..c0166bc410e 100644 --- a/lib/telephony/test/message.rb +++ b/lib/telephony/test/message.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Test class Message diff --git a/lib/telephony/test/sms_sender.rb b/lib/telephony/test/sms_sender.rb index 244ad3fd555..6d9ea1cf34e 100644 --- a/lib/telephony/test/sms_sender.rb +++ b/lib/telephony/test/sms_sender.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Test class SmsSender diff --git a/lib/telephony/util.rb b/lib/telephony/util.rb index 396397fb64c..92daefa8ffe 100644 --- a/lib/telephony/util.rb +++ b/lib/telephony/util.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Telephony module Util # @param [Time] start diff --git a/scripts/artifact-upload b/scripts/artifact-upload index 99eae75e51a..edc942ca74c 100755 --- a/scripts/artifact-upload +++ b/scripts/artifact-upload @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require 'yaml' require 'open3' diff --git a/scripts/changelog_check.rb b/scripts/changelog_check.rb index 7e22936202e..4d5cd9e5a6d 100755 --- a/scripts/changelog_check.rb +++ b/scripts/changelog_check.rb @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + require 'open3' require 'optparse' @@ -169,7 +171,7 @@ def format_changelog(changelog_entries) sort_by(&:subcategory). group_by { |entry| [entry.category, entry.change] } - changelog = '' + changelog = +'' CATEGORIES.each do |category| category_changes = changelog_entries. filter { |(changelog_category, _change), _changes| changelog_category == category } diff --git a/scripts/deep-merge-yaml b/scripts/deep-merge-yaml index e8c673b50b6..64d08081038 100755 --- a/scripts/deep-merge-yaml +++ b/scripts/deep-merge-yaml @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + require 'yaml' require 'active_support/core_ext/hash/deep_merge' require 'optparse' diff --git a/scripts/generate_readme.rb b/scripts/generate_readme.rb index d82ad9b679b..176c548139d 100644 --- a/scripts/generate_readme.rb +++ b/scripts/generate_readme.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'optparse' class GenerateReadme diff --git a/scripts/pinpoint-supported-countries b/scripts/pinpoint-supported-countries index 1f861be3e15..46e393a1283 100755 --- a/scripts/pinpoint-supported-countries +++ b/scripts/pinpoint-supported-countries @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + $LOAD_PATH.unshift(File.expand_path('../lib', File.dirname(__FILE__))) require 'pinpoint_supported_countries' require 'yaml'