Commit 7a0c278e authored by Markus Koller's avatar Markus Koller Committed by Jarka Košanová

Fix Style/FrozenStringLiteralComment violations in config*

Auto-corrected with Rubocop
parent 3b692a28
......@@ -2647,113 +2647,6 @@ Style/FrozenStringLiteralComment:
- 'app/views/projects/tags/index.atom.builder'
- 'app/views/users/show.atom.builder'
- 'bin/secpick'
- 'config.ru'
- 'config/boot.rb'
- 'config/environment.rb'
- 'config/environments/development.rb'
- 'config/environments/production.rb'
- 'config/environments/test.rb'
- 'config/initializers/01_secret_token.rb'
- 'config/initializers/0_acts_as_taggable.rb'
- 'config/initializers/0_inject_feature_flags.rb'
- 'config/initializers/0_post_deployment_migrations.rb'
- 'config/initializers/1_settings.rb'
- 'config/initializers/2_gitlab.rb'
- 'config/initializers/5_backend.rb'
- 'config/initializers/6_validations.rb'
- 'config/initializers/7_prometheus_metrics.rb'
- 'config/initializers/7_redis.rb'
- 'config/initializers/8_devise.rb'
- 'config/initializers/8_gitaly.rb'
- 'config/initializers/9_fast_gettext.rb'
- 'config/initializers/action_dispatch_http_mime_negotiation.rb'
- 'config/initializers/action_mailer_hooks.rb'
- 'config/initializers/active_record_data_types.rb'
- 'config/initializers/active_record_ping.rb'
- 'config/initializers/active_record_preloader.rb'
- 'config/initializers/active_record_schema_ignore_tables.rb'
- 'config/initializers/active_record_table_definition.rb'
- 'config/initializers/ar_speed_up_migration_checking.rb'
- 'config/initializers/asset_proxy_settings.rb'
- 'config/initializers/attr_encrypted_no_db_connection.rb'
- 'config/initializers/backtrace_silencers.rb'
- 'config/initializers/batch_loader.rb'
- 'config/initializers/bootstrap_form.rb'
- 'config/initializers/bullet.rb'
- 'config/initializers/cluster_events_before_phased_restart.rb'
- 'config/initializers/console_message.rb'
- 'config/initializers/cookies_serializer.rb'
- 'config/initializers/date_time_formats.rb'
- 'config/initializers/default_url_options.rb'
- 'config/initializers/deprecations.rb'
- 'config/initializers/direct_upload_support.rb'
- 'config/initializers/doorkeeper.rb'
- 'config/initializers/doorkeeper_openid_connect.rb'
- 'config/initializers/etag_caching.rb'
- 'config/initializers/fill_shards.rb'
- 'config/initializers/fix_local_cache_middleware.rb'
- 'config/initializers/fog_google_https_private_urls.rb'
- 'config/initializers/forbid_sidekiq_in_transactions.rb'
- 'config/initializers/gettext_rails_i18n_patch.rb'
- 'config/initializers/gitlab_kas_secret.rb'
- 'config/initializers/gitlab_shell_secret_token.rb'
- 'config/initializers/gitlab_workhorse_secret.rb'
- 'config/initializers/go_get.rb'
- 'config/initializers/grpc.rb'
- 'config/initializers/hamlit.rb'
- 'config/initializers/health_check.rb'
- 'config/initializers/http_hostname_override.rb'
- 'config/initializers/kaminari_active_record_relation_methods_with_limit.rb'
- 'config/initializers/kaminari_config.rb'
- 'config/initializers/lograge.rb'
- 'config/initializers/mail_encoding_patch.rb'
- 'config/initializers/mime_types.rb'
- 'config/initializers/mini_magick.rb'
- 'config/initializers/new_framework_defaults.rb'
- 'config/initializers/octokit.rb'
- 'config/initializers/omniauth.rb'
- 'config/initializers/peek.rb'
- 'config/initializers/postgresql_cte.rb'
- 'config/initializers/premailer.rb'
- 'config/initializers/query_limiting.rb'
- 'config/initializers/rack_lineprof.rb'
- 'config/initializers/relative_naming_ci_namespace.rb'
- 'config/initializers/request_context.rb'
- 'config/initializers/request_profiler.rb'
- 'config/initializers/routing_draw.rb'
- 'config/initializers/sentry.rb'
- 'config/initializers/server_uptime.rb'
- 'config/initializers/session_store.rb'
- 'config/initializers/sherlock.rb'
- 'config/initializers/sprockets.rb'
- 'config/initializers/static_files.rb'
- 'config/initializers/time_zone.rb'
- 'config/initializers/trusted_proxies.rb'
- 'config/initializers/warden.rb'
- 'config/initializers/workhorse_multipart.rb'
- 'config/initializers/wrap_parameters.rb'
- 'config/initializers/zz_metrics.rb'
- 'config/initializers_before_autoloader/000_inflections.rb'
- 'config/object_store_settings.rb'
- 'config/routes.rb'
- 'config/routes/admin.rb'
- 'config/routes/api.rb'
- 'config/routes/dashboard.rb'
- 'config/routes/development.rb'
- 'config/routes/explore.rb'
- 'config/routes/git_http.rb'
- 'config/routes/google_api.rb'
- 'config/routes/help.rb'
- 'config/routes/import.rb'
- 'config/routes/legacy_builds.rb'
- 'config/routes/repository.rb'
- 'config/routes/sherlock.rb'
- 'config/routes/sidekiq.rb'
- 'config/routes/snippets.rb'
- 'config/routes/uploads.rb'
- 'config/routes/wiki.rb'
- 'config/smime_signature_settings.rb'
- 'config/spring.rb'
- 'danger/changes_size/Dangerfile'
- 'danger/metadata/Dangerfile'
- 'db/migrate/20190325080727_truncate_user_fullname.rb'
......
# frozen_string_literal: true
# This file is used by Rack-based servers to start the application.
if defined?(Unicorn)
......
# frozen_string_literal: true
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
# Set up gems listed in the Gemfile.
......
# frozen_string_literal: true
# Load the Rails application.
require_relative 'application'
......
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb
......
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb
......
# frozen_string_literal: true
require 'gitlab/testing/request_blocker_middleware'
require 'gitlab/testing/robots_blocker_middleware'
require 'gitlab/testing/request_inspector_middleware'
......
# 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.
#
......
# 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
......
# frozen_string_literal: true
# This needs to be loaded after
# config/initializers/0_inject_enterprise_edition_module.rb
......
# 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.
......
# frozen_string_literal: true
require_relative '../settings'
require_relative '../object_store_settings'
require_relative '../smime_signature_settings'
......
# frozen_string_literal: true
require_dependency 'gitlab'
# 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)
......
# frozen_string_literal: true
def storage_validation_error(message)
raise "#{message}. Please fix this in your gitlab.yml before starting GitLab."
end
......
# frozen_string_literal: true
require 'prometheus/client'
# Keep separate directories for separate processes
......
# frozen_string_literal: true
# Make sure we initialize a Redis connection pool before multi-threaded
# execution starts by
# 1. Sidekiq
......
# 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|
......
# frozen_string_literal: true
require 'uri'
Gitlab.config.repositories.storages.keys.each do |storage|
......
# frozen_string_literal: true
FastGettext.default_available_locales = Gitlab::I18n.available_locales
I18n.available_locales = Gitlab::I18n.available_locales
# 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.
......
# frozen_string_literal: true
unless Gitlab.config.gitlab.email_enabled
ActionMailer::Base.register_interceptor(::Gitlab::Email::Hook::DisableEmailInterceptor)
ActionMailer::Base.logger = nil
......
# 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
......
# frozen_string_literal: true
# # frozen_string_literal: true
if Gitlab::Utils.to_boolean(ENV['ENABLE_ACTIVERECORD_EMPTY_PING'], default: false)
......
# frozen_string_literal: true
module ActiveRecord
module Associations
class Preloader
......
# frozen_string_literal: true
# Ignore dynamically managed partitions in static application schema
ActiveRecord::SchemaDumper.ignore_tables += ["#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.*"]
# frozen_string_literal: true
# ActiveRecord custom method definitions with timezone information.
# See https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/11229
......
# frozen_string_literal: true
if Rails.env.test?
require 'active_record/migration'
......
# frozen_string_literal: true
#
# Asset proxy settings
#
......
# frozen_string_literal: true
module AttrEncrypted
module Adapters
module ActiveRecord
......
# frozen_string_literal: true
Rails.backtrace_cleaner.remove_silencers!
# This allows us to see the proper caller of SQL calls in {development,test}.log
......
# frozen_string_literal: true
Rails.application.config.middleware.use(BatchLoader::Middleware)
# frozen_string_literal: true
module BootstrapFormBuilderCustomization
def label_class
"label-bold"
......
# frozen_string_literal: true
def bullet_enabled?
Gitlab::Utils.to_boolean(ENV['ENABLE_BULLET'].to_s)
end
......
# frozen_string_literal: true
# Technical debt, this should be ideally upstreamed.
#
# However, there's currently no way to hook before doing
......
# frozen_string_literal: true
# rubocop:disable Rails/Output
if Gitlab::Runtime.console?
# note that this will not print out when using `spring`
......
# 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
......
# frozen_string_literal: true
# :short - 10 Nov
# :medium - Nov 10, 2007
# :long - November 10, 2007
......
# frozen_string_literal: true
default_url_options = {
host: Gitlab.config.gitlab.host,
protocol: Gitlab.config.gitlab.protocol,
......
# frozen_string_literal: true
if Rails.env.development? || ENV['GITLAB_LEGACY_PATH_LOG_MESSAGE']
deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab')
......
# frozen_string_literal: true
class DirectUploadsValidator
SUPPORTED_DIRECT_UPLOAD_PROVIDERS = [ObjectStorage::Config::GOOGLE_PROVIDER,
ObjectStorage::Config::AWS_PROVIDER,
......
# frozen_string_literal: true
Doorkeeper.configure do
# Change the ORM that doorkeeper will use.
# Currently supported options are :active_record, :mongoid2, :mongoid3, :mongo_mapper
......
# frozen_string_literal: true
Doorkeeper::OpenidConnect.configure do
issuer Gitlab.config.gitlab.url
......
# 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
......
# 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?
......
# frozen_string_literal: true
module LocalCacheRegistryCleanupWithEnsure
LocalCacheRegistry =
ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry
......
# frozen_string_literal: true
#
# Monkey patching the https support for private urls
# See https://gitlab.com/gitlab-org/gitlab/issues/4879
......
# frozen_string_literal: true
module Sidekiq
module Worker
EnqueueFromTransactionError = Class.new(StandardError)
......
# frozen_string_literal: true
require 'gettext_i18n_rails/haml_parser'
require 'gettext_i18n_rails_js/parser/javascript'
require 'json'
......
# frozen_string_literal: true
Gitlab::Kas.ensure_secret!
# frozen_string_literal: true
Gitlab::Shell.ensure_secret_token!
# frozen_string_literal: true
begin
Gitlab::Workhorse.secret
rescue
......
# frozen_string_literal: true
Rails.application.config.middleware.use(Gitlab::Middleware::Go)
# frozen_string_literal: true
require 'logger'
GRPC_LOGGER = Logger.new(Rails.root.join('log/grpc.log'))
......
# frozen_string_literal: true
Hamlit::RailsTemplate.set_options(attr_quote: '"')
Hamlit::Filters.remove_filter('coffee')
......
# frozen_string_literal: true
HealthCheck.setup do |config|
config.standard_checks = %w(database migrations cache)
config.full_checks = %w(database migrations cache)
......
# 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.
......
# frozen_string_literal: true
module Kaminari
# Active Record specific page scope methods implementations
module ActiveRecordRelationMethodsWithLimit
......
# frozen_string_literal: true
Kaminari.configure do |config|
config.default_per_page = 20
config.max_per_page = 100
......
# frozen_string_literal: true
# Only use Lograge for Rails
unless Gitlab::Runtime.sidekiq?
Rails.application.reloader.to_prepare do
......
# 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
......
# 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:
......
# frozen_string_literal: true
MiniMagick.configure do |config|
config.cli = :graphicsmagick
end
# 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.
......
# frozen_string_literal: true
Octokit.middleware.insert_after Octokit::Middleware::FollowRedirects, Gitlab::Octokit::Middleware
# frozen_string_literal: true
if Gitlab::Auth::Ldap::Config.enabled?
module OmniAuth::Strategies
Gitlab::Auth::Ldap::Config.available_servers.each do |server|
......
# frozen_string_literal: true
require 'peek/adapters/redis'
Peek::Adapters::Redis.prepend ::Gitlab::PerformanceBar::RedisAdapterWhenPeekEnabled
......
# 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:
......
# frozen_string_literal: true
# See https://github.com/fphilipe/premailer-rails#configuration
Premailer::Rails.config.merge!(
generate_text_part: false,
......
# frozen_string_literal: true
if Gitlab::QueryLimiting.enable?
require_dependency 'gitlab/query_limiting/active_support_subscriber'
require_dependency 'gitlab/query_limiting/transaction'
......
# 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.
......
# 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:
......
# frozen_string_literal: true
Rails.application.configure do |config|
config.middleware.insert_after RequestStore::Middleware, Gitlab::Middleware::RequestContext
end
# frozen_string_literal: true
Rails.application.configure do |config|
config.middleware.use(Gitlab::RequestProfiler::Middleware)
end
# 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
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
require 'gitlab/current_settings'
......
# frozen_string_literal: true
Rails.application.config.booted_at = Time.now
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
require 'gitlab/current_settings'
......
# frozen_string_literal: true
if Gitlab::Sherlock.enabled?
Rails.application.configure do |config|
config.middleware.use(Gitlab::Sherlock::Middleware)
......
# frozen_string_literal: true
Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor
# frozen_string_literal: true
app = Rails.application
if app.config.public_file_server.enabled
......
# 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
......
# 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
......
# 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)
......
# 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)
......
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
......
# 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
......
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
......
# frozen_string_literal: true
# Set default values for object_store settings
class ObjectStoreSettings
SUPPORTED_TYPES = %w(artifacts external_diffs lfs uploads packages dependency_proxy terraform_state pages).freeze
......
# frozen_string_literal: true
require 'sidekiq/web'
require 'sidekiq/cron/web'
require 'product_analytics/collector_app'
......
# frozen_string_literal: true
namespace :admin do
resources :users, constraints: { id: %r{[a-zA-Z./0-9_\-]+} } do
resources :keys, only: [:show, :destroy]
......
# frozen_string_literal: true
post '/api/graphql', to: 'graphql#execute'
mount GraphiQL::Rails::Engine, at: '/-/graphql-explorer', graphql_path: Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, '/api/graphql')
......
# frozen_string_literal: true
resource :dashboard, controller: 'dashboard', only: [] do
get :issues, action: :issues_calendar, constraints: lambda { |req| req.format == :ics }
get :issues
......
# frozen_string_literal: true
if Rails.env.development?
# Make the built-in Rails routes available in development, otherwise they'd
# get swallowed by the `namespace/project` route matcher below.
......
# frozen_string_literal: true
namespace :explore do
resources :projects, only: [:index] do
collection do
......
# frozen_string_literal: true
scope(path: '*repository_path', format: false) do
constraints(repository_path: Gitlab::PathRegex.repository_git_route_regex) do
scope(module: :repositories) do
......@@ -42,7 +44,7 @@ scope(path: '*repository_path', format: false) do
wiki_redirect = redirect do |params, request|
container_path = params[:repository_path].delete_suffix('.wiki.git')
path = File.join(container_path, '-', 'wikis')
path << "?#{request.query_string}" unless request.query_string.blank?
path += "?#{request.query_string}" unless request.query_string.blank?
path
end
......@@ -54,7 +56,7 @@ scope(path: '*repository_path', format: false) do
constraints(repository_path: Gitlab::PathRegex.repository_route_regex) do
ref_redirect = redirect do |params, request|
path = "#{params[:repository_path]}.git/info/refs"
path << "?#{request.query_string}" unless request.query_string.blank?
path += "?#{request.query_string}" unless request.query_string.blank?
path
end
......
# frozen_string_literal: true
scope '-' do
namespace :google_api do
resource :auth, only: [], controller: :authorizations do
......
# frozen_string_literal: true
get 'help' => 'help#index'
get 'help/shortcuts' => 'help#shortcuts'
get 'help/instance_configuration' => 'help#instance_configuration'
......
# frozen_string_literal: true
# Alias import callbacks under the /users/auth endpoint so that
# the OAuth2 callback URL can be restricted under http://example.com/users/auth
# instead of http://example.com.
......
# frozen_string_literal: true
resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do
collection do
resources :artifacts, only: [], controller: 'build_artifacts' do
......
# frozen_string_literal: true
# All routing related to repository browsing
resource :repository, only: [:create] do
......
# frozen_string_literal: true
if Gitlab::Sherlock.enabled?
namespace :sherlock do
resources :transactions, only: [:index, :show] do
......
# frozen_string_literal: true
constraints ::Constraints::AdminConstrainer.new do
mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq
end
# frozen_string_literal: true
resources :snippets, except: [:create, :update, :destroy], concerns: :awardable, constraints: { id: /\d+/ } do
member do
get :raw
......
# frozen_string_literal: true
scope path: :uploads do
# Note attachments and User/Group/Project avatars
get "-/system/:model/:mounted_as/:id/:filename",
......
# frozen_string_literal: true
scope(controller: :wikis) do
scope(path: 'wikis', as: :wikis) do
get :git_access
......
# frozen_string_literal: true
# Set default values for email_smime settings
class SmimeSignatureSettings
def self.parse(email_smime)
......
# frozen_string_literal: true
%w(
.ruby-version
.rbenv-vars
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment