Skip to content

Commit

Permalink
Disable Style/FrozenStringLiteralComment.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdesi committed Mar 8, 2025
1 parent 22ed447 commit eb3a5b7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,7 @@ Style/StringLiterals:
- bin/rubocop
- config/initializers/new_framework_defaults_7_2.rb
- config/puma.rb

# The new Ruby version 3.4 enforces frozen string literals by default
Style/FrozenStringLiteralComment:
Enabled: false
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "fileutils"

APP_ROOT = File.expand_path("..", __dir__)
APP_NAME = "laa-court-data-ui"
APP_NAME = "laa-court-data-ui".freeze

def system!(*args)
system(*args, exception: true)
Expand Down
10 changes: 5 additions & 5 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class Application < Rails::Application

config.exceptions_app = routes
config.active_job.queue_adapter = :sidekiq
config.x.support_email_address = 'access-court-data-team@digital.justice.gov.uk'
config.x.display_raw_responses = %w[enabled true].include?(ENV.fetch('DISPLAY_RAW_RESPONSES', nil))
config.x.support_email_address = "access-court-data-team@digital.justice.gov.uk"
config.x.display_raw_responses = %w[enabled true].include?(ENV.fetch("DISPLAY_RAW_RESPONSES", nil))
config.action_mailer.deliver_later_queue_name = :mailers
config.x.court_data_api_config.uri = ENV.fetch('COURT_DATA_API_URL', nil)
config.x.court_data_api_config.user = ENV.fetch('COURT_DATA_API_USERNAME', nil)
config.x.court_data_api_config.secret = ENV.fetch('COURT_DATA_API_SECRET', nil)
config.x.court_data_api_config.uri = ENV.fetch("COURT_DATA_API_URL", nil)
config.x.court_data_api_config.user = ENV.fetch("COURT_DATA_API_USERNAME", nil)
config.x.court_data_api_config.secret = ENV.fetch("COURT_DATA_API_SECRET", nil)
end
end
4 changes: 2 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
config.logstasher.view_enabled = false
config.logstasher.job_enabled = true
config.logstasher.suppress_app_log = false
config.logstasher.source = 'laa-court-data-ui-development'
config.logstasher.source = "laa-court-data-ui-development"
config.logstasher.backtrace = true
config.logstasher.logger_path = 'log/logstasher_development.log'
config.logstasher.logger_path = "log/logstasher_development.log"
end
6 changes: 3 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV.fetch('RAILS_SERVE_STATIC_FILES', nil).present?
config.public_file_server.enabled = ENV.fetch("RAILS_SERVE_STATIC_FILES", nil).present?

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.asset_host = "http://assets.example.com"
Expand Down Expand Up @@ -60,7 +60,7 @@
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: ENV.fetch('DOMAIN_URL', nil) }
config.action_mailer.default_url_options = { host: ENV.fetch("DOMAIN_URL", nil) }

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
Expand All @@ -73,7 +73,7 @@
config.active_record.dump_schema_after_migration = false

# Only use :id for inspections in production.
config.active_record.attributes_for_inspect = [ :id ]
config.active_record.attributes_for_inspect = [:id]

# Enable DNS rebinding protection and other `Host` header attacks.
# config.hosts = [
Expand Down
6 changes: 3 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
}

# Don't care if the mailer can't send.
Expand Down Expand Up @@ -73,9 +73,9 @@
config.logstasher.view_enabled = false
config.logstasher.job_enabled = true
config.logstasher.suppress_app_log = false
config.logstasher.source = 'laa-court-data-ui-test'
config.logstasher.source = "laa-court-data-ui-test"
config.logstasher.backtrace = true
config.logstasher.logger_path = 'log/logstasher_test.log'
config.logstasher.logger_path = "log/logstasher_test.log"
end

# Annotate rendered view with file names.
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :password, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
Rails.application.config.filter_parameters += %i[
passw password email secret token _key crypt salt certificate otp ssn
]
2 changes: 1 addition & 1 deletion config/initializers/inflections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# These inflection rules are supported but not enabled by default:
ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
inflect.acronym 'MAAT'
inflect.acronym "MAAT"
end

0 comments on commit eb3a5b7

Please sign in to comment.