Commit fd577b86 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'frozen_string_lib_2' into 'master'

Add frozen_string_literal to lib part 2

See merge request gitlab-org/gitlab-ce!32094
parents 1037935c a50703f1
...@@ -97,7 +97,7 @@ module Gitlab ...@@ -97,7 +97,7 @@ module Gitlab
attr_reader :load_times_by_model, :private_token attr_reader :load_times_by_model, :private_token
def debug(message, *) def debug(message, *)
message.gsub!(private_token, FILTERED_STRING) if private_token message = message.gsub(private_token, FILTERED_STRING) if private_token
_, type, time = *message.match(/(\w+) Load \(([0-9.]+)ms\)/) _, type, time = *message.match(/(\w+) Load \(([0-9.]+)ms\)/)
......
...@@ -17,8 +17,9 @@ module Gitlab ...@@ -17,8 +17,9 @@ module Gitlab
return unless content return unless content
all_names.each do |a_name| all_names.each do |a_name|
content.gsub!(%r{/#{a_name} ?(.*)$}i, execute_block(action_block, context, '\1')) content = content.gsub(%r{/#{a_name} ?(.*)$}i, execute_block(action_block, context, '\1'))
end end
content content
end end
end end
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::LegacyGithubImport::ReleaseFormatter do describe Gitlab::LegacyGithubImport::ReleaseFormatter do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::LegacyGithubImport::UserFormatter do describe Gitlab::LegacyGithubImport::UserFormatter do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::LegacyGithubImport::WikiFormatter do describe Gitlab::LegacyGithubImport::WikiFormatter do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::LoopHelpers do describe Gitlab::LoopHelpers do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ManifestImport::Manifest do describe Gitlab::ManifestImport::Manifest do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ManifestImport::ProjectCreator do describe Gitlab::ManifestImport::ProjectCreator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::MarkupHelper do describe Gitlab::MarkupHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::BackgroundTransaction do describe Gitlab::Metrics::BackgroundTransaction do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Delta do describe Gitlab::Metrics::Delta do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Instrumentation do describe Gitlab::Metrics::Instrumentation do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::MethodCall do describe Gitlab::Metrics::MethodCall do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Methods do describe Gitlab::Metrics::Methods do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Metric do describe Gitlab::Metrics::Metric do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Prometheus, :prometheus do describe Gitlab::Metrics::Prometheus, :prometheus do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::RackMiddleware do describe Gitlab::Metrics::RackMiddleware do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::RequestsRackMiddleware do describe Gitlab::Metrics::RequestsRackMiddleware do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Samplers::InfluxSampler do describe Gitlab::Metrics::Samplers::InfluxSampler do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Samplers::RubySampler do describe Gitlab::Metrics::Samplers::RubySampler do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Samplers::UnicornSampler do describe Gitlab::Metrics::Samplers::UnicornSampler do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::SidekiqMetricsExporter do describe Gitlab::Metrics::SidekiqMetricsExporter do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::SidekiqMiddleware do describe Gitlab::Metrics::SidekiqMiddleware do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Subscribers::ActionView do describe Gitlab::Metrics::Subscribers::ActionView do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Subscribers::ActiveRecord do describe Gitlab::Metrics::Subscribers::ActiveRecord do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Subscribers::RailsCache do describe Gitlab::Metrics::Subscribers::RailsCache do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::System do describe Gitlab::Metrics::System do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::WebTransaction do describe Gitlab::Metrics::WebTransaction do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics do describe Gitlab::Metrics do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Middleware::BasicHealthCheck do describe Gitlab::Middleware::BasicHealthCheck do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
require 'tempfile' require 'tempfile'
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Middleware::RailsQueueDuration do describe Gitlab::Middleware::RailsQueueDuration do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Middleware::ReadOnly do describe Gitlab::Middleware::ReadOnly do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Middleware::ReleaseEnv do describe Gitlab::Middleware::ReleaseEnv do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::MultiCollectionPaginator do describe Gitlab::MultiCollectionPaginator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ObjectHierarchy do describe Gitlab::ObjectHierarchy do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Octokit::Middleware do describe Gitlab::Octokit::Middleware do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::OmniauthInitializer do describe Gitlab::OmniauthInitializer do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::OptimisticLocking do describe Gitlab::OptimisticLocking do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::OtherMarkup do describe Gitlab::OtherMarkup do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::OtpKeyRotator do describe Gitlab::OtpKeyRotator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PagesClient do describe Gitlab::PagesClient do
......
# coding: utf-8 # coding: utf-8
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PathRegex do describe Gitlab::PathRegex do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PerformanceBar do describe Gitlab::PerformanceBar do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PhabricatorImport::Importer do describe Gitlab::PhabricatorImport::Importer do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PhabricatorImport::UserFinder, :clean_gitlab_redis_cache do describe Gitlab::PhabricatorImport::UserFinder, :clean_gitlab_redis_cache do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PhabricatorImport::WorkerState, :clean_gitlab_redis_shared_state do describe Gitlab::PhabricatorImport::WorkerState, :clean_gitlab_redis_shared_state do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Plugin do describe Gitlab::Plugin do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PollingInterval do describe Gitlab::PollingInterval do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Popen::Runner do describe Gitlab::Popen::Runner do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Popen do describe Gitlab::Popen do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Profiler do describe Gitlab::Profiler do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ProjectAuthorizations do describe Gitlab::ProjectAuthorizations do
......
# coding: utf-8 # coding: utf-8
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ProjectSearchResults do describe Gitlab::ProjectSearchResults do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ProjectTemplate do describe Gitlab::ProjectTemplate do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ProjectTransfer do describe Gitlab::ProjectTransfer do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Prometheus::AdditionalMetricsParser do describe Gitlab::Prometheus::AdditionalMetricsParser do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Prometheus::Queries::AdditionalMetricsDeploymentQuery do describe Gitlab::Prometheus::Queries::AdditionalMetricsDeploymentQuery do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Prometheus::Queries::AdditionalMetricsEnvironmentQuery do describe Gitlab::Prometheus::Queries::AdditionalMetricsEnvironmentQuery do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Prometheus::Queries::DeploymentQuery do describe Gitlab::Prometheus::Queries::DeploymentQuery do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Prometheus::Queries::MatchedMetricQuery do describe Gitlab::Prometheus::Queries::MatchedMetricQuery do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::PrometheusClient do describe Gitlab::PrometheusClient do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QueryLimiting::ActiveSupportSubscriber do describe Gitlab::QueryLimiting::ActiveSupportSubscriber do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QueryLimiting::Middleware do describe Gitlab::QueryLimiting::Middleware do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QueryLimiting::Transaction do describe Gitlab::QueryLimiting::Transaction do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QueryLimiting do describe Gitlab::QueryLimiting do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QuickActions::CommandDefinition do describe Gitlab::QuickActions::CommandDefinition do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QuickActions::Dsl do describe Gitlab::QuickActions::Dsl do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QuickActions::Extractor do describe Gitlab::QuickActions::Extractor do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QuickActions::SpendTimeAndDateSeparator do describe Gitlab::QuickActions::SpendTimeAndDateSeparator do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::QuickActions::SubstitutionDefinition do describe Gitlab::QuickActions::SubstitutionDefinition do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Redis::Cache do describe Gitlab::Redis::Cache do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Redis::Queues do describe Gitlab::Redis::Queues do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Redis::SharedState do describe Gitlab::Redis::SharedState do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Redis::Wrapper do describe Gitlab::Redis::Wrapper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ReferenceCounter do describe Gitlab::ReferenceCounter do
......
# coding: utf-8 # coding: utf-8
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Regex do describe Gitlab::Regex do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ::Gitlab::RepoPath do describe ::Gitlab::RepoPath do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RepositoryCacheAdapter do describe Gitlab::RepositoryCacheAdapter do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RepositoryCache do describe Gitlab::RepositoryCache do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RepositorySetCache, :clean_gitlab_redis_cache do describe Gitlab::RepositorySetCache, :clean_gitlab_redis_cache do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RequestContext do describe Gitlab::RequestContext do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RequestForgeryProtection, :allow_forgery_protection do describe Gitlab::RequestForgeryProtection, :allow_forgery_protection do
......
# frozen_string_literal: true
require 'fast_spec_helper' require 'fast_spec_helper'
describe Gitlab::RequestProfiler::Profile do describe Gitlab::RequestProfiler::Profile do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RequestProfiler do describe Gitlab::RequestProfiler do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::RouteMap do describe Gitlab::RouteMap do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Routing do describe Gitlab::Routing do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Sanitizers::Exif do describe Gitlab::Sanitizers::Exif do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Sanitizers::SVG do describe Gitlab::Sanitizers::SVG do
......
# coding: utf-8 # coding: utf-8
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
...@@ -108,7 +109,7 @@ describe Gitlab::Search::FoundBlob do ...@@ -108,7 +109,7 @@ describe Gitlab::Search::FoundBlob do
end end
context 'with ISO-8859-1' do context 'with ISO-8859-1' do
let(:search_result) { "master:encoding/iso8859.txt\x001\x00\xC4\xFC\nmaster:encoding/iso8859.txt\x002\x00\nmaster:encoding/iso8859.txt\x003\x00foo\n".force_encoding(Encoding::ASCII_8BIT) } let(:search_result) { (+"master:encoding/iso8859.txt\x001\x00\xC4\xFC\nmaster:encoding/iso8859.txt\x002\x00\nmaster:encoding/iso8859.txt\x003\x00foo\n").force_encoding(Encoding::ASCII_8BIT) }
it 'returns results as UTF-8' do it 'returns results as UTF-8' do
expect(subject.filename).to eq('encoding/iso8859.txt') expect(subject.filename).to eq('encoding/iso8859.txt')
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Search::Query do describe Gitlab::Search::Query do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::SearchResults do describe Gitlab::SearchResults do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Sentry do describe Gitlab::Sentry do
......
# frozen_string_literal: true
require 'fast_spec_helper' require 'fast_spec_helper'
describe Gitlab::Serializer::Ci::Variables do describe Gitlab::Serializer::Ci::Variables do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Serializer::Pagination do describe Gitlab::Serializer::Pagination do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::ShardHealthCache, :clean_gitlab_redis_cache do describe Gitlab::ShardHealthCache, :clean_gitlab_redis_cache do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
require 'stringio' require 'stringio'
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Sherlock::Collection do describe Gitlab::Sherlock::Collection do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Sherlock::FileSample do describe Gitlab::Sherlock::FileSample do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Sherlock::LineProfiler do describe Gitlab::Sherlock::LineProfiler do
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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