diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-03 21:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-03 21:09:17 +0000 |
commit | a1ed241c8212fe848501de9d561796ed6879307f (patch) | |
tree | f4cd88555f3e9be61e498761c7a289260135c806 /config/initializers | |
parent | 174343966742d2f4b87ac84f9ce4ee576cb9d75e (diff) | |
download | gitlab-ce-a1ed241c8212fe848501de9d561796ed6879307f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
80 files changed, 160 insertions, 0 deletions
diff --git a/config/initializers/01_secret_token.rb b/config/initializers/01_secret_token.rb index d7e725477eb..c4520b4b313 100644 --- a/config/initializers/01_secret_token.rb +++ b/config/initializers/01_secret_token.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # WARNING: Before you make a change to secrets.yml, read the development guide for GitLab secrets # doc/development/application_secrets.md. # diff --git a/config/initializers/0_acts_as_taggable.rb b/config/initializers/0_acts_as_taggable.rb index 50dc47673ab..9a92b8f2d18 100644 --- a/config/initializers/0_acts_as_taggable.rb +++ b/config/initializers/0_acts_as_taggable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ActsAsTaggableOn.strict_case_match = true # tags_counter enables caching count of tags which results in an update whenever a tag is added or removed diff --git a/config/initializers/0_inject_feature_flags.rb b/config/initializers/0_inject_feature_flags.rb index 5b33b3bb4ea..daf208bd960 100644 --- a/config/initializers/0_inject_feature_flags.rb +++ b/config/initializers/0_inject_feature_flags.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This needs to be loaded after # config/initializers/0_inject_enterprise_edition_module.rb diff --git a/config/initializers/0_post_deployment_migrations.rb b/config/initializers/0_post_deployment_migrations.rb index 2d647f72840..dabb82c8525 100644 --- a/config/initializers/0_post_deployment_migrations.rb +++ b/config/initializers/0_post_deployment_migrations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Post deployment migrations are included by default. This file must be loaded # before other initializers as Rails may otherwise memoize a list of migrations # excluding the post deployment migrations. diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index e3c614b720b..2d8bab50635 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../settings' require_relative '../object_store_settings' require_relative '../smime_signature_settings' diff --git a/config/initializers/2_gitlab.rb b/config/initializers/2_gitlab.rb index 8b7f245b7b0..5b78a471f8a 100644 --- a/config/initializers/2_gitlab.rb +++ b/config/initializers/2_gitlab.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require_dependency 'gitlab' diff --git a/config/initializers/5_backend.rb b/config/initializers/5_backend.rb index 46854af9b55..78910bb7675 100644 --- a/config/initializers/5_backend.rb +++ b/config/initializers/5_backend.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + unless Rails.env.test? required_version = Gitlab::VersionInfo.parse(Gitlab::Shell.version_required) current_version = Gitlab::VersionInfo.parse(Gitlab::Shell.version) diff --git a/config/initializers/6_validations.rb b/config/initializers/6_validations.rb index 827b15e5c8d..060b04be824 100644 --- a/config/initializers/6_validations.rb +++ b/config/initializers/6_validations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def storage_validation_error(message) raise "#{message}. Please fix this in your gitlab.yml before starting GitLab." end diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index 05487341610..a304f861db8 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'prometheus/client' # Keep separate directories for separate processes diff --git a/config/initializers/7_redis.rb b/config/initializers/7_redis.rb index af4967521b8..a6025a6dbf0 100644 --- a/config/initializers/7_redis.rb +++ b/config/initializers/7_redis.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Make sure we initialize a Redis connection pool before multi-threaded # execution starts by # 1. Sidekiq diff --git a/config/initializers/8_devise.rb b/config/initializers/8_devise.rb index a4841a11a00..3cac012c2f7 100644 --- a/config/initializers/8_devise.rb +++ b/config/initializers/8_devise.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Use this hook to configure devise mailer, warden hooks and so forth. The first # four configuration values can also be set straight in your models. Devise.setup do |config| diff --git a/config/initializers/8_gitaly.rb b/config/initializers/8_gitaly.rb index f4f116e67f7..d7b5bfbc269 100644 --- a/config/initializers/8_gitaly.rb +++ b/config/initializers/8_gitaly.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'uri' Gitlab.config.repositories.storages.keys.each do |storage| diff --git a/config/initializers/9_fast_gettext.rb b/config/initializers/9_fast_gettext.rb index f836e6e971d..0c28a1b7ce8 100644 --- a/config/initializers/9_fast_gettext.rb +++ b/config/initializers/9_fast_gettext.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + FastGettext.default_available_locales = Gitlab::I18n.available_locales I18n.available_locales = Gitlab::I18n.available_locales diff --git a/config/initializers/action_dispatch_http_mime_negotiation.rb b/config/initializers/action_dispatch_http_mime_negotiation.rb index 6c31de2de55..2d6afb97a60 100644 --- a/config/initializers/action_dispatch_http_mime_negotiation.rb +++ b/config/initializers/action_dispatch_http_mime_negotiation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Starting with Rails 5, Rails tries to determine the request format based on # the extension of the full URL path if no explicit `format` param or `Accept` # header is provided, like when simply browsing to a page in your browser. diff --git a/config/initializers/action_mailer_hooks.rb b/config/initializers/action_mailer_hooks.rb index 41e34b6eb20..46d5e387d9d 100644 --- a/config/initializers/action_mailer_hooks.rb +++ b/config/initializers/action_mailer_hooks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + unless Gitlab.config.gitlab.email_enabled ActionMailer::Base.register_interceptor(::Gitlab::Email::Hook::DisableEmailInterceptor) ActionMailer::Base.logger = nil diff --git a/config/initializers/active_record_data_types.rb b/config/initializers/active_record_data_types.rb index 3fa999e9908..f8f0a69622f 100644 --- a/config/initializers/active_record_data_types.rb +++ b/config/initializers/active_record_data_types.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # ActiveRecord custom data type for storing datetimes with timezone information. # See https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/11229 diff --git a/config/initializers/active_record_ping.rb b/config/initializers/active_record_ping.rb index 349a7e4a496..196f587f565 100644 --- a/config/initializers/active_record_ping.rb +++ b/config/initializers/active_record_ping.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # # frozen_string_literal: true if Gitlab::Utils.to_boolean(ENV['ENABLE_ACTIVERECORD_EMPTY_PING'], default: false) diff --git a/config/initializers/active_record_preloader.rb b/config/initializers/active_record_preloader.rb index d585ecda307..349ca6c4831 100644 --- a/config/initializers/active_record_preloader.rb +++ b/config/initializers/active_record_preloader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveRecord module Associations class Preloader diff --git a/config/initializers/active_record_schema_ignore_tables.rb b/config/initializers/active_record_schema_ignore_tables.rb index 0a840bbf1d8..55c44e00c40 100644 --- a/config/initializers/active_record_schema_ignore_tables.rb +++ b/config/initializers/active_record_schema_ignore_tables.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + # Ignore dynamically managed partitions in static application schema ActiveRecord::SchemaDumper.ignore_tables += ["#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.*"] diff --git a/config/initializers/active_record_table_definition.rb b/config/initializers/active_record_table_definition.rb index 9220620da41..3c6311f034f 100644 --- a/config/initializers/active_record_table_definition.rb +++ b/config/initializers/active_record_table_definition.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # ActiveRecord custom method definitions with timezone information. # See https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/11229 diff --git a/config/initializers/ar_speed_up_migration_checking.rb b/config/initializers/ar_speed_up_migration_checking.rb index c4ffcc54cb2..778b2ee0cb1 100644 --- a/config/initializers/ar_speed_up_migration_checking.rb +++ b/config/initializers/ar_speed_up_migration_checking.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if Rails.env.test? require 'active_record/migration' diff --git a/config/initializers/asset_proxy_settings.rb b/config/initializers/asset_proxy_settings.rb index 92247aba1b8..48eedcee681 100644 --- a/config/initializers/asset_proxy_settings.rb +++ b/config/initializers/asset_proxy_settings.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # # Asset proxy settings # diff --git a/config/initializers/attr_encrypted_no_db_connection.rb b/config/initializers/attr_encrypted_no_db_connection.rb index 7ad458929db..f8d0effbbad 100644 --- a/config/initializers/attr_encrypted_no_db_connection.rb +++ b/config/initializers/attr_encrypted_no_db_connection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module AttrEncrypted module Adapters module ActiveRecord diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index 2f892f78112..f3e01d23448 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.backtrace_cleaner.remove_silencers! # This allows us to see the proper caller of SQL calls in {development,test}.log diff --git a/config/initializers/batch_loader.rb b/config/initializers/batch_loader.rb index 2e2256b0eb9..d88b43fbcea 100644 --- a/config/initializers/batch_loader.rb +++ b/config/initializers/batch_loader.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Rails.application.config.middleware.use(BatchLoader::Middleware) diff --git a/config/initializers/bootstrap_form.rb b/config/initializers/bootstrap_form.rb index bbc1d83a63f..8121bc8bf1d 100644 --- a/config/initializers/bootstrap_form.rb +++ b/config/initializers/bootstrap_form.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module BootstrapFormBuilderCustomization def label_class "label-bold" diff --git a/config/initializers/bullet.rb b/config/initializers/bullet.rb index d1f72ca3ce7..2d21514b121 100644 --- a/config/initializers/bullet.rb +++ b/config/initializers/bullet.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def bullet_enabled? Gitlab::Utils.to_boolean(ENV['ENABLE_BULLET'].to_s) end diff --git a/config/initializers/cluster_events_before_phased_restart.rb b/config/initializers/cluster_events_before_phased_restart.rb index aae5470d6ae..d029adbe363 100644 --- a/config/initializers/cluster_events_before_phased_restart.rb +++ b/config/initializers/cluster_events_before_phased_restart.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Technical debt, this should be ideally upstreamed. # # However, there's currently no way to hook before doing diff --git a/config/initializers/console_message.rb b/config/initializers/console_message.rb index fe47195062b..2c05c2c9a24 100644 --- a/config/initializers/console_message.rb +++ b/config/initializers/console_message.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Rails/Output if Gitlab::Runtime.console? # note that this will not print out when using `spring` diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index e9a71f32581..375a23fdfd6 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.use_cookies_with_metadata = true diff --git a/config/initializers/date_time_formats.rb b/config/initializers/date_time_formats.rb index 1939ced512d..44d07869033 100644 --- a/config/initializers/date_time_formats.rb +++ b/config/initializers/date_time_formats.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # :short - 10 Nov # :medium - Nov 10, 2007 # :long - November 10, 2007 diff --git a/config/initializers/default_url_options.rb b/config/initializers/default_url_options.rb index de2cdc6ecae..138a8e467c7 100644 --- a/config/initializers/default_url_options.rb +++ b/config/initializers/default_url_options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + default_url_options = { host: Gitlab.config.gitlab.host, protocol: Gitlab.config.gitlab.protocol, diff --git a/config/initializers/deprecations.rb b/config/initializers/deprecations.rb index 2b07ca665e2..3d03efe67e0 100644 --- a/config/initializers/deprecations.rb +++ b/config/initializers/deprecations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if Rails.env.development? || ENV['GITLAB_LEGACY_PATH_LOG_MESSAGE'] deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab') diff --git a/config/initializers/direct_upload_support.rb b/config/initializers/direct_upload_support.rb index 919b80b79c0..880aea7d114 100644 --- a/config/initializers/direct_upload_support.rb +++ b/config/initializers/direct_upload_support.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class DirectUploadsValidator SUPPORTED_DIRECT_UPLOAD_PROVIDERS = [ObjectStorage::Config::GOOGLE_PROVIDER, ObjectStorage::Config::AWS_PROVIDER, diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 6b54b5074d5..1cf70909997 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Doorkeeper.configure do # Change the ORM that doorkeeper will use. # Currently supported options are :active_record, :mongoid2, :mongoid3, :mongo_mapper diff --git a/config/initializers/doorkeeper_openid_connect.rb b/config/initializers/doorkeeper_openid_connect.rb index 3523776c4f7..12a963ce45d 100644 --- a/config/initializers/doorkeeper_openid_connect.rb +++ b/config/initializers/doorkeeper_openid_connect.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Doorkeeper::OpenidConnect.configure do issuer Gitlab.config.gitlab.url diff --git a/config/initializers/etag_caching.rb b/config/initializers/etag_caching.rb index eba88801141..2e5574d2602 100644 --- a/config/initializers/etag_caching.rb +++ b/config/initializers/etag_caching.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This middleware has to come after Gitlab::Metrics::RackMiddleware # in the middleware stack, because it tracks events with # GitLab Performance Monitoring diff --git a/config/initializers/fill_shards.rb b/config/initializers/fill_shards.rb index 90c0d63e4fe..e2889f59574 100644 --- a/config/initializers/fill_shards.rb +++ b/config/initializers/fill_shards.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # The explicit schema version check is needed because during our migration rollback testing, # `Shard.connected?` could be cached and return true even though the table doesn't exist return unless Shard.connected? diff --git a/config/initializers/fix_local_cache_middleware.rb b/config/initializers/fix_local_cache_middleware.rb index 2644ee6a7d3..94da6d9c0e0 100644 --- a/config/initializers/fix_local_cache_middleware.rb +++ b/config/initializers/fix_local_cache_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module LocalCacheRegistryCleanupWithEnsure LocalCacheRegistry = ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry diff --git a/config/initializers/fog_google_https_private_urls.rb b/config/initializers/fog_google_https_private_urls.rb index ef6afb2b686..78cbd41a609 100644 --- a/config/initializers/fog_google_https_private_urls.rb +++ b/config/initializers/fog_google_https_private_urls.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # # Monkey patching the https support for private urls # See https://gitlab.com/gitlab-org/gitlab/issues/4879 diff --git a/config/initializers/forbid_sidekiq_in_transactions.rb b/config/initializers/forbid_sidekiq_in_transactions.rb index f505fb5843a..85ec8cad0a3 100644 --- a/config/initializers/forbid_sidekiq_in_transactions.rb +++ b/config/initializers/forbid_sidekiq_in_transactions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Sidekiq module Worker EnqueueFromTransactionError = Class.new(StandardError) diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb index 09c9b325a04..c23049e93c9 100644 --- a/config/initializers/gettext_rails_i18n_patch.rb +++ b/config/initializers/gettext_rails_i18n_patch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'gettext_i18n_rails/haml_parser' require 'gettext_i18n_rails_js/parser/javascript' require 'json' diff --git a/config/initializers/gitlab_kas_secret.rb b/config/initializers/gitlab_kas_secret.rb index 5e86e954684..8955f71a597 100644 --- a/config/initializers/gitlab_kas_secret.rb +++ b/config/initializers/gitlab_kas_secret.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Gitlab::Kas.ensure_secret! diff --git a/config/initializers/gitlab_shell_secret_token.rb b/config/initializers/gitlab_shell_secret_token.rb index 529dcdd4644..e11f65bb8ca 100644 --- a/config/initializers/gitlab_shell_secret_token.rb +++ b/config/initializers/gitlab_shell_secret_token.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Gitlab::Shell.ensure_secret_token! diff --git a/config/initializers/gitlab_workhorse_secret.rb b/config/initializers/gitlab_workhorse_secret.rb index ed54dc11098..5c959a72bd1 100644 --- a/config/initializers/gitlab_workhorse_secret.rb +++ b/config/initializers/gitlab_workhorse_secret.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin Gitlab::Workhorse.secret rescue diff --git a/config/initializers/go_get.rb b/config/initializers/go_get.rb index 7e7896b4900..830579f4a8a 100644 --- a/config/initializers/go_get.rb +++ b/config/initializers/go_get.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Rails.application.config.middleware.use(Gitlab::Middleware::Go) diff --git a/config/initializers/grpc.rb b/config/initializers/grpc.rb index b96962fe7db..66b212ef131 100644 --- a/config/initializers/grpc.rb +++ b/config/initializers/grpc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'logger' GRPC_LOGGER = Logger.new(Rails.root.join('log/grpc.log')) diff --git a/config/initializers/hamlit.rb b/config/initializers/hamlit.rb index b5bcae4bbfc..dda38d2a61f 100644 --- a/config/initializers/hamlit.rb +++ b/config/initializers/hamlit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Hamlit::RailsTemplate.set_options(attr_quote: '"') Hamlit::Filters.remove_filter('coffee') diff --git a/config/initializers/health_check.rb b/config/initializers/health_check.rb index 1496f20afc1..0b35aaf115b 100644 --- a/config/initializers/health_check.rb +++ b/config/initializers/health_check.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + HealthCheck.setup do |config| config.standard_checks = %w(database migrations cache) config.full_checks = %w(database migrations cache) diff --git a/config/initializers/http_hostname_override.rb b/config/initializers/http_hostname_override.rb index 58dd380326f..5d2739c1f58 100644 --- a/config/initializers/http_hostname_override.rb +++ b/config/initializers/http_hostname_override.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This override allows passing `@hostname_override` to the SNI protocol, # which is used to lookup the correct SSL certificate in the # request handshake process. diff --git a/config/initializers/kaminari_active_record_relation_methods_with_limit.rb b/config/initializers/kaminari_active_record_relation_methods_with_limit.rb index 55b98cda520..982cb69e532 100644 --- a/config/initializers/kaminari_active_record_relation_methods_with_limit.rb +++ b/config/initializers/kaminari_active_record_relation_methods_with_limit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Kaminari # Active Record specific page scope methods implementations module ActiveRecordRelationMethodsWithLimit diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb index 3cbe9a058d7..8e10079ce36 100644 --- a/config/initializers/kaminari_config.rb +++ b/config/initializers/kaminari_config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Kaminari.configure do |config| config.default_per_page = 20 config.max_per_page = 100 diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb index 5b068c15aad..e8479bc6aa4 100644 --- a/config/initializers/lograge.rb +++ b/config/initializers/lograge.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Only use Lograge for Rails unless Gitlab::Runtime.sidekiq? Rails.application.reloader.to_prepare do diff --git a/config/initializers/mail_encoding_patch.rb b/config/initializers/mail_encoding_patch.rb index d53b058ba75..11a96625e08 100644 --- a/config/initializers/mail_encoding_patch.rb +++ b/config/initializers/mail_encoding_patch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Monkey patch mail 2.7.1 to fix quoted-printable issues with newlines # The issues upstream invalidate SMIME signatures under some conditions # This was working properly in 2.6.6 diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index acbdf8de5a6..5329232cc92 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: diff --git a/config/initializers/mini_magick.rb b/config/initializers/mini_magick.rb index db0e7bbaaa3..8e3e55279f7 100644 --- a/config/initializers/mini_magick.rb +++ b/config/initializers/mini_magick.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + MiniMagick.configure do |config| config.cli = :graphicsmagick end diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index 115ee08dbb6..3d3ee5299e2 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Remove this `if` condition when upgraded to rails 5.0. # The body must be kept. # Be sure to restart your server when you modify this file. diff --git a/config/initializers/octokit.rb b/config/initializers/octokit.rb index b3749258ec5..cd8c8ec24ee 100644 --- a/config/initializers/octokit.rb +++ b/config/initializers/octokit.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Octokit.middleware.insert_after Octokit::Middleware::FollowRedirects, Gitlab::Octokit::Middleware diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index a2720ab9986..85984772d05 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if Gitlab::Auth::Ldap::Config.enabled? module OmniAuth::Strategies Gitlab::Auth::Ldap::Config.available_servers.each do |server| diff --git a/config/initializers/peek.rb b/config/initializers/peek.rb index 7027ba69e13..85bfc4f0214 100644 --- a/config/initializers/peek.rb +++ b/config/initializers/peek.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'peek/adapters/redis' Peek::Adapters::Redis.prepend ::Gitlab::PerformanceBar::RedisAdapterWhenPeekEnabled diff --git a/config/initializers/postgresql_cte.rb b/config/initializers/postgresql_cte.rb index 68d53c4edbf..1ea0b4cfb58 100644 --- a/config/initializers/postgresql_cte.rb +++ b/config/initializers/postgresql_cte.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Adds support for WITH statements when using PostgreSQL. The code here is taken # from https://github.com/shmay/ctes_in_my_pg which at the time of writing has # not been pushed to RubyGems. The license of this repository is as follows: diff --git a/config/initializers/premailer.rb b/config/initializers/premailer.rb index 87f8e67ef1c..77077888af3 100644 --- a/config/initializers/premailer.rb +++ b/config/initializers/premailer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # See https://github.com/fphilipe/premailer-rails#configuration Premailer::Rails.config.merge!( generate_text_part: false, diff --git a/config/initializers/query_limiting.rb b/config/initializers/query_limiting.rb index 66864d1898e..66aefc97c6a 100644 --- a/config/initializers/query_limiting.rb +++ b/config/initializers/query_limiting.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if Gitlab::QueryLimiting.enable? require_dependency 'gitlab/query_limiting/active_support_subscriber' require_dependency 'gitlab/query_limiting/transaction' diff --git a/config/initializers/rack_lineprof.rb b/config/initializers/rack_lineprof.rb index f7172fce9bc..e66bfd88907 100644 --- a/config/initializers/rack_lineprof.rb +++ b/config/initializers/rack_lineprof.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # The default colors of rack-lineprof can be very hard to look at in terminals # with darker backgrounds. This patch tweaks the colors a bit so the output is # actually readable. diff --git a/config/initializers/relative_naming_ci_namespace.rb b/config/initializers/relative_naming_ci_namespace.rb index d9d3034150f..7380597722a 100644 --- a/config/initializers/relative_naming_ci_namespace.rb +++ b/config/initializers/relative_naming_ci_namespace.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Description: https://coderwall.com/p/heed_q/rails-routing-and-namespaced-models # # This allows us to use CI ActiveRecord objects in all routes and use it: diff --git a/config/initializers/request_context.rb b/config/initializers/request_context.rb index f79f1f32d70..99e51ce498a 100644 --- a/config/initializers/request_context.rb +++ b/config/initializers/request_context.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do |config| config.middleware.insert_after RequestStore::Middleware, Gitlab::Middleware::RequestContext end diff --git a/config/initializers/request_profiler.rb b/config/initializers/request_profiler.rb index fb5a7b8372e..8e426772b9a 100644 --- a/config/initializers/request_profiler.rb +++ b/config/initializers/request_profiler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do |config| config.middleware.use(Gitlab::RequestProfiler::Middleware) end diff --git a/config/initializers/routing_draw.rb b/config/initializers/routing_draw.rb index f0f74954eef..4978073633c 100644 --- a/config/initializers/routing_draw.rb +++ b/config/initializers/routing_draw.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Adds draw method into Rails routing # It allows us to keep routing split into files ActionDispatch::Routing::Mapper.prepend Gitlab::Patch::DrawRoute diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index a1eddd6a2c2..df80d4f7f73 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. require 'gitlab/current_settings' diff --git a/config/initializers/server_uptime.rb b/config/initializers/server_uptime.rb index 46bf242e143..9e58a848007 100644 --- a/config/initializers/server_uptime.rb +++ b/config/initializers/server_uptime.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Rails.application.config.booted_at = Time.now diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index da24881885e..6e0cd33aa96 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. require 'gitlab/current_settings' diff --git a/config/initializers/sherlock.rb b/config/initializers/sherlock.rb index 8f2ababb712..ba33ffa13c5 100644 --- a/config/initializers/sherlock.rb +++ b/config/initializers/sherlock.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if Gitlab::Sherlock.enabled? Rails.application.configure do |config| config.middleware.use(Gitlab::Sherlock::Middleware) diff --git a/config/initializers/sprockets.rb b/config/initializers/sprockets.rb index a20b7dc75e9..d0660574eb6 100644 --- a/config/initializers/sprockets.rb +++ b/config/initializers/sprockets.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor diff --git a/config/initializers/static_files.rb b/config/initializers/static_files.rb index 4e19fec084a..3cdb5a5abcf 100644 --- a/config/initializers/static_files.rb +++ b/config/initializers/static_files.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + app = Rails.application if app.config.public_file_server.enabled diff --git a/config/initializers/time_zone.rb b/config/initializers/time_zone.rb index bca7411ad63..8ad6b2d3447 100644 --- a/config/initializers/time_zone.rb +++ b/config/initializers/time_zone.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Time.zone = Gitlab.config.gitlab.time_zone || Time.zone # The default is normally set by Rails in the # active_support.initialize_time_zone Railtie, but we need to set it diff --git a/config/initializers/trusted_proxies.rb b/config/initializers/trusted_proxies.rb index a4528020c06..79e4b831c5e 100644 --- a/config/initializers/trusted_proxies.rb +++ b/config/initializers/trusted_proxies.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Override Rack::Request to make use of the same list of trusted_proxies # as the ActionDispatch::Request object. This is necessary for libraries # like rack_attack where they don't use ActionDispatch, and we want them diff --git a/config/initializers/warden.rb b/config/initializers/warden.rb index 3cfab52efd1..2517c0cf5c2 100644 --- a/config/initializers/warden.rb +++ b/config/initializers/warden.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do |config| Warden::Manager.after_set_user(scope: :user) do |user, auth, opts| Gitlab::Auth::UniqueIpsLimiter.limit_user!(user) diff --git a/config/initializers/workhorse_multipart.rb b/config/initializers/workhorse_multipart.rb index 9c170d1adfa..b68a6fc6ee5 100644 --- a/config/initializers/workhorse_multipart.rb +++ b/config/initializers/workhorse_multipart.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.configure do |config| # ApolloUploadServer::Middleware expects to find uploaded files ready to use config.middleware.insert_before(ApolloUploadServer::Middleware, Gitlab::Middleware::Multipart) diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 999df20181e..85b2d840618 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/initializers/zz_metrics.rb b/config/initializers/zz_metrics.rb index a14239bf619..d0e22187454 100644 --- a/config/initializers/zz_metrics.rb +++ b/config/initializers/zz_metrics.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file was prefixed with zz_ because we want to load it the last! # See: https://gitlab.com/gitlab-org/gitlab-foss/issues/55611 |