Commit e392184e authored by Stan Hu's avatar Stan Hu

Merge branch 'frozen-string-lib-gitlab-even-even-more' into 'master'

Enable even more frozen string for lib/gitlab

See merge request gitlab-org/gitlab-ce!23161
parents 8a581d53 7ec8af50
---
title: Enable even more frozen string for lib/gitlab
merge_request:
author: gfyoung
type: performance
# frozen_string_literal: true
module Gitlab
module HookData
class BaseBuilder
......
# frozen_string_literal: true
module Gitlab
module HookData
class IssuableBuilder < BaseBuilder
......
# frozen_string_literal: true
module Gitlab
module HookData
class IssueBuilder < BaseBuilder
......
# frozen_string_literal: true
module Gitlab
module HookData
class MergeRequestBuilder < BaseBuilder
......
# frozen_string_literal: true
module Gitlab
module HookData
class NoteBuilder < BaseBuilder
......
# frozen_string_literal: true
module Gitlab
module HookData
class WikiPageBuilder < BaseBuilder
......
# frozen_string_literal: true
module Gitlab
module I18n
class MetadataEntry
......
# frozen_string_literal: true
module Gitlab
module I18n
class PoLinter
......
# frozen_string_literal: true
module Gitlab
module I18n
class TranslationEntry
......
# frozen_string_literal: true
module Gitlab
module Import
class Logger < ::Gitlab::JsonLogger
......
# frozen_string_literal: true
module Gitlab
module ImportExport
module AfterExportStrategies
......
# frozen_string_literal: true
module Gitlab
module ImportExport
module AfterExportStrategies
......
# frozen_string_literal: true
module Gitlab
module ImportExport
module AfterExportStrategies
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class AfterExportStrategyBuilder
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class AttributeCleaner
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class AttributesFinder
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class AvatarRestorer
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class AvatarSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
module CommandLineUtil
......
# frozen_string_literal: true
module Gitlab
module ImportExport
Error = Class.new(StandardError)
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class FileImporter
......
# frozen_string_literal: true
module Gitlab
module ImportExport
# Given a class, it finds or creates a new object
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class HashUtil
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class Importer
......
# frozen_string_literal: true
module Gitlab
module ImportExport
# Generates a hash that conforms with http://apidock.com/rails/Hash/to_json
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class LfsRestorer
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class LfsSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class MembersMapper
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class MergeRequestParser
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class ProjectTreeRestorer
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class ProjectTreeSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class Reader
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class RelationFactory
......@@ -211,7 +213,7 @@ module Gitlab
def update_note_for_missing_author(author_name)
@relation_hash['note'] = '*Blank note*' if @relation_hash['note'].blank?
@relation_hash['note'] += missing_author_note(@relation_hash['updated_at'], author_name)
@relation_hash['note'] = "#{@relation_hash['note']}#{missing_author_note(@relation_hash['updated_at'], author_name)}"
end
def admin_user?
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class RepoRestorer
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class RepoSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class Saver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class Shared
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class StatisticsRestorer
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class UploadsManager
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class UploadsRestorer < UploadsSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class UploadsSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class VersionChecker
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class VersionSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class WikiRepoSaver < RepoSaver
......
# frozen_string_literal: true
module Gitlab
module ImportExport
class WikiRestorer < RepoRestorer
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
class ConfigMap
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Helm
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
class Namespace
......
# frozen_string_literal: true
module Gitlab
module Kubernetes
module Pod
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class BranchFormatter < BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class Client
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class CommentFormatter < BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class Importer
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class IssuableFormatter < BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class IssueFormatter < IssuableFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class LabelFormatter < BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class MilestoneFormatter < BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class ProjectCreator
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class PullRequestFormatter < IssuableFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class ReleaseFormatter < BaseFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class UserFormatter
......
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class WikiFormatter
......
# frozen_string_literal: true
# Class to parse manifest file and build a list of repositories for import
#
# <manifest>
......
# frozen_string_literal: true
module Gitlab
module ManifestImport
class ProjectCreator
......
# frozen_string_literal: true
module Gitlab
module Metrics
class BackgroundTransaction < Transaction
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Class for calculating the difference between two numeric values.
......
# frozen_string_literal: true
module Gitlab
module Metrics
module InfluxDb
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Module for instrumenting methods.
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Class for tracking timing information about method calls
......
# frozen_string_literal: true
# rubocop:disable Style/ClassVars
module Gitlab
......
# frozen_string_literal: true
module Gitlab
module Metrics
module Methods
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Class for storing details of a single metric (label, value, etc).
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Mocks ::Prometheus::Client::Metric and all derived metrics
......
# frozen_string_literal: true
require 'prometheus/client'
module Gitlab
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Rack middleware for tracking Rails and Grape requests.
......
# frozen_string_literal: true
module Gitlab
module Metrics
class RequestsRackMiddleware
......
# frozen_string_literal: true
require 'logger'
module Gitlab
......
# frozen_string_literal: true
module Gitlab
module Metrics
module Samplers
......
# frozen_string_literal: true
require 'prometheus/client/support/unicorn'
module Gitlab
......
# frozen_string_literal: true
module Gitlab
module Metrics
module Samplers
......
# frozen_string_literal: true
require 'webrick'
require 'prometheus/client/rack/exporter'
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Sidekiq middleware for tracking jobs.
......
# frozen_string_literal: true
module Gitlab
module Metrics
module Subscribers
......
# frozen_string_literal: true
module Gitlab
module Metrics
module Subscribers
......
# frozen_string_literal: true
module Gitlab
module Metrics
module Subscribers
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Module for gathering system/process statistics such as the memory usage.
......
# frozen_string_literal: true
module Gitlab
module Metrics
# Class for storing metrics information of a single transaction.
......
# frozen_string_literal: true
module Gitlab
module Metrics
class WebTransaction < Transaction
......@@ -40,7 +42,7 @@ module Gitlab
# increasing the cardinality of our metrics, we limit the number of
# possible suffixes.
if suffix && ALLOWED_SUFFIXES.include?(suffix)
action += ".#{suffix}"
action = "#{action}.#{suffix}"
end
{ controller: controller.class.name, action: action }
......
# frozen_string_literal: true
# A dumb middleware that returns a Go HTML document if the go-get=1 query string
# is used irrespective if the namespace/project exists
module Gitlab
......
# frozen_string_literal: true
# Gitlab::Middleware::Multipart - a Rack::Multipart replacement
#
# Rack::Multipart leaves behind tempfiles in /tmp and uses valuable Ruby
......
# frozen_string_literal: true
# This Rack middleware is intended to measure the latency between
# gitlab-workhorse forwarding a request to the Rails application and the
# time this middleware is reached.
......
# frozen_string_literal: true
module Gitlab
module Middleware
class ReadOnly
......
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